all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Andrus <darthandrus@gmail.com>
To: 23679@debbugs.gnu.org
Subject: bug#23679: 25.0.94; vc-region-history does not work correctly when narrowed
Date: Wed, 1 Jun 2016 20:44:03 -0600	[thread overview]
Message-ID: <2DC550A0-0BEB-4BEB-88BD-F8C0F1606069@gmail.com> (raw)

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






             reply	other threads:[~2016-06-02  2:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02  2:44 Ivan Andrus [this message]
2017-12-20 20:18 ` bug#23679: 25.0.94; vc-region-history does not work correctly when narrowed Charles A. Roelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2DC550A0-0BEB-4BEB-88BD-F8C0F1606069@gmail.com \
    --to=darthandrus@gmail.com \
    --cc=23679@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.