unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Cc: Stephen Berman <Stephen.Berman@gmx.net>,
	ding@gnus.org, emacs-devel@gnu.org,
	mh-e-devel@lists.sourceforge.net
Subject: Re: default mode for email drafts
Date: Mon, 05 Dec 2005 15:36:59 +0100	[thread overview]
Message-ID: <v9zmnfsj90.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <E1Ej1GC-0005E7-W6@fencepost.gnu.org> (Richard M. Stallman's message of "Sun, 04 Dec 2005 16:19:04 -0500")

On Sun, Dec 04 2005, Richard M. Stallman wrote:

>     I visited with C-x C-f a file whose file-name is an integer and whose
>     immediate directory is named "drafts", and to my surprise I found
>     myself in mh-letter-mode.  I was surprised because I not only don't
>     use mh-e but I don't even have MH installed on my system.  I use Gnus
>     to read and send email messages, and Gnus has a special group for
>     drafts, and of course visiting a draft within Gnus DTRT. The problem
>     is that Gnus uses a file structure for drafts that matches the regexp
>     which auto-mode-alist associates exclusively with mh-letter-mode,
>     which takes effect when visiting drafts outside of Gnus.
>
> I think that Gnus should change the file name so that mh-e won't
> be triggered.  Is there any obstacle to this?

Gnus uses "/drafts/[0-9]+" filenames at least since 1997.  We can't
change then [0-9]+ part in Gnus because the filenames need to be
integers.  Changing "/drafts/" might be possible but it break
compatibility with previous versions.  I'm quite sure it's not worth
the trouble.

Couldn't the regexp be made more specific to match only the MH files?
[ Cc-ing mh-e-devel. ]

False positives in `auto-mode-alist' cannot be avoided completely.
IIRC the policy is to make it work correctly in the common cases.

BTW, when I do `C-x C-f .../drafts/drafts/1240 RET' with `emacs
-Q', I get:

Debugger entered--Lisp error: (file-error "Searching for program" "no such file or directory" ".../drafts/drafts/install-mh")
  call-process(".../drafts/drafts/install-mh" nil t nil "-auto")
  apply(call-process ".../drafts/drafts/install-mh" nil t nil "-auto")
  mh-exec-cmd(".../drafts/drafts/install-mh" "-auto")
  mh-install("/home/dept/ste/.mh_profile" (file-error "Opening input
  file" "no such file or directory" "/home/dept/ste/.mh_profile"))
  mh-find-path()
  mh-letter-mode()
  set-auto-mode-0(mh-letter-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer 1240> ".../drafts/drafts/1240" nil nil
  ".../drafts/drafts/1240" (935129 64775))
  find-file-noselect(".../drafts/drafts/1240" nil nil t)
  find-file(".../drafts/drafts/1240" t)
  call-interactively(find-file)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



  reply	other threads:[~2005-12-05 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87r78wx3jd.fsf@escher.local.home>
2005-12-04 21:19 ` default mode for email drafts Richard M. Stallman
2005-12-05 14:36   ` Reiner Steib [this message]
2005-12-06  1:43     ` Richard M. Stallman
2005-12-06 21:55       ` Richard M. Stallman
2005-12-07  0:59     ` Juri Linkov
2005-12-07  3:11       ` Stefan Monnier
2005-12-07 19:03         ` Xavier Maillard
2005-12-07 22:58       ` Richard M. Stallman
2005-12-08  1:14       ` Bill Wohler

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=v9zmnfsj90.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=Stephen.Berman@gmx.net \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=mh-e-devel@lists.sourceforge.net \
    /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).