emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
@ 2010-09-09 11:38 Jules Bean
  2010-09-12 16:50 ` David Maus
  0 siblings, 1 reply; 6+ messages in thread
From: Jules Bean @ 2010-09-09 11:38 UTC (permalink / raw)
  To: emacs-orgmode

If I run org-capture with the template:

("t" "Todo" entry (file+headline
"/Users/jules/work/TODO.org" "Tasks") "* TODO %?
  (Captured at %u)
  %i
  %a
")

whilst I have narrowed (using, e.g., org-narrow-to-subtree) the buffer
that contains TODO.org, a new "* Tasks" headline is inserted at the
end of my narrowing and the new entry is added there, which messes up
the hierarchy of the file.

Thanks,

Jules

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
  2010-09-09 11:38 [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer Jules Bean
@ 2010-09-12 16:50 ` David Maus
  2010-09-23 19:06   ` David Maus
  0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2010-09-12 16:50 UTC (permalink / raw)
  To: Jules Bean; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 710 bytes --]

Jules Bean wrote:
>If I run org-capture with the template:

>("t" "Todo" entry (file+headline
>"/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>  (Captured at %u)
>  %i
>  %a
>")

>whilst I have narrowed (using, e.g., org-narrow-to-subtree) the buffer
>that contains TODO.org, a new "* Tasks" headline is inserted at the
>end of my narrowing and the new entry is added there, which messes up
>the hierarchy of the file.

I can confirm this with

Org-mode version 7.01trans (release_7.01h.497.g59fa)

GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
 of 2010-08-14 on raven, modified by Debian

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
  2010-09-12 16:50 ` David Maus
@ 2010-09-23 19:06   ` David Maus
  2010-09-24  7:01     ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2010-09-23 19:06 UTC (permalink / raw)
  To: David Maus; +Cc: Jules Bean, emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 779 bytes --]

David Maus wrote:
>Jules Bean wrote:
>>If I run org-capture with the template:

>>("t" "Todo" entry (file+headline
>>"/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>>  (Captured at %u)
>>  %i
>>  %a
>>")

>>whilst I have narrowed (using, e.g., org-narrow-to-subtree) the buffer
>>that contains TODO.org, a new "* Tasks" headline is inserted at the
>>end of my narrowing and the new entry is added there, which messes up
>>the hierarchy of the file.

>I can confirm this with

>Org-mode version 7.01trans (release_7.01h.497.g59fa)

>GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
> of 2010-08-14 on raven, modified by Debian

Attached should fix this problem.

Best,
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.1.2: 0001-Widen-to-remove-possible-restrictions-in-target-buff.patch --]
[-- Type: text/plain, Size: 1257 bytes --]

From a9a464ba0d6a31ce90473b1a5a409430c1a64294 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Thu, 23 Sep 2010 21:04:10 +0200
Subject: [PATCH] Widen to remove possible restrictions in target buffer

* org-capture.el (org-capture-place-template): Widen to remove
possible restrictions in target buffer.

Jules Bean wrote:
>If I run org-capture with the template:

>("t" "Todo" entry (file+headline
>"/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>  (Captured at %u)
>  %i
>  %a
>")

>whilst I have narrowed (using, e.g., org-narrow-to-subtree) the buffer
>that contains TODO.org, a new "* Tasks" headline is inserted at the
>end of my narrowing and the new entry is added there, which messes up
>the hierarchy of the file.
---
 lisp/org-capture.el |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index a3d40f0..44face1 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -681,6 +681,7 @@ already gone."
   (delete-other-windows)
   (org-switch-to-buffer-other-window
    (org-capture-get-indirect-buffer (org-capture-get :buffer) "CAPTURE"))
+  (widen)
   (show-all)
   (goto-char (org-capture-get :pos))
   (org-set-local 'org-capture-target-marker
-- 
1.7.1


[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
  2010-09-23 19:06   ` David Maus
@ 2010-09-24  7:01     ` Carsten Dominik
  2010-09-24 12:29       ` David Maus
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2010-09-24  7:01 UTC (permalink / raw)
  To: David Maus; +Cc: Jules Bean, emacs-orgmode


