GNU bug report logs - #52441
28.0.50; ffap-file-at-point reports a keyword symbol as the current directory

Previous Next

Package: emacs;

Reported by: "Omar Antolín Camarena" <omar.antolin <at> gmail.com>

Date: Sat, 11 Dec 2021 23:21:01 UTC

Severity: normal

Tags: moreinfo

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Omar Antolín Camarena <omar.antolin <at> gmail.com>
Cc: 52441 <at> debbugs.gnu.org
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
"Omar Antolín Camarena" <omar.antolin <at> 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




This bug report was last modified 3 years and 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.