From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: How to display overlay or propertize text on file: link type about the file? Date: Thu, 20 Feb 2020 23:58:46 +0800 Message-ID: <87v9o16yix.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52730) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4oE9-0006eC-Mb for emacs-orgmode@gnu.org; Thu, 20 Feb 2020 10:59:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4oE8-00083s-Kz for emacs-orgmode@gnu.org; Thu, 20 Feb 2020 10:59:01 -0500 Received: from [112.17.247.17] (port=62809 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j4oE6-00081Q-94 for emacs-orgmode@gnu.org; Thu, 20 Feb 2020 10:59:00 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: Org Mode =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I have a requirement, I want to display file: link's file type info on the = link. For example, an Org file: link #+begin_src org [[file:~/Org/logo.png][logo]] [[file:~/Org/document.pdf][document]] [[file:~/Org/book.epub][book]] #+end_src I want to display link as: #+begin_src org logo (image: png) document (document: pdf) book (ebook: epub) #+end_src I'm inspired by this code snippet: #+begin_src emacs-lisp (org-link-set-parameters "file+sys" :complete 'org-file-complete-link :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning))) #+end_src Is it possible to display those info between parentheses with an overlay or propertied text? If someone have any idea or how to implement this, please help me. Thanks i= n advanced. =2D --=20 [ stardiviner ] I try to make every word tell the meaning what I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5OrLYUHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsPElQf/W71U1JQ9ZeFjCWCxICs0q87016Iq 8FQ5Fr3lSmRb6NRLqzqAAbY6b14roxtixxmllvArJgd7bz280xTZs3NGgYMm/HMf sZ+vtkpiHgJk31KXxAk/LT1OcgzYOrSv7g6c8Y3Gg8G5eSDmKGu+tMwqFzYtVmk2 6G0/wz9ezsdYAFLlNrX/FhcVaxCUSSdG08z0Ip/Op1I4iqh3Y86N7LalPVZWNa9H eZSFsf3Z8NqfVnCmTvmyJon4x1SGvJ8Iaf4QUiE7huNeizJK2+CSIhjSu8yDBGr4 2oMPrkAm1XkJDLMQh0FLjIrIJUoTLzLonEYtlmg3thvFEMqFuF8ziYaGdw=3D=3D =3DsZhk =2D----END PGP SIGNATURE-----