On Sep 23, 2010, at 9:06 PM, David Maus wrote:

> David Maus wrote:
>> Jules Bean wrote:
>>> If I run org-capture with the template:
>
>>> ("t" "Todo" entry (file+headline
>>> "/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>>> (Captured at %u)
>>> %i
>>> %a
>>> ")
>
>>> whilst I have narrowed (using, e.g., org-narrow-to-subtree) the  
>>> buffer
>>> that contains TODO.org, a new "* Tasks" headline is inserted at the
>>> end of my narrowing and the new entry is added there, which messes  
>>> up
>>> the hierarchy of the file.
>
>> I can confirm this with
>
>> Org-mode version 7.01trans (release_7.01h.497.g59fa)
>
>> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>> of 2010-08-14 on raven, modified by Debian
>
> Attached should fix this problem.

Looks good to me.

- Carsten

>
> Best,
>  -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> <0001-Widen-to-remove-possible-restrictions-in-target- 
> buff.patch>_______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
  2010-09-24  7:01     ` Carsten Dominik
@ 2010-09-24 12:29       ` David Maus
  2010-09-24 15:17         ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2010-09-24 12:29 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Jules Bean, David Maus, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 971 bytes --]

Carsten Dominik wrote:

>On Sep 23, 2010, at 9:06 PM, David Maus wrote:

>> David Maus wrote:
>>> Jules Bean wrote:
>>>> If I run org-capture with the template:
>>
>>>> ("t" "Todo" entry (file+headline
>>>> "/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>>>> (Captured at %u)
>>>> %i
>>>> %a
>>>> ")
>>
>>>> whilst I have narrowed (using, e.g., org-narrow-to-subtree) the
>>>> buffer
>>>> that contains TODO.org, a new "* Tasks" headline is inserted at the
>>>> end of my narrowing and the new entry is added there, which messes
>>>> up
>>>> the hierarchy of the file.
>>
>>> I can confirm this with
>>
>>> Org-mode version 7.01trans (release_7.01h.497.g59fa)
>>
>>> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>>> of 2010-08-14 on raven, modified by Debian
>>
>> Attached should fix this problem.

>Looks good to me.

>- Carsten

Okay, pushed to master.

 -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer
  2010-09-24 12:29       ` David Maus
@ 2010-09-24 15:17         ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-09-24 15:17 UTC (permalink / raw)
  To: David Maus; +Cc: Jules Bean, emacs-orgmode


On Sep 24, 2010, at 2:29 PM, David Maus wrote:

> Carsten Dominik wrote:
>
>> On Sep 23, 2010, at 9:06 PM, David Maus wrote:
>
>>> David Maus wrote:
>>>> Jules Bean wrote:
>>>>> If I run org-capture with the template:
>>>
>>>>> ("t" "Todo" entry (file+headline
>>>>> "/Users/jules/work/TODO.org" "Tasks") "* TODO %?
>>>>> (Captured at %u)
>>>>> %i
>>>>> %a
>>>>> ")
>>>
>>>>> whilst I have narrowed (using, e.g., org-narrow-to-subtree) the
>>>>> buffer
>>>>> that contains TODO.org, a new "* Tasks" headline is inserted at  
>>>>> the
>>>>> end of my narrowing and the new entry is added there, which messes
>>>>> up
>>>>> the hierarchy of the file.
>>>
>>>> I can confirm this with
>>>
>>>> Org-mode version 7.01trans (release_7.01h.497.g59fa)
>>>
>>>> GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0)
>>>> of 2010-08-14 on raven, modified by Debian
>>>
>>> Attached should fix this problem.
>
>> Looks good to me.
>
>> - Carsten
>
> Okay, pushed to master.

Thank you for all your work, David.

- Carsten

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-24 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 11:38 [BUG] Org-capture breaks if captured-to file is open in a narrowed buffer Jules Bean
2010-09-12 16:50 ` David Maus
2010-09-23 19:06   ` David Maus
2010-09-24  7:01     ` Carsten Dominik
2010-09-24 12:29       ` David Maus
2010-09-24 15:17         ` Carsten Dominik

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).