From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Robert Pluim <rpluim@gmail.com>, emacs-devel@gnu.org
Subject: Re: xref in a narrowed buffer?
Date: Wed, 4 Mar 2020 18:04:50 +0200 [thread overview]
Message-ID: <f7c7f7b9-04fc-7842-0c20-37b612ce6425@yandex.ru> (raw)
In-Reply-To: <jwvwo80unrt.fsf-monnier+emacs@gnu.org>
On 04.03.2020 17:46, Stefan Monnier wrote:
>>> Should 'xref-goto-ref' widen the buffer before attempting to jump to
>>> the definition? Or should 'xref-find-definitions' not show definitions
>>> that are outside the narrowed area?
>>
>> The latter is pretty hard to do, so the former, I guess.
>
> It could also signal a clean error telling the user the destination is
> outside of the narrowed region, so the user can decide whether to widen
> or not (and is aware of the fact that the source of the problem is the
> narrowing).
True. It's also an option.
I don't use narrowing, and don't understand its intended behavior, so
someone else should make the choice on what is the best approach here.
next prev parent reply other threads:[~2020-03-04 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 14:39 xref in a narrowed buffer? Robert Pluim
2020-03-04 15:20 ` Dmitry Gutov
2020-03-04 15:46 ` Stefan Monnier
2020-03-04 16:04 ` Dmitry Gutov [this message]
2020-03-04 16:38 ` Eli Zaretskii
2020-03-04 16:08 ` Robert Pluim
2020-03-04 18:18 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7c7f7b9-04fc-7842-0c20-37b612ce6425@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rpluim@gmail.com \
/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 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).