Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[VM] VM change in Emacs 24 - leaving mail mode

7 views
Skip to first unread message

Daniel Barrett

unread,
Dec 15, 2015, 12:03:56 AM12/15/15
to viewma...@nongnu.org, Daniel Barrett

I've noticed a change in VM's behavior since upgrading to Emacs 24.
When I'm composing an email and I run "save-buffer" to a file, the
buffer enters text-mode instead of staying in mail-mode. In previous
versions of Emacs, the buffer remained in mail-mode even after saving.
Is there an easy way to prevent this change of mode?

Thanks,
Dan

--
Dan Barrett
dbar...@blazemonger.com


r...@knighten.org

unread,
Dec 15, 2015, 12:47:19 AM12/15/15
to Daniel Barrett, viewma...@nongnu.org
Just checked on my system with emacs-version 24.2.1 and vm-version 8.1.0 and
saw no such change.

--
Robert L. Knighten
R...@knighten.org

Uday Reddy

unread,
Dec 15, 2015, 6:34:12 AM12/15/15
to Daniel Barrett, viewma...@nongnu.org
Daniel Barrett writes:

>
> I've noticed a change in VM's behavior since upgrading to Emacs 24.
> When I'm composing an email and I run "save-buffer" to a file, the
> buffer enters text-mode instead of staying in mail-mode. In previous
> versions of Emacs, the buffer remained in mail-mode even after saving.
> Is there an easy way to prevent this change of mode?

That might depend on what file name you use for the file, and what your
auto-mode setting is for that file name.

Cheers,
Uday

Daniel Barrett

unread,
Dec 15, 2015, 8:25:31 PM12/15/15
to viewma...@nongnu.org, Daniel Barrett
On December 15, 2015, Uday Reddy wrote:
>> I've noticed a change in VM's behavior since upgrading to Emacs 24.
>> When I'm composing an email and I run "save-buffer" to a file, the
>> buffer enters text-mode instead of staying in mail-mode.
>That might depend on what file name you use for the file, and what your
>auto-mode setting is for that file name.

Thanks Uday. The filename for saving has no extension (for example, "foo").

I removed this line from my .emacs file:

(setq default-major-mode 'text-mode)

and the bad behavior stopped. However, this line was present for
earlier versions of Emacs and didn't cause the mode-switching on
saves.

Any suggestions to stop the mode-switching, and still have my default
major mode be text-mode? Thanks.

--
Dan Barrett
dbar...@blazemonger.com


Uday Reddy

unread,
Dec 16, 2015, 6:15:10 AM12/16/15
to Daniel Barrett, viewma...@nongnu.org
Daniel Barrett writes:

> On December 15, 2015, Uday Reddy wrote:
> >> I've noticed a change in VM's behavior since upgrading to Emacs 24.
> >> When I'm composing an email and I run "save-buffer" to a file, the
> >> buffer enters text-mode instead of staying in mail-mode.
> >That might depend on what file name you use for the file, and what your
> >auto-mode setting is for that file name.
>
> Thanks Uday. The filename for saving has no extension (for example, "foo").
>
> I removed this line from my .emacs file:
>
> (setq default-major-mode 'text-mode)
>
> and the bad behavior stopped. However, this line was present for
> earlier versions of Emacs and didn't cause the mode-switching on
> saves.

I can't speak for Emacs.

The sensible thing to do is to use a file extension for mail messages, e.g.,
"eml" or "ml", and then define the auto-mode for it to be mail-mode.

Cheers,
Uday

0 new messages