[SOLVED] Re: Function for retrieving the link of an Org Mode buffer

2021-08-15 Thread Rodrigo Morales
On Sat, 14 Aug 2021 at 07:48, John Kitchin wrote: > I would probably do it like this: > Thanks for the help! I just found this question at Emacs SE: https://emacs.stackexchange.com/questions/38276 which asks this exact question. I'm mentioning it just in case someone has this question again. P.

Re: Function for retrieving the link of an Org Mode buffer

2021-08-14 Thread John Kitchin
I would probably do it like this: (org-element-map (org-element-parse-buffer) 'link (lambda (lnk) (let ((lnkplist '())) (setq lnkplist (plist-put lnkplist :link (org-element-property :raw-link lnk))) (when (org-element-property :contents-begin lnk) (setq lnkplist (plist-put lnkpl

Function for retrieving the link of an Org Mode buffer

2021-08-13 Thread Rodrigo Morales
I've written the following function for retrieving the links from a given Org Mode buffer. #+BEGIN_SRC elisp (defun my/org-collect-links-in-buffer (buffer) "Collect all the links in the current buffer. If the link has a description, then it is also collected. Returns a list of PLISTS of the f