all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>
Cc: hochberg@dmhsoftware.com, 8439@debbugs.gnu.org,
	Jari Aalto <jari.aalto@cante.net>
Subject: bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2)
Date: Fri, 19 Oct 2012 21:45:25 -0400	[thread overview]
Message-ID: <jwv4nlqj63o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CALa-7vz8FCYQSjHn557ww0hZChLFgjVuxWnNLVJ4ju3D4iOXBQ@mail.gmail.com> (Andrew W. Nosenko's message of "Sat, 20 Oct 2012 00:47:55 +0300")

>> C:\emacs\bin\prog1.exe on Windows or /usr/bin/prog1 on Unix.
> Eli, excuse me very much, but you cheating.

I don't see the relationship with cheating.  Yes, his example is
probably not too important, but I think if we want to add support for
spaces we first need to decide which cases we want to handle, since the
general case is simply impossible.

Here are some disorganized thoughts:
- many of the examples shown in this thread have to do with "one file
  name per line".  But if noone tells us beforehand that the file name
  goes to EOL, handling these well will unavoidably end up with too many
  false positives.
- we should think of good hints for beginning/end of file names.
  E.g. I think if we find something that matches "['\">,.][ \n]", we
  should probably assume it's the end of the file name (EOFN).
  Or " /" is probably a BOFN, whereas "/ " is an EOFN.
- maybe if the separators are forward slashes, we should assume that
  there's no space in the file name.

> But, if there no way to make false positives amount small enough, I
> would to propose an idea for extension: find-file-at-region().  You
> just select a region of text, and Emacs tries to interprets it as
> default value for find-file().

M-w C-x C-f C-y already handles this case.


        Stefan





  parent reply	other threads:[~2012-10-20  1:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 15:24 bug#8439: [PATCH] ffap.el -- detect paths with spaces Jari Aalto
2011-07-03 23:29 ` Lars Magne Ingebrigtsen
2012-10-19  7:39 ` bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2) Jari Aalto
2012-10-19  9:49   ` Eli Zaretskii
2012-10-19 10:05     ` jari
2012-10-19 11:15       ` Yigal Hochberg
2012-10-19 11:22       ` Eli Zaretskii
2012-10-19 12:15       ` Nicolas Richard
2012-10-19 21:47     ` Andrew W. Nosenko
2012-10-19 22:23       ` Eli Zaretskii
2012-10-19 22:36       ` Yigal Hochberg
2012-10-19 22:57         ` Andrew W. Nosenko
2012-10-19 23:24         ` Yigal Hochberg
2012-10-20  1:45       ` Stefan Monnier [this message]
2012-10-20 11:01       ` Juri Linkov
2012-10-19  8:35 ` Jari Aalto
2012-10-20  1:44   ` Stefan Monnier
2012-10-20  1:49     ` Daniel Colascione
2012-10-20  7:56     ` bug#8439: [PATCH] ffap.el -- detect paths with spaces (v3) jari
2012-10-20  8:45       ` bug#8439: [PATCH] ffap.el -- detect paths with spaces (v4) jari
2012-10-20 10:20         ` Eli Zaretskii
2012-10-21  0:18         ` Stefan Monnier
2012-10-21  8:07           ` Jari Aalto
2019-11-23 13:31         ` bug#6695: " Lars Ingebrigtsen
2020-08-14 13:08           ` Lars Ingebrigtsen
2020-08-15  9:07             ` Eli Zaretskii
2020-08-15 10:13               ` Lars Ingebrigtsen
2012-10-20  8:11     ` bug#8439: [PATCH] ffap.el -- detect paths with spaces (v2) Eli Zaretskii
2012-10-21  0:16       ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=jwv4nlqj63o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=8439@debbugs.gnu.org \
    --cc=andrew.w.nosenko@gmail.com \
    --cc=hochberg@dmhsoftware.com \
    --cc=jari.aalto@cante.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.