From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: rms@gnu.org
Cc: dmhouse@gmail.com, monnier@iro.umontreal.ca,
aaron.s.hawley@gmail.com, emacs-devel@gnu.org
Subject: Re: Specifying mode in file variables trouble
Date: Wed, 24 Sep 2008 18:23:10 +0200 [thread overview]
Message-ID: <48DA696E.4060807@gmail.com> (raw)
In-Reply-To: <E1KiUiO-0004I1-7T@fencepost.gnu.org>
Richard M. Stallman wrote:
> > I'm not sure whether majmodpri is a useful feature, because I am not
> > convinced there is a real problem to be solved. What is a real case
> > of the problem, and is there another solution?
>
> I tried to describe the problem in the comment in majmodpri.el. Is that
> comment not clear?
>
> I can see what feature the file implements, for controlling the order
> of `auto-mode-alist' and a few other variables. I do not see that the
> feature is useful.
>
> If you show me a REAL case in which this is useful, that might convice me.
When I wrote the majmodpri.el I had third party elisp files in mind. For
files inside Emacs we can perhaps use a simpler mechanism.
It is quite common that third party files adds themselves to
auto-mode-alist when they are loaded. At least some of the php-mode.el
varianst that are available does that; they bind .php to the php-mode
the supply. This will then be the default major mode for .php files.
We can of course say that should not have this side effect, but that
does not help all times. (We have already done that.)
This problem actually exists inside Emacs too. Today there are two major
modes for editing XML files.
majmodpri.el offers a way to solve this type of problem through custom
(though it may of course need some changes).
> I am not impressed by imaginary hypothetical cases.
>
> > But if we want such a facility, we should implement it right. The
> > right way is to insert these elements in the proper position the first
> > time.
>
> Unfortunately that can't be done. Please see the comment above.
>
> Of course it can be done.
Yes, but this is a misunderstanding. I was thinking of the problems I
wrote about above.
> It is easy to write a function that would
> add an item to `auto-mode-alist' and choose where to put it based on
> whatever criteria we like. It could take four three arguments, one
> being the major mode that the elements are for, and the other three
> being elements to add to the three variables that majmodpri sorts.
> And it could insert them in the proper order.
>
> I don't know if it is useful, but it is not hard.
next prev parent reply other threads:[~2008-09-24 16:23 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-20 0:44 Specifying mode in file variables trouble Lennart Borgman (gmail)
2008-09-20 0:48 ` Lennart Borgman (gmail)
2008-09-20 0:59 ` Miles Bader
2008-09-20 1:06 ` Lennart Borgman (gmail)
2008-09-21 6:32 ` Richard M. Stallman
2008-09-21 12:33 ` Lennart Borgman (gmail)
2008-09-21 23:34 ` Richard M. Stallman
2008-09-22 0:38 ` Lennart Borgman (gmail)
2008-09-22 4:39 ` Richard M. Stallman
2008-09-22 13:14 ` Lennart Borgman (gmail)
2008-09-22 14:12 ` Stefan Monnier
2008-09-22 14:26 ` Lennart Borgman (gmail)
2008-09-23 4:40 ` Richard M. Stallman
2008-09-23 9:29 ` Lennart Borgman (gmail)
2008-09-23 19:47 ` Richard M. Stallman
2008-09-22 23:11 ` Lennart Borgman (gmail)
2008-09-23 4:40 ` Richard M. Stallman
2008-09-23 9:47 ` Lennart Borgman (gmail)
2008-09-23 19:47 ` Richard M. Stallman
2008-09-23 20:43 ` Lennart Borgman (gmail)
2008-09-24 13:47 ` Richard M. Stallman
2008-09-24 13:47 ` Richard M. Stallman
2008-09-24 17:21 ` Lennart Borgman (gmail)
2008-09-25 5:49 ` Richard M. Stallman
2008-09-25 6:28 ` tomas
2008-09-25 6:41 ` Paul R
2008-09-25 7:55 ` tomas
2008-09-25 8:35 ` Paul R
2008-09-25 16:42 ` Lennart Borgman
2008-09-27 4:39 ` Richard M. Stallman
2008-10-21 19:16 ` Lennart Borgman (gmail)
2008-10-22 5:21 ` tomas
2008-10-22 6:21 ` Richard M. Stallman
2008-09-23 19:47 ` Richard M. Stallman
2008-09-23 20:37 ` Lennart Borgman (gmail)
2008-09-24 13:47 ` Richard M. Stallman
2008-09-24 16:23 ` Lennart Borgman (gmail) [this message]
2008-09-25 5:50 ` Richard M. Stallman
2008-09-24 23:09 ` Lennart Borgman (gmail)
2008-09-23 4:40 ` Richard M. Stallman
2008-09-23 9:57 ` Lennart Borgman (gmail)
2008-09-23 16:03 ` Stefan Monnier
2008-09-23 17:22 ` Lennart Borgman (gmail)
2008-09-23 20:33 ` Stefan Monnier
2008-09-23 20:48 ` Lennart Borgman (gmail)
2008-09-23 21:27 ` Stefan Monnier
2008-09-23 21:30 ` Lennart Borgman (gmail)
2008-09-24 20:57 ` Richard M. Stallman
2008-09-24 21:29 ` Lennart Borgman (gmail)
2008-09-25 17:46 ` Richard M. Stallman
2008-09-25 21:34 ` Lennart Borgman (gmail)
2008-09-26 4:45 ` Richard M. Stallman
2008-09-26 4:45 ` Richard M. Stallman
2008-09-25 17:46 ` Selecting mumamo modes Richard M. Stallman
2008-09-25 21:12 ` Lennart Borgman (gmail)
2008-09-26 4:45 ` Richard M. Stallman
2008-10-21 19:20 ` Lennart Borgman (gmail)
2008-09-23 19:47 ` Specifying mode in file variables trouble Richard M. Stallman
2008-09-23 20:26 ` Lennart Borgman (gmail)
2008-09-24 20:56 ` Richard M. Stallman
2008-09-24 21:21 ` Lennart Borgman (gmail)
2008-09-25 17:46 ` Richard M. Stallman
2008-09-25 21:36 ` Lennart Borgman (gmail)
2008-09-26 4:45 ` Richard M. Stallman
2008-09-24 20:57 ` Richard M. Stallman
2008-09-24 21:45 ` Lennart Borgman (gmail)
2008-09-20 19:03 ` Stefan Monnier
2008-09-20 23:34 ` Lennart Borgman (gmail)
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=48DA696E.4060807@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=aaron.s.hawley@gmail.com \
--cc=dmhouse@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--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 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.