GNU bug report logs -
#47566
28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 10 Apr 2021 04:40:49 +0300
with message-id <7f1b570f-ea1b-5524-59fa-83bb5eaa9abd <at> yandex.ru>
and subject line Re: bug#47566: 28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'
has caused the debbugs.gnu.org bug report #47566,
regarding 28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
47566: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47566
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep'.
Commentary in `diff-hl' says
;; `diff-hl-mode' highlights uncommitted changes on the side of the
;; window (using the fringe, by default), allows you to jump between
;; the hunks and revert them selectively.
;; Provided commands:
;;
;; `diff-hl-diff-goto-hunk' C-x v =
;; `diff-hl-revert-hunk' C-x v n
;; `diff-hl-previous-hunk' C-x v [
;; `diff-hl-next-hunk' C-x v ]
;;
;; The mode takes advantage of `smartrep' if it is installed.
FWIW, `smartrep' is not part of GNU Emacs or GNU ELPA but available
elsewhere. (I install it via MELPA)
Now, that `repeat-mode' is part of GNU Emacs, I think this dependency
on `smartrep' can be removed.
FWIW, this is what I have in my `.emacs'.
(progn
(defvar diff-hl--repeat-map
(let
((map
(make-sparse-keymap)))
map))
(message "Installed %s" 'diff-hl--repeat-map)
(cl-loop for
(cmd . key)
in
'((diff-hl-diff-goto-hunk . "=")
(diff-hl-revert-hunk . "n")
(diff-hl-previous-hunk . "[")
(diff-hl-next-hunk . "]"))
do
(define-key diff-hl--repeat-map key cmd)
(put cmd 'repeat-map 'diff-hl--repeat-map)))
----------------
In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
of 2021-03-20 built on debian
Repository revision: 31544bc908d35bff513450bc4bea1d0283a7ddb0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: Debian GNU/Linux bullseye/sid
[Message part 3 (message/rfc822, inline)]
On 08.04.2021 21:57, Juri Linkov wrote:
> Thanks for the detailed test case. Now it's fixed in 580c4c6510.
Thanks! repeat-mode is looking good now (*).
I've added integration for it to diff-hl master, and with that we can
close this issue.
Thanks all.
(*) Though the first impression, in comparison, was that it is too
chatty. The hints are definitely helpful for discovery at first, though.
Maybe something like this would be an improvement? Experimental code
warning.
diff --git a/lisp/repeat.el b/lisp/repeat.el
index b3c58f2f81..e704e4da56 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -404,7 +404,7 @@ repeat-post-hook
(key-description repeat-exit-key))
""))))
(if (current-message)
- (message "%s [%s]" (current-message) mess)
+ (message #("%s [%s]" 3 7 (face deemphasized))
(current-message) mess)
(message mess))))
;; Adding an exit key
This bug report was last modified 3 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.