From ff3582500ac6ec5551c964e6f1a2365ae0910853 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 15 May 2022 08:28:45 +0300 Subject: [PATCH] Remove beacon.el --- .emacs.d/esy.org | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.emacs.d/esy.org b/.emacs.d/esy.org index fc0885a..98b1617 100644 --- a/.emacs.d/esy.org +++ b/.emacs.d/esy.org @@ -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")))) -- 2.39.2