mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-10-18 02:19:46 +00:00
org-link-plain-re: Improve heuristic regexp for plain link detection
* lisp/ol.el (org-link-make-regexps): Allow trailing ?- at the end of the plain links. * etc/ORG-NEWS (Trailing =-= is now allowed in plain links): Announce the change. Link: https://orgmode.org/list/87sexh9ddv.fsf@ice9.digital
This commit is contained in:
parent
9f0a9ec34a
commit
73da6beb50
17
etc/ORG-NEWS
17
etc/ORG-NEWS
@ -60,6 +60,23 @@ all the references are resolved in the generated png.
|
||||
# This also includes changes in function behavior from Elisp perspective.
|
||||
|
||||
** Miscellaneous
|
||||
*** Trailing =-= is now allowed in plain links
|
||||
|
||||
Previously, plain links like
|
||||
|
||||
: https://domain/test-
|
||||
|
||||
did not include the trailing =-= punctuation.
|
||||
|
||||
Now, the =-= is allowed at the end, and is considered a part of the plain link.
|
||||
|
||||
#+begin_quote
|
||||
These types of links will likely be encountered for sites where anchor
|
||||
targets are automatically generated from documentation headings which
|
||||
are questions.
|
||||
https://list.orgmode.org/orgmode/87sexh9ddv.fsf@ice9.digital/
|
||||
#+end_quote
|
||||
|
||||
*** =org-attach= now considers symlinked files when searching pre-existing attach dirs
|
||||
|
||||
When Org buffer is opened from a symlink, Org mode looks into the
|
||||
|
@ -944,6 +944,12 @@ This should be called after the variable `org-link-parameters' has changed."
|
||||
(1+ (or (regex ,non-space-bracket)
|
||||
,parenthesis))
|
||||
(or (regexp "[^[:punct:] \t\n]")
|
||||
;; Allow "-" punctuation, as an exception
|
||||
;; See https://list.orgmode.org/orgmode/87sexh9ddv.fsf@ice9.digital/
|
||||
;; This is also in line with the heuristics
|
||||
;; above - it also does not include "-"
|
||||
;; punctuation.
|
||||
?-
|
||||
?/
|
||||
,parenthesis)))))
|
||||
org-link-bracket-re
|
||||
|
Loading…
Reference in New Issue
Block a user