mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-12-02 08:22:16 +00:00
`org-file-contents': Improve error message
* lisp/org.el (org-file-contents): Improve error message.
This commit is contained in:
parent
3f1d5f9091
commit
5861a55740
@ -5290,7 +5290,8 @@ is available. This option applies only if FILE is a URL."
|
||||
;; Move point to after the url-retrieve header.
|
||||
(search-forward "\n\n" nil :move)
|
||||
;; Search for the success code only in the url-retrieve header.
|
||||
(if (save-excursion (re-search-backward "HTTP.*\\s-+200\\s-OK" nil :noerror))
|
||||
(if (save-excursion
|
||||
(re-search-backward "HTTP.*\\s-+200\\s-OK" nil :noerror))
|
||||
;; Update the cache `org--file-cache' and return contents.
|
||||
(puthash file
|
||||
(buffer-substring-no-properties (point) (point-max))
|
||||
@ -5306,7 +5307,8 @@ is available. This option applies only if FILE is a URL."
|
||||
(buffer-string))
|
||||
(file-error
|
||||
(funcall (if noerror #'message #'user-error)
|
||||
(error-message-string err)))))))))
|
||||
"Unable to read file %S"
|
||||
file))))))))
|
||||
|
||||
(defun org-extract-log-state-settings (x)
|
||||
"Extract the log state setting from a TODO keyword string.
|
||||
|
Loading…
Reference in New Issue
Block a user