-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
Description
Thank you for this great extension, it worked out of the box with my config (Debian distro).
I just had some problems with ArXiv.org links (https://arxiv.org/abs/1606.04838 for instance), because page tile:
[1606.04838] Optimization Methods for Large-Scale Machine Learning
contains [, ] brackets.
Using the org-capture-template:
(setq org-capture-templates `(
("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
"* %? [[%:link][%:description]]\n")
))
returns broken org-mode link.
I used a function to convert [, ] char into (, ) to fix this:
(defun transform-square-brackets-to-round-ones(string-to-transform)
"Transforms [ into ( and ] into ), other chars left unchanged."
(concat
(mapcar #'(lambda (c) (if (equal c ?[) ?\( (if (equal c ?]) ?\) c))) string-to-transform))
)
(setq org-capture-templates `(
("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
"* %? [[%:link][%(transform-square-brackets-to-round-ones \"%:description\")]]\n")
))
but I think that there is certainly better/more elegant fix.
Maybe it would be interesting to mention this potential problem in the doc (ArXiv is a widely used site)
Best,
Vincent