From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Feature request: org-agenda-store-link Date: Sat, 12 Sep 2009 07:06:10 +0200 Message-ID: <3BD452E1-9B5A-4160-A16E-9AC72BD7BAD2@gmail.com> References: <24169F30-7678-4FD6-9A57-00972C639416@gmail.com> <1252506234.20644.1333969045@webmail.messagingengine.com> <1252669277.3930.1334331775@webmail.messagingengine.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MmKoX-0008Lu-9O for emacs-orgmode@gnu.org; Sat, 12 Sep 2009 01:06:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MmKoS-0008LN-3A for emacs-orgmode@gnu.org; Sat, 12 Sep 2009 01:06:20 -0400 Received: from [199.232.76.173] (port=40940 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MmKoR-0008LI-WF for emacs-orgmode@gnu.org; Sat, 12 Sep 2009 01:06:16 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:33962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MmKoR-0007ih-CG for emacs-orgmode@gnu.org; Sat, 12 Sep 2009 01:06:15 -0400 Received: by ewy7 with SMTP id 7so214751ewy.31 for ; Fri, 11 Sep 2009 22:06:14 -0700 (PDT) In-Reply-To: <1252669277.3930.1334331775@webmail.messagingengine.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Peter Westlake Cc: emacs-orgmode@gnu.org Hi Peter, that does make a lot of sense, why did we not think of this earlier? Works now. Thanks! - Carsten On Sep 11, 2009, at 1:41 PM, Peter Westlake wrote: > Carsten, > > Could I request this as a small feature enhancement, please? > Commands like org-refile have an agenda equivalent so that > the same keys work in the agenda, and it would be very nice > to be able to store a link to an item that way as well. > > Regards, > > Peter. > > On Wed, 09 Sep 2009 15:23 +0100, "Peter Westlake" > wrote: >> On Wed, 09 Sep 2009 14:39 +0200, "Carsten Dominik" >> wrote: >>> >>> On Sep 8, 2009, at 8:14 PM, Raffi R wrote: >> ... >>>> In org-mode normally, I can get this behaviour by pressing C-0 C-x >>>> C-e. Looking at org.el suggested that I should be able to simply >>>> provide the 0 as an argument, i.e. using (org-export 0). However, >>>> org-export seems to ignore that 0. >>> >>> (let ((current-prefix-arg 0)) >>> (call-interactively 'org-export)) >> >> This also happens to be the reason a function I was trying to write >> didn't work! I would never have worked it out for myself - does >> anyone have time to explain why the original form doesn't work? >> >> Here, incidentally, is the function I was writing. It works now! >> It is intended to be bound to C-c l in the agenda buffer, and >> was written by imitating org-agenda-refile: >> >> (defun org-agenda-store-link (arg) >> "Store a link to the item at point." >> (interactive "P") >> (let* ((marker (or (get-text-property (point) 'org-hd-marker) >> (org-agenda-error))) >> (buffer (marker-buffer marker)) >> (org-link-to-org-use-id t)) >> (with-current-buffer buffer >> (save-excursion >> (save-restriction >> (widen) >> (goto-char marker) >> (let ((current-prefix-arg 0)) >> (call-interactively 'org-store-link))))))) >> >> Is this the right way to do it? >> >> Peter. >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode