emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Noorul Islam <noorul@noorul.com>
To: Richard Riley <rileyrg@googlemail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: capture initial "level" and refile of capture buffer
Date: Sat, 23 Oct 2010 15:46:48 +0530	[thread overview]
Message-ID: <AANLkTim4khW3tXmP0az0w_knV82FFdV=JGDbzKWcG7Ov@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikHLWVyUUoA6nUDS0Zd3nOzdt9CHyLjzG0gORpy@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

On Sat, Oct 23, 2010 at 2:12 PM, Noorul Islam <noorul@noorul.com> wrote:
> On Fri, Oct 22, 2010 at 5:13 PM, Richard Riley <rileyrg@googlemail.com> wrote:
>>
>> What determines the level of a new capture element? e.g I just created
>> one and it started at "****".
>>
>> feature request : when I added some sub elements to a capture buffer e.g
>>
>> * my new capture
>>
>> ** sub point
>>
>> *** sub sub point 1
>> *** sub sub point 2
>>
>> and hit C-c C-w to refile, it only refiled the sub element (where cursor
>> was) and then lost the rest. I would like to suggest that refile from
>> the capture buffer should refile the entire buffer and not only the
>> "current nested org item". Or am I missing something in my setup?
>
> On my box I have this observation.
>
> If I have something like this in my capture buffer
>
> * TODO Test
>
> * my new capture
>
> ** sub point
>
> *** sub sub point 1
> *** sub sub point 2
>
>
> and if I press C-c C-w at the last line (*** sub sub point 2) and
> refile it to refile.org then what I get in refile.org is this
>
>
> * TODO Test
>
> * my new capture
>
> ** sub point
>
> *** sub sub point 1
> * sub sub point 2
>
>
> The last one's level got changed.
> I have latest pull from git repo.
>
> Org-mode version 7.01trans (release_7.01h.833.g21ad0)
> GNU Emacs 23.2.2 (i686-pc-linux-gnu)
>  of 2010-06-08 on sajida
>

Fix org-capture bug.

* lisp/org.el (org-capture-refile): Consider entire temporary buffer
for refiling.

Thanks and Regards
Noorul

[-- Attachment #2: org.el.txt --]
[-- Type: text/plain, Size: 478 bytes --]

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 7915f7f..6c62114 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -548,7 +548,7 @@ already gone."
   (unless (eq (org-capture-get :type 'local) 'entry)
     (error
      "Refiling from a capture buffer makes only sense for `entry'-type templates"))
-  (let ((pos (point))
+  (let ((pos (point-min))
 	(base (buffer-base-buffer (current-buffer)))
 	(org-refile-for-capture t))
     (org-capture-finalize)

[-- Attachment #3: 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

  reply	other threads:[~2010-10-23 10:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 11:43 capture initial "level" and refile of capture buffer Richard Riley
2010-10-23  8:42 ` Noorul Islam
2010-10-23 10:16   ` Noorul Islam [this message]
2010-10-23 10:34     ` Noorul Islam
2010-10-25  7:11     ` Carsten Dominik
2010-10-25  8:54       ` Noorul Islam
2010-10-25  9:11         ` Carsten Dominik
2010-12-12  8:39         ` Carsten Dominik
2010-10-25 11:34   ` Carsten Dominik
2010-10-26  8:37     ` Noorul Islam
2010-10-26  8:53 ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTim4khW3tXmP0az0w_knV82FFdV=JGDbzKWcG7Ov@mail.gmail.com' \
    --to=noorul@noorul.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rileyrg@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).