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: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Federico Tedin <federicotedin <at> gmail.com>
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 21:54:03 -0400
> I realize that in this case I'm hard-coding the specific
> file name handlers that *can* be used.

Exactly, it's no better.

> I'm not sure how to express "only use these file handlers" without
> explicitly mentioning them.

Instead, you should state the property you want, and then let each
file-name-handler decide how to handle that property.  E.g.:

    (let ((write-region-provides-raw-file-contents t))
      (write-region ...))

Of course, the problem here is that by using dynamic scoping, this var
will affect all write-regions that will take place during this call,
which might lead to more problems.

Maybe it would be better to have it as an argument to `write-region`, or
to introduce a new function?

Or maybe, not use `write-region` but `copy-file` instead (which already
provides the expected semantics (i.e. it doesn't (un)compress or
(en/de)crypt, IIUC).


        Stefan





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.