From: phs <phs@lsv.ens-cachan.fr>
To: 21167@debbugs.gnu.org
Subject: bug#21167: 24.5; tags-search should ignore buffer restriction
Date: Fri, 31 Jul 2015 11:43:39 +0200 [thread overview]
Message-ID: <55BB434B.7020004@lsv.ens-cachan.fr> (raw)
Description: tags-search when going through all files listed in the
current tags table, tags-search searches inside existing buffers for
files that are currently visited (this is where the latest version can
be found).
But when the visiting buffer has been restricted by a narrow-to-region,
tags-search will not look outside the narrowed-to scope.
I call this a bug. E.g., it can cause a global renaming of variables
miss some occurrences. It seems that a minimal fix is for tags-search to
warn the user that the buffer has been narrowed and offer to widen for
the search (and maybe reinstall the restriction after the search???).
I looked at the source code. It appears that the problem is located
within function next-file (in progmodes/etags.el). When it is found that
there already is a buffer visiting the file to be searched for tags,
next-file just uses it without checking for restrictions.
BTW, I don't understand why next-file passes the novisit flag to find-file?
--
Philippe SCHNOEBELEN, www.lsv.ens-cachan.fr/~phs
LSV, CNRS UMR 8643 & ENS de Cachan Tel: (+33/0) 147 407 530
"Algebraic symbols are used when you do not know what you are talking about"
next reply other threads:[~2015-07-31 9:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 9:43 phs [this message]
2015-08-01 11:43 ` bug#21167: 24.5; tags-search should ignore buffer restriction 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=55BB434B.7020004@lsv.ens-cachan.fr \
--to=phs@lsv.ens-cachan.fr \
--cc=21167@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 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).