From: Carsten Dominik <carsten.dominik@gmail.com>
To: Peter Westlake <peter.westlake@pobox.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Feature request: org-agenda-store-link
Date: Sat, 12 Sep 2009 07:06:10 +0200 [thread overview]
Message-ID: <3BD452E1-9B5A-4160-A16E-9AC72BD7BAD2@gmail.com> (raw)
In-Reply-To: <1252669277.3930.1334331775@webmail.messagingengine.com>
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"
> <peter.westlake@pobox.com> wrote:
>> On Wed, 09 Sep 2009 14:39 +0200, "Carsten Dominik"
>> <carsten.dominik@gmail.com> 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
next prev parent reply other threads:[~2009-09-12 5:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 18:14 Prefixing a function call with C-digit Raffi R
2009-09-09 0:42 ` Haroldo Stenger
2009-09-09 0:44 ` Raffi R
2009-09-09 11:59 ` GTD and adding next actions under projects with remember Desmond Rivet
2009-09-09 12:25 ` Paul Mead
2009-09-09 15:30 ` Friedrich Delgado Friedrichs
2009-09-10 0:23 ` Desmond Rivet
2009-09-09 23:20 ` Matt Lundin
2009-09-09 12:39 ` Prefixing a function call with C-digit Carsten Dominik
2009-09-09 14:23 ` Peter Westlake
2009-09-09 14:33 ` Raffi R
2009-09-11 11:41 ` Feature request: org-agenda-store-link Peter Westlake
2009-09-12 5:06 ` Carsten Dominik [this message]
2009-09-12 9:42 ` Peter Westlake
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=3BD452E1-9B5A-4160-A16E-9AC72BD7BAD2@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=peter.westlake@pobox.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.