From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: outorg-edit-as-org and mu4e Date: Tue, 22 Oct 2013 18:41:58 +0200 Message-ID: <874n89feax.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382460153 3367 80.91.229.3 (22 Oct 2013 16:42:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Oct 2013 16:42:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 22 18:42:36 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VYf2R-0004xa-Tn for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 18:42:36 +0200 Original-Received: from localhost ([::1]:45887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYf2R-0002Rm-IX for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 12:42:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44053) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYf2B-0002Rb-Sd for help-gnu-emacs@gnu.org; Tue, 22 Oct 2013 12:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYf25-0003uW-TY for help-gnu-emacs@gnu.org; Tue, 22 Oct 2013 12:42:19 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYf25-0003uQ-MV for help-gnu-emacs@gnu.org; Tue, 22 Oct 2013 12:42:13 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VYf23-0004j7-F0 for help-gnu-emacs@gnu.org; Tue, 22 Oct 2013 18:42:11 +0200 Original-Received: from g231107227.adsl.alicedsl.de ([92.231.107.227]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Oct 2013 18:42:11 +0200 Original-Received: from tjolitz by g231107227.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Oct 2013 18:42:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231107227.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:JFjmnD0F102RdmIoZWfxK+5SbyI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94144 Archived-At: Alan Schmitt writes: > Alan Schmitt writes: > >> I think I found the problem, looking at the code for >> outorg-edit-as-org. It seems that you explicitly check for >> message-mode, but I write my email using mu4e, and then the major mode >> is mu4e-compose-mode. Is there a way to apply >> 'outorg-prepare-message-mode-buffer-for-editing' for other modes than >> message mode? (Editing the code seems to be the only way I see.) > > Sorry to reply to myself, but how about replacing > > #+begin_src emacs-lisp > (and (eq major-mode 'message-mode) > (outorg-prepare-message-mode-buffer-for-editing)) > #+end_src > > on lines 719-720 of outorg.el by > > #+begin_src emacs-lisp > (and (derived-mode-p 'message-mode) > (outorg-prepare-message-mode-buffer-for-editing)) > #+end_src > > I think it would work with mu4e-compose-mode. Ok, then its not a bug but just a (slightly) different use case. I don't use mu4e, actually I never heard of it (is it good?). Could you test these changes and let me know if it works for you? Then I'm happy to apply them to outorg, no matter if this version: #+begin_src emacs-lisp (and (derived-mode-p 'message-mode) (outorg-prepare-message-mode-buffer-for-editing)) #+end_src or something like this (untested): #+begin_src emacs-lisp (and (or (eq major-mode 'message-mode) (eq major-mode 'mu4e-compose-mode)) (outorg-prepare-message-mode-buffer-for-editing)) #+end_src -- cheers, Thorsten