From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: tramp+recentf: persistent errors due to expand-file-name Date: Sun, 10 Aug 2008 19:08:02 +0200 Message-ID: <9E807BB3-1944-44F8-A5F5-1DBED9C99927@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: multipart/signed; boundary=Apple-Mail-17--437286268; micalg=sha1; protocol="application/pkcs7-signature" X-Trace: ger.gmane.org 1218388111 21958 80.91.229.12 (10 Aug 2008 17:08:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Aug 2008 17:08:31 +0000 (UTC) To: Emacs-Devel devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 10 19:09:22 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 1KSEPp-0005Nx-HU for ged-emacs-devel@m.gmane.org; Sun, 10 Aug 2008 19:09:14 +0200 Original-Received: from localhost ([127.0.0.1]:55989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSEOt-0007ij-JS for ged-emacs-devel@m.gmane.org; Sun, 10 Aug 2008 13:08:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSEOo-0007iM-HU for emacs-devel@gnu.org; Sun, 10 Aug 2008 13:08:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSEOn-0007i9-5J for emacs-devel@gnu.org; Sun, 10 Aug 2008 13:08:10 -0400 Original-Received: from [199.232.76.173] (port=59616 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSEOm-0007i5-UT for emacs-devel@gnu.org; Sun, 10 Aug 2008 13:08:08 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.187]:29672) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSEOm-0000dQ-AC for emacs-devel@gnu.org; Sun, 10 Aug 2008 13:08:08 -0400 Original-Received: by mu-out-0910.google.com with SMTP id i2so1961623mue.6 for ; Sun, 10 Aug 2008 10:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:mime-version:subject:date:x-mailer; bh=E49H58weKhgp0uuNl91eF/6cZieCGohgHuyQXv31HyM=; b=aFfLfatxXKI1mkd8KFhnzV//KFrZDIGuZtXJG6PjYygeawV9bV6FSfnhyQ7CemLvM3 Ll2UluMduuv7JzG+3Obn9erWAKwFQlJpUAR/UPsEj5ONbauyLIY1lR8HkMDVtCIvW0M1 GCLW4//SDeo2mknD56gLTquGxm3LRRwIbDz+A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=bXCEpVnhbpg9kZ0vqji2aTfFdf8EOQL+VllILH5LEvpKP0X4ogfk1UKrZDXbK2UPd6 Z8gaDTMZhwtsSGMzBilK+WaWb3Aos+SeeBcLo0Goft3knq8vBqevbgCA17/AX63yKYOM 4hVxgvxwxKAHJjeH8INQxjjAOy4QHToU76j34= Original-Received: by 10.103.239.10 with SMTP id q10mr5059426mur.82.1218388086274; Sun, 10 Aug 2008 10:08:06 -0700 (PDT) Original-Received: from ?192.168.2.38? ( [79.211.66.215]) by mx.google.com with ESMTPS id e10sm3809628muf.3.2008.08.10.10.08.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 10 Aug 2008 10:08:06 -0700 (PDT) X-Mailer: Apple Mail (2.926) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:102265 Archived-At: --Apple-Mail-17--437286268 Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable I've been playing around with tramp, which does not recognize a =20 location such as /dr@localhost:/tmp/123123//bar as a local /bar file. Worse than that, the error that ensues (in combination with recentf-=20 mode) prevents users from saving or openeing other files in the future: Debugger entered--Lisp error: (error "Not a tramp file name: /qweqwe") signal(error ("Not a tramp file name: /qweqwe")) ad-Orig-error("Not a tramp file name: %s" "/qweqwe") apply(ad-Orig-error ("Not a tramp file name: %s" "/qweqwe")) error("Not a tramp file name: %s" "/qweqwe") tramp-dissect-file-name("/qweqwe") tramp-file-name-handler(expand-file-name "/dr@localhost:/tmp/=20 123123//qweqwe" nil) expand-file-name("/dr@localhost:/tmp/123123//qweqwe") recentf-expand-file-name("/dr@localhost:/tmp/123123//qweqwe") recentf-track-opened-file() run-hook-with-args-until-success(recentf-track-opened-file) basic-save-buffer() save-buffer() mac-key-save-file() call-interactively(mac-key-save-file) when opening: Debugger entered--Lisp error: (error "Not a tramp file name: /qweqwe") signal(error ("Not a tramp file name: /qweqwe")) ad-Orig-error("Not a tramp file name: %s" "/qweqwe") apply(ad-Orig-error ("Not a tramp file name: %s" "/qweqwe")) error("Not a tramp file name: %s" "/qweqwe") tramp-dissect-file-name("/qweqwe") tramp-file-name-handler(expand-file-name "/dr@localhost:/tmp/=20 123123//qweqwe" nil) expand-file-name("/dr@localhost:/tmp/123123//qweqwe") recentf-expand-file-name("/dr@localhost:/tmp/123123//qweqwe") recentf-track-opened-file() run-hooks(find-file-hook) after-find-file(nil t) find-file-noselect-1(# "/Applications/=20 Aquamacs Emacs.app/Contents/Resources/lisp/recentf.el.gz" nil nil "/=20 Applications/Aquamacs Emacs.app/Contents/Resources/lisp/=20 recentf.el.gz" (21798801 234881026)) find-file-noselect("/Applications/Aquamacs Emacs.app/Contents/=20 Resources/lisp/recentf.el.gz") find-function-search-for-symbol(recentf-track-opened-file nil =20 "recentf.el") #[(fun file) "=E2=87=84=E8=A0=80=E0=A0=80=EC=94=80=3D=C2=83=11=00=E0=A6= =87=E2=84=80=EC=84=80\"=10=E0=A7=88=EC=A4=80=08#=1A=E5=B3=8A=E6=B8=80=E4=80= =80=E2=84=80=E8=A0=80=20 =E5=B0=80=E6=B8=80=E4=84=80=E8=8C=80=E2=9C=80=00=E5=B0=80=E6=B8=80=E4=84=80= =E6=88=80=E8=88=80=E2=A8=80=00=EC=B0=80!)=C2=87" [file fun location = require =20 find-func C-source help-C-file-name indirect-function find-function-=20 search-for-symbol nil pop-to-buffer message "Unable to find location =20 in file"] 4](recentf-track-opened-file "recentf.el") apply(#[(fun file) "=E2=87=84=E8=A0=80=E0=A0=80=EC=94=80=3D=C2=83=11=00= =E0=A6=87=E2=84=80=EC=84=80\"=10=E0=A7=88=EC=A4=80=08#=1A=E5=B3=8A=E6=B8=80= =E4=80=80=20 =E2=84=80=E8=A0=80=E5=B0=80=E6=B8=80=E4=84=80=E8=8C=80=E2=9C=80=00=E5=B0=80= =E6=B8=80=E4=84=80=E6=88=80=E8=88=80=E2=A8=80=00=EC=B0=80!)=C2=87" [file = fun location =20 require find-func C-source help-C-file-name indirect-function find-=20 function-search-for-symbol nil pop-to-buffer message "Unable to find =20 location in file"] 4] (recentf-track-opened-file "recentf.el")) help-do-xref(59 #[(fun file) "=E2=87=84=E8=A0=80=E0=A0=80=EC=94=80=3D=C2= =83=11=00=E0=A6=87=E2=84=80=EC=84=80\"=10=E0=A7=88=EC=A4=80=08#=1A=20 =E5=B3=8A=E6=B8=80=E4=80=80=E2=84=80=E8=A0=80=E5=B0=80=E6=B8=80=E4=84=80=E8= =8C=80=E2=9C=80=00=E5=B0=80=E6=B8=80=E4=84=80=E6=88=80=E8=88=80=E2=A8=80=00= =EC=B0=80!)=C2=87" [file fun =20 location require find-func C-source help-C-file-name indirect-function =20= find-function-search-for-symbol nil pop-to-buffer message "Unable to =20 find location in file"] 4] (recentf-track-opened-file "recentf.el")) help-button-action(#) push-button(63 t) push-button((mouse-2 (# 63 (439 . 10) 71778152 =20= nil 63 (62 . 0) nil (5 . 10) (7 . 15)))) call-interactively(push-button) The patch below fixes this - comments appreciated. The alternative would be to fix tramp so it doesn't throw an error =20 when expand-file-name is called, but this might prevent it from giving =20= proper feedback to the user. *** lisp/recentf.el 06 Apr 2008 13:51:37 +0200 1.56.2.2 --- lisp/recentf.el 10 Aug 2008 19:04:41 +0200=09 *************** *** 394,400 **** "Convert file NAME to absolute, and canonicalize it. NAME is first passed to the function `expand-file-name', then to `recentf-filename-handlers' to post process it." ! (recentf-apply-filename-handlers (expand-file-name name))) (defun recentf-include-p (filename) "Return non-nil if FILENAME should be included in the recent list. --- 394,402 ---- "Convert file NAME to absolute, and canonicalize it. NAME is first passed to the function `expand-file-name', then to `recentf-filename-handlers' to post process it." ! (condition-case nil ! (recentf-apply-filename-handlers (expand-file-name name)) ! (error name))) (defun recentf-include-p (filename) "Return non-nil if FILENAME should be included in the recent list. --Apple-Mail-17--437286268 Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIFxDCCAn0w ggHmoAMCAQICEEfSZyInpN9bVdFPsdICbiIwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA3MTIwOTIzMDM0OFoXDTA4MTIwODIzMDM0 OFowYjEQMA4GA1UEBBMHUmVpdHRlcjEOMAwGA1UEKhMFRGF2aWQxFj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