mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 19:37:52 +00:00
Fix `org-edit-special' on file names with spaces
* lisp/org.el (org-edit-special): Fix function when INCLUDE or SETUPFILE keyword points to a file name with spaces.
This commit is contained in:
parent
986037a538
commit
cf77a8e878
11
lisp/org.el
11
lisp/org.el
|
@ -20528,9 +20528,14 @@ Otherwise, return a user error."
|
|||
(org-open-link-from-string
|
||||
(format "[[%s]]"
|
||||
(expand-file-name
|
||||
(org-remove-double-quotes
|
||||
(car (org-split-string
|
||||
(org-element-property :value element)))))))
|
||||
(let ((value (org-element-property :value element)))
|
||||
(cond ((not (org-string-nw-p value))
|
||||
(user-error "No file to edit"))
|
||||
((string-match "\\`\"\\(.*?\\)\"" value)
|
||||
(match-string 1 value))
|
||||
((string-match "\\`[^ \t\"]\\S-*" value)
|
||||
(match-string 0 value))
|
||||
(t (user-error "No valid file specified")))))))
|
||||
(user-error "No special environment to edit here")))
|
||||
(table
|
||||
(if (eq (org-element-property :type element) 'table.el)
|
||||
|
|
Loading…
Reference in a new issue