From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: emacs or =?utf-8?Q?mutt=C2=A0=3F?= Date: Sun, 10 Mar 2019 17:16:48 +0100 Message-ID: <87bm2iu2kv.fsf@fastmail.fm> References: <20190310102332.GA2029@magellan.machin.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="254201"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.1.0; emacs 26.1 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 10 17:17:52 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h3195-001421-1f for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 17:17:52 +0100 Original-Received: from localhost ([127.0.0.1]:46878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3193-0003TA-VK for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 12:17:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h318D-00034S-Nd for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 12:16:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h318C-0007Eg-Vd for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 12:16:57 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49009) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h318C-0007E0-IG for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 12:16:56 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id EF21821B20 for ; Sun, 10 Mar 2019 12:16:54 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 10 Mar 2019 12:16:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=VtzIjQ3rAwOdxgUcjS6C16AGCY ATkouGk6E7Lh0tRyk=; b=FsnW6Xv+THk6F8o9/djQf9zsNtPjm11gnER6gogbQm 2zyGVtnyNEf/rcygTFy7GStAGkAy+lS3gPsb3F1ji8/rrqodxRblrG2T3fKSgRGJ CZBlrdmrCrZruSN6D0VccU5QliaaCBFlqaFGKFkomBZhskYyBVfv2MbIfc/M+12l 3immmqQdQRuy4fulSW+JtaczkmM0iporhvyZO9GuIYafNmeOUaHJJrP+mlCwT5n5 g1rN+1pGkk/Ve14YH86a5X9p73mhXCN4swXUmqmr7D6mQHijJPeYmX7mybNibxDH s68+ZoC8wL4UeAvtBXKSWz/1WGEbHDKIT78+MkMZotgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=VtzIjQ 3rAwOdxgUcjS6C16AGCYATkouGk6E7Lh0tRyk=; b=RXG3VZ3Cm4088Lu1joeaj5 Ec0LHyUbASuNjUmAW7UUVQW/k+T986wyrNDbQxCDVsKtZCVT2slMIQbCvmcX7mLf TljG9UJkHunIejLrW2ldBIWDKgrdLVjiX+8b/NgTDYl4DPiWC+bUgMqOKmacPQij XyN0WzGcQiEfrDnrrmwYTD3L0CRS2vLLhecvVH2en3RksSj5db+2+D30GSGUm+mq 1su1YQGzOxFi69i8OiborHMuUrIcbP+a1OFEg1UDVgTqYF38M/AKZ9Mmt115WAk6 G5sXXibrGXxFW305lqGWMSKr28+34j1Wq4mRgIjkW9FxNe4HdWO+ycYNwhvpp81Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrgeeggdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufgjfffkgggtsehttdertd dtreejnecuhfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgv rhhssehfrghsthhmrghilhdrfhhmqeenucfkphepleehrdeltddrvddtuddrudegnecurf grrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhl rdhfmhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Original-Received: from Swift.fastmail.com (ip5f5ac90e.dynamic.kabel-deutschland.de [95.90.201.14]) by mail.messagingengine.com (Postfix) with ESMTPA id 5D3DA10310 for ; Sun, 10 Mar 2019 12:16:54 -0400 (EDT) In-reply-to: <20190310102332.GA2029@magellan.machin.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.26 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119600 Archived-At: 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