From 6e17fcc8b793684eaf4b4d894c93e070cd575ee1 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 20 Mar 2021 15:58:46 +0000 Subject: wee clean ups --- counsel.org | 10 ++++++++-- init.org | 22 ++++++++++++---------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/counsel.org b/counsel.org index 9bf0892..10268be 100644 --- a/counsel.org +++ b/counsel.org @@ -206,9 +206,15 @@ (interactive "s") (kill-new x)) + (defun jao-cmap-url (url) + "Browse URL, externally if we're already in emacs-w3m" + (if (derived-mode-p 'w3m-mode) + (jao-browse-with-external-browser url) + (browse-url url))) + + (define-key cmap-url-map [return] #'jao-cmap-url) (define-key cmap-url-map "f" #'browse-url-firefox) (define-key cmap-url-map "w" #'jao-cmap-kill) - (define-key cmap-url-map [return] #'browse-url) (defun jao-cmap-target-video-url () (when-let (url (jao-cmap-target-w3m-url)) @@ -218,7 +224,7 @@ (cmap-define-keymap jao-cmap-video-url-map "Actions on URLs pointing to remote video streams." ("v" . jao-cmap-vlc) - ("m" . jao-cmap-mpv)) + ([return] . jao-cmap-mpv)) (add-to-list 'cmap-targets #'jao-cmap-target-w3m-url) (add-to-list 'cmap-targets #'jao-cmap-target-video-url) diff --git a/init.org b/init.org index 4d94c50..1477225 100644 --- a/init.org +++ b/init.org @@ -347,10 +347,11 @@ discussion. #+begin_src emacs-lisp (defun jao--set-fontsets (frame) - ;; (set-fontset-font t 64257 "Quivira") - ;; (set-fontset-font t 'egyptian "Noto Sans Egyptian Hieroglyphs") - ;; (set-fontset-font t 'hangul "NanumGothicCoding") + (set-fontset-font t 64257 "Quivira") + (set-fontset-font t 'egyptian "Noto Sans Egyptian Hieroglyphs") + (set-fontset-font t 'hangul "NanumGothicCoding") (set-fontset-font t 'unicode (face-attribute 'default :family)) + (set-fontset-font t 'unicode-bmp (face-attribute 'default :family)) (set-fontset-font t 'symbol "Symbola-10") (set-fontset-font t 'greek "GFS Didot") (set-fontset-font t 'mathematical "FreeSerif") @@ -739,7 +740,9 @@ (defun jao-tracking--clean-slack (s) (let ((s (replace-regexp-in-string - "^\\*Slack - .*? : \\(mpdm-\\)?\\([^ ]+\\)\\( \\(T\\)\\)?.*" "#\\2\\4" s))) + "^\\*Slack - .*? : \\(mpdm-\\)?\\([^ ]+\\)\\( \\(T\\)\\)?.*" + "#\\2\\4" + s))) (replace-regexp-in-string "^[^a-zA-Z#]+" "#" s))) (defun jao-tracking-shorten-aggressively (lst tail-count) @@ -4083,7 +4086,6 @@ Access to spotify uses packages tangled from [[./lib/media/espotify.org][espotify.org]], which offers functionality tailored to the completion engines at hand: #+begin_src emacs-lisp - ;; (jao-maybe-tangle "lib/media/espotify") (jao-load-path "espotify") (use-package espotify :demand t) @@ -4105,11 +4107,11 @@ '(spotify-search-item . spotify-item-keymap))) (when (eq 'counsel jao-completion-engine) - (require 'espotify-counsel) - (defalias 'jao-spotify-album #'espotify-counsel-album) - (defalias 'jao-spotify-track #'espotify-counsel-track) - (defalias 'jao-spotify-artist #'espotify-counsel-artist) - (defalias 'jao-spotify-playlist #'espotify-counsel-playlist)) + (require 'ivy-spotify) + (defalias 'jao-spotify-album #'ivy-spotify-album) + (defalias 'jao-spotify-track #'ivy-spotify-track) + (defalias 'jao-spotify-artist #'ivy-spotify-artist) + (defalias 'jao-spotify-playlist #'ivy-spotify-playlist)) #+end_src *** mpdel #+BEGIN_SRC emacs-lisp -- cgit v1.2.3