all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23679: 25.0.94; vc-region-history does not work correctly when narrowed
@ 2016-06-02  2:44 Ivan Andrus
  2017-12-20 20:18 ` Charles A. Roelli
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Andrus @ 2016-06-02  2:44 UTC (permalink / raw
  To: 23679

1. Emacs -Q
2. Open a file with git history, say something in the Emacs repository.
3. Narrow to a region not at the beginning of the file
4. Select a region
5. M-x vc-region-history
6. Notice that the history shown is for the beginning of the file

This is because vc-region-history uses line-number-at-pos which returns
the line number in the narrowed portion of the buffer.

We could either put a save-restriction/widen pair in vc-region-history
or create a function (say widened-line-number-at-pos or
file-line-number-at-pos), which would be generally useful IMO.
However, that would lead to two calles to save-restriction and widen
instead of just one.  Given the recent discussion on emacs-devel about
widening for programs I felt I should get some feed back on the
preferred method before pushing a fix.

-Ivan






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

end of thread, other threads:[~2017-12-20 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02  2:44 bug#23679: 25.0.94; vc-region-history does not work correctly when narrowed Ivan Andrus
2017-12-20 20:18 ` Charles A. Roelli

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.