-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Ihor Radchenko <[email protected]> writes: > "Christopher M. Miles" <[email protected]> writes: > >> I think add an "description" extraction for standard link style >> [[link][description]] is convenient for other ol.el ecosystem like link >> previewing, e.g. [[file:test.pdf][file:preview.png]] >> >> Also, Ihor, maybe this patch can simplify the function >> `org-link-preview-region` which I reviewed the commit >> "3362773397df1e05fb2cc31b9cd944ca83ab6792". > > I do not like this idea. > We have enough headaches with headline parser parsing the property > drawer that is then additionally parsed as an element of its own. > > Nested markup is a common theme in Org mode - we have nested markup > inside headings, drawers, sections, special blocks, and other greater > elements. All that is commonly delimited by :contents-begin/end and > stored in org-element-contents. > > If anything, a useful addition could be generalized extractor of raw > contents. Something wrapping around > (buffer-substring > (org-element-contents-begin el) > (org-element-contents-end el)) > But only if it is actually useful in the code. The result of org-element-link-parser on link [[file:contacts.vcf][file:.thumbnails/file.png]] is as bellowing: #+begin_src emacs-lisp (link (:standard-properties [656165 nil 656186 656211 656213 0 nil nil nil nil nil nil nil nil nil nil nil nil] :type "file" :type-explicit-p t :path "contacts.vcf" :format bracket :raw-link "file:contacts.vcf" :application nil :search-option nil)) #+end_src We can see `:type`, `:path`, `:raw-link`, etc, except `:description`. As an Org element API function, it should work as a normal user intuitive expecting. This function return every parts of link except the `:description`. Really weird. So I still think we should add this patch. - -- [ stardiviner ] I try to make every word tell the meaning that I want to express without misunderstanding. Blog: https://stardiviner.github.io/ IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQFPBAEBCAA5FiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmoAtuAbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMCwzAAoJEBtd8cla6JrDxLIIAJW9h+G/bxV7DPqL+31U 6LkAB+qNmf15q5gsiIdqg95yV4dvcyQy1AnG8F8ik/OjDc3ieGWeyzDewKKy/Big r13rc66ddUVrwdKAHBut9FCW0WgWgMVGJIWIbBz7bDtBRFZJW4cj/kU9q0VFKWt9 b1raILy5UAXbGUFn4hDQp/xZK2R6lRyC0UOorygY1FgmslYEmx9v6VWg6mDNO2od QOrRBTHcxdZHvuveErGlblpUyJMbjpWlWarNAsc3+uzkRemn1SYEo6U1Iqzr36kf P/qRQmEyFhesfNfTcm+rwgGsTC7hYTro+kSP0uoffz8M+L42+dbQ2uzSobninSZB FKc= =GaeQ -----END PGP SIGNATURE-----
