all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: "Edward O'Connor" <hober0@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: find-file-literally-at-point
Date: Fri, 06 Nov 2009 03:45:45 +0200	[thread overview]
Message-ID: <87vdhoe73d.fsf@mail.jurta.org> (raw)
In-Reply-To: <3b31caf90911051613w80af4cu61352a29ce5dcd77@mail.gmail.com> (Edward O'Connor's message of "Thu, 5 Nov 2009 16:13:27 -0800")

> I recently found myself in need of such a function (I was going through
> a bunch of files to strip out their UTF-8 BOMs, if you're curious),

Oh, I see.  That's what I regularly had to do on files produced
by Windows editors :)  Some time ago Emacs used to display BOMs,
so it was easy to see and delete BOMs, but now doesn't anymore,
since now the default coding system of files with the BOM is
`utf-8-with-signature'.  Forcing it to use `utf-8' with e.g.
`C-x RET c utf-8 RET C-x C-f' is a way to display BOMs
in an UTF-8 file.

> and it was quick enough to put together:
>
> (autoload 'ffap-guesser "ffap")
> (defun find-file-literally-at-point ()
>   "Open the file at point (like `ffap') with `find-file-literally'."
>   (interactive)
>   (find-file-literally (ffap-guesser)))
>
> Is this something people might like to see added to ffap.el?

When I added a few find-file related functions to ffap,
I don't remember why I missed `find-file-literally'.
Maybe because it has no keybinding (should we try to find one?).
So we definitely need such a function.

However, I wonder why you don't implement it using `ffap-file-finder'
and `call-interactively', like e.g. `ffap-alternate-file' does?
Like other ffap functions, it asks for a filename in the minibuffer,
and allows to get the default behavior with C-u.

-- 
Juri Linkov
http://www.jurta.org/emacs/




  reply	other threads:[~2009-11-06  1:45 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06  0:13 find-file-literally-at-point Edward O'Connor
2009-11-06  1:45 ` Juri Linkov [this message]
2009-11-06  4:20   ` FFAP (was: find-file-literally-at-point) Stefan Monnier
2009-11-06  4:41     ` FFAP Miles Bader
2009-11-06 15:20       ` FFAP Stefan Monnier
2009-11-06  4:45     ` FFAP Juri Linkov
2009-11-06  8:50       ` FFAP Eli Zaretskii
2009-11-06 10:37         ` FFAP Juri Linkov
2009-11-06 15:18       ` FFAP Stefan Monnier
2009-11-06 21:19         ` FFAP Juri Linkov
2009-11-07  1:32           ` FFAP Stefan Monnier
2009-11-09  0:52             ` FFAP Juri Linkov
2009-11-09  6:33               ` FFAP Stefan Monnier
2009-11-09 10:09           ` find-file-read-args (was: FFAP) Juri Linkov
2009-11-09 14:28             ` find-file-read-args Stefan Monnier
2009-11-10  0:57               ` find-file-read-args Juri Linkov
2009-11-12  9:56               ` find-file-read-args Juri Linkov
2009-11-12 10:45                 ` find-file-read-args martin rudalics
2009-11-12 10:51                   ` find-file-read-args Juri Linkov
2009-11-15 15:09                     ` find-file-read-args Juri Linkov
2009-11-15 17:28                       ` find-file-read-args martin rudalics
2009-11-16  1:23                         ` find-file-read-args Stefan Monnier
2009-11-17  7:43                           ` find-file-read-args martin rudalics
2009-11-17  9:59                             ` find-file-read-args Juri Linkov
2009-11-17 17:42                               ` dired-dwim-target-directory (was: find-file-read-args) Juri Linkov
2009-11-17 17:43                               ` Juri Linkov
2009-11-23  4:19                               ` find-file-read-args Stefan Monnier
2009-11-23  9:59                                 ` find-file-read-args Juri Linkov
2009-11-23 20:17                                   ` find-file-read-args Stefan Monnier
2009-11-23 21:17                                     ` find-file-read-args Juri Linkov
2009-11-24  2:33                                       ` find-file-read-args Stefan Monnier
2009-11-24 17:08                                         ` find-file-read-args Juri Linkov
2009-11-24 19:40                                           ` find-file-read-args Stefan Monnier
2009-11-23 21:17                                 ` find-file-literally (was: find-file-read-args) Juri Linkov
2009-11-25  2:10                                   ` find-file-literally Stefan Monnier
2009-11-09 10:14           ` read-file-name (was: FFAP) Juri Linkov
2009-11-09 14:31             ` read-file-name Stefan Monnier
2009-11-10  0:55               ` read-file-name Juri Linkov
2009-11-10 17:25                 ` read-file-name Stefan Monnier
2009-11-09 10:30           ` dired-read-dir-and-switches (was: FFAP) Juri Linkov
2009-11-09 10:36           ` M-! M-n should fetch filename (Re: FFAP) Juri Linkov
2009-11-09 14:35             ` Stefan Monnier
2009-11-10  0:59               ` Juri Linkov
2009-11-10 17:29                 ` Stefan Monnier
2009-11-11  0:12                   ` Juri Linkov
2009-11-15 15:12           ` dired-dwim-target (was: FFAP) Juri Linkov
2009-11-23 21:12             ` dired-dwim-target-defaults (was: dired-dwim-target) Juri Linkov
2009-11-09  0:44   ` find-file-literally-at-point Juri Linkov
2009-11-09  2:00     ` find-file-literally-at-point Miles Bader
2009-11-09  2:11       ` find-file-literally-at-point Juri Linkov
2009-11-10  0:49         ` find-file-literally-at-point Juri Linkov
2009-11-09 10:01   ` utf-8-with-signature (was: find-file-literally-at-point) Juri Linkov
2009-11-06 10:20 ` find-file-literally-at-point Eduard Wiebe
2009-11-09  0:55   ` find-file-literally-at-point Juri Linkov
2009-11-09 19:49     ` find-file-literally-at-point Eduard Wiebe

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=87vdhoe73d.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=hober0@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 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.