-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I found org link can't get link description easily.

I googled it how to get link description. Found this solution. But it's not 
intuitive.

#+begin_src emacs-lisp
(defun get-description-at-point ()
  (interactive)
  (let ((link (org-element-context)))
    (message "%s" (buffer-substring (org-element-property :contents-begin link)
                                    (org-element-property :contents-end 
link)))))
#+end_src

Why now support this?

#+begin_src emacs-lisp
(org-element-property :desc (org-element-context))
#+end_src

Maybe the key ~:desc~ could be more meaningful detailed.

WDYT? Nicolas

- -- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      
-----BEGIN PGP SIGNATURE-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7E++0UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPYzAgAgpAgmgYJGvQME1T+cniWWAcfLDLh
tHNrV9vmfPdmtKtMQsLBACkmHysGBt4jsxZXPB96nhpK7vc0Vo7WPSUum7jW4M4q
GVC2bj9+gb/ZS4dYXnSHxzHTz62c5NRLHAj6jSuHow1cAtkuE/J5yT7M4ziECo4P
NnSuOZaBpHdAfWLFfkQYM4PG0Nrawfe+fy5BTqthXLchExtvMAD2tdgOrI4fxaIV
wfptEog/l6fzNfwpEW9XUUqaxqlFFPoN1GBVS3nPEuW/tInaOJgINL0giEN0ZSa6
P5czGgE9Zsdolw+v96rgqiInH3zRDFLDV8DiVrYxYig2wJ+xg0He2h6HNQ==
=44DQ
-----END PGP SIGNATURE-----

Reply via email to