unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44001: vc-print-log-setup-buttons leaves point at eob
@ 2020-10-14 23:55 Thien-Thi Nguyen
  2020-10-15  6:52 ` Andrii Kolomoiets
  0 siblings, 1 reply; 6+ messages in thread
From: Thien-Thi Nguyen @ 2020-10-14 23:55 UTC (permalink / raw)
  To: 44001

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 219 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-15  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-14 23:55 bug#44001: vc-print-log-setup-buttons leaves point at eob Thien-Thi Nguyen
2020-10-15  6:52 ` Andrii Kolomoiets
2020-10-15  6:57   ` Andrii Kolomoiets
2020-10-15  8:04     ` Thien-Thi Nguyen
2020-10-15  8:21       ` Robert Pluim
2020-10-15  8:23       ` Andrii Kolomoiets

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).