From 2a32ee1fbc148d440fc12aa390ed3d2cc7d6fe3b Mon Sep 17 00:00:00 2001 From: Rasmus Date: Thu, 5 Oct 2017 21:30:05 +0200 Subject: [PATCH] Update Org to v9.1.2 Please note this is a bugfix release. See etc/ORG-NEWS for details. --- doc/misc/org.texi | 19 +++++++++---------- etc/refcards/orgcard.tex | 2 +- lisp/org/ob-hledger.el | 2 +- lisp/org/ob-lob.el | 14 +++++++++----- lisp/org/org-clock.el | 1 + lisp/org/org-colview.el | 3 ++- lisp/org/org-table.el | 8 +++++--- lisp/org/org-version.el | 4 ++-- lisp/org/org.el | 28 +++++++++++++++++----------- lisp/org/ox-html.el | 23 ++++++++++------------- lisp/org/ox-publish.el | 4 ++-- 11 files changed, 59 insertions(+), 49 deletions(-) diff --git a/doc/misc/org.texi b/doc/misc/org.texi index b6a4fa23557..72fbbade59e 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -4,7 +4,7 @@ @settitle The Org Manual @include docstyle.texi -@set VERSION 9.1.1 +@set VERSION 9.1.2 @set DATE 2017-09-17 @c Version and Contact Info @@ -1257,13 +1257,8 @@ Org uses just two commands, bound to @key{TAB} and @end example @vindex org-cycle-emulate-tab -@vindex org-cycle-global-at-bob The cursor must be on a headline for this to work@footnote{see, however, -the option @code{org-cycle-emulate-tab}.}. When the cursor is at the -beginning of the buffer and the first line is not a headline, then -@key{TAB} actually runs global cycling (see below)@footnote{see the -option @code{org-cycle-global-at-bob}.}. Also when called with a prefix -argument (@kbd{C-u @key{TAB}}), global cycling is invoked. +the option @code{org-cycle-emulate-tab}.}. @cindex global visibility states @cindex global cycling @@ -1283,6 +1278,11 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the CONTENTS view up to headlines of level N will be shown. Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field. +@vindex org-cycle-global-at-bob +You can run global cycling using @key{TAB} only if point is at the very +beginning of the buffer, but not on a headline, and +@code{org-cycle-global-at-bob} is set to a non-@code{nil} value. + @cindex set startup visibility, command @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} Switch back to the startup visibility of the buffer (@pxref{Initial visibility}). @@ -1659,11 +1659,9 @@ line. In particular, if an ordered list reaches number @samp{10.}, then the list. An item ends before the next line that is less or equally indented than its bullet/number. -@vindex org-list-empty-line-terminates-plain-lists A list ends whenever every item has ended, which means before any line less or equally indented than items at top level. It also ends before two blank -lines@footnote{See also @code{org-list-empty-line-terminates-plain-lists}.}. -In that case, all items are closed. Here is an example: +lines. In that case, all items are closed. Here is an example: @example @group @@ -14991,6 +14989,7 @@ directory on the local machine. '(("org" :base-directory "~/org/" :publishing-directory "~/public_html" + :publishing-function org-html-publish-to-html :section-numbers nil :with-toc nil :html-head " lob-ingest-count 1) "s" "")) lob-ingest-count)) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 2eec817735a..9dc501500b1 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -2984,6 +2984,7 @@ The details of what will be saved are regulated by the variable ;; Local variables: ;; generated-autoload-file: "org-loaddefs.el" +;; coding: utf-8 ;; End: ;;; org-clock.el ends here diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index 242bdc26550..eac29c50f65 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el @@ -464,7 +464,8 @@ for the duration of the command.") (kill-local-variable 'org-previous-header-line-format) (remove-hook 'post-command-hook 'org-columns-hscroll-title 'local)) (set-marker org-columns-begin-marker nil) - (set-marker org-columns-top-level-marker nil) + (when (markerp org-columns-top-level-marker) + (set-marker org-columns-top-level-marker nil)) (org-with-silent-modifications (mapc #'delete-overlay org-columns-overlays) (setq org-columns-overlays nil) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 66907e2cd9c..8dc648eaecd 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -1646,12 +1646,14 @@ In particular, this does handle wide and invisible characters." (if (not (org-at-table-p)) (user-error "Not at a table")) (let ((col (current-column)) - (dline (org-table-current-dline))) + (dline (and (not (org-match-line org-table-hline-regexp)) + (org-table-current-dline)))) (kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max))) (if (not (org-at-table-p)) (beginning-of-line 0)) (org-move-to-column col) - (when (or (not org-table-fix-formulas-confirm) - (funcall org-table-fix-formulas-confirm "Fix formulas? ")) + (when (and dline + (or (not org-table-fix-formulas-confirm) + (funcall org-table-fix-formulas-confirm "Fix formulas? "))) (org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID")) dline -1 dline)))) diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 523afd1ad33..30318ba92c8 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.1.1")) + (let ((org-release "9.1.2")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of org-mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.1.1-37-gb1e8b5")) + (let ((org-git-version "release_9.1.2-40-g6ca906")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index c5759cb537b..35405b4bf81 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -16071,7 +16071,9 @@ automatically performed, such drawers will be silently ignored." (when (memq (org-element-type element) '(keyword node-property)) (let ((value (org-element-property :value element)) (start 0)) - (while (string-match "%[0-9]*\\(\\S-+\\)" value start) + (while (string-match "%[0-9]*\\([[:alnum:]_-]+\\)\\(([^)]+)\\)?\ +\\(?:{[^}]+}\\)?" + value start) (setq start (match-end 0)) (let ((p (match-string-no-properties 1 value))) (unless (member-ignore-case p org-special-properties) @@ -19481,7 +19483,6 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (org-defkey org-mode-map [(shift return)] 'org-table-copy-down) (org-defkey org-mode-map [(meta shift return)] 'org-insert-todo-heading) -(org-defkey org-mode-map [(meta return)] 'org-meta-return) (org-defkey org-mode-map (kbd "M-RET") #'org-meta-return) ;; Cursor keys with modifiers @@ -24204,16 +24205,25 @@ convenience: - On an affiliated keyword, jump to the first one. - On a table or a property drawer, move to its beginning. - - On a verse or source block, stop before blank lines." + - On comment, example, export, src and verse blocks, stop + before blank lines." (interactive) (unless (bobp) (let* ((deactivate-mark nil) (element (org-element-at-point)) (type (org-element-type element)) - (contents-begin (org-element-property :contents-begin element)) (contents-end (org-element-property :contents-end element)) (post-affiliated (org-element-property :post-affiliated element)) - (begin (org-element-property :begin element))) + (begin (org-element-property :begin element)) + (special? ;blocks handled specially + (memq type '(comment-block example-block export-block src-block + verse-block))) + (contents-begin + (if special? + ;; These types have no proper contents. Fake line + ;; below the block opening line as contents beginning. + (save-excursion (goto-char begin) (line-beginning-position 2)) + (org-element-property :contents-begin element)))) (cond ((not element) (goto-char (point-min))) ((= (point) begin) @@ -24224,11 +24234,8 @@ convenience: (goto-char (org-element-property :post-affiliated (org-element-property :parent element)))) ((memq type '(property-drawer table)) (goto-char begin)) - ((memq type '(src-block verse-block)) - (when (eq type 'src-block) - (setq contents-begin - (save-excursion (goto-char begin) (forward-line) (point)))) - (if (= (point) contents-begin) (goto-char post-affiliated) + (special? + (if (<= (point) contents-begin) (goto-char post-affiliated) ;; Inside a verse block, see blank lines as paragraph ;; separators. (let ((origin (point))) @@ -24237,7 +24244,6 @@ convenience: (skip-chars-forward " \r\t\n" origin) (if (= (point) origin) (goto-char contents-begin) (beginning-of-line)))))) - ((not contents-begin) (goto-char (or post-affiliated begin))) ((eq type 'paragraph) (goto-char contents-begin) ;; When at first paragraph in an item or a footnote definition, diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index fb8c61334f5..8ce4fb6adcd 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -174,7 +174,6 @@ (:html-klipsify-src nil nil org-html-klipsify-src) (:html-klipse-css nil nil org-html-klipse-css) (:html-klipse-js nil nil org-html-klipse-js) - (:html-klipse-keep-old-src nil nil org-html-keep-old-src) (:html-klipse-selection-script nil nil org-html-klipse-selection-script) (:infojs-opt "INFOJS_OPT" nil nil) ;; Redefine regular options. @@ -1572,12 +1571,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag" :package-version '(Org . "9.1") :type 'string) -(defcustom org-html-keep-old-src nil - "When non-nil, use
 instead of 
."
-  :group 'org-export-html
-  :package-version '(Org . "9.1")
-  :type 'boolean)
-
 
 ;;;; Todos
 
@@ -3402,12 +3395,16 @@ contextual information."
 			      listing-number
 			      (org-trim (org-export-data caption info))))))
 		;; Contents.
-		(let ((open (if org-html-keep-old-src "" "
"))) - (format "%s class=\"src src-%s\"%s%s>%s%s" - open lang label (if (and klipsify (string= lang "html")) - " data-editor-type=\"html\"" "") - code close))))))) + (if klipsify + (format "
%s
" + lang + label + (if (string= lang "html") + " data-editor-type=\"html\"" + "") + code) + (format "
%s
" + lang label code))))))) ;;;; Statistics Cookie diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index a975abc4871..957b0da7c59 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -435,8 +435,8 @@ This splices all the components into the list." (let* ((base-dir (file-name-as-directory (org-publish-property :base-directory project))) (extension (or (org-publish-property :base-extension project) "org")) - (match (and (not (eq extension 'any)) - (concat "^[^\\.].*\\.\\(" extension "\\)$"))) + (match (if (eq extension 'any) "" + (format "^[^\\.].*\\.\\(%s\\)$" extension))) (base-files (cl-remove-if #'file-directory-p (if (org-publish-property :recursive project) -- 2.39.5