From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Strange loading of vc-bzr with additional file-handler Date: Sat, 19 Jul 2008 18:28:25 +0200 Message-ID: <48821629.4070601@gmail.com> References: <4881EC8F.9050001@gmail.com> <4881EEF7.8070201@gmail.com> <4881F036.8010406@gmail.com> <4881F1DC.2040404@gmail.com> <48820CF2.7060706@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090400020201010801000004" X-Trace: ger.gmane.org 1216484930 15345 80.91.229.12 (19 Jul 2008 16:28:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jul 2008 16:28:50 +0000 (UTC) Cc: Michael Albinus , Emacs Devel To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 19 18:29:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KKFJQ-0001De-Iq for ged-emacs-devel@m.gmane.org; Sat, 19 Jul 2008 18:29:36 +0200 Original-Received: from localhost ([127.0.0.1]:42704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKFIX-0004mu-J1 for ged-emacs-devel@m.gmane.org; Sat, 19 Jul 2008 12:28:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKFIS-0004lP-Td for emacs-devel@gnu.org; Sat, 19 Jul 2008 12:28:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKFIR-0004kl-BO for emacs-devel@gnu.org; Sat, 19 Jul 2008 12:28:36 -0400 Original-Received: from [199.232.76.173] (port=38775 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKFIR-0004ki-7X for emacs-devel@gnu.org; Sat, 19 Jul 2008 12:28:35 -0400 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:59795) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KKFIM-0002VM-D6; Sat, 19 Jul 2008 12:28:30 -0400 Original-Received: from c83-254-145-59.bredband.comhem.se ([83.254.145.59]:64081 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KKFIK-0004IR-8U; Sat, 19 Jul 2008 18:28:29 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <48820CF2.7060706@gnu.org> X-Antivirus: avast! (VPS 080719-0, 2008-07-19), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.145.59 X-Scan-Result: No virus found in message 1KKFIK-0004IR-8U. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KKFIK-0004IR-8U 705d91dcd65cc7ad01a9ffdccd293168 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100985 Archived-At: This is a multi-part message in MIME format. --------------090400020201010801000004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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.) --------------090400020201010801000004 Content-Type: text/plain; name="non-file-handler.el" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="non-file-handler.el" (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))) --------------090400020201010801000004--