From: Kyle Meyer <kyle@kyleam.com>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
Samuel Loury <konubinix@gmail.com>
Subject: Re: can I refile or archive from the agenda without rebuilding?
Date: Tue, 16 Dec 2014 15:46:46 -0500 [thread overview]
Message-ID: <87ppbj5nm1.fsf@kyleam.com> (raw)
In-Reply-To: <m2h9wwnebk.fsf@polytechnique.org> (Alan Schmitt's message of "Tue, 16 Dec 2014 10:17:51 +0100")
Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
> On 2014-12-15 09:31, Samuel Loury <konubinix@gmail.com> writes:
[...]
> This is how I did it:
>
> #+begin_src emacs-lisp
> (defun as/org-agenda-refile-noupdate (&optional goto rfloc)
> "Call `org-agenda-refile' with arguments GOTO, RFLOC, and t."
> (interactive "P")
> (org-agenda-refile goto rfloc t))
>
> (add-hook 'org-agenda-mode-hook
> (lambda ()
> (local-set-key (kbd "C-c C-w") 'as/org-agenda-refile-noupdate)))
> #+end_src
You could also use
(define-key org-agenda-mode-map [remap org-agenda-refile]
'as/org-agenda-refile-noupdate)
> I'm curious: is it better to use an advice or to redefine a function?
I usually prefer to define a new function because it allows you to use
both the old and new variant.
--
Kyle
next prev parent reply other threads:[~2014-12-16 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-12 13:30 can I refile or archive from the agenda without rebuilding? Alan Schmitt
2014-12-12 17:01 ` Kyle Meyer
2014-12-13 9:16 ` Alan Schmitt
2014-12-15 8:31 ` Samuel Loury
2014-12-16 9:17 ` Alan Schmitt
2014-12-16 20:46 ` Kyle Meyer [this message]
2014-12-17 9:34 ` Samuel Loury
2014-12-17 15:36 ` Alan Schmitt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ppbj5nm1.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
--cc=konubinix@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.