From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: Re: can I refile or archive from the agenda without rebuilding? Date: Wed, 17 Dec 2014 10:34:36 +0100 Message-ID: <87zjamipqr.fsf@konixwork.incubateur.ens-lyon.fr> References: <87egs4u7j4.fsf@kyleam.com> <87y4q9tiug.fsf@konixwork.incubateur.ens-lyon.fr> <87ppbj5nm1.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1B0H-0001uK-Fj for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 04:34:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1B0C-0002DN-RU for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 04:34:45 -0500 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:64204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1B0C-0002AQ-Ji for emacs-orgmode@gnu.org; Wed, 17 Dec 2014 04:34:40 -0500 Received: by mail-wi0-f179.google.com with SMTP id ex7so15369105wid.0 for ; Wed, 17 Dec 2014 01:34:39 -0800 (PST) In-Reply-To: <87ppbj5nm1.fsf@kyleam.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kyle Meyer , Alan Schmitt Cc: emacs-orgmode --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Kyle Meyer writes: > Alan Schmitt wrote: >> On 2014-12-15 09:31, Samuel Loury 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-noupdat= e))) >> #+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). =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUkU4sAAoJEHXSPO10ORBqFtMH/1HGS2LDpswQCZCba/XZkVQ+ w9KQWRWkMbXMOezuIHvX03poKvv4q0OQ6kx2pw3uK04hUyrLuJPvSpvSILevw54z jl+k9LzV3N5/wZKXhegT75bMCuFcL3S83zqL82phxKQ+uYYiXfq1DC3+/lRAIJKV vUj8a8WoiXq1aNX8h2boKJTyz4Xcv1NSbK5OQLgmM72x+YDFYEB5fKsWvoMXGH1K OWrSgSjfb6axi059av9UjPidav2+2atN7Os0SgBR6S04/BsT3gT9y0EiOLimVv9N 3kYd6mGpLqchI0PSFQKqEUJO4W2fxSo42EflXotIi62R50PkvSNSCeYzbytGmMQ= =dQW2 -----END PGP SIGNATURE----- --=-=-=--