unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [christopher.ian.moore@gmail.com: Emacs very slow opening file]
Date: Thu, 29 Sep 2005 15:44:53 -0400	[thread overview]
Message-ID: <87achvll8q.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20050929123820.GC31770@kenny.sha-bang.local> (Sascha Wilde's message of "Thu, 29 Sep 2005 14:38:20 +0200")

>> > So, I would conclude, that there is no bug at all.  Emacs can't
>> > possibly know, that the "Local Variables:" block isn't meant to be
>> > interpreted in the diff file.  
> [...]
>> Perhaps, Emacs has to detect that the file is a patch before
>> checking "-*- ... -*-" and "Local Variables".

> I don't think that any magical file-type recognition mechanism should
> overwrite explicitly stated modes.

I completely agree with that, but I do think that the rule for "what is
a Local-Variables section" is not strict enough.  It'd be good to tighten
them, or at least make it possible to tighten them.

E.g. major modes could set a "local-variables-prefix-regexp" which the text
leading to the "Local Variables" should match.  E.g. c-mode could set it to
"\\`[ \t]*\\(//\\|/?\\*)[ \t]*\\'"  Problem is: in order for
this to be useful for the OP, the test should be done *after* using the
Local-Variables's section (i.e. after switching to C mode).  Still, it
doesn't sound unfeasible, and would help reduce the likelihood of mistakenly
using a Local-Variables section.


        Stefan

  reply	other threads:[~2005-09-29 19:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28 17:11 [christopher.ian.moore@gmail.com: Emacs very slow opening file] Richard M. Stallman
2005-09-29  9:51 ` Sascha Wilde
2005-09-29 12:24   ` Kenichi Handa
2005-09-29 12:38     ` Sascha Wilde
2005-09-29 19:44       ` Stefan Monnier [this message]
2005-09-29 20:55         ` Juri Linkov
2005-09-30 17:33           ` Richard M. Stallman
2005-09-29 21:03         ` Andreas Schwab
2005-09-29 23:31   ` Richard M. Stallman
2005-09-30  6:39     ` David Kastrup
2005-09-30  7:58       ` Sascha Wilde
2005-09-30 23:50       ` Richard M. Stallman
2005-10-02 14:48         ` Stefan Monnier
2005-09-30  7:43     ` Sascha Wilde
2005-10-02 20:22       ` Juri Linkov
2005-10-03 15:35         ` Richard M. Stallman

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=87achvll8q.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /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).