From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: mctags
Date: Fri, 13 Oct 2017 09:42:32 -0400 [thread overview]
Message-ID: <jwvbmlbxjlv.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: CAAE-R+8a_mnx_zYFQDFdkj30VLz5i4Fv85ZyJ+sL6zUvQW7UTw@mail.gmail.com
> I've been using xref for some time. As I can see, it just gives your
> the list of matches in a buffer. It can't filter further with pattern
> or negative pattern or combination of patterns.
We introduced xref to try and provide a uniform UI to all the various
ways to get etags-like functionality. So we want to move *away* from
UIs specific to a particular etags-like tool.
So if you found xref insufficient, instead of a new package I'd much
rather see either xref extended to cover your needs (or its etags
backend extended if the missing functionality is in that backend, or
a new xref backend if extending the current backend proves
impractical).
> For example, I can filter candidates in mctags with
> "keyword1\|keyword2 !keyword3" (matching either "keyword1" or
> "keyword2" but not keyword3)
As Eli mentioned when looking for definitions, in most cases this
sophistication should not be needed, but I'm sure there can be
circumstances where it can make sense, and indeed it can make a lot of
sense when looking for references (rather than definitions), so it would
make sense to add such a filtering feature to xref.
>>> - the tags file is automatically created in current project.
>> Yes, but AFAICT, the package uses a somewhat naïve way of generating
>> TAGS, in effect passing all the non-trivial file names to etags. Some
> Good question. For tags creation, mctags now focus on out of box
> userexperience (For example, by default, `*.o`, `*.elc` are ignored`).
Auto-creation is good indeed (personally I'd favor including only the
files which are version controlled, so as to reuse the .<foo>ignore
info already setup by the user instead of hard coding things like *.o).
I think it'd be good to add to etags.el the ability to auto-create TAGS file.
> Please note mctags RESPECTS the existing tags file created by other
> solutions. mctags will NOT override existing TAGS created by other
> programs (Makefile, for example) without user's confirmation.
The problem here is what happens if you use mctags *before* running
"make tags", in which case mctags will not know that it should respect
the (not-yet) existing tags file.
So I think the better answer is to let the user teach etags.el how to
create the TAGS file in such special cases (i.e. it can have a default
system, based on *.o thingies or based on VCS data, but that can be
overridden on a per-project basis, e.g. via .dir-locals.el).
> Grep is called if and only if mctags-find-tag fails. It's a useful
> feature when TAGS is not updated yet.
Such a feature should fit into xref as well.
> Some people might preferring TAGS auto-updating instead of manually
> running ctags from time to time.
Agreed. Adding that functionality to etags.el would be nice (obviously
optional as well, since again it might depend on how we build the TAGS
file and things like that).
Stefan
next prev parent reply other threads:[~2017-10-13 13:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 11:05 [ELPA] New package: mctags Chen Bin
2017-10-12 12:11 ` Eli Zaretskii
2017-10-12 13:24 ` chen bin
2017-10-12 16:13 ` Eli Zaretskii
2017-10-13 1:39 ` chen bin
2017-10-13 8:47 ` Eli Zaretskii
2017-10-13 12:24 ` chen bin
2017-10-13 12:33 ` Dmitry Gutov
[not found] ` <CAAE-R+-Xxm3x5_u9jMO243SqfwaYfQs6XC=p1T0XQaAeFgy+dg@mail.gmail.com>
2017-10-14 0:52 ` Fwd: " chen bin
2017-10-13 13:42 ` Stefan Monnier [this message]
2017-10-21 19:59 ` Tom Tromey
2017-10-21 20:43 ` Stefan Monnier
2017-10-25 15:11 ` Tom Tromey
2017-11-12 3:19 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2017-10-07 1:39 Chen Bin
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=jwvbmlbxjlv.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@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).