emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-capture - go to last captured note is not consistent
@ 2010-06-28 16:00 Bernt Hansen
  2010-06-29  7:48 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Bernt Hansen @ 2010-06-28 16:00 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

I've switched to org-capture from remember for capturing new items to my
refile.org file.

I noticed one inconsistency when visiting the last captured note.

If you create a capture note with a single heading

,----
| * TODO do something
|   :CLOCK:
|   CLOCK: [2010-06-28 Mon 11:53]--[2010-06-28 Mon 11:54] =>  0:01
|   :END:
|   [2010-06-28 Mon 11:53]
|   [[file:~/News/drafts/drafts/4::If%20you%20create%20a%20capture%20note%20with%20a%20single%20heading][file:~/News/drafts/drafts/4::If you create a capture note with a single heading]]
`----

and go to the last capture location with C-u C-u C-M-r

then it goes to the heading as I expect.  But if you capture a tree it
goes to the end of the tree instead of the last headline.

The first case goes here
,----
| * TODO do something <<<<<<<<<<<<<<<<<<<<<<point on this line>>>>>>>>
|   :CLOCK:
|   CLOCK: [2010-06-28 Mon 11:53]--[2010-06-28 Mon 11:54] =>  0:01
|   :END:
|   [2010-06-28 Mon 11:53]
|   [[file:~/News/drafts/drafts/4::If%20you%20create%20a%20capture%20note%20with%20a%20single%20heading][file:~/News/drafts/drafts/4::If you create a capture note with a single heading]]
`----

but capturing this:

,----
| * TODO do something else
|   [2010-06-28 Mon 11:56]
|   [[file:~/News/drafts/drafts/4::but]]
| ** TODO Sublevel task
|    one two three
|    four five six
`----

puts the point on the last line

,----
| * TODO do something else
|   [2010-06-28 Mon 11:56]
|   [[file:~/News/drafts/drafts/4::but]]
| ** TODO Sublevel task
|    one two three
|    four five six  <<<<<<<<<<<<point on this line>>>>>>
`----

and I really expected it to be on the 'do something else' heading
instead.

Remember mode used to go to the first line of the captured tree (top
level heading of the remember note)

It's not a critical issue but it jumped out at me today as being weird.

Thanks,
Bernt


PS.  I have C-M-r bound to org-capture.

,----
| C-M-r runs the command org-capture
|   which is an interactive Lisp function in `org-capture.el'.
| It is bound to C-M-r.
| (org-capture &optional goto keys)
| 
| Capture something.
| 
| This will let you select a template from org-capture-templates, and then
| file new captured information.  The text is immediately inserted at the
| target location, and an indirect buffer is shown where you can edit it.
| Pressing `C-c C-c' brings you back to the previous state of Emacs,
| so that you can continue your work.
| 
| When called interactively with a `C-u' prefix argument goto, don't capture
| anything, just go to the file/headline where the selected template
| stores its notes.  With a double prefix arg `C-u C-u', go to the last
| note stored.
| 
| When called with a `C-0' (zero) prefix, insert a template at point.
| 
| Lisp programs can set keys to a string associated with a template in
| `org-capture-templates'.  In this case, interactive selection will be
| bypassed.
| 
| [back]
`----

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

* Re: Org-capture - go to last captured note is not consistent
  2010-06-28 16:00 Org-capture - go to last captured note is not consistent Bernt Hansen
@ 2010-06-29  7:48 ` Carsten Dominik
  2010-06-29 11:05   ` Bernt Hansen
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-06-29  7:48 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Carsten Dominik, emacs-orgmode


On Jun 28, 2010, at 6:00 PM, Bernt Hansen wrote:

> Hi Carsten,
>
> I've switched to org-capture from remember for capturing new items  
> to my
> refile.org file.

:-)

My private definition of success was if I could make you and
John switch.  I guess that settles it. :-D

>
> I noticed one inconsistency when visiting the last captured note.
>
> If you create a capture note with a single heading
>
> ,----
> | * TODO do something
> |   :CLOCK:
> |   CLOCK: [2010-06-28 Mon 11:53]--[2010-06-28 Mon 11:54] =>  0:01
> |   :END:
> |   [2010-06-28 Mon 11:53]
> |   [[file:~/News/drafts/drafts/4::If%20you%20create%20a%20capture 
> %20note%20with%20a%20single%20heading][file:~/News/drafts/drafts/ 
> 4::If you create a capture note with a single heading]]
> `----
>
> and go to the last capture location with C-u C-u C-M-r
>
> then it goes to the heading as I expect.  But if you capture a tree it
> goes to the end of the tree instead of the last headline.

