GNU bug report logs -
#51579
Mark variable as safe only in one file or directory
Previous Next
To reply to this bug, email your comments to 51579 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51579
; Package
emacs
.
(Wed, 03 Nov 2021 04:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Kangas <stefan <at> marxist.se>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 03 Nov 2021 04:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: wishlist
I'd like a way to mark a variable as safe only when read from a
particular directory or file.
I create a .dir-locals.el file with some unsafe variable, e.g.
tmp=`mktemp -d`
echo "((nil . ((epa-file-cache-passphrase-for-symmetric-encryption . t))))" \
> $tmp/.dir-locals.el
echo $tmp
Now I visit a file in the created directory and get this message:
The local variables list in /tmp/tmp.qakuGgnFPH/
contains values that may not be safe (*).
Do you want to apply it? You can type
y -- to apply the local variables list.
n -- to ignore the local variables list.
! -- to apply the local variables list, and permanently mark these
values (*) as safe (in the future, they will be set automatically.)
i -- to ignore the local variables list, and permanently mark these
values (*) as ignored
* epa-file-cache-passphrase-for-symmetric-encryption : t
According to (info "(emacs) Safe File Variables"), hitting "i" means
that:
You can also tell Emacs to permanently ignore all the variable/value
pairs in the file, by typing āiā at the confirmation prompt ā these
pairs will thereafter be ignored in this file and in all other files.
I would like to be able to mark this variable/value pair as safe *only*
when read from this file, and not in any file.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51579
; Package
emacs
.
(Thu, 04 Nov 2021 18:11:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 51579 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> I would like to be able to mark this variable/value pair as safe *only*
> when read from this file, and not in any file.
Yes, that sounds like a good idea to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 3 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.