[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default mode for email drafts

From: Reiner Steib
Subject: Re: default mode for email drafts
Date: Mon, 05 Dec 2005 15:36:59 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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"))
  set-auto-mode-0(mh-letter-mode nil)
  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)

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]