From: Bastien <bzg@gnu.org>
To: Rodrigo Amestica <ramestica@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: capture template property :kill-buffer does not let me refile
Date: Wed, 06 Nov 2013 14:42:25 +0100 [thread overview]
Message-ID: <87ob5xk5oe.fsf@bzg.ath.cx> (raw)
In-Reply-To: <ybifvrmyxl3.wl%ramestica@gmail.com> (Rodrigo Amestica's message of "Sun, 27 Oct 2013 21:48:40 -0400")
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
Hi Rodrigo,
Rodrigo Amestica <ramestica@gmail.com> writes:
> based on 'printf' type logging I have found one solution that looks to me like a
> bug fix in org-capture-refile. But I'm obviously far from guessing any side
> effect that I could be missing.
>
> In org-capture-refile if I move org-capture-finalize after the
> save-window-excursion form then the :kill-buffer option works as expected
> without interfering with the refile operation.
>
> I meant to say a bug fix because to me it sounds more reasonable to call
> org-capture-finalize really when finished, in this specific case after refile.
>
> Does that make sense?
Yes it does -- I attach a patch, can you confirm it is what you did
and it does what you want?
Also, I'd be glad if a few others could test the patch so that we can
make more sure there are no side-effects -- I could not think of any.
Thanks,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-capture-refile.patch --]
[-- Type: text/x-diff, Size: 708 bytes --]
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 871382d..b832798 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -787,14 +787,14 @@ already gone. Any prefix argument will be passed to the refile command."
(let ((pos (point))
(base (buffer-base-buffer (current-buffer)))
(org-refile-for-capture t))
- (org-capture-finalize)
(save-window-excursion
(with-current-buffer (or base (current-buffer))
(save-excursion
(save-restriction
(widen)
(goto-char pos)
- (call-interactively 'org-refile)))))))
+ (call-interactively 'org-refile)))))
+ (org-capture-finalize)))
(defun org-capture-kill ()
"Abort the current capture process."
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2013-11-06 13:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 22:54 capture template property :kill-buffer does not let me refile Rodrigo Amestica
2013-10-27 16:39 ` Rodrigo Amestica
2013-10-28 1:48 ` Rodrigo Amestica
2013-11-06 13:42 ` Bastien [this message]
2013-11-06 15:17 ` Rodrigo Amestica
2013-11-06 15:27 ` Bastien
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=87ob5xk5oe.fsf@bzg.ath.cx \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=ramestica@gmail.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).