From: stardiviner <numbchild@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: How to display overlay or propertize text on file: link type about the file?
Date: Thu, 20 Feb 2020 23:58:46 +0800 [thread overview]
Message-ID: <87v9o16yix.fsf@gmail.com> (raw)
-----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 in advanced.
- --
[ 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
-----BEGIN PGP SIGNATURE-----
iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5OrLYUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsPElQf/W71U1JQ9ZeFjCWCxICs0q87016Iq
8FQ5Fr3lSmRb6NRLqzqAAbY6b14roxtixxmllvArJgd7bz280xTZs3NGgYMm/HMf
sZ+vtkpiHgJk31KXxAk/LT1OcgzYOrSv7g6c8Y3Gg8G5eSDmKGu+tMwqFzYtVmk2
6G0/wz9ezsdYAFLlNrX/FhcVaxCUSSdG08z0Ip/Op1I4iqh3Y86N7LalPVZWNa9H
eZSFsf3Z8NqfVnCmTvmyJon4x1SGvJ8Iaf4QUiE7huNeizJK2+CSIhjSu8yDBGr4
2oMPrkAm1XkJDLMQh0FLjIrIJUoTLzLonEYtlmg3thvFEMqFuF8ziYaGdw==
=sZhk
-----END PGP SIGNATURE-----
next reply other threads:[~2020-02-20 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 15:58 stardiviner [this message]
2020-02-22 21:52 ` How to display overlay or propertize text on file: link type about the file? John Kitchin
2020-02-23 4:54 ` stardiviner
2020-02-23 13:46 ` John Kitchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9o16yix.fsf@gmail.com \
--to=numbchild@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).