GNU bug report logs - #28870
25.3; find-file-at-point with spaces in path

Previous Next

Package: emacs;

Reported by: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>

Date: Mon, 16 Oct 2017 21:30:02 UTC

Severity: wishlist

Found in version 25.3

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 28870 in the body.
You can then email your comments to 28870 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Mon, 16 Oct 2017 21:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 16 Oct 2017 21:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; find-file-at-point with spaces in path
Date: Mon, 16 Oct 2017 21:35:58 +0200
Dear Emacs maintainers,

find-file-at-point does not work correctly if there are spaces in the 
path, but also exists in emacs 26.0.90.1 to reproduce:

1) create the file "~/new folder/New Folder/New Empty File"
2) emacs -q
3) go to *scratch* buffer
4) put the following in the scratch buffer:

"~/new folder/New Folder/New Empty File"
".emacs.d/init.el"

5) place point on each and run `find-file-at-point`

Observed bevior: the second line works fine, the first line does not
complete correctly, see also here:

https://github.com/syl20bnr/spacemacs/issues/9743

and here

https://stackoverflow.com/questions/46661120/emacs-find-file-at-point-how-to-escape-spaces-in-filepath 






In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2017-09-13 built on laaja
Repository revision: bd299e7629b76c6d4f053dd9c8fb94987f63b460
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Ubuntu 16.04.3 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
value of $LC_MONETARY: en_US.UTF-8
value of $LC_NUMERIC: en_US.UTF-8
value of $LC_TIME: en_US.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS:
locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
diff-auto-refine-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list... [2 times]
Quit
<f1> ESC is undefined
Quit
M-RET is undefined
Making completion list...
You can run the command ‘find-file-at-point’ with M-x f-fi-a RET
Making completion list...
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr vc-git diff-mode easy-mmode ffap thingatpt
url-parse auth-source cl-seq eieio byte-opt bytecomp byte-compile
cl-extra cconv eieio-core cl-macs gv url-vars emacsbug message dired
format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns
help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils
time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 112958 9448)
(symbols 48 22095 0)
(miscs 40 1587 143)
(strings 32 22122 3918)
(string-bytes 1 696723)
(vectors 16 15902)
(vector-slots 8 490873 6159)
(floats 8 204 246)
(intervals 56 507 4)
(buffers 976 22)
(heap 1024 39184 1509))

-- 
Guido Kraemer
Max Planck Institute for Biogeochemistry Jena
Department for Biogeochemical Integration
Hans-Knöll-Str. 10
07745 Jena
Germany

phone: +49 3641 576293
e-mail: gkraemer <at> bgc-jena.mpg.de





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Tue, 17 Oct 2017 16:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
Cc: 28870 <at> debbugs.gnu.org
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Tue, 17 Oct 2017 19:43:26 +0300
tags 28870 wishlist
thanks

> From: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
> Date: Mon, 16 Oct 2017 21:35:58 +0200
> 
> find-file-at-point does not work correctly if there are spaces in the 
> path, but also exists in emacs 26.0.90.1 to reproduce:
> 
> 1) create the file "~/new folder/New Folder/New Empty File"
> 2) emacs -q
> 3) go to *scratch* buffer
> 4) put the following in the scratch buffer:
> 
> "~/new folder/New Folder/New Empty File"
> ".emacs.d/init.el"
> 
> 5) place point on each and run `find-file-at-point`
> 
> Observed bevior: the second line works fine, the first line does not
> complete correctly, see also here:

find-file-at-point doesn't currently support file names with spaces,
it's a missing feature.  Patches to add that are welcome.

FWIW, I think if such a feature is added, it should support several
kinds of quoting: `..', '..', "..", ‘..’, etc., because we are talking
about free text, where such file names could be quoted in many ways.

Thanks.




Severity set to 'wishlist' from 'minor' Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 17 Oct 2017 16:54:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Tue, 17 Oct 2017 18:46:02 GMT) Full text and rfc822 format available.

Message #13 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
Cc: 28870 <at> debbugs.gnu.org
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Tue, 17 Oct 2017 21:44:50 +0300
[Please use Reply-all so that this discussion gets recorded by the
bug-tracker.]

> From: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
> Date: Tue, 17 Oct 2017 19:11:16 +0200
> 
> It should probably support escaped spaces, too:
> 
> ~/new\ folder/New\ Folder/New\ Empty\ File

I'm not sure, which is why I omitted this variant.  We are taking
about free text, where such quoting is very rare.  OTOH, this will get
is in trouble with Windows file names that use backslashes.

But if someone cracks that nut without hurting anything, why not?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Thu, 07 Jan 2021 16:17:02 GMT) Full text and rfc822 format available.

Message #16 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>, 28870 <at> debbugs.gnu.org
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Thu, 07 Jan 2021 17:16:21 +0100
Hello 

While working on a cheap solution for my own nuisances on Windows I
found that for the upcoming Gnu Emacs-28 setting

(setq ffap-file-name-with-spaces 1)

is working quite fine!  FYI: ffap is checking if the file or path
exists.  So ffap-string-at-point might work for test strings but then
ffap is more reluctant... ;-)

     Dieter

Eli Zaretskii <eliz <at> gnu.org> writes:

> tags 28870 wishlist
> thanks
>
>> From: Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
>> Date: Mon, 16 Oct 2017 21:35:58 +0200
>> 
>> find-file-at-point does not work correctly if there are spaces in the 
>> path, but also exists in emacs 26.0.90.1 to reproduce:
>> 
>> 1) create the file "~/new folder/New Folder/New Empty File"
>> 2) emacs -q
>> 3) go to *scratch* buffer
>> 4) put the following in the scratch buffer:
>> 
>> "~/new folder/New Folder/New Empty File"
>> ".emacs.d/init.el"
>> 
>> 5) place point on each and run `find-file-at-point`
>> 
>> Observed bevior: the second line works fine, the first line does not
>> complete correctly, see also here:
>
> find-file-at-point doesn't currently support file names with spaces,
> it's a missing feature.  Patches to add that are welcome.
>
> FWIW, I think if such a feature is added, it should support several
> kinds of quoting: `..', '..', "..", ‘..’, etc., because we are talking
> about free text, where such file names could be quoted in many ways.
>
> Thanks.
>
>
>
>

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Fri, 03 Sep 2021 07:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 28870 <at> debbugs.gnu.org,
 Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Fri, 03 Sep 2021 09:18:50 +0200
"H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de> writes:

> While working on a cheap solution for my own nuisances on Windows I
> found that for the upcoming Gnu Emacs-28 setting
>
> (setq ffap-file-name-with-spaces 1)
>
> is working quite fine!  FYI: ffap is checking if the file or path
> exists.  So ffap-string-at-point might work for test strings but then
> ffap is more reluctant... ;-)

So it seems like this has been fixed now (with that setting), so I'm
closing this bug report.

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




bug marked as fixed in version 28.1, send any further explanations to 28870 <at> debbugs.gnu.org and Guido Kraemer <gkraemer <at> bgc-jena.mpg.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 03 Sep 2021 07:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Fri, 03 Sep 2021 16:23:02 GMT) Full text and rfc822 format available.

Message #24 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 28870 <at> debbugs.gnu.org,
 Guido Kraemer <gkraemer <at> bgc-jena.mpg.de>
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Fri, 03 Sep 2021 18:22:36 +0200
From Emacs master: In the NEWS file:
---
*** New variable 'ffap-file-name-with-spaces'.
If non-nil, 'find-file-at-point' and friends will try to guess more
expansively to identify a file name with spaces. 

  DieterAm 03.09.2021 09:18 schrieb Lars Ingebrigtsen <larsi <at> gnus.org>:
>
> "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de> writes: 
>
> > While working on a cheap solution for my own nuisances on Windows I 
> > found that for the upcoming Gnu Emacs-28 setting 
> > 
> > (setq ffap-file-name-with-spaces 1) 
> > 
> > is working quite fine!  FYI: ffap is checking if the file or path 
> > exists.  So ffap-string-at-point might work for test strings but then 
> > ffap is more reluctant... ;-) 
>
> So it seems like this has been fixed now (with that setting), so I'm 
> closing this bug report. 
>
> -- 
> (domestic pets only, the antidote for overdose, milk.) 
>    bloggy blog: http://lars.ingebrigtsen.no 

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 02 Oct 2021 11:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 04 Oct 2021 09:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Mon, 04 Oct 2021 12:53:02 GMT) Full text and rfc822 format available.

Message #31 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: dieter <at> duenenhof-wilhelm.de, stefan <at> marxist.se, gkraemer <at> bgc-jena.mpg.de,
 28870 <at> debbugs.gnu.org
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Mon, 04 Oct 2021 15:51:57 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  28870 <at> debbugs.gnu.org,  Guido Kraemer
>  <gkraemer <at> bgc-jena.mpg.de>, Stefan Kangas <stefan <at> marxist.se>
> Date: Mon, 04 Oct 2021 11:10:47 +0200
> 
> "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de> writes:
> 
> > At least, on Windows the problem seems only partially solved:
> 
> Yes, ffap, spaces and Windows is a general problem, I seem to recall?
> But I don't remember the details; I don't use Windows myself.

Spaces in file names is not specific to Windows, although Windows
systems tend to have more of them.  I suggest to dig deeper into
ffap.el to understand what exactly trips it on Windows.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28870; Package emacs. (Mon, 04 Oct 2021 20:09:02 GMT) Full text and rfc822 format available.

Message #34 received at 28870 <at> debbugs.gnu.org (full text, mbox):

From: "H. Dieter Wilhelm" <dieter <at> duenenhof-wilhelm.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: , stefan <at> marxist.se, Lars Ingebrigtsen <larsi <at> gnus.org>,
 28870 <at> debbugs.gnu.org, guido.kraemer <at> uni-leipzig.de
Subject: Re: bug#28870: 25.3; find-file-at-point with spaces in path
Date: Mon, 04 Oct 2021 22:08:15 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Yes, ffap, spaces and Windows is a general problem, I seem to recall?
>> But I don't remember the details; I don't use Windows myself.
>
> Spaces in file names is not specific to Windows, although Windows
> systems tend to have more of them.  I suggest to dig deeper into
> ffap.el to understand what exactly trips it on Windows.

For your information: Orgmode 9.4 manages already to open its links -
like [[PATH][LINK_NAME]] - with spaces in paths on Windows (and Linux)!

-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Nov 2021 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 176 days ago.

Previous Next


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