all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 70409@debbugs.gnu.org
Subject: bug#70409: 30.0.50; `latexenc-find-file-coding-system` uses `TeX-master` before we know it's safe
Date: Tue, 16 Apr 2024 16:35:53 +0300	[thread overview]
Message-ID: <86zfttig5i.fsf@gnu.org> (raw)
In-Reply-To: <jwvplup324z.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Tue, 16 Apr 2024 08:53:13 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: 70409@debbugs.gnu.org
> Date: Tue, 16 Apr 2024 08:53:13 -0400
> 
> > Is it correct for latexenc-find-file-coding-system to use
> > find-file-noselect for this purpose?
> 
> That's another question.  My question is instead whether it's safe for
> `latexenc-find-file-coding-system` to use the `TeX-master` setting in
> foo.tex`.  I can imagine cases where that setting could be dangerous
> because it tricks the users into accessing a file they shouldn't access.

But wouldn't processing the file in a "more literal" manner solve that
problem as well?  We only process file-local variables when we turn on
the proper major mode, so avoiding to turn on a mode will also solve
the problem you have, including unsafe variables.  And finding the
telltale signature of the file's encoding doesn't need any major
mode's help, does it?





  reply	other threads:[~2024-04-16 13:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 22:42 bug#70409: 30.0.50; `latexenc-find-file-coding-system` uses `TeX-master` before we know it's safe Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 10:19 ` Arash Esbati
2024-04-16 12:54   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 20:46     ` Arash Esbati
2024-04-16 11:49 ` Eli Zaretskii
2024-04-16 12:53   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 13:35     ` Eli Zaretskii [this message]
2024-04-17 17:52       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=86zfttig5i.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70409@debbugs.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.