Sergey Poznyakoff | 5 Jan 2010 00:46
Picon

Desktop-read fails to restore mh-folder-mode.

Hello,

When restoring MH folders from .emacs.desktop, Emacs opens
them in dired-mode, instead of the expected mh-folder mode.
This happens, because mh-folder.el fails to register its
mode handler in desktop-buffer-mode-handlers. The attached
patch fixes this. 

Regards,
Sergey

Index: lisp/mh-e/mh-folder.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mh-e/mh-folder.el,v
retrieving revision 1.26
diff -p -u -r1.26 mh-folder.el
--- lisp/mh-e/mh-folder.el	5 Nov 2009 21:05:00 -0000	1.26
+++ lisp/mh-e/mh-folder.el	4 Jan 2010 22:06:49 -0000
 <at>  <at>  -78,7 +78,7  <at>  <at>  the MH mail system."
 ;;; Desktop Integration

 ;; desktop-buffer-mode-handlers appeared in Emacs 22.
-(if (fboundp 'desktop-buffer-mode-handlers)
+(if (boundp 'desktop-buffer-mode-handlers)
     (add-to-list 'desktop-buffer-mode-handlers
                  '(mh-folder-mode . mh-restore-desktop-buffer)))

(Continue reading)

Bill Wohler | 5 Jan 2010 18:12
Picon
Picon
Gravatar

Re: Desktop-read fails to restore mh-folder-mode.

Sergey Poznyakoff <gray <at> gnu.org.ua> wrote:

> When restoring MH folders from .emacs.desktop, Emacs opens
> them in dired-mode, instead of the expected mh-folder mode.
> This happens, because mh-folder.el fails to register its
> mode handler in desktop-buffer-mode-handlers. The attached
> patch fixes this. 
> 
> Index: lisp/mh-e/mh-folder.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/mh-e/mh-folder.el,v
> retrieving revision 1.26
> diff -p -u -r1.26 mh-folder.el
> --- lisp/mh-e/mh-folder.el	5 Nov 2009 21:05:00 -0000	1.26
> +++ lisp/mh-e/mh-folder.el	4 Jan 2010 22:06:49 -0000
>  <at>  <at>  -78,7 +78,7  <at>  <at>  the MH mail system."
>  ;;; Desktop Integration
>  
>  ;; desktop-buffer-mode-handlers appeared in Emacs 22.
> -(if (fboundp 'desktop-buffer-mode-handlers)
> +(if (boundp 'desktop-buffer-mode-handlers)

Thanks, Sergey!

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

------------------------------------------------------------------------------
(Continue reading)

Mike Kupfer | 18 Jan 2010 20:50
Picon
Favicon

Re: [gmane.emacs.devel] Mail mode vs message mode

Sorry for the (very) delayed response...

Bill> Any thoughts on how much this change would affect us?

Bill> Superficially, it appears we'd switch from mail-mode-hook to
Bill> message-mode-hook, and extend message-mode instead of mail-mode in
Bill> mh-letter-mode. But otherwise, it doesn't look too bad. I'm
Bill> wondering about Emacs 22, 21, and XEmacs though...

XEmacs has both mail-mode and message-mode, so I don't *think* this
would be a problem.  But I'm not familiar enough with either one to say
for sure.

cheers,
mike

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
Bill Wohler | 20 Jan 2010 04:11
Picon
Picon
Gravatar

Re: [gmane.emacs.devel] Mail mode vs message mode

Mike Kupfer <m.kupfer <at> acm.org> wrote:

> Sorry for the (very) delayed response...
> 
> Bill> Any thoughts on how much this change would affect us?
> 
> Bill> Superficially, it appears we'd switch from mail-mode-hook to
> Bill> message-mode-hook, and extend message-mode instead of mail-mode in
> Bill> mh-letter-mode. But otherwise, it doesn't look too bad. I'm
> Bill> wondering about Emacs 22, 21, and XEmacs though...
> 
> XEmacs has both mail-mode and message-mode, so I don't *think* this
> would be a problem.  But I'm not familiar enough with either one to say
> for sure.

Thanks, Mike. I'm quite a bit behind too, but one of these days one of
us could attempt the the change on trunk: I could test the change in
Emacs 21, 22 (I'm not using 23 yet) and you could test the change in
XEmacs. I'll add a note to myself to check to see if we've got a ticket
for this item and add one if not.

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
(Continue reading)


Gmane