From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-capture and XEmacs, indenting too far Date: Sun, 23 Oct 2011 11:54:18 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:56963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHulB-0006nn-Q6 for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 05:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHulA-00077T-Fb for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 05:54:29 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:57020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHulA-00077J-6i for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 05:54:28 -0400 Received: by eye4 with SMTP id 4so5537900eye.0 for ; Sun, 23 Oct 2011 02:54:26 -0700 (PDT) In-Reply-To: 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: Michael Sperber Cc: Robert Pluim , emacs-orgmode@gnu.org THis looks like the right solution to me... - Carsten On 23.10.2011, at 10:15, Michael Sperber wrote: >=20 > Michael Sperber writes: >=20 >> Robert Pluim writes: >>=20 >>> 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 >>>=20 >>> (("t" "Todo" entry (file+headline "~/org/notes.org" "Tasks") "* TODO = %?")) >>>=20 >>> 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: >>>=20 >>> * Tasks >>> *** TODO a task >>>=20 >>> 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)? >>=20 >> 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, >=20 > Looking at this again, my analysis was stupid: The problem is that the > indirect buffer used for capture is not in org-mode at all, and that = is > indeed an XEmacs-specific problem, as `make-indirect-buffer' does not > accept the 'clone argument on XEmacs. I therefore retract the rubbish = I > sent earlier and suggest this one instead: >=20 > diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el > index 14d7d5d..44ed82b 100644 > --- a/lisp/ob-calc.el > +++ b/lisp/ob-calc.el > @@ -28,7 +28,6 @@ > ;;; Code: > (require 'ob) > (require 'calc) > -(require 'calc-store) > (unless (featurep 'xemacs) > (require 'calc-trail) > (require 'calc-store)) > diff --git a/lisp/org-capture.el b/lisp/org-capture.el > index e1b8a4f..fa9895f 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 > @@ -1213,7 +1214,10 @@ Use PREFIX as a prefix for the name of the = indirect buffer." > (setq bname (concat prefix "-" (number-to-string (incf n)) "-" = base))) > (condition-case nil > (make-indirect-buffer buffer bname 'clone) > - (error (make-indirect-buffer buffer bname))))) > + (error=20 > + (let ((buf (make-indirect-buffer buffer bname))) > + (with-current-buffer buf (org-mode)) > + buf))))) >=20 >=20 > (defun org-capture-verify-tree (tree) >=20 > Sorry about the snafu. >=20 > --=20 > Cheers =3D8-} Mike > Friede, V=F6lkerverst=E4ndigung und =FCberhaupt blabla