emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorth


From: Gregory Heytings
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Thu, 30 Sep 2021 11:46:00 +0000


A simple example: suppose you want to check which ELPA package activates tab-bar-mode. That's easy to do with "grep -R tab-bar-mode" in a clone of the ELPA repository. With symbol prefix renaming, a package author might decide to add ("tb-" . "tab-bar-") in the shorthands of the package, and "grep -R tab-bar-mode" will not show anything. Likewise for tag systems, the symbols that are recorded will possibly be different in each package, and a search for tab-bar-mode will not return occurrences of tb-mode.

I don't think this is a problem. Grep comes the world of Unix and its mantras. But Lisp REPLs come from another world.

Using grep and tag systems to reason about a Lisp program is like eating soup with a fork. You can do it


You could do it for Emacs 1 up to and including Emacs 28.


but it's the wrong tool.


And what is/what are the "right" tool(s) for the above use case?

I agree with you on one point: in some cases grep/tags are not the best tools, because they will not display all actual matches. This is not only true for Lisp, it's also true for plain C, in which tokens can be the result of preprocessing. But they are (much used) tools on programmer's workbenches, and if something can be done to avoid breaking them, or at least to make it easier to adapt them to the change, that would be better.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]