bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44001: vc-print-log-setup-buttons leaves point at eob


From: Thien-Thi Nguyen
Subject: bug#44001: vc-print-log-setup-buttons leaves point at eob
Date: Wed, 14 Oct 2020 19:55:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

I have the following in my ~/.emacs flow:

;; 2020-02-01
;;
;; As of Emacs 26 (or thereabouts), ‘C-x v l’ for files w/
;; "fewer" commits, leaves point at the end of the buffer,
;; whereas it used to leave it at the beginning, or rather on
;; the "selected" commit entry, which typically was the first --
;; same result after all.
;;
;; The culprit seems to be the buttons for extending the commit
;; range, drawn at the end of the buffer by
;; ‘vc-print-log-setup-buttons’.  This advice fixes things for
;; now.  The true fix will be to upstream this, either directly
;; into the function itself, or into its caller.  Probably
;; better to do it in the caller.
;;
;; FIXME: Upstream the fix!
;;
(advice-add 'vc-print-log-setup-buttons :around
            (lambda (orig-fun &rest args)
              "Do ‘save-excursion’ around the original function."
              (save-excursion
                (apply orig-fun args))))

I know advice is not the right way to do it, but am writing to
ask if this approach is okay.  (If so, i can work up a patch.)

-- 
Thien-Thi Nguyen -----------------------------------------------
 (defun responsep (query)               ; (2020) Software Libero
   (pcase (context query)               ;       = Dissenso Etico
     (`(technical ,ml) (correctp ml))
     ...))                              748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]