* org-capture and XEmacs, indenting too far
@ 2010-11-30 10:09 Robert Pluim
2011-10-22 14:46 ` Michael Sperber
0 siblings, 1 reply; 7+ messages in thread
From: Robert Pluim @ 2010-11-30 10:09 UTC (permalink / raw)
To: emacs-orgmode
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)?
Thanks
Robert
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture and XEmacs, indenting too far
2010-11-30 10:09 org-capture and XEmacs, indenting too far Robert Pluim
@ 2011-10-22 14:46 ` Michael Sperber
2011-10-23 8:15 ` Michael Sperber
2011-10-26 17:50 ` [Accepted] " Bastien Guerry
0 siblings, 2 replies; 7+ messages in thread
From: Michael Sperber @ 2011-10-22 14:46 UTC (permalink / raw)
To: emacs-orgmode, Robert Pluim, carsten.dominik
Robert Pluim <rpluim@gmail.com> 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:
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
Could somebody review and maybe apply this?
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: org-capture and XEmacs, indenting too far
2011-10-22 14:46 ` Michael Sperber
@ 2011-10-23 8:15 ` Michael Sperber
2011-10-23 9:54 ` Carsten Dominik
` (2 more replies)
2011-10-26 17:50 ` [Accepted] " Bastien Guerry
1 sibling, 3 replies; 7+ messages in thread
From: Michael Sperber @ 2011-10-23 8:15 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Robert Pluim, carsten.dominik
Michael Sperber <sperber@deinprogramm.de> writes:
> Robert Pluim <rpluim@gmail.com> 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,
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:
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
+ (let ((buf (make-indirect-buffer buffer bname)))
+ (with-current-buffer buf (org-mode))
+ buf)))))
(defun org-capture-verify-tree (tree)
Sorry about the snafu.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: org-capture and XEmacs, indenting too far
2011-10-23 8:15 ` Michael Sperber
@ 2011-10-23 9:54 ` Carsten Dominik
2011-10-23 17:53 ` Bastien
2011-10-26 17:43 ` Bastien
2 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2011-10-23 9:54 UTC (permalink / raw)
To: Michael Sperber; +Cc: Robert Pluim, emacs-orgmode
THis looks like the right solution to me...
- Carsten
On 23.10.2011, at 10:15, Michael Sperber wrote:
>
> Michael Sperber <sperber@deinprogramm.de> writes:
>
>> Robert Pluim <rpluim@gmail.com> 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,
>
> 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:
>
> 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
> + (let ((buf (make-indirect-buffer buffer bname)))
> + (with-current-buffer buf (org-mode))
> + buf)))))
>
>
> (defun org-capture-verify-tree (tree)
>
> Sorry about the snafu.
>
> --
> Cheers =8-} Mike
> Friede, Völkerverständigung und überhaupt blabla
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture and XEmacs, indenting too far
2011-10-23 8:15 ` Michael Sperber
2011-10-23 9:54 ` Carsten Dominik
@ 2011-10-23 17:53 ` Bastien
2011-10-26 17:43 ` Bastien
2 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2011-10-23 17:53 UTC (permalink / raw)
To: Michael Sperber; +Cc: Robert Pluim, emacs-orgmode, carsten.dominik
Hello Michael,
Michael Sperber <sperber@deinprogramm.de> writes:
> 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:
Thanks for the analysis and solution.
May I ask you to resend the patch with a proper ChangeLog?
The simple way is to commit your changes on a newbranch then
to create the patches with
~$ git format-patch master..newbranch
Thanks a lot for your effort,
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: org-capture and XEmacs, indenting too far
2011-10-23 8:15 ` Michael Sperber
2011-10-23 9:54 ` Carsten Dominik
2011-10-23 17:53 ` Bastien
@ 2011-10-26 17:43 ` Bastien
2 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2011-10-26 17:43 UTC (permalink / raw)
To: Michael Sperber; +Cc: Robert Pluim, emacs-orgmode, carsten.dominik
Hi Michael,
Michael Sperber <sperber@deinprogramm.de> writes:
> 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:
Applied, thanks for this.
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Accepted] org-capture and XEmacs, indenting too far
2011-10-22 14:46 ` Michael Sperber
2011-10-23 8:15 ` Michael Sperber
@ 2011-10-26 17:50 ` Bastien Guerry
1 sibling, 0 replies; 7+ messages in thread
From: Bastien Guerry @ 2011-10-26 17:50 UTC (permalink / raw)
To: emacs-orgmode
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 <sperber@deinprogramm.de>
> X-Patchwork-Id: 1002
> Message-Id: <y9lipnhjd8w.fsf@deinprogramm.de>
> To: emacs-orgmode@gnu.org, Robert Pluim <rpluim@gmail.com>,
> carsten.dominik@gmail.com
>
> Robert Pluim <rpluim@gmail.com> 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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-10-26 17:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 10:09 org-capture and XEmacs, indenting too far Robert Pluim
2011-10-22 14:46 ` Michael Sperber
2011-10-23 8:15 ` Michael Sperber
2011-10-23 9:54 ` Carsten Dominik
2011-10-23 17:53 ` Bastien
2011-10-26 17:43 ` Bastien
2011-10-26 17:50 ` [Accepted] " Bastien Guerry
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).