From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raffi R Subject: Re: Prefixing a function call with C-digit Date: Wed, 9 Sep 2009 10:33:05 -0400 Message-ID: References: <24169F30-7678-4FD6-9A57-00972C639416@gmail.com> <1252506234.20644.1333969045@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlOMC-0000Bv-96 for emacs-orgmode@gnu.org; Wed, 09 Sep 2009 10:41:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlOMB-0000BW-MB for emacs-orgmode@gnu.org; Wed, 09 Sep 2009 10:41:11 -0400 Received: from [199.232.76.173] (port=56812 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlOMB-0000BQ-FB for emacs-orgmode@gnu.org; Wed, 09 Sep 2009 10:41:11 -0400 Received: from ey-out-1920.google.com ([74.125.78.150]:19710) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlOMB-0003d6-0f for emacs-orgmode@gnu.org; Wed, 09 Sep 2009 10:41:11 -0400 Received: by ey-out-1920.google.com with SMTP id 3so2223897eyh.34 for ; Wed, 09 Sep 2009 07:41:10 -0700 (PDT) In-Reply-To: <1252506234.20644.1333969045@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 Thank you very much! On Wed, Sep 9, 2009 at 10:23 AM, Peter Westlake w= rote: > 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. =A0Looking 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)) >> =A0 (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) > =A0"Store a link to the item at point." > =A0(interactive "P") > =A0(let* ((marker (or (get-text-property (point) 'org-hd-marker) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (org-agenda-error))) > =A0 =A0 =A0 =A0 (buffer (marker-buffer marker)) > =A0 =A0 =A0 =A0 (org-link-to-org-use-id t)) > =A0 =A0(with-current-buffer buffer > =A0 =A0 =A0(save-excursion > =A0 =A0 =A0 =A0(save-restriction > =A0 =A0 =A0 =A0 =A0(widen) > =A0 =A0 =A0 =A0 =A0(goto-char marker) > =A0 =A0 =A0 =A0 =A0(let ((current-prefix-arg 0)) > =A0 =A0 =A0 =A0 =A0 =A0(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 >