emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] can I refile or archive from the agenda without rebuilding?


From: Samuel Loury
Subject: Re: [O] can I refile or archive from the agenda without rebuilding?
Date: Wed, 17 Dec 2014 10:34:36 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Kyle Meyer <address@hidden> writes:

> Alan Schmitt <address@hidden> wrote:
>> On 2014-12-15 09:31, Samuel Loury <address@hidden> 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.

That makes sense. Thanks for the advice (no pun intended).

-- 
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]