unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Dmitry Gutov <dmitry@gutov.dev>, Eli Zaretskii <eliz@gnu.org>
Cc: 67687@debbugs.gnu.org, eskinjp@gmail.com
Subject: bug#67687: Feature request: automatic tags management
Date: Sat, 30 Dec 2023 12:31:57 -0800	[thread overview]
Message-ID: <CADwFkm=CPgLxuXOGLgjMX8VAQLi3Nmwe9Vs0yEd-w95Dt4ci4w@mail.gmail.com> (raw)
In-Reply-To: <a116652c-56e7-41a7-8f84-b7c0928bdfce@gutov.dev>

Dmitry Gutov <dmitry@gutov.dev> writes:

> As long as it's in a separate file, it should be easy to publish it to
> ELPA (as "core" package). Which is an option that's nice to have, even
> if not essential. Sometime later, when the features and implementation
> stabilize, we could merge the files, leaving the code in ELPA for older
> emacsen. Or something like that.

That overall plan sounds good to me, thanks.  We'll have to decide on
the details as we go of course, but clearly it makes sense to allow the
feature some breathing room to stabilize.

> This is only necessary for language constructs not supported by etags
> OOtB. Such as our C macros which define Elisp functions and variables.
> These are the same regexps that we have in our Makefile.
>
> So this is a per-project thing, rather than per-language. Most users and
> projects shouldn't need it, or wouldn't need it right away.

Ah, that makes more sense to me now.  Thank you.

Would it be helpful to put that explanation in the .dir-locals.el file
itself?

>>> +;;; Commentary:
>>> +
>>> +;; Simple automatic tags generation with updates on save.
>>> +;;
>>> +;; The goal of this mode is to provide a feature that should be
>>> +;; familiar to the users of certain lightweight programmer's editors,
>>> +;; such as Sublime Text.  Which is "go to definition" with automatic
>>> +;; indexing, added in ST3 (released in 2017).
>>
>> This makes it sound like we're just copying others, when we could be
>> more confident.  Emacs has had the described feature since before 2017.
>> I propose dropping all references to Sublime Text and reducing the above
>> to simply saying:
>
> But... it didn't? Otherwise you wouldn't have called it "long overdue",
> right?

Uhm, yeah, that could have been more clear.  I must have hatched a key
sentence when editing, or something.  Please let me try again.

The proposed text seemed to open up for the misunderstanding that "go to
definition" is a new feature, that Sublime text introduced in 2017 and
Emacs will now get in version 30.1.

I think we should clarify that the new feature is only "automatic
indexing".  Furthermore, doing things for the user in the background is
hardly revolutionary enough that we need to give Sublime text the credit
for the invention, or anything like that.  It's rather mundane these
days, as far as features go.  Users have learned to expect it.

This is what makes the feature long overdue.

Does that make more sense?

> Anyway, I'm not married to the above text, it's just a description of
> how I'm thinking about the problem. But I would invite you and other to
> consider how the ST users take advantage of automatic indexing without
> having to be aware of how information is stored behind the scenes (tag
> files or not), when considering the sections of the manual touching on
> etags-regen-mode.
>
>>      This library provides automatic indexing for Emacs "go to
>>      definition" feature, the `xref-go-forward' command (bound to `M-.'
>>      by default).
>
> Sure.
>
> We could also add some text that would distinguish it from the general
> notion of "automatic indexing", so that the users of Eglot, for example,
> don't consider it necessary to enable this mode. Even though they would
> also want indexing to remain automatic.

Indeed, the possible confusion with eglot could bear some documenting.
Perhaps we should add a new paragraph to the commentary explaining how
this feature will (or will not) interact with Eglot.

>>> +;; At the moment reindexing works off before/after-save-hook, but to
>>> +;; handle more complex changes (e.g. the user switching to another
>>
>> (We usually prefer "for example" to "e.g.".)
>
> No problem.
>
> Though searching across the codebase, the number of hits for these two
> options seems to be about the same (5K vs 4K).

Search for "abbreviations" in (info "(elisp) Documentation Tips").

But when we made that addition, we didn't bother changing all existing
documentation.  IIRC, most people in that discussion preferred a more
gradual approach.





  reply	other threads:[~2023-12-30 20:31 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 11:43 bug#67687: Feature request: automatic tags management Jon Eskin
2023-12-07 15:57 ` Dmitry Gutov
2023-12-07 19:57   ` Jon Eskin
2023-12-10  2:41     ` Dmitry Gutov
2023-12-10 11:38       ` Jon Eskin
2023-12-20 21:11         ` Jon Eskin
2023-12-21  0:24           ` Dmitry Gutov
2023-12-21  7:40             ` Eli Zaretskii
2023-12-21 16:46               ` Dmitry Gutov
2023-12-21 23:37                 ` Dmitry Gutov
2023-12-24  1:43                   ` Dmitry Gutov
2023-12-28  9:30                     ` Eli Zaretskii
2023-12-30  3:05                       ` Dmitry Gutov
2023-12-30  7:33                         ` Eli Zaretskii
2023-12-30 23:43                           ` Dmitry Gutov
2023-12-31  1:02                             ` Stefan Kangas
2023-12-31 23:29                               ` Dmitry Gutov
2024-01-02  0:40                                 ` Stefan Kangas
2024-01-02  1:31                                   ` Dmitry Gutov
2023-12-31  7:07                             ` Eli Zaretskii
2023-12-31 15:21                               ` Dmitry Gutov
2023-12-29 22:29                     ` Stefan Kangas
2023-12-30  1:50                       ` Dmitry Gutov
2023-12-30 20:31                         ` Stefan Kangas [this message]
2023-12-30 22:50                           ` Dmitry Gutov
2023-12-30 23:25                             ` Stefan Kangas
2023-12-30 23:58                               ` Dmitry Gutov
2023-12-31  7:23                                 ` Eli Zaretskii
2023-12-31 15:31                                   ` Dmitry Gutov
2023-12-29 22:17                 ` Stefan Kangas
2023-12-30  1:31                   ` Dmitry Gutov
2023-12-30 20:56                     ` Stefan Kangas
2023-12-30 23:23                       ` Dmitry Gutov
2023-12-31  0:03                         ` Stefan Kangas
2023-12-31  6:34                       ` Eli Zaretskii
2023-12-31  7:22                         ` Stefan Kangas
2023-12-31 15:22                           ` Dmitry Gutov
2023-12-31 15:25                         ` Dmitry Gutov
2023-12-31 16:42                           ` Eli Zaretskii
2023-12-31 17:53                             ` Dmitry Gutov
2023-12-31 19:27                               ` Eli Zaretskii
2024-01-01  1:23                                 ` Dmitry Gutov
2024-01-01 12:07                                   ` Eli Zaretskii
2024-01-01 15:47                                     ` Dmitry Gutov
2024-01-01 16:50                                       ` Eli Zaretskii
2024-01-01 17:23                                         ` Dmitry Gutov
2024-01-01 17:39                                           ` Eli Zaretskii
2024-01-01 18:48                                             ` Dmitry Gutov
2024-01-01 19:25                                               ` Eli Zaretskii
2024-01-02  1:40                                                 ` Dmitry Gutov
2024-01-04  1:56                                                   ` Dmitry Gutov
2024-01-02 10:41                               ` Francesco Potortì
2024-01-02 13:09                                 ` 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='CADwFkm=CPgLxuXOGLgjMX8VAQLi3Nmwe9Vs0yEd-w95Dt4ci4w@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=67687@debbugs.gnu.org \
    --cc=dmitry@gutov.dev \
    --cc=eliz@gnu.org \
    --cc=eskinjp@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).