From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: [Accepted] org-capture and XEmacs, indenting too far Date: Wed, 26 Oct 2011 19:50:08 +0200 (CEST) Message-ID: <20111026175008.576BAA97E@myhost.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ7bJ-0004zB-D9 for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 13:49:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJ7bH-0000bk-O4 for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 13:49:17 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:34341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJ7bH-0000bU-Ij for emacs-orgmode@gnu.org; Wed, 26 Oct 2011 13:49:15 -0400 Received: by wyg34 with SMTP id 34so2345513wyg.0 for ; Wed, 26 Oct 2011 10:49:14 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 1002 (http://patchwork.newartisans.com/patch/1002/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3Cy9lipnhjd8w.fsf%40deinprogramm.de%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] org-capture and XEmacs, indenting too far > Date: Sat, 22 Oct 2011 19:46:07 -0000 > From: Michael Sperber > X-Patchwork-Id: 1002 > Message-Id: > To: emacs-orgmode@gnu.org, Robert Pluim , > carsten.dominik@gmail.com > > Robert Pluim writes: > > > Hi, I'm using XEmacs 21.5 (beta29) "garbanzo" d27c1ee1943b+ [Lucid] > > (i686-pc-cygwin, Mule) of Mon Oct 18 2010 on RPluim, with the following > > org-capture-templates > > > > (("t" "Todo" entry (file+headline "~/org/notes.org" "Tasks") "* TODO %?")) > > > > The problem is that for some reason the resulting TODO heading is has 2 > > extra spaces, and is placed at too deep a level, giving: > > > > * Tasks > > *** TODO a task > > > > I've tested this on a fairly recent emacs24 build, and everything works > > fine there, so this is probably something XEmacs specific. Can anyone > > suggest any way to track this down (I'd bisect, but I've yet to find a > > 'good' version)? > > I finally got around to looking into this: The reason is that, in > org-capture mode, `outline-level' is bound to outline.el's function, > which is off by one compared to org-mode's. I used this patch to fix > it: > > > Could somebody review and maybe apply this? > > > diff --git a/lisp/org-capture.el b/lisp/org-capture.el > index e1b8a4f..cfa35d5 100644 > --- a/lisp/org-capture.el > +++ b/lisp/org-capture.el > @@ -848,6 +848,7 @@ it. When it is a variable, retrieve the value. Return whatever we get." > (goto-char (org-capture-get :pos)) > (org-set-local 'org-capture-target-marker > (move-marker (make-marker) (point))) > + (org-set-local 'outline-level 'org-outline-level) > (let* ((template (org-capture-get :template)) > (type (org-capture-get :type))) > (case type >