From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.help Subject: Re: contractor resources for emacs extension development Date: Tue, 22 Oct 2013 13:57:06 +0200 Organization: IRISA, INRIA Rennes (FR) Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382452823 6181 80.91.229.3 (22 Oct 2013 14:40:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Oct 2013 14:40:23 +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 16:40:28 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 1VYd8F-0006Ef-Tg for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 16:40:28 +0200 Original-Received: from localhost ([::1]:45195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYd8E-0006GH-Vj for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Oct 2013 10:40:27 -0400 Original-Newsgroups: gnu.emacs.help Original-Lines: 53 Original-NNTP-Posting-Host: top.irisa.fr Original-X-Trace: news-v3.irisa.fr 1382443025 22604 131.254.16.41 (22 Oct 2013 11:57:05 GMT) Original-X-Complaints-To: abuse@irisa.fr Original-NNTP-Posting-Date: Tue, 22 Oct 2013 11:57:05 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:UumpEzm8nkpTMAhnYz3f5DUIxR4= Original-Path: usenet.stanford.edu!bloom-beacon.mit.edu!micro-heart-of-gold.mit.edu!nntp.club.cc.cmu.edu!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news-rocq.inria.fr!news.irisa.fr!.POSTED!not-for-mail Original-Xref: usenet.stanford.edu gnu.emacs.help:201873 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:94143 Archived-At: Thorsten Jolitz writes: > Alan Schmitt writes: > >> I have them in my configuration file. Is it supposed to work if no >> headling is present? > > Yes, because the trick I used is to temporarily convert this > line: > > ,--------------------------- > | --text follows this line-- > `--------------------------- > > into a first-level Org-mode heading to make outorg work. > > I assumed that this line is always present in message-mode between the > header and the body, so there is always at least one heading (created > in the background by outorg). > > Is that line present in your case? Yes. Here is a backtrace of the error: ,---- | Debugger entered--Lisp error: (error "before first heading") | signal(error ("before first heading")) | error("before first heading") | outline-back-to-heading(INVISIBLE-OK) | (save-excursion (outline-back-to-heading (quote INVISIBLE-OK)) (setq outorg-code-buffer-beg-of-subtree-marker (point-marker))) | outorg-edit-as-org(nil) | call-interactively(outorg-edit-as-org record nil) | command-execute(outorg-edit-as-org record) `---- Looking at the "outline-back-to-heading" code, I don't see how your trick works. Printing 'outline-regexp' yields "> [*]+ " which makes sense in message mode. (Later.) 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.) Thanks, Alan