emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Question] why my org-link-set-parameters :face function does not work?


From: stardiviner
Subject: [Question] why my org-link-set-parameters :face function does not work?
Date: Tue, 19 May 2020 21:11:53 +0800
User-agent: mu4e 1.4; emacs 28.0.50

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


Bellowing is my source code, it does not work. I'm wondering why?

#+begin_src emacs-lisp
(defun org-link-beautify-face (link)
  "Set link face colors."
  (let ((raw-link (org-element-property :raw-link link))
        (type (org-element-property :type link))
        (path (org-element-property :path link)))
    (pcase type
      ;; ("https" )
      ;; ("http" )
      ("file"
       (if (and (not (file-remote-p path))
                (file-exists-p (expand-file-name path)))
           'org-link 'org-warning)))))

;;; DEBUG
(org-link-set-parameters
 "file"
 :face #'org-link-beautify-face)
#+end_src

- -- 
[ 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-----

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7D2xkUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsMfHAgAjnoQlzdHlcKL/rBVBLlkmMITh7f5
6SxRw9sS1BagIma+APiuy+A4O4fSDLyzUMDg+Sg/C+vNu3QC2BM7ipBYNXtWcX1M
oPZj8loMrnISTIK51j2+9Pg0iOP1aZSvZqwA0p1mK2aZURBXWl7qDkVxD2oWji5P
qCBVr9ZFUloGSl7PtZTlOtsCgTCGHvnfvnk7vqxY4beuavQgaRSWUCsVDDO0c/M6
5CSzxobElB3Y68fQ2awuQwRGCzfEvRkGShHp3Raug+EJ5Ew+MYEi6wILfPxYF2WR
VJjuxAxseBuiIjYjF91xzbR7mSZQsvB1gNttLYb3uQ/jrgj0HOQDo5Jmtg==
=4fE9
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]