unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Shynur Xie <one.last.kiss@outlook.com>
To: Drew Adams <drew.adams@oracle.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Eli Zaretskii <eliz@gnu.org>
Cc: "64281@debbugs.gnu.org" <64281@debbugs.gnu.org>
Subject: bug#64281: [Feature Request] Recognize “#” syntax
Date: Mon, 26 Jun 2023 10:21:25 +0000	[thread overview]
Message-ID: <PH0PR11MB7470F86F606C887808298F9AD726A@PH0PR11MB7470.namprd11.prod.outlook.com> (raw)
In-Reply-To: <SJ0PR10MB5488C6AB9BF40201427071C2F321A@SJ0PR10MB5488.namprd10.prod.outlook.com>

To: Drew

> drew> Node `Read Syntax for Circular Objects' says nothing about any
> drew> possible danger (security/safety problem) circular objects can
> drew> introduce.

I guess that “.dir-locals.el” _isn’t_ read by ELisp syntax, so if you
visit a “.dir-locals.el” file, Emacs will choose “Lisp-Data mode” for
it.  And (info "(elisp)Circular Objects") _is_ about Elisp read
syntax.

> stefan> To: Eli
> stefan> If you want to do better, you can use an actual ELisp file.
                                                ^^^^^^^^^^^^^^^^^^^^

Seems like it is indeed not now, though uses a “.el” postfix.

____________________

To: ALL

> drew> Wouldn't it make sense (be useful) to let users and code
> drew> decide whether to allow this for particular file-local
> drew> variables?

Agree.

There have already been numerous potential dangerous behaviors,
perhaps one more won’t make much of a difference.  I think as long as
users are provided with appropriate warnings, it should suffice.   For
instance, the following code snippet can cause Emacs to crash
instantly, but we still shouldn’t deprive users of their right to
execute it:

    (clear-string (symbol-name t))

Luckily, manual contains a corresponding warning.

--
shynur




  reply	other threads:[~2023-06-26 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-25 11:54 bug#64281: [Feature Request] Recognize “#” syntax when reading local-variables Shynur Xie
2023-06-25 13:53 ` bug#64281: [Feature Request] Recognize “#” syntax Shynur Xie
2023-06-25 15:08   ` Eli Zaretskii
2023-06-25 15:46     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-25 16:16       ` Drew Adams
2023-06-26 10:21         ` Shynur Xie [this message]
2023-06-26 12:21       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB7470F86F606C887808298F9AD726A@PH0PR11MB7470.namprd11.prod.outlook.com \
    --to=one.last.kiss@outlook.com \
    --cc=64281@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).