unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Omar Antolín Camarena" <omar.antolin@gmail.com>
Cc: 52441@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	[thread overview]
Message-ID: <87r1aiflaa.fsf@gnus.org> (raw)
In-Reply-To: <87v8zupw3e.fsf@matem.unam.mx> ("Omar Antolín Camarena"'s message of "Sat, 11 Dec 2021 17:20:37 -0600")

"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	other threads:[~2021-12-12  5:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 23:20 bug#52441: 28.0.50; ffap-file-at-point reports a keyword symbol as the current directory Omar Antolín Camarena
2021-12-12  5:24 ` Lars Ingebrigtsen [this message]
2022-01-14  9:30   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1aiflaa.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=52441@debbugs.gnu.org \
    --cc=omar.antolin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).