Re: How to display overlay or propertize text on file: link type about the file?

2020-02-23 Thread John Kitchin
In that case: #+BEGIN_SRC emacs-lisp (defun file-description (start end path bracketp) (put-text-property start end 'display (shell-command-to-string (format "file %s" path (org-link-set-parameters "file" :activate-func 'file-description) #+END_SRC With this, you have to have a way to in

Re: How to display overlay or propertize text on file: link type about the file?

2020-02-22 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 John Kitchin writes: > I think you are looking for the :activate-func property of a link. What > you want is somewhat tricky though, how would you edit the link? > > There is an example at > https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-l

Re: How to display overlay or propertize text on file: link type about the file?

2020-02-22 Thread John Kitchin
I think you are looking for the :activate-func property of a link. What you want is somewhat tricky though, how would you edit the link? There is an example at https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9/#org069cbfa that might give you some ideas. You can use a '

How to display overlay or propertize text on file: link type about the file?

2020-02-20 Thread stardiviner
-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