bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35495: 27.0.50; Untarring an archive with a keyring.gpg inside


From: Federico Tedin
Subject: bug#35495: 27.0.50; Untarring an archive with a keyring.gpg inside
Date: Fri, 10 May 2019 22:43:11 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

Stefan Monnier <address@hidden> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]