0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-27 04:02:53 +00:00

Fix whitespace problem with in-buffer settings

This commit is contained in:
Carsten Dominik 2010-05-14 07:50:39 +02:00
parent 650a416935
commit 256b0dc88a
2 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2010-05-14 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-file-contents): Improve error message.
(org-set-regexps-and-options): Remove spaces at both ends.
2010-05-13 Carsten Dominik <carsten.dominik@gmail.com>
* org-docbook.el (org-export-as-docbook-pdf): Improve

View file

@ -4030,10 +4030,9 @@ means to push this value onto the list in the variable.")
(re-search-forward re nil t)))
(setq key (upcase (match-string 1 ext-setup-or-nil))
value (org-match-string-no-properties 2 ext-setup-or-nil))
(if stringp value (setq value (org-trim value)))
(cond
((equal key "CATEGORY")
(if (string-match "[ \t]+$" value)
(setq value (replace-match "" t t value)))
(setq cat value))
((member key '("SEQ_TODO" "TODO"))
(push (cons 'sequence (org-split-string value splitre)) kwds))
@ -4084,8 +4083,7 @@ means to push this value onto the list in the variable.")
(set (make-local-variable var) (symbol-value var))
(add-to-list var val))))))
((equal key "ARCHIVE")
(string-match " *$" value)
(setq arch (replace-match "" t t value))
(setq arch value)
(remove-text-properties 0 (length arch)
'(face t fontified t) arch))
((equal key "LATEX_CLASS")
@ -4291,10 +4289,10 @@ means to push this value onto the list in the variable.")
(not (file-readable-p file)))
(if noerror
(progn
(message "Cannot read file %s" file)
(message "Cannot read file \"%s\"" file)
(ding) (sit-for 2)
"")
(error "Cannot read file %s" file))
(error "Cannot read file \"%s\"" file))
(with-temp-buffer
(insert-file-contents file)
(buffer-string))))