GNU bug report logs - #35495
27.0.50; Untarring an archive with a keyring.gpg inside

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Date: Mon, 29 Apr 2019 20:04:03 UTC

Severity: normal

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Federico Tedin <federicotedin <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 35495 <at> debbugs.gnu.org, Daiki Ueno <ueno <at> unixuser.org>
Subject: bug#35495: 27.0.50; Untarring an archive with a keyring.gpg inside
Date: Fri, 10 May 2019 22:43:11 -0300
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> (let ((inhibit-file-name-handlers '(jka-compr-handler epa-file-handler))
>
> I don't like hard-coding a specific set of file-name-handler names.

Ok, I see. How about:

(defmacro with-literal-file-name-handlers (&rest body)
  `(let* ((allowed-file-name-handlers '(tramp-completion-file-name-handler
					tramp-file-name-handler
					file-name-non-special))
	  (file-name-handler-alist
	   (seq-filter (lambda (c) (memq (cdr c) allowed-file-name-handlers))
		       file-name-handler-alist)))
     ,@body))

I realize that in this case I'm hard-coding the specific
file name handlers that *can* be used. I'm not sure how to express "only
use these file handlers" without explicitly mentioning them. I'm also
not sure if we only care for `tramp-file-name-handler`, or for the three
I listed above.




This bug report was last modified 3 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.