From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8IPxHOneuF8mdwAA0tVLHw (envelope-from ) for ; Sat, 21 Nov 2020 09:33:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OI3HGOneuF9KRgAA1q6Kng (envelope-from ) for ; Sat, 21 Nov 2020 09:33:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 210219404C8 for ; Sat, 21 Nov 2020 09:33:29 +0000 (UTC) Received: from localhost ([::1]:38986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgPGp-0007PL-VZ for larch@yhetil.org; Sat, 21 Nov 2020 04:33:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgPEU-0007NY-Cx for emacs-orgmode@gnu.org; Sat, 21 Nov 2020 04:31:02 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:33472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgPES-0007hl-2o for emacs-orgmode@gnu.org; Sat, 21 Nov 2020 04:31:01 -0500 Received: from set (cbg35-2-78-242-14-140.fbx.proxad.net [78.242.14.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 31305564C31 for ; Sat, 21 Nov 2020 10:30:55 +0100 (CET) From: Alan Schmitt To: "emacs-orgmode" Subject: storing a link to a task from an agenda view Date: Sat, 21 Nov 2020 10:30:48 +0100 Message-ID: <87h7pjgipj.fsf@m4x.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Sat Nov 21 10:30:55 2020 +0100 (CET)) X-Org-Mail: alan.schmitt.1995@polytechnique.org Received-SPF: pass client-ip=129.104.30.34; envelope-from=SRS0=gaYy=E3=polytechnique.org=alan.schmitt@bounces.m4x.org; helo=mx1.polytechnique.org X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.61 X-TUID: QEyNmWUSJN2v --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I'm trying to store a link to a task while the cursor is on it in the agenda view. I=C2=A0tried ~org-store-link~ on it, but it tells me there is = no method to do so. So I looked at some of the org-agenda code to find a way to get to the underlying task, and I tried this: #+begin_src emacs-lisp (defun as/mk-agenda-link () (interactive) (let* ((marker (or (org-get-at-bol 'org-marker) (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) (with-current-buffer buffer (save-excursion (goto-char pos) (org-store-link nil) )))) #+end_src but it does not store anything. (I have to put the ~nil~ at the ~org-store-link~ code otherwise I have an error, and looking at some of the ~org-capture~ code, I saw it there.) Do you have suggestions on how to store such a link from an agenda view? It can either end up in ~org-stored-links~ or captured in a variable. Thanks, Alan --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAl+43kgfHGFsYW4uc2No bWl0dEBwb2x5dGVjaG5pcXVlLm9yZwAKCRAEDQo7TtLlxzhqB/9l1RRL1F+9hoK1 +stJKZDLZSijeyKkEjJzpaepOestf1UuvpennqV16Jt+VAnPqh2yYKymfHharKOS JyDb4UNmjDuw1kExpGillvCIzXQJ2N4HGZQUJ7kPlC2+1J+N5S6S7A9XjsXSydZ7 oW7DMt67wJ3B5GmhvyheLD1+h3A0U/+WRDxj3YWF4ss8rZEpZ+XshgNir/M+gyFG HHHxLFggyfoHhRCins3+op3GoK5MTTEjFSdHWxooIOkFmEQVxgsNnXjXloJSnuJw 7kfZ6LvadYZGFu9k7tedAVirHHfeTZPZ/wbZLpyd/m6bY6rEY8JvhnqzzIira4B2 hm6OUpN8 =s8IW -----END PGP SIGNATURE----- --=-=-=--