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

* bug#44001: vc-print-log-setup-buttons leaves point at eob
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Andrii Kolomoiets @ 2020-10-15  6:52 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: 44001

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> 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

Can you please provide receipt to reproduce this?  For me, on Emacs 28:

1. emacs -Q
2. C-x C-f <file-under-git-repo>
3. C-x v l

The point is at the top log entry.





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

* bug#44001: vc-print-log-setup-buttons leaves point at eob
  2020-10-15  6:52 ` Andrii Kolomoiets
@ 2020-10-15  6:57   ` Andrii Kolomoiets
  2020-10-15  8:04     ` Thien-Thi Nguyen
  0 siblings, 1 reply; 6+ messages in thread
From: Andrii Kolomoiets @ 2020-10-15  6:57 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: 44001

Andrii Kolomoiets <andreyk.mad@gmail.com> writes:

> Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>
>> 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
>
> Can you please provide receipt to reproduce this?  For me, on Emacs 28:
>
> 1. emacs -Q
> 2. C-x C-f <file-under-git-repo>
> 3. C-x v l
>
> The point is at the top log entry.

Looks like this was fixed in bug#31764:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31764





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

* bug#44001: vc-print-log-setup-buttons leaves point at eob
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Thien-Thi Nguyen @ 2020-10-15  8:04 UTC (permalink / raw)
  To: Andrii Kolomoiets; +Cc: Thien-Thi Nguyen, 44001

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

() Andrii Kolomoiets <andreyk.mad@gmail.com>
() Thu, 15 Oct 2020 09:57:49 +0300

   Looks like this was fixed in bug#31764:
   https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31764

Indeed, and w/ the same approach i stumbled upon.
Thanks!  I suppose we can close this bug, then.

BTW, for future reference, how did you find this
previous bug report?

-- 
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

* bug#44001: vc-print-log-setup-buttons leaves point at eob
  2020-10-15  8:04     ` Thien-Thi Nguyen
@ 2020-10-15  8:21       ` Robert Pluim
  2020-10-15  8:23       ` Andrii Kolomoiets
  1 sibling, 0 replies; 6+ messages in thread
From: Robert Pluim @ 2020-10-15  8:21 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Andrii Kolomoiets, 44001

>>>>> On Thu, 15 Oct 2020 04:04:46 -0400, Thien-Thi Nguyen <ttn@gnuvola.org> said:

    Thien-Thi> () Andrii Kolomoiets <andreyk.mad@gmail.com>
    Thien-Thi> () Thu, 15 Oct 2020 09:57:49 +0300

    Thien-Thi>    Looks like this was fixed in bug#31764:
    Thien-Thi>    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31764

    Thien-Thi> Indeed, and w/ the same approach i stumbled upon.
    Thien-Thi> Thanks!  I suppose we can close this bug, then.

    Thien-Thi> BTW, for future reference, how did you find this
    Thien-Thi> previous bug report?

I donʼt know about Andrii, but 'git log --grep
vc-print-log-setup-buttons' will do it.

Robert
-- 





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

* bug#44001: vc-print-log-setup-buttons leaves point at eob
  2020-10-15  8:04     ` Thien-Thi Nguyen
  2020-10-15  8:21       ` Robert Pluim
@ 2020-10-15  8:23       ` Andrii Kolomoiets
  1 sibling, 0 replies; 6+ messages in thread
From: Andrii Kolomoiets @ 2020-10-15  8:23 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: 44001

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Andrii Kolomoiets <andreyk.mad@gmail.com>
> () Thu, 15 Oct 2020 09:57:49 +0300
>
>    Looks like this was fixed in bug#31764:
>    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31764
>
> Indeed, and w/ the same approach i stumbled upon.
> Thanks!  I suppose we can close this bug, then.
>
> BTW, for future reference, how did you find this
> previous bug report?

Found call to 'vc-print-log-setup-buttons' in 'vc-print-log-internal' in
vc.el, noticed it's already under 'save-excursion'.
Then 'vc-annotate' (C-x v g) and then
'vc-annotate-show-log-revision-at-line' (l).





^ 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).