From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Jason Rumney <jasonr@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,
Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Strange loading of vc-bzr with additional file-handler
Date: Sat, 19 Jul 2008 18:28:25 +0200 [thread overview]
Message-ID: <48821629.4070601@gmail.com> (raw)
In-Reply-To: <48820CF2.7060706@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 886 bytes --]
Jason Rumney wrote:
> Lennart Borgman (gmail) wrote:
>
>> Before the error I get
>>
>> operation=expand-file-name,
>> args=(c:/emacs/p/080718/emacs/lisp/image-mode.elc nil)
>> apply: End of file during parsing:
>> c:/emacs/p/080718/emacs/lisp/image-mode.elc
>>
>> So I guess there is an error in expand-file-name. Could tramp be
>> involved (since there are special problems with the w32 file names)?
>
> Given that you said at the start of this thread that you were testing
> your own file-handler when you first came across this, I would first
> suspect a bug in your code rather than in the Emacs that everyone else
> is using without such problems.
Please try the handler in the attached file. It should just fall back to
the default handlers, but at least for me it gets in the way for example
during file completion. (Tested with CVS Emacs 23 from 2008-07-16.)
[-- Attachment #2: non-file-handler.el --]
[-- Type: text/plain, Size: 755 bytes --]
(defun mytemp-file-handler (operation &rest args)
"Bug test. Fall back to default handler."
(let ((inhibit-file-name-handlers
(cons 'mytemp-file-handler
(and (eq inhibit-file-name-operation operation)
inhibit-file-name-handlers)))
(inhibit-file-name-operation operation))
(apply operation args)))
(put 'mytemp-file-handler 'operation '(insert-file-contents))
(defun mytemp-enable-handler ()
(interactive)
(add-to-list 'file-name-handler-alist
(cons "\\.[a-z]+\\'" 'mytemp-file-handler) t))
(defun mytemp-disable-handler ()
(interactive)
(setq file-name-handler-alist
(delete (cons "\\.[a-z]+\\'" 'mytemp-file-handler)
file-name-handler-alist)))
next prev parent reply other threads:[~2008-07-19 16:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-19 13:30 Strange loading of vc-bzr with additional file-handler Lennart Borgman (gmail)
2008-07-19 13:41 ` Lennart Borgman (gmail)
2008-07-19 13:46 ` Lennart Borgman (gmail)
2008-07-19 13:53 ` Lennart Borgman (gmail)
2008-07-19 14:14 ` Lennart Borgman (gmail)
2008-07-19 15:49 ` Jason Rumney
2008-07-19 16:28 ` Lennart Borgman (gmail) [this message]
2008-07-19 16:42 ` Lennart Borgman (gmail)
2008-07-19 16:45 ` Johan Bockgård
2008-07-19 16:50 ` Lennart Borgman (gmail)
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=48821629.4070601@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
--cc=michael.albinus@gmx.de \
/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.