bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#52441: 28.0.50; ffap-file-at-point reports a keyword symbol as the c


From: Lars Ingebrigtsen
Subject: bug#52441: 28.0.50; ffap-file-at-point reports a keyword symbol as the current directory
Date: Sun, 12 Dec 2021 06:24:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

"Omar Antolín Camarena" <omar.antolin@gmail.com> writes:

> If you place point on the colon of any symbol, such as :foo and evaluate
> the expression (ffap-file-at-point) the result is the value of
> default-directory. This seems wrong, probably nil would be a better
> answer.  If you put point on any other character of the symbol,
> (ffap-file-at-point) does indeed return nil.

It's interpreted as a path.  I.e., with

/usr/bin:/bin

and point over the first bit, it returns "/usr/bin".  And empty
strings are valid directories in paths, and means "the current
directory".

So what it's doing is consistent, but perhaps surprising.  We could
change it to disregard the path interpretation if the string starts with
":", because that will be correct in the vast majority of the cases.

It more DWIM, but the ffap functions are already pretty DWIM, so I'm in
favour.  Anybody else got an opinion?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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