* emacs or mutt ? @ 2019-03-10 10:23 Philippe Delavalade 2019-03-10 16:16 ` Joost Kremers 2019-03-13 6:42 ` Bob Proulx 0 siblings, 2 replies; 10+ messages in thread From: Philippe Delavalade @ 2019-03-10 10:23 UTC (permalink / raw) To: help-gnu-emacs Hello. I don't know if it is the right place for this question because it truns around emacs but also around mutt. I encounter a problem with emacs and mutt under gnu/linux. In .emacs I have the line : (add-hook 'text-mode-hook 'turn-on-auto-fill) In .muttrc I have this line : set editor="emacs --eval '(text-mode)'" Formerly, when writing a message with muut, the buffer was in text-mode and fill-mode was active. Today, with emacs 26.1 instead of 25.3 and mutt 1.11.3 instead of 1.10.1, this is no more the case. When I write a message in mutt, emacs is called but the buffer is in fundamental mode and I must type M-x auto-fill-mode :-(. I tried in .muttrc set editor=emacs --debug-init --eval '(text-mode)'" but nothing wrong was detected. Can someone give me an hint to resore the right comportment ? Thanks and sorry for the poor english. -- Ph. Delavalade ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-10 10:23 emacs or mutt ? Philippe Delavalade @ 2019-03-10 16:16 ` Joost Kremers 2019-03-10 22:08 ` Philippe Delavalade 2019-03-13 6:42 ` Bob Proulx 1 sibling, 1 reply; 10+ messages in thread From: Joost Kremers @ 2019-03-10 16:16 UTC (permalink / raw) To: help-gnu-emacs Hi Philippe, On Sun, Mar 10 2019, Philippe Delavalade wrote: > I don't know if it is the right place for this question because > it truns > around emacs but also around mutt. > > I encounter a problem with emacs and mutt under gnu/linux. > > In .emacs I have the line : > (add-hook 'text-mode-hook 'turn-on-auto-fill) > > In .muttrc I have this line : > set editor="emacs --eval '(text-mode)'" That looks a bit suspicious to me. I think it's better to put the configuration for the major mode in Emacs' init file. This is what I used to do when I used mutt. First, in .muttrc: set editor = emacsclient (I used emacsclient, which I preferred, but it should work with "set editor = emacs" as well). > Formerly, when writing a message with muut, the buffer was in > text-mode > and fill-mode was active. > > Today, with emacs 26.1 instead of 25.3 and mutt 1.11.3 instead > of > 1.10.1, this is no more the case. > > When I write a message in mutt, emacs is called but the buffer > is in > fundamental mode and I must type M-x auto-fill-mode :-(. The best way to do this, I think, is to use `auto-mode-alist`. Put this in ~/.emacs.d/init.el: (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'" . message-mode)) In case that wraps badly, that should be a single line, with a space between the dot and `message-mode`. Note that the regular expression should match the file names that mutt creates. I had this work for me for a long long time, but it's of course possible that the format changes. You'd have to adjust the regexp then. Note also that this puts mutt messages into `message-mode`, which I prefer, but you can use `text-mode` as well. That should work, it used to work for me. (I switched to mu4e, but I've been using mutt as a backup until quite recently, so the setup has been tested with Emacs 26). HTH Joost -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-10 16:16 ` Joost Kremers @ 2019-03-10 22:08 ` Philippe Delavalade 2019-03-11 7:53 ` tomas 2019-03-11 9:50 ` Joost Kremers 0 siblings, 2 replies; 10+ messages in thread From: Philippe Delavalade @ 2019-03-10 22:08 UTC (permalink / raw) To: help-gnu-emacs Hi Jost. Many thanks for your help. Le dimanche 10 mars à 17:16, Joost Kremers a écrit : > Hi Philippe, > > On Sun, Mar 10 2019, Philippe Delavalade wrote: > > I don't know if it is the right place for this question because it truns > > around emacs but also around mutt. > > > > I encounter a problem with emacs and mutt under gnu/linux. > > > > In .emacs I have the line : > > (add-hook 'text-mode-hook 'turn-on-auto-fill) > > > > In .muttrc I have this line : > > set editor="emacs --eval '(text-mode)'" > > That looks a bit suspicious to me. I think it's better to put the > configuration for the major mode in Emacs' init file. This is what I used to > do when I used mutt. First, in .muttrc: > > set editor = emacsclient > > (I used emacsclient, which I preferred, but it should work with "set editor > = emacs" as well). I tried but it didn't solved the problem. mutt refused to open the buffer and quit :-( > > Formerly, when writing a message with muut, the buffer was in text-mode > > and fill-mode was active. > > > > Today, with emacs 26.1 instead of 25.3 and mutt 1.11.3 instead of > > 1.10.1, this is no more the case. > > > > When I write a message in mutt, emacs is called but the buffer is in > > fundamental mode and I must type M-x auto-fill-mode :-(. > > The best way to do this, I think, is to use `auto-mode-alist`. Put this in > ~/.emacs.d/init.el: > > (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'" . > message-mode)) I had no file ~/.emac.d/init.el So I created it and wrote your line but it produces no effect. Finally I put the line in .emacs and now I have what I want. I replaced message-mode with text-mode because I don't know at all this mode but I will try it later. Thanks a lot. -- Ph. Delavalade ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-10 22:08 ` Philippe Delavalade @ 2019-03-11 7:53 ` tomas 2019-03-11 9:39 ` Joost Kremers 2019-03-11 9:50 ` Joost Kremers 1 sibling, 1 reply; 10+ messages in thread From: tomas @ 2019-03-11 7:53 UTC (permalink / raw) To: Philippe Delavalade; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 821 bytes --] On Sun, Mar 10, 2019 at 11:08:50PM +0100, Philippe Delavalade wrote: > Hi Jost. > > Many thanks for your help. [...] > > The best way to do this, I think, is to use `auto-mode-alist`. Put this in > > ~/.emacs.d/init.el: > > > > (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'" . > > message-mode)) > > I had no file ~/.emac.d/init.el > > So I created it and wrote your line but it produces no effect. I don't know whether this is a typo, but the "normal" name is ~/.emacs.d (you wrote ~/.emac.d). Nevertheless... > Finally I put the line in .emacs and now I have what I want. I replaced > message-mode with text-mode because I don't know at all this mode but I > will try it later. if you have an ~/.emacs, this will take precedence, I think. Cheers -- t [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-11 7:53 ` tomas @ 2019-03-11 9:39 ` Joost Kremers 2019-03-11 9:49 ` tomas 0 siblings, 1 reply; 10+ messages in thread From: Joost Kremers @ 2019-03-11 9:39 UTC (permalink / raw) To: help-gnu-emacs; +Cc: Philippe Delavalade On Mon, Mar 11 2019, tomas@tuxteam.de wrote: > On Sun, Mar 10, 2019 at 11:08:50PM +0100, Philippe Delavalade > wrote: >> > The best way to do this, I think, is to use >> > `auto-mode-alist`. Put this in >> > ~/.emacs.d/init.el: >> > >> > (add-to-list 'auto-mode-alist >> > '("mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'" . >> > message-mode)) >> >> I had no file ~/.emac.d/init.el >> >> So I created it and wrote your line but it produces no effect. > > I don't know whether this is a typo, but the "normal" name is > ~/.emacs.d > (you wrote ~/.emac.d). It is a typo, indeed. > Nevertheless... > >> Finally I put the line in .emacs and now I have what I want. I >> replaced >> message-mode with text-mode because I don't know at all this >> mode but I >> will try it later. > > if you have an ~/.emacs, this will take precedence, I think. Yes, AFAIK it will. ~/.emacs is the older one of the two, and when ~/.emacs.d/init.el was introduced, the devs didn't want to upset people's configs, so ~/.emacs still takes precedence. -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-11 9:39 ` Joost Kremers @ 2019-03-11 9:49 ` tomas 2019-03-13 1:47 ` 황병희 0 siblings, 1 reply; 10+ messages in thread From: tomas @ 2019-03-11 9:49 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 354 bytes --] On Mon, Mar 11, 2019 at 10:39:33AM +0100, Joost Kremers wrote: [...] > Yes, AFAIK it will. ~/.emacs is the older one of the two, and when > ~/.emacs.d/init.el was introduced, the devs didn't want to upset > people's configs, so ~/.emacs still takes precedence. Exactly. I switched from ~/.emacs style to ~/.emacs.d a couple of years ago. Cheers -- t [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-11 9:49 ` tomas @ 2019-03-13 1:47 ` 황병희 2019-03-13 8:30 ` tomas 0 siblings, 1 reply; 10+ messages in thread From: 황병희 @ 2019-03-13 1:47 UTC (permalink / raw) To: help-gnu-emacs Hellow! tomas!!! Really i am happy with your e-mail messages on the usenet, all the time, thanks! and... On Mon, Mar 11 2019, tomas@tuxteam.de wrote: > On Mon, Mar 11, 2019 at 10:39:33AM +0100, Joost Kremers wrote: > > [...] > >> Yes, AFAIK it will. ~/.emacs is the older one of the two, and when >> ~/.emacs.d/init.el was introduced, the devs didn't want to upset >> people's configs, so ~/.emacs still takes precedence. > > Exactly. I switched from ~/.emacs style to ~/.emacs.d a couple of > years ago. Still mine is ~/.emacs in Ubuntu 18.04, maybe i am old boy... Just i wanted to say that in Earth somebody is using ~/.emacs for long time^^^ Sincerely, Byung-Hee from South Korea. -- ^고맙습니다 _地平天成_ 감사합니다_^))// ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-13 1:47 ` 황병희 @ 2019-03-13 8:30 ` tomas 0 siblings, 0 replies; 10+ messages in thread From: tomas @ 2019-03-13 8:30 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 517 bytes --] On Wed, Mar 13, 2019 at 10:47:59AM +0900, 황병희 wrote: > Hellow! tomas!!! > Really i am happy with your e-mail messages on the usenet, all the time, > thanks! and... Glad to make a person happy :-) [...] > Still mine is ~/.emacs in Ubuntu 18.04, maybe i am old boy... Just i > wanted to say that in Earth somebody is using ~/.emacs for long time^^^ Fortunately, Emacs supports both styles. Emacs has a long tradition of trying to not break things when introducing new ones. Cheers -- tomás [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-10 22:08 ` Philippe Delavalade 2019-03-11 7:53 ` tomas @ 2019-03-11 9:50 ` Joost Kremers 1 sibling, 0 replies; 10+ messages in thread From: Joost Kremers @ 2019-03-11 9:50 UTC (permalink / raw) To: help-gnu-emacs On Sun, Mar 10 2019, Philippe Delavalade wrote: > Le dimanche 10 mars à 17:16, Joost Kremers a écrit : >> set editor = emacsclient >> >> (I used emacsclient, which I preferred, but it should work with >> "set editor >> = emacs" as well). > > I tried but it didn't solved the problem. mutt refused to open > the buffer > and quit :-( That's probably because emacsclient requires a running Emacs to attach to. You'd need to read about using Emacs as a server in the manual: <https://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html> >> The best way to do this, I think, is to use `auto-mode-alist`. >> Put this in >> ~/.emacs.d/init.el: >> >> (add-to-list 'auto-mode-alist >> '("mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'" . >> message-mode)) > > I had no file ~/.emac.d/init.el Like tomas already indicated, that's a typo, it should be ~/.emacs.d/init.el. Furthermore, if you already have a ~/.emacs file, ~/.emacs.d/init.el isn't going to be read anyway. > So I created it and wrote your line but it produces no effect. > > Finally I put the line in .emacs and now I have what I want. I > replaced > message-mode with text-mode because I don't know at all this > mode but I > will try it later. It's Gnu's major mode for messages. In combination with mutt, it's mainly useful for fontification. Some of the keybindings won't work, because they expect Gnus to be running. -- Joost Kremers Life has its moments ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs or mutt ? 2019-03-10 10:23 emacs or mutt ? Philippe Delavalade 2019-03-10 16:16 ` Joost Kremers @ 2019-03-13 6:42 ` Bob Proulx 1 sibling, 0 replies; 10+ messages in thread From: Bob Proulx @ 2019-03-13 6:42 UTC (permalink / raw) To: Philippe Delavalade; +Cc: help-gnu-emacs Philippe Delavalade wrote: > I don't know if it is the right place for this question because it truns > around emacs but also around mutt. I am using mutt and emacs to read and reply to this message. > I encounter a problem with emacs and mutt under gnu/linux. What is the GNU/Linux OS distribution? > In .emacs I have the line : > (add-hook 'text-mode-hook 'turn-on-auto-fill) > > In .muttrc I have this line : > set editor="emacs --eval '(text-mode)'" In my muttrc file: set editor="emacs" In my ~/.emacs file: (add-hook 'text-mode-hook (lambda () (abbrev-mode 1) (auto-fill-mode 1))) post-mail-message is set to "\\(mutt-[a-zA-Z0-9-.]+-[0-9]+-[0-9]+\\(-[a-fA-F0-9]+\\)?\\|mutt[a-zA-Z0-9._-]\\{6\\}\\)\\'" > Formerly, when writing a message with muut, the buffer was in text-mode > and fill-mode was active. > > Today, with emacs 26.1 instead of 25.3 and mutt 1.11.3 instead of > 1.10.1, this is no more the case. I am using emacs 26.1 and mutt 1.10.1. > When I write a message in mutt, emacs is called but the buffer is in > fundamental mode and I must type M-x auto-fill-mode :-(. > > I tried in .muttrc > set editor=emacs --debug-init --eval '(text-mode)'" > but nothing wrong was detected. > > Can someone give me an hint to resore the right comportment? I think either post-mail-message should be set or perhaps use something like this to set text-mode for mutt buffers. (setq auto-mode-alist ; Note: RE matches full pathname, so (append ; '^' matches / in /dir/dir/filename '( ("^\\(/var\\)?/tmp/mutt" . text-mode) ) auto-mode-alist)) By the way... I also set this in mutt so that buffers are stored in /var/tmp instead of /tmp since /tmp is purged on a reboot and an accidental system crash would not preserve the draft. But putting it in /var/tmp will preserve the draft across a system crash and reboot. set tmpdir="/var/tmp" Bob ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-03-13 8:30 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-03-10 10:23 emacs or mutt ? Philippe Delavalade 2019-03-10 16:16 ` Joost Kremers 2019-03-10 22:08 ` Philippe Delavalade 2019-03-11 7:53 ` tomas 2019-03-11 9:39 ` Joost Kremers 2019-03-11 9:49 ` tomas 2019-03-13 1:47 ` 황병희 2019-03-13 8:30 ` tomas 2019-03-11 9:50 ` Joost Kremers 2019-03-13 6:42 ` Bob Proulx
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.