GNU bug report logs - #44001
vc-print-log-setup-buttons leaves point at eob

Previous Next

Package: emacs;

Reported by: Thien-Thi Nguyen <ttn <at> gnuvola.org>

Date: Wed, 14 Oct 2020 23:59:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 31764

Found in version 26.1

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thien-Thi Nguyen <ttn <at> gnuvola.org>
To: 44001 <at> debbugs.gnu.org
Subject: bug#44001: vc-print-log-setup-buttons leaves point at eob
Date: Wed, 14 Oct 2020 19:55:25 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 213 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.