Yep, this is (was) a bug.

Thanks!

- Carsten

>
> The first case goes here
> ,----
> | * TODO do something <<<<<<<<<<<<<<<<<<<<<<point on this line>>>>>>>>
> |   :CLOCK:
> |   CLOCK: [2010-06-28 Mon 11:53]--[2010-06-28 Mon 11:54] =>  0:01
> |   :END:
> |   [2010-06-28 Mon 11:53]
> |   [[file:~/News/drafts/drafts/4::If%20you%20create%20a%20capture 
> %20note%20with%20a%20single%20heading][file:~/News/drafts/drafts/ 
> 4::If you create a capture note with a single heading]]
> `----
>
> but capturing this:
>
> ,----
> | * TODO do something else
> |   [2010-06-28 Mon 11:56]
> |   [[file:~/News/drafts/drafts/4::but]]
> | ** TODO Sublevel task
> |    one two three
> |    four five six
> `----
>
> puts the point on the last line
>
> ,----
> | * TODO do something else
> |   [2010-06-28 Mon 11:56]
> |   [[file:~/News/drafts/drafts/4::but]]
> | ** TODO Sublevel task
> |    one two three
> |    four five six  <<<<<<<<<<<<point on this line>>>>>>
> `----
>
> and I really expected it to be on the 'do something else' heading
> instead.
>
> Remember mode used to go to the first line of the captured tree (top
> level heading of the remember note)
>
> It's not a critical issue but it jumped out at me today as being  
> weird.
>
> Thanks,
> Bernt
>
>
> PS.  I have C-M-r bound to org-capture.
>
> ,----
> | C-M-r runs the command org-capture
> |   which is an interactive Lisp function in `org-capture.el'.
> | It is bound to C-M-r.
> | (org-capture &optional goto keys)
> |
> | Capture something.
> |
> | This will let you select a template from org-capture-templates,  
> and then
> | file new captured information.  The text is immediately inserted  
> at the
> | target location, and an indirect buffer is shown where you can  
> edit it.
> | Pressing `C-c C-c' brings you back to the previous state of Emacs,
> | so that you can continue your work.
> |
> | When called interactively with a `C-u' prefix argument goto, don't  
> capture
> | anything, just go to the file/headline where the selected template
> | stores its notes.  With a double prefix arg `C-u C-u', go to the  
> last
> | note stored.
> |
> | When called with a `C-0' (zero) prefix, insert a template at point.
> |
> | Lisp programs can set keys to a string associated with a template in
> | `org-capture-templates'.  In this case, interactive selection will  
> be
> | bypassed.
> |
> | [back]
> `----
>
>

- Carsten

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

* Re: Org-capture - go to last captured note is not consistent
  2010-06-29  7:48 ` Carsten Dominik
@ 2010-06-29 11:05   ` Bernt Hansen
  0 siblings, 0 replies; 3+ messages in thread
From: Bernt Hansen @ 2010-06-29 11:05 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Carsten Dominik, emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Jun 28, 2010, at 6:00 PM, Bernt Hansen wrote:
>
>> Hi Carsten,
>>
>> I've switched to org-capture from remember for capturing new items
>> to my
>> refile.org file.
>
> :-)
>
> My private definition of success was if I could make you and
> John switch.  I guess that settles it. :-D

Wow! I feel honoured :)  \o/

>> I noticed one inconsistency when visiting the last captured note.
>>
>> If you create a capture note with a single heading
>>
>> ,----
>> | * TODO do something
>> |   :CLOCK:
>> |   CLOCK: [2010-06-28 Mon 11:53]--[2010-06-28 Mon 11:54] =>  0:01
>> |   :END:
>> |   [2010-06-28 Mon 11:53]
>> |   [[file:~/News/drafts/drafts/4::If%20you%20create%20a%20capture
>> %20note%20with%20a%20single%20heading][file:~/News/drafts/drafts/
>> 4::If you create a capture note with a single heading]]
>> `----
>>
>> and go to the last capture location with C-u C-u C-M-r
>>
>> then it goes to the heading as I expect.  But if you capture a tree it
>> goes to the end of the tree instead of the last headline.
>
> Yep, this is (was) a bug.
>
> Thanks!
>
> - Carsten

Thanks for fixing this!

-Bernt

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

end of thread, other threads:[~2010-06-29 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 16:00 Org-capture - go to last captured note is not consistent Bernt Hansen
2010-06-29  7:48 ` Carsten Dominik
2010-06-29 11:05   ` Bernt Hansen

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