unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28870: 25.3; find-file-at-point with spaces in path
@ 2017-10-16 19:35 Guido Kraemer
  2017-10-17 16:43 ` Eli Zaretskii
  2021-09-03 16:22 ` H. Dieter Wilhelm
  0 siblings, 2 replies; 8+ messages in thread
From: Guido Kraemer @ 2017-10-16 19:35 UTC (permalink / raw)
  To: 28870

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@bgc-jena.mpg.de






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
  2017-10-16 19:35 bug#28870: 25.3; find-file-at-point with spaces in path Guido Kraemer
@ 2017-10-17 16:43 ` Eli Zaretskii
       [not found]   ` <b0233c2e-10d2-fc57-344f-38c30b405f40@bgc-jena.mpg.de>
  2021-01-07 16:16   ` H. Dieter Wilhelm
  2021-09-03 16:22 ` H. Dieter Wilhelm
  1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2017-10-17 16:43 UTC (permalink / raw)
  To: Guido Kraemer; +Cc: 28870

tags 28870 wishlist
thanks

> From: Guido Kraemer <gkraemer@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
       [not found]   ` <b0233c2e-10d2-fc57-344f-38c30b405f40@bgc-jena.mpg.de>
@ 2017-10-17 18:44     ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2017-10-17 18:44 UTC (permalink / raw)
  To: Guido Kraemer; +Cc: 28870

[Please use Reply-all so that this discussion gets recorded by the
bug-tracker.]

> From: Guido Kraemer <gkraemer@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?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
  2017-10-17 16:43 ` Eli Zaretskii
       [not found]   ` <b0233c2e-10d2-fc57-344f-38c30b405f40@bgc-jena.mpg.de>
@ 2021-01-07 16:16   ` H. Dieter Wilhelm
  2021-09-03  7:18     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: H. Dieter Wilhelm @ 2021-01-07 16:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Guido Kraemer, 28870

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@gnu.org> writes:

> tags 28870 wishlist
> thanks
>
>> From: Guido Kraemer <gkraemer@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
  2021-01-07 16:16   ` H. Dieter Wilhelm
@ 2021-09-03  7:18     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-09-03  7:18 UTC (permalink / raw)
  To: H. Dieter Wilhelm; +Cc: 28870, Guido Kraemer

"H. Dieter Wilhelm" <dieter@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
  2017-10-16 19:35 bug#28870: 25.3; find-file-at-point with spaces in path Guido Kraemer
  2017-10-17 16:43 ` Eli Zaretskii
@ 2021-09-03 16:22 ` H. Dieter Wilhelm
       [not found]   ` <8635pip16d.fsf@duenenhof-wilhelm.de>
  1 sibling, 1 reply; 8+ messages in thread
From: H. Dieter Wilhelm @ 2021-09-03 16:22 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 28870, Guido Kraemer

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@gnus.org>:
>
> "H. Dieter Wilhelm" <dieter@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 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
       [not found]     ` <87r1d1p33c.fsf@gnus.org>
@ 2021-10-04 12:51       ` Eli Zaretskii
  2021-10-04 20:08         ` H. Dieter Wilhelm
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2021-10-04 12:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: dieter, 28870, gkraemer, stefan

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  28870@debbugs.gnu.org,  Guido Kraemer
>  <gkraemer@bgc-jena.mpg.de>, Stefan Kangas <stefan@marxist.se>
> Date: Mon, 04 Oct 2021 11:10:47 +0200
> 
> "H. Dieter Wilhelm" <dieter@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.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#28870: 25.3; find-file-at-point with spaces in path
  2021-10-04 12:51       ` Eli Zaretskii
@ 2021-10-04 20:08         ` H. Dieter Wilhelm
  0 siblings, 0 replies; 8+ messages in thread
From: H. Dieter Wilhelm @ 2021-10-04 20:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 28870, Lars Ingebrigtsen, stefan, guido.kraemer

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-04 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-16 19:35 bug#28870: 25.3; find-file-at-point with spaces in path Guido Kraemer
2017-10-17 16:43 ` Eli Zaretskii
     [not found]   ` <b0233c2e-10d2-fc57-344f-38c30b405f40@bgc-jena.mpg.de>
2017-10-17 18:44     ` Eli Zaretskii
2021-01-07 16:16   ` H. Dieter Wilhelm
2021-09-03  7:18     ` Lars Ingebrigtsen
2021-09-03 16:22 ` H. Dieter Wilhelm
     [not found]   ` <8635pip16d.fsf@duenenhof-wilhelm.de>
     [not found]     ` <87r1d1p33c.fsf@gnus.org>
2021-10-04 12:51       ` Eli Zaretskii
2021-10-04 20:08         ` H. Dieter Wilhelm

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).