]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Remove beacon.el
authorEshel Yaron <eshel@areionsec.com>
Sun, 15 May 2022 05:28:45 +0000 (08:28 +0300)
committerEshel Yaron <eshel@areionsec.com>
Sun, 15 May 2022 05:28:45 +0000 (08:28 +0300)
.emacs.d/esy.org

index fc0885aba04e25fcf237ebbc14a8041d72849354..98b161780226bb502e16e6947343853ac0b5c01b 100644 (file)
@@ -128,7 +128,7 @@ For further information about Elisp headers, see [[info:elisp#Library
   (setq package-selected-packages
         '(academic-phrases avy ace-window alert
           all-the-icons all-the-icons-completion anzu
-          auctex-latexmk beacon benchmark-init browse-at-remote
+          auctex-latexmk benchmark-init browse-at-remote
           browse-kill-ring cape corfu command-log-mode dabbrev define-word
           diff-hl diminish disable-mouse dockerfile-mode dtache elfeed
           emacsql-sqlite3 embark-consult erlang exec-path-from-shell
@@ -254,20 +254,17 @@ For a list of available frame parameters, see [[info:elisp#Frame Parameters][eli
   (defun esy/setup-display ()
     "Setup display-related customizations."
     (require 'diff-hl)
-    (require 'beacon)
     (require 'paren)
     (require 'lin)
     (require 'which-key)
     (require 'whitespace-cleanup-mode)
-    (setq beacon-color "magenta"
-          show-paren-context-when-offscreen t)
+    (setq show-paren-context-when-offscreen t)
     (add-to-list 'lin-mode-hooks 'package-menu-mode-hook)
     (add-to-list 'lin-mode-hooks 'gnus-summary-mode-hook)
     (add-to-list 'lin-mode-hooks 'gnus-group-mode-hook)
     (add-to-list 'lin-mode-hooks 'gnus-server-mode-hook)
     (global-diff-hl-mode)
     (lin-global-mode 1)
-    (beacon-mode 1)
     (transient-mark-mode)
     (show-paren-mode))
 
@@ -371,7 +368,7 @@ refiling directly into deeper headings as well.
   (defun esy/org-maybe-prompt-custom-id ()
     "Prompt for CUSTOM_ID if not set for the entry at POINT."
     (unless (org-entry-get (point) "CUSTOM_ID")
-      (beacon-blink)
+      (pulse-momentary-highlight-one-line)
       (org-cycle)
       (call-interactively #'esy/org-fill-custom-id)
       (org-global-cycle 1)))
@@ -1306,7 +1303,7 @@ Add the timezones of places of interest to the list of clocks shown by
           (widen)
           (goto-char pos))
         (recenter)
-        (beacon-blink))))
+        (pulse-momentary-highlight-one-line))))
 
   (defun esy/buttons (&optional buffer)
     "Return an alist of buttons in BUFFER."
@@ -1318,9 +1315,7 @@ Add the timezones of places of interest to the list of clocks shown by
             (while button
               (setq buttons
                     (cons `(,(concat (truncate-string-to-width
-                                      (string-replace "\n"
-                                                      " "
-                                                      (button-label button))
+                                      (esy/inline (button-label button))
                                       64 nil ?\s t)
                                      " "
                                      (propertize (format "[%d]" index) 'invisible t))
@@ -1331,6 +1326,11 @@ Add the timezones of places of interest to the list of clocks shown by
               (setq button (next-button (button-end button))))
             (reverse buttons))))))
 
+  (defun esy/inline (str)
+    "Inline STR."
+    (when str
+      (string-replace "\n" " " str)))
+
   (defun esy/consult-push-button ()
     "Choose a button in the current buffer with `consult--read' and push it."
     (interactive)
@@ -1353,9 +1353,12 @@ Add the timezones of places of interest to the list of clocks shown by
                                                   (assoc key table))))
                                         (type (button-type button))
                                         (action (button-get button 'action)))
-                                   (if type
-                                       (format "%32S #'%S" type action)
-                                     (when action (format "#'%S" action))))))
+                                   (esy/inline
+                                    (if type
+                                        (format "%32S #'%S"
+                                                type
+                                                action)
+                                      (when action (format "#'%S" action)))))))
                              :sort nil)))
         (user-error "No buttons found in current buffer"))))