[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: systemd @ in filenames not supported by thing-at-point
From: |
Yuri Khan |
Subject: |
Re: systemd @ in filenames not supported by thing-at-point |
Date: |
Sat, 30 Jul 2016 12:48:28 +0600 |
On Sat, Jul 30, 2016 at 8:31 AM, Emanuel Berg <embe8573@student.uu.se> wrote:
> (defvar thing-at-point-file-name-chars "-~/[:alnum:]_.${}#%,:"
> "Characters allowable in filenames.")
>
> (line 241 in /usr/share/emacs/24.4/lisp/thingatpt.el.gz )
>
> Because "@" isn't included, it is considered
> a file name delimiter and the path returned is
> incorrectly /lib/systemd/system/getty - with this:
>
> (setq thing-at-point-file-name-chars "@-~/[:alnum:]_.${}#%,:")
>
> it works as expected.
>
> But I don't know if that will break something else?
User expectations, mostly.
As you surely know, on *nix, every character is valid in a filename,
except for NUL and slash; and every character is valid in a file path,
except for NUL.
However, we expect all kinds of parentheses, brackets and angle
brackets to close around file paths. #include <foo/bar.h>
The @ character, for instance, is used in makefile recipes and Windows
batch files to indicate that a line should not be echoed when it is
executed. The word immediately following the @ is a command, which in
many cases is a file name or path.
I do not know of other instances of @ used as a delimiter next to a file name.