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: Adam Porter
Subject: Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)
Date: Thu, 30 Sep 2021 08:18:33 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Joost Kremers <joostkremers@fastmail.fm> writes:

> As Gregory points out, there is a package that does this already. It actually
> has another issue, which is that indentation is sometimes wrong. If the second
> argument of a function is on a separate line, it's indented to align with the
> first argument. This position depends on the length of the prefix of the
> function name:
>
> ```
> (somelongprefix-do-something arg1
>                              arg2)
> ```
>
> The nameless package can align `arg2` so that it matches up with `arg1`, but
> unlike the shortening of the prefix, that indentation is saved to the file.
> Not dramatic, but it can occasionally be annoying.

FWIW, this is a dramatically annoying problem that has prevented me from
using Nameless.  :)  Either the code is indented incorrectly while I'm
editing it with Nameless activated, or it's indented incorrectly in the
saved file.  And having incorrect indentation is more annoying than
longer symbols, for me.

Since I usually use aggressive-indent-mode for my Elisp projects, I once
tried to use hooks to automatically reindent a file with full symbol
names before saving, and restore the abbreviated view and indentation
afterward, but I couldn't make it work smoothly (IIRC, buffers always
indicated that they were modified after having saved them and
reactivated the mode, which was an even bigger problem for usability).

If this issue could be solved, it could be as Phil said: user-local
symbol abbreviations that are transparent to everything else.




reply via email to

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