diff options
| author | Rasmus | 2017-12-06 15:02:15 +0100 |
|---|---|---|
| committer | Rasmus | 2017-12-06 15:37:41 +0100 |
| commit | 445eefd238eb7c3843e18cd265c05f07233f8aff (patch) | |
| tree | 1b80ecda2301629cf8e1f0b2941e1f729952ca84 | |
| parent | 5381c70b7a9d46fe4de205363b99f761e2475f1f (diff) | |
| download | emacs-445eefd238eb7c3843e18cd265c05f07233f8aff.tar.gz emacs-445eefd238eb7c3843e18cd265c05f07233f8aff.zip | |
Backport: Update Org to v9.1.4
Please note this is a bugfix release. See etc/ORG-NEWS for details.
(cherry picked from commit 567b5efe1f338c10c574758fb968915c5c34c909)
31 files changed, 561 insertions, 460 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 72fbbade59e..1f6e10287d1 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @settitle The Org Manual | 4 | @settitle The Org Manual |
| 5 | @include docstyle.texi | 5 | @include docstyle.texi |
| 6 | 6 | ||
| 7 | @set VERSION 9.1.2 | 7 | @set VERSION 9.1.4 |
| 8 | @set DATE 2017-09-17 | 8 | @set DATE 2017-09-17 |
| 9 | 9 | ||
| 10 | @c Version and Contact Info | 10 | @c Version and Contact Info |
| @@ -1299,7 +1299,7 @@ level, all sibling headings. With a double prefix argument, also show the | |||
| 1299 | entire subtree of the parent. | 1299 | entire subtree of the parent. |
| 1300 | @cindex show branches, command | 1300 | @cindex show branches, command |
| 1301 | @orgcmd{C-c C-k,outline-show-branches} | 1301 | @orgcmd{C-c C-k,outline-show-branches} |
| 1302 | Expose all the headings of the subtree, CONTENT view for just one subtree. | 1302 | Expose all the headings of the subtree, CONTENTS view for just one subtree. |
| 1303 | @cindex show children, command | 1303 | @cindex show children, command |
| 1304 | @orgcmd{C-c @key{TAB},outline-show-children} | 1304 | @orgcmd{C-c @key{TAB},outline-show-children} |
| 1305 | Expose all direct children of the subtree. With a numeric prefix argument N, | 1305 | Expose all direct children of the subtree. With a numeric prefix argument N, |
| @@ -1461,10 +1461,10 @@ Demote current heading by one level. | |||
| 1461 | Promote the current subtree by one level. | 1461 | Promote the current subtree by one level. |
| 1462 | @orgcmd{M-S-@key{right},org-demote-subtree} | 1462 | @orgcmd{M-S-@key{right},org-demote-subtree} |
| 1463 | Demote the current subtree by one level. | 1463 | Demote the current subtree by one level. |
| 1464 | @orgcmd{M-S-@key{up},org-move-subtree-up} | 1464 | @orgcmd{M-@key{up},org-move-subtree-up} |
| 1465 | Move subtree up (swap with previous subtree of same | 1465 | Move subtree up (swap with previous subtree of same |
| 1466 | level). | 1466 | level). |
| 1467 | @orgcmd{M-S-@key{down},org-move-subtree-down} | 1467 | @orgcmd{M-@key{down},org-move-subtree-down} |
| 1468 | Move subtree down (swap with next subtree of same level). | 1468 | Move subtree down (swap with next subtree of same level). |
| 1469 | @orgcmd{M-h,org-mark-element} | 1469 | @orgcmd{M-h,org-mark-element} |
| 1470 | Mark the element at point. Hitting repeatedly will mark subsequent elements | 1470 | Mark the element at point. Hitting repeatedly will mark subsequent elements |
| @@ -5818,8 +5818,7 @@ The following commands insert or update the dynamic block: | |||
| 5818 | Insert a dynamic block capturing a column view. You will be prompted | 5818 | Insert a dynamic block capturing a column view. You will be prompted |
| 5819 | for the scope or ID of the view. | 5819 | for the scope or ID of the view. |
| 5820 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} | 5820 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} |
| 5821 | Update dynamic block at point. The cursor needs to be in the | 5821 | Update dynamic block at point. |
| 5822 | @code{#+BEGIN} line of the dynamic block. | ||
| 5823 | @orgcmd{C-u C-c C-x C-u,org-update-all-dblocks} | 5822 | @orgcmd{C-u C-c C-x C-u,org-update-all-dblocks} |
| 5824 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if | 5823 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if |
| 5825 | you have several clock table blocks, column-capturing blocks or other dynamic | 5824 | you have several clock table blocks, column-capturing blocks or other dynamic |
| @@ -6604,8 +6603,7 @@ argument, jump to the first clock report in the current document and | |||
| 6604 | update it. The clock table always includes also trees with | 6603 | update it. The clock table always includes also trees with |
| 6605 | @code{:ARCHIVE:} tag. | 6604 | @code{:ARCHIVE:} tag. |
| 6606 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} | 6605 | @orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} |
| 6607 | Update dynamic block at point. The cursor needs to be in the | 6606 | Update dynamic block at point. |
| 6608 | @code{#+BEGIN} line of the dynamic block. | ||
| 6609 | @orgkey{C-u C-c C-x C-u} | 6607 | @orgkey{C-u C-c C-x C-u} |
| 6610 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if | 6608 | Update all dynamic blocks (@pxref{Dynamic blocks}). This is useful if |
| 6611 | you have several clock table blocks in a buffer. | 6609 | you have several clock table blocks in a buffer. |
| @@ -7352,6 +7350,7 @@ gnus | %:group, @r{for messages also all email fiel | |||
| 7352 | eww, w3, w3m | %:url | 7350 | eww, w3, w3m | %:url |
| 7353 | info | %:file %:node | 7351 | info | %:file %:node |
| 7354 | calendar | %:date | 7352 | calendar | %:date |
| 7353 | org-protocol | %:link %:description %:annotation | ||
| 7355 | @end smallexample | 7354 | @end smallexample |
| 7356 | 7355 | ||
| 7357 | @noindent | 7356 | @noindent |
| @@ -7593,22 +7592,15 @@ javascript:location.href='org-protocol://store-link?url='+ | |||
| 7593 | @cindex capture protocol | 7592 | @cindex capture protocol |
| 7594 | @cindex protocol, capture | 7593 | @cindex protocol, capture |
| 7595 | 7594 | ||
| 7596 | @cindex capture, %:url placeholder | ||
| 7597 | @cindex %:url template expansion in capture | ||
| 7598 | @cindex capture, %:title placeholder | ||
| 7599 | @cindex %:title template expansion in capture | ||
| 7600 | Activating @code{capture} handler pops up a @samp{Capture} buffer and fills | 7595 | Activating @code{capture} handler pops up a @samp{Capture} buffer and fills |
| 7601 | the capture template associated to the @samp{X} key with them. The template | 7596 | the capture template associated to the @samp{X} key with them. |
| 7602 | refers to the data through @code{%:url} and @code{%:title} placeholders. | ||
| 7603 | Moreover, any selected text in the browser is appended to the body of the | ||
| 7604 | entry. | ||
| 7605 | 7597 | ||
| 7606 | @example | 7598 | @example |
| 7607 | emacsclient org-protocol://capture?template=X?url=URL?title=TITLE?body=BODY | 7599 | emacsclient org-protocol://capture?template=X?url=URL?title=TITLE?body=BODY |
| 7608 | @end example | 7600 | @end example |
| 7609 | 7601 | ||
| 7610 | To use this feature, add a bookmark with an arbitrary name, e.g. | 7602 | To use this feature, add a bookmark with an arbitrary name, e.g. @samp{Org: |
| 7611 | @samp{Org: capture} and enter this as @samp{Location}: | 7603 | capture} and enter this as @samp{Location}: |
| 7612 | 7604 | ||
| 7613 | @example | 7605 | @example |
| 7614 | javascript:location.href='org-protocol://template=x'+ | 7606 | javascript:location.href='org-protocol://template=x'+ |
| @@ -7622,6 +7614,21 @@ The result depends on the capture template used, which is set in the bookmark | |||
| 7622 | itself, as in the example above, or in | 7614 | itself, as in the example above, or in |
| 7623 | @code{org-protocol-default-template-key}. | 7615 | @code{org-protocol-default-template-key}. |
| 7624 | 7616 | ||
| 7617 | @cindex capture, %:link placeholder | ||
| 7618 | @cindex %:link template expansion in capture | ||
| 7619 | @cindex capture, %:description placeholder | ||
| 7620 | @cindex %:description template expansion in capture | ||
| 7621 | @cindex capture, %:annotation placeholder | ||
| 7622 | @cindex %:annotation template expansion in capture | ||
| 7623 | The following template placeholders are available: | ||
| 7624 | |||
| 7625 | @example | ||
| 7626 | %:link The URL | ||
| 7627 | %:description The webpage title | ||
| 7628 | %:annotation Equivalent to [[%:link][%:description]] | ||
| 7629 | %i The selected text | ||
| 7630 | @end example | ||
| 7631 | |||
| 7625 | @node @code{open-source} protocol | 7632 | @node @code{open-source} protocol |
| 7626 | @subsection @code{open-source} protocol | 7633 | @subsection @code{open-source} protocol |
| 7627 | @cindex open-source protocol | 7634 | @cindex open-source protocol |
| @@ -10782,8 +10789,9 @@ Toggle inclusion of inlinetasks (@code{org-export-with-inlinetasks}). | |||
| 10782 | @cindex property, UNNUMBERED | 10789 | @cindex property, UNNUMBERED |
| 10783 | Toggle section-numbers (@code{org-export-with-section-numbers}). When set to | 10790 | Toggle section-numbers (@code{org-export-with-section-numbers}). When set to |
| 10784 | number @samp{n}, Org numbers only those headlines at level @samp{n} or above. | 10791 | number @samp{n}, Org numbers only those headlines at level @samp{n} or above. |
| 10785 | Set @code{UNNUMBERED} property to non-@code{nil} to disable numbering of | 10792 | Setting @code{UNNUMBERED} property to non-@code{nil} disables numbering of |
| 10786 | heading and subheadings entirely. | 10793 | a heading. Since subheadings inherit from this property, it affects their |
| 10794 | numbering, too. | ||
| 10787 | 10795 | ||
| 10788 | @item p: | 10796 | @item p: |
| 10789 | @vindex org-export-with-planning | 10797 | @vindex org-export-with-planning |
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 19648cf17a8..7ed839a1847 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS | |||
| @@ -492,9 +492,6 @@ It used to be ~@samp~ but ~@asis~ is neutral and, therefore, more | |||
| 492 | suitable as a default value. | 492 | suitable as a default value. |
| 493 | *** Texinfo default process includes ~--no-split~ option | 493 | *** Texinfo default process includes ~--no-split~ option |
| 494 | *** New entities : ~\dollar~ and ~\USD~ | 494 | *** New entities : ~\dollar~ and ~\USD~ |
| 495 | *** ~org-parse-time-string~ accepts a new optional argument | ||
| 496 | =ZONE= specifies the current time zone. | ||
| 497 | *** ~org-time-string-to-seconds~ now accepts an optional =ZONE= argument | ||
| 498 | *** Support for date style URLs in =org-protocol://open-source= | 495 | *** Support for date style URLs in =org-protocol://open-source= |
| 499 | URLs like =https://cool-blog.com/2017/05/20/cool-post/= are | 496 | URLs like =https://cool-blog.com/2017/05/20/cool-post/= are |
| 500 | covered by rewrite rules. | 497 | covered by rewrite rules. |
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 99f90b8d31c..ad0d3bc13e5 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | % Reference Card for Org Mode | 1 | % Reference Card for Org Mode |
| 2 | \def\orgversionnumber{9.1.2} | 2 | \def\orgversionnumber{9.1.4} |
| 3 | \def\versionyear{2017} % latest update | 3 | \def\versionyear{2017} % latest update |
| 4 | \input emacsver.tex | 4 | \input emacsver.tex |
| 5 | 5 | ||
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index c7c03845451..17aae68434a 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el | |||
| @@ -1765,15 +1765,17 @@ to `org-babel-named-src-block-regexp'." | |||
| 1765 | 1765 | ||
| 1766 | (defun org-babel-src-block-names (&optional file) | 1766 | (defun org-babel-src-block-names (&optional file) |
| 1767 | "Returns the names of source blocks in FILE or the current buffer." | 1767 | "Returns the names of source blocks in FILE or the current buffer." |
| 1768 | (when file (find-file file)) | 1768 | (with-current-buffer (if file (find-file-noselect file) (current-buffer)) |
| 1769 | (save-excursion | 1769 | (org-with-point-at 1 |
| 1770 | (goto-char (point-min)) | 1770 | (let ((regexp "^[ \t]*#\\+begin_src ") |
| 1771 | (let* ((re (org-babel-named-src-block-regexp-for-name)) | 1771 | (case-fold-search t) |
| 1772 | (names (and (looking-at re) | 1772 | (names nil)) |
| 1773 | (list (match-string-no-properties 9))))) | 1773 | (while (re-search-forward regexp nil t) |
| 1774 | (while (ignore-errors (org-next-block 1 nil re)) | 1774 | (let ((element (org-element-at-point))) |
| 1775 | (push (match-string-no-properties 9) names)) | 1775 | (when (eq 'src-block (org-element-type element)) |
| 1776 | names))) | 1776 | (let ((name (org-element-property :name element))) |
| 1777 | (when name (push name names)))))) | ||
| 1778 | names)))) | ||
| 1777 | 1779 | ||
| 1778 | ;;;###autoload | 1780 | ;;;###autoload |
| 1779 | (defun org-babel-goto-named-result (name) | 1781 | (defun org-babel-goto-named-result (name) |
| @@ -2416,8 +2418,11 @@ INFO may provide the values of these header arguments (in the | |||
| 2416 | (goto-char location) | 2418 | (goto-char location) |
| 2417 | (when (looking-at (concat org-babel-result-regexp ".*$")) | 2419 | (when (looking-at (concat org-babel-result-regexp ".*$")) |
| 2418 | (delete-region | 2420 | (delete-region |
| 2419 | (if keep-keyword (1+ (match-end 0)) (1- (match-beginning 0))) | 2421 | (if keep-keyword (line-beginning-position 2) |
| 2420 | (progn (forward-line 1) (org-babel-result-end)))))))) | 2422 | (save-excursion |
| 2423 | (skip-chars-backward " \r\t\n") | ||
| 2424 | (line-beginning-position 2))) | ||
| 2425 | (progn (forward-line) (org-babel-result-end)))))))) | ||
| 2421 | 2426 | ||
| 2422 | (defun org-babel-remove-inline-result (&optional datum) | 2427 | (defun org-babel-remove-inline-result (&optional datum) |
| 2423 | "Remove the result of the current inline-src-block or babel call. | 2428 | "Remove the result of the current inline-src-block or babel call. |
| @@ -2454,24 +2459,21 @@ in the buffer." | |||
| 2454 | 2459 | ||
| 2455 | (defun org-babel-result-end () | 2460 | (defun org-babel-result-end () |
| 2456 | "Return the point at the end of the current set of results." | 2461 | "Return the point at the end of the current set of results." |
| 2457 | (save-excursion | 2462 | (cond ((looking-at-p "^[ \t]*$") (point)) ;no result |
| 2458 | (cond | 2463 | ((looking-at-p (format "^[ \t]*%s[ \t]*$" org-bracket-link-regexp)) |
| 2459 | ((org-at-table-p) (progn (goto-char (org-table-end)) (point))) | 2464 | (line-beginning-position 2)) |
| 2460 | ((org-at-item-p) (let* ((struct (org-list-struct)) | 2465 | (t |
| 2461 | (prvs (org-list-prevs-alist struct))) | 2466 | (let ((element (org-element-at-point))) |
| 2462 | (org-list-get-list-end (point-at-bol) struct prvs))) | 2467 | (if (memq (org-element-type element) |
| 2463 | ((let ((case-fold-search t)) (looking-at "^\\([ \t]*\\):results:")) | 2468 | ;; Possible results types. |
| 2464 | (progn (re-search-forward (concat "^" (match-string 1) ":END:")) | 2469 | '(drawer example-block export-block fixed-width item |
| 2465 | (forward-char 1) (point))) | 2470 | plain-list src-block table)) |
| 2466 | (t | 2471 | (save-excursion |
| 2467 | (let ((case-fold-search t)) | 2472 | (goto-char (min (point-max) ;for narrowed buffers |
| 2468 | (if (looking-at (concat "[ \t]*#\\+begin_\\([^ \t\n\r]+\\)")) | 2473 | (org-element-property :end element))) |
| 2469 | (progn (re-search-forward (concat "[ \t]*#\\+end_" (match-string 1)) | 2474 | (skip-chars-backward " \r\t\n") |
| 2470 | nil t) | 2475 | (line-beginning-position 2)) |
| 2471 | (forward-char 1)) | 2476 | (point)))))) |
| 2472 | (while (looking-at "[ \t]*\\(: \\|:$\\|\\[\\[\\)") | ||
| 2473 | (forward-line 1)))) | ||
| 2474 | (point))))) | ||
| 2475 | 2477 | ||
| 2476 | (defun org-babel-result-to-file (result &optional description) | 2478 | (defun org-babel-result-to-file (result &optional description) |
| 2477 | "Convert RESULT into an `org-mode' link with optional DESCRIPTION. | 2479 | "Convert RESULT into an `org-mode' link with optional DESCRIPTION. |
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el index 763386270d7..b0743f60475 100644 --- a/lisp/org/ob-gnuplot.el +++ b/lisp/org/ob-gnuplot.el | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | ;;; Code: | 40 | ;;; Code: |
| 41 | (require 'ob) | 41 | (require 'ob) |
| 42 | 42 | ||
| 43 | (declare-function org-time-string-to-time "org" (s &optional zone)) | 43 | (declare-function org-time-string-to-time "org" (s)) |
| 44 | (declare-function org-combine-plists "org" (&rest plists)) | 44 | (declare-function org-combine-plists "org" (&rest plists)) |
| 45 | (declare-function orgtbl-to-generic "org-table" (table params)) | 45 | (declare-function orgtbl-to-generic "org-table" (table params)) |
| 46 | (declare-function gnuplot-mode "ext:gnuplot-mode" ()) | 46 | (declare-function gnuplot-mode "ext:gnuplot-mode" ()) |
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index adc6806766d..09d011fc35e 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el | |||
| @@ -494,10 +494,9 @@ non-nil, return the full association list to be used by | |||
| 494 | link) | 494 | link) |
| 495 | source-name | 495 | source-name |
| 496 | params | 496 | params |
| 497 | (org-unescape-code-in-string | 497 | (if org-src-preserve-indentation |
| 498 | (if org-src-preserve-indentation | 498 | (org-trim body t) |
| 499 | (org-trim body t) | 499 | (org-trim (org-remove-indentation body))) |
| 500 | (org-trim (org-remove-indentation body)))) | ||
| 501 | comment))) | 500 | comment))) |
| 502 | (if only-this-block | 501 | (if only-this-block |
| 503 | (list (cons src-lang (list result))) | 502 | (list (cons src-lang (list result))) |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index cf7a4dbf38b..ad811ce3193 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -606,8 +606,8 @@ subtree to see if any of the subtasks have project status. | |||
| 606 | See also the variable `org-tags-match-list-sublevels' which applies | 606 | See also the variable `org-tags-match-list-sublevels' which applies |
| 607 | to projects matched by this search as well. | 607 | to projects matched by this search as well. |
| 608 | 608 | ||
| 609 | After defining this variable, you may use `\\[org-agenda-list-stuck-projects]' | 609 | After defining this variable, you may use `org-agenda-list-stuck-projects' |
| 610 | \(bound to `C-c a #') to produce the list." | 610 | \(bound to `\\[org-agenda] #') to produce the list." |
| 611 | :group 'org-agenda-custom-commands | 611 | :group 'org-agenda-custom-commands |
| 612 | :type '(list | 612 | :type '(list |
| 613 | (string :tag "Tags/TODO match to identify a project") | 613 | (string :tag "Tags/TODO match to identify a project") |
| @@ -2520,7 +2520,7 @@ The following commands are available: | |||
| 2520 | ("MobileOrg" | 2520 | ("MobileOrg" |
| 2521 | ["Push Files and Views" org-mobile-push t] | 2521 | ["Push Files and Views" org-mobile-push t] |
| 2522 | ["Get Captured and Flagged" org-mobile-pull t] | 2522 | ["Get Captured and Flagged" org-mobile-pull t] |
| 2523 | ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c a ?"] | 2523 | ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "\\[org-agenda] ?"] |
| 2524 | ["Show note / unflag" org-agenda-show-the-flagging-note t] | 2524 | ["Show note / unflag" org-agenda-show-the-flagging-note t] |
| 2525 | "--" | 2525 | "--" |
| 2526 | ["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t]) | 2526 | ["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t]) |
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el index 03376172a62..01514d75652 100644 --- a/lisp/org/org-archive.el +++ b/lisp/org/org-archive.el | |||
| @@ -381,10 +381,7 @@ direct children of this heading." | |||
| 381 | (point) | 381 | (point) |
| 382 | (concat "ARCHIVE_" (upcase (symbol-name item))) | 382 | (concat "ARCHIVE_" (upcase (symbol-name item))) |
| 383 | value)))) | 383 | value)))) |
| 384 | (widen) | 384 | (widen)))) |
| 385 | ;; Save and kill the buffer, if it is not the same | ||
| 386 | ;; buffer. | ||
| 387 | (unless (eq this-buffer buffer) (save-buffer))))) | ||
| 388 | ;; Here we are back in the original buffer. Everything seems | 385 | ;; Here we are back in the original buffer. Everything seems |
| 389 | ;; to have worked. So now run hooks, cut the tree and finish | 386 | ;; to have worked. So now run hooks, cut the tree and finish |
| 390 | ;; up. | 387 | ;; up. |
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index 38b79cecfe4..cd6b4136233 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el | |||
| @@ -507,7 +507,7 @@ This can be used after files have been added externally." | |||
| 507 | (let ((attach-dir (org-attach-dir))) | 507 | (let ((attach-dir (org-attach-dir))) |
| 508 | (when attach-dir | 508 | (when attach-dir |
| 509 | (let ((files (org-attach-file-list attach-dir))) | 509 | (let ((files (org-attach-file-list attach-dir))) |
| 510 | (and files (org-attach-tag)) | 510 | (org-attach-tag (not files)) |
| 511 | (when org-attach-file-list-property | 511 | (when org-attach-file-list-property |
| 512 | (dolist (file files) | 512 | (dolist (file files) |
| 513 | (unless (string-match "^\\.\\.?\\'" file) | 513 | (unless (string-match "^\\.\\.?\\'" file) |
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index 862cdb27623..03210210864 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -79,6 +79,12 @@ | |||
| 79 | (defvar org-capture-is-refiling nil | 79 | (defvar org-capture-is-refiling nil |
| 80 | "Non-nil when capture process is refiling an entry.") | 80 | "Non-nil when capture process is refiling an entry.") |
| 81 | 81 | ||
| 82 | (defvar org-capture--prompt-history-table (make-hash-table :test #'equal) | ||
| 83 | "Hash table for all history lists per prompt.") | ||
| 84 | |||
| 85 | (defvar org-capture--prompt-history nil | ||
| 86 | "History list for prompt placeholders.") | ||
| 87 | |||
| 82 | (defgroup org-capture nil | 88 | (defgroup org-capture nil |
| 83 | "Options concerning capturing new entries." | 89 | "Options concerning capturing new entries." |
| 84 | :tag "Org Capture" | 90 | :tag "Org Capture" |
| @@ -1311,8 +1317,8 @@ Of course, if exact position has been required, just put it there." | |||
| 1311 | 1317 | ||
| 1312 | (defun org-capture-mark-kill-region (beg end) | 1318 | (defun org-capture-mark-kill-region (beg end) |
| 1313 | "Mark the region that will have to be killed when aborting capture." | 1319 | "Mark the region that will have to be killed when aborting capture." |
| 1314 | (let ((m1 (move-marker (make-marker) beg)) | 1320 | (let ((m1 (copy-marker beg)) |
| 1315 | (m2 (move-marker (make-marker) end))) | 1321 | (m2 (copy-marker end t))) |
| 1316 | (org-capture-put :begin-marker m1) | 1322 | (org-capture-put :begin-marker m1) |
| 1317 | (org-capture-put :end-marker m2))) | 1323 | (org-capture-put :end-marker m2))) |
| 1318 | 1324 | ||
| @@ -1792,19 +1798,25 @@ The template may still contain \"%?\" for cursor positioning." | |||
| 1792 | (let* ((upcase? (equal (upcase key) key)) | 1798 | (let* ((upcase? (equal (upcase key) key)) |
| 1793 | (org-end-time-was-given nil) | 1799 | (org-end-time-was-given nil) |
| 1794 | (time (org-read-date upcase? t nil prompt))) | 1800 | (time (org-read-date upcase? t nil prompt))) |
| 1795 | (let ((org-time-was-given upcase?)) | 1801 | (org-insert-time-stamp |
| 1796 | (org-insert-time-stamp | 1802 | time (or org-time-was-given upcase?) |
| 1797 | time org-time-was-given | 1803 | (member key '("u" "U")) |
| 1798 | (member key '("u" "U")) | 1804 | nil nil (list org-end-time-was-given)))) |
| 1799 | nil nil (list org-end-time-was-given))))) | ||
| 1800 | (`nil | 1805 | (`nil |
| 1806 | ;; Load history list for current prompt. | ||
| 1807 | (setq org-capture--prompt-history | ||
| 1808 | (gethash prompt org-capture--prompt-history-table)) | ||
| 1801 | (push (org-completing-read | 1809 | (push (org-completing-read |
| 1802 | (concat (or prompt "Enter string") | 1810 | (concat (or prompt "Enter string") |
| 1803 | (and default (format " [%s]" default)) | 1811 | (and default (format " [%s]" default)) |
| 1804 | ": ") | 1812 | ": ") |
| 1805 | completions nil nil nil nil default) | 1813 | completions |
| 1814 | nil nil nil 'org-capture--prompt-history default) | ||
| 1806 | strings) | 1815 | strings) |
| 1807 | (insert (car strings))) | 1816 | (insert (car strings)) |
| 1817 | ;; Save updated history list for current prompt. | ||
| 1818 | (puthash prompt org-capture--prompt-history | ||
| 1819 | org-capture--prompt-history-table)) | ||
| 1808 | (_ | 1820 | (_ |
| 1809 | (error "Unknown template placeholder: \"%%^%s\"" | 1821 | (error "Unknown template placeholder: \"%%^%s\"" |
| 1810 | key)))))))) | 1822 | key)))))))) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 69e199ea27f..0e7eb214958 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1467,7 +1467,7 @@ The time is always returned as UTC." | |||
| 1467 | (and (or (not cmt) (equal cmt "auto")) | 1467 | (and (or (not cmt) (equal cmt "auto")) |
| 1468 | lr)) | 1468 | lr)) |
| 1469 | (setq org--msg-extra "showing task time since last repeat.") | 1469 | (setq org--msg-extra "showing task time since last repeat.") |
| 1470 | (and lr (org-time-string-to-time lr t))) | 1470 | (and lr (org-time-string-to-time lr))) |
| 1471 | (t nil)))) | 1471 | (t nil)))) |
| 1472 | 1472 | ||
| 1473 | (defun org-clock-find-position (find-unclosed) | 1473 | (defun org-clock-find-position (find-unclosed) |
| @@ -1604,9 +1604,9 @@ to, overriding the existing value of `org-clock-out-switch-to-state'." | |||
| 1604 | (insert "--") | 1604 | (insert "--") |
| 1605 | (setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive)) | 1605 | (setq te (org-insert-time-stamp (or at-time now) 'with-hm 'inactive)) |
| 1606 | (setq s (- (float-time | 1606 | (setq s (- (float-time |
| 1607 | (apply #'encode-time (org-parse-time-string te nil t))) | 1607 | (apply #'encode-time (org-parse-time-string te))) |
| 1608 | (float-time | 1608 | (float-time |
| 1609 | (apply #'encode-time (org-parse-time-string ts nil t)))) | 1609 | (apply #'encode-time (org-parse-time-string ts)))) |
| 1610 | h (floor (/ s 3600)) | 1610 | h (floor (/ s 3600)) |
| 1611 | s (- s (* 3600 h)) | 1611 | s (- s (* 3600 h)) |
| 1612 | m (floor (/ s 60)) | 1612 | m (floor (/ s 60)) |
| @@ -1711,8 +1711,8 @@ Optional argument N tells to change by that many units." | |||
| 1711 | (begts (if updatets1 begts1 begts2))) | 1711 | (begts (if updatets1 begts1 begts2))) |
| 1712 | (setq tdiff | 1712 | (setq tdiff |
| 1713 | (time-subtract | 1713 | (time-subtract |
| 1714 | (org-time-string-to-time org-last-changed-timestamp t) | 1714 | (org-time-string-to-time org-last-changed-timestamp) |
| 1715 | (org-time-string-to-time ts t))) | 1715 | (org-time-string-to-time ts))) |
| 1716 | (save-excursion | 1716 | (save-excursion |
| 1717 | (goto-char begts) | 1717 | (goto-char begts) |
| 1718 | (org-timestamp-change | 1718 | (org-timestamp-change |
| @@ -1820,10 +1820,10 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes." | |||
| 1820 | (lmax 30) | 1820 | (lmax 30) |
| 1821 | (ltimes (make-vector lmax 0)) | 1821 | (ltimes (make-vector lmax 0)) |
| 1822 | (level 0) | 1822 | (level 0) |
| 1823 | (tstart (cond ((stringp tstart) (org-time-string-to-seconds tstart t)) | 1823 | (tstart (cond ((stringp tstart) (org-time-string-to-seconds tstart)) |
| 1824 | ((consp tstart) (float-time tstart)) | 1824 | ((consp tstart) (float-time tstart)) |
| 1825 | (t tstart))) | 1825 | (t tstart))) |
| 1826 | (tend (cond ((stringp tend) (org-time-string-to-seconds tend t)) | 1826 | (tend (cond ((stringp tend) (org-time-string-to-seconds tend)) |
| 1827 | ((consp tend) (float-time tend)) | 1827 | ((consp tend) (float-time tend)) |
| 1828 | (t tend))) | 1828 | (t tend))) |
| 1829 | (t1 0) | 1829 | (t1 0) |
| @@ -1840,11 +1840,10 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes." | |||
| 1840 | (let* ((ts (float-time | 1840 | (let* ((ts (float-time |
| 1841 | (apply #'encode-time | 1841 | (apply #'encode-time |
| 1842 | (save-match-data | 1842 | (save-match-data |
| 1843 | (org-parse-time-string | 1843 | (org-parse-time-string (match-string 2)))))) |
| 1844 | (match-string 2) nil t))))) | ||
| 1845 | (te (float-time | 1844 | (te (float-time |
| 1846 | (apply #'encode-time | 1845 | (apply #'encode-time |
| 1847 | (org-parse-time-string (match-string 3) nil t)))) | 1846 | (org-parse-time-string (match-string 3))))) |
| 1848 | (dt (- (if tend (min te tend) te) | 1847 | (dt (- (if tend (min te tend) te) |
| 1849 | (if tstart (max ts tstart) ts)))) | 1848 | (if tstart (max ts tstart) ts)))) |
| 1850 | (when (> dt 0) (cl-incf t1 (floor (/ dt 60)))))) | 1849 | (when (> dt 0) (cl-incf t1 (floor (/ dt 60)))))) |
| @@ -2725,7 +2724,9 @@ LEVEL is an integer. Indent by two spaces per level above 1." | |||
| 2725 | (setq te (float-time (apply #'encode-time (org-parse-time-string te)))))) | 2724 | (setq te (float-time (apply #'encode-time (org-parse-time-string te)))))) |
| 2726 | (setq tsb | 2725 | (setq tsb |
| 2727 | (if (eq step0 'week) | 2726 | (if (eq step0 'week) |
| 2728 | (- ts (* 86400 (- (nth 6 (decode-time (seconds-to-time ts))) ws))) | 2727 | (let ((dow (nth 6 (decode-time (seconds-to-time ts))))) |
| 2728 | (if (< dow ws) ts | ||
| 2729 | (- ts (* 86400 (- dow ws))))) | ||
| 2729 | ts)) | 2730 | ts)) |
| 2730 | (setq p1 (plist-put p1 :header "")) | 2731 | (setq p1 (plist-put p1 :header "")) |
| 2731 | (setq p1 (plist-put p1 :step nil)) | 2732 | (setq p1 (plist-put p1 :step nil)) |
| @@ -2735,9 +2736,14 @@ LEVEL is an integer. Indent by two spaces per level above 1." | |||
| 2735 | (setq p1 (plist-put p1 :tstart (format-time-string | 2736 | (setq p1 (plist-put p1 :tstart (format-time-string |
| 2736 | (org-time-stamp-format nil t) | 2737 | (org-time-stamp-format nil t) |
| 2737 | (seconds-to-time (max tsb ts))))) | 2738 | (seconds-to-time (max tsb ts))))) |
| 2739 | (cl-incf tsb (let ((dow (nth 6 (decode-time (seconds-to-time tsb))))) | ||
| 2740 | (if (or (eq step0 'day) | ||
| 2741 | (= dow ws)) | ||
| 2742 | step | ||
| 2743 | (* 86400 (- ws dow))))) | ||
| 2738 | (setq p1 (plist-put p1 :tend (format-time-string | 2744 | (setq p1 (plist-put p1 :tend (format-time-string |
| 2739 | (org-time-stamp-format nil t) | 2745 | (org-time-stamp-format nil t) |
| 2740 | (seconds-to-time (min te (setq tsb (+ tsb step))))))) | 2746 | (seconds-to-time (min te tsb))))) |
| 2741 | (insert "\n" (if (eq step0 'day) "Daily report: " | 2747 | (insert "\n" (if (eq step0 'day) "Daily report: " |
| 2742 | "Weekly report starting on: ") | 2748 | "Weekly report starting on: ") |
| 2743 | (plist-get p1 :tstart) "\n") | 2749 | (plist-get p1 :tstart) "\n") |
| @@ -2895,9 +2901,9 @@ Otherwise, return nil." | |||
| 2895 | (setq ts (match-string 1) | 2901 | (setq ts (match-string 1) |
| 2896 | te (match-string 3)) | 2902 | te (match-string 3)) |
| 2897 | (setq s (- (float-time | 2903 | (setq s (- (float-time |
| 2898 | (apply #'encode-time (org-parse-time-string te nil t))) | 2904 | (apply #'encode-time (org-parse-time-string te))) |
| 2899 | (float-time | 2905 | (float-time |
| 2900 | (apply #'encode-time (org-parse-time-string ts nil t)))) | 2906 | (apply #'encode-time (org-parse-time-string ts)))) |
| 2901 | neg (< s 0) | 2907 | neg (< s 0) |
| 2902 | s (abs s) | 2908 | s (abs s) |
| 2903 | h (floor (/ s 3600)) | 2909 | h (floor (/ s 3600)) |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index eac29c50f65..649ca52c4f8 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -1070,7 +1070,7 @@ as a canonical duration, i.e., using units defined in | |||
| 1070 | (cond | 1070 | (cond |
| 1071 | ((string-match-p org-ts-regexp s) | 1071 | ((string-match-p org-ts-regexp s) |
| 1072 | (/ (- org-columns--time | 1072 | (/ (- org-columns--time |
| 1073 | (float-time (apply #'encode-time (org-parse-time-string s nil t)))) | 1073 | (float-time (apply #'encode-time (org-parse-time-string s)))) |
| 1074 | 60)) | 1074 | 60)) |
| 1075 | ((org-duration-p s) (org-duration-to-minutes s t)) ;skip user units | 1075 | ((org-duration-p s) (org-duration-to-minutes s t)) ;skip user units |
| 1076 | (t (user-error "Invalid age: %S" s)))) | 1076 | (t (user-error "Invalid age: %S" s)))) |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index f2b3002f1fd..c5f656e09ea 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -1308,23 +1308,19 @@ CONTENTS is the contents of the element." | |||
| 1308 | (inlinetask-re (and (featurep 'org-inlinetask) "^\\*+ ")) | 1308 | (inlinetask-re (and (featurep 'org-inlinetask) "^\\*+ ")) |
| 1309 | items struct) | 1309 | items struct) |
| 1310 | (save-excursion | 1310 | (save-excursion |
| 1311 | (catch 'exit | 1311 | (catch :exit |
| 1312 | (while t | 1312 | (while t |
| 1313 | (cond | 1313 | (cond |
| 1314 | ;; At limit: end all items. | 1314 | ;; At limit: end all items. |
| 1315 | ((>= (point) limit) | 1315 | ((>= (point) limit) |
| 1316 | (throw 'exit | 1316 | (let ((end (progn (skip-chars-backward " \r\t\n") |
| 1317 | (let ((end (progn (skip-chars-backward " \r\t\n") | 1317 | (line-beginning-position 2)))) |
| 1318 | (forward-line) | 1318 | (dolist (item items) (setcar (nthcdr 6 item) end))) |
| 1319 | (point)))) | 1319 | (throw :exit (sort (nconc items struct) #'car-less-than-car))) |
| 1320 | (dolist (item items (sort (nconc items struct) | ||
| 1321 | 'car-less-than-car)) | ||
| 1322 | (setcar (nthcdr 6 item) end))))) | ||
| 1323 | ;; At list end: end all items. | 1320 | ;; At list end: end all items. |
| 1324 | ((looking-at org-list-end-re) | 1321 | ((looking-at org-list-end-re) |
| 1325 | (throw 'exit (dolist (item items (sort (nconc items struct) | 1322 | (dolist (item items) (setcar (nthcdr 6 item) (point))) |
| 1326 | 'car-less-than-car)) | 1323 | (throw :exit (sort (nconc items struct) #'car-less-than-car))) |
| 1327 | (setcar (nthcdr 6 item) (point))))) | ||
| 1328 | ;; At a new item: end previous sibling. | 1324 | ;; At a new item: end previous sibling. |
| 1329 | ((looking-at item-re) | 1325 | ((looking-at item-re) |
| 1330 | (let ((ind (save-excursion (skip-chars-forward " \t") | 1326 | (let ((ind (save-excursion (skip-chars-forward " \t") |
| @@ -1348,7 +1344,7 @@ CONTENTS is the contents of the element." | |||
| 1348 | ;; Ending position, unknown so far. | 1344 | ;; Ending position, unknown so far. |
| 1349 | nil))) | 1345 | nil))) |
| 1350 | items)) | 1346 | items)) |
| 1351 | (forward-line 1)) | 1347 | (forward-line)) |
| 1352 | ;; Skip empty lines. | 1348 | ;; Skip empty lines. |
| 1353 | ((looking-at "^[ \t]*$") (forward-line)) | 1349 | ((looking-at "^[ \t]*$") (forward-line)) |
| 1354 | ;; Skip inline tasks and blank lines along the way. | 1350 | ;; Skip inline tasks and blank lines along the way. |
| @@ -1360,17 +1356,18 @@ CONTENTS is the contents of the element." | |||
| 1360 | (goto-char origin))))) | 1356 | (goto-char origin))))) |
| 1361 | ;; At some text line. Check if it ends any previous item. | 1357 | ;; At some text line. Check if it ends any previous item. |
| 1362 | (t | 1358 | (t |
| 1363 | (let ((ind (save-excursion (skip-chars-forward " \t") | 1359 | (let ((ind (save-excursion |
| 1364 | (current-column)))) | 1360 | (skip-chars-forward " \t") |
| 1365 | (when (<= ind top-ind) | 1361 | (current-column))) |
| 1366 | (skip-chars-backward " \r\t\n") | 1362 | (end (save-excursion |
| 1367 | (forward-line)) | 1363 | (skip-chars-backward " \r\t\n") |
| 1364 | (line-beginning-position 2)))) | ||
| 1368 | (while (<= ind (nth 1 (car items))) | 1365 | (while (<= ind (nth 1 (car items))) |
| 1369 | (let ((item (pop items))) | 1366 | (let ((item (pop items))) |
| 1370 | (setcar (nthcdr 6 item) (line-beginning-position)) | 1367 | (setcar (nthcdr 6 item) end) |
| 1371 | (push item struct) | 1368 | (push item struct) |
| 1372 | (unless items | 1369 | (unless items |
| 1373 | (throw 'exit (sort struct #'car-less-than-car)))))) | 1370 | (throw :exit (sort struct #'car-less-than-car)))))) |
| 1374 | ;; Skip blocks (any type) and drawers contents. | 1371 | ;; Skip blocks (any type) and drawers contents. |
| 1375 | (cond | 1372 | (cond |
| 1376 | ((and (looking-at "[ \t]*#\\+BEGIN\\(:\\|_\\S-+\\)") | 1373 | ((and (looking-at "[ \t]*#\\+BEGIN\\(:\\|_\\S-+\\)") |
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el index 0119864df9f..cd2e95f7ad2 100644 --- a/lisp/org/org-feed.el +++ b/lisp/org/org-feed.el | |||
| @@ -624,7 +624,7 @@ containing the properties `:guid' and `:item-full-text'." | |||
| 624 | end (and (re-search-forward "</item>" nil t) | 624 | end (and (re-search-forward "</item>" nil t) |
| 625 | (match-beginning 0))) | 625 | (match-beginning 0))) |
| 626 | (setq item (buffer-substring beg end) | 626 | (setq item (buffer-substring beg end) |
| 627 | guid (if (string-match "<guid\\>.*?>\\(.*?\\)</guid>" item) | 627 | guid (if (string-match "<guid\\>.*?>\\([^\000]*?\\)</guid>" item) |
| 628 | (xml-substitute-special (match-string-no-properties 1 item)))) | 628 | (xml-substitute-special (match-string-no-properties 1 item)))) |
| 629 | (setq entry (list :guid guid :item-full-text item)) | 629 | (setq entry (list :guid guid :item-full-text item)) |
| 630 | (push entry entries) | 630 | (push entry entries) |
diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 687bc08b16e..26bb8899d3b 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el | |||
| @@ -31,15 +31,31 @@ | |||
| 31 | 31 | ||
| 32 | ;;; Code: | 32 | ;;; Code: |
| 33 | 33 | ||
| 34 | (require 'org) | 34 | (require 'gnus-sum) |
| 35 | (require 'gnus-util) | 35 | (require 'gnus-util) |
| 36 | (require 'nnheader) | ||
| 37 | (require 'nnir) | ||
| 38 | (require 'org) | ||
| 36 | 39 | ||
| 37 | 40 | ||
| 38 | ;;; Declare external functions and variables | 41 | ;;; Declare external functions and variables |
| 39 | 42 | ||
| 43 | (declare-function gnus-activate-group "gnus-start" (group &optional scan dont-check method dont-sub-check)) | ||
| 44 | (declare-function gnus-find-method-for-group "gnus" (group &optional info)) | ||
| 45 | (declare-function gnus-group-group-name "gnus-group") | ||
| 46 | (declare-function gnus-group-jump-to-group "gnus-group" (group &optional prompt)) | ||
| 47 | (declare-function gnus-group-read-group "gnus-group" (&optional all no-article group select-articles)) | ||
| 40 | (declare-function message-fetch-field "message" (header &optional not-all)) | 48 | (declare-function message-fetch-field "message" (header &optional not-all)) |
| 49 | (declare-function message-generate-headers "message" (headers)) | ||
| 50 | (declare-function message-narrow-to-headers "message") | ||
| 51 | (declare-function message-tokenize-header "message" (header &optional separator)) | ||
| 52 | (declare-function message-unquote-tokens "message" (elems)) | ||
| 41 | (declare-function nnvirtual-map-article "nnvirtual" (article)) | 53 | (declare-function nnvirtual-map-article "nnvirtual" (article)) |
| 42 | 54 | ||
| 55 | (defvar gnus-newsgroup-name) | ||
| 56 | (defvar gnus-summary-buffer) | ||
| 57 | (defvar gnus-other-frame-object) | ||
| 58 | |||
| 43 | 59 | ||
| 44 | ;;; Customization variables | 60 | ;;; Customization variables |
| 45 | 61 | ||
| @@ -120,9 +136,11 @@ If `org-store-link' was called with a prefix arg the meaning of | |||
| 120 | (let* ((group | 136 | (let* ((group |
| 121 | (pcase (gnus-find-method-for-group gnus-newsgroup-name) | 137 | (pcase (gnus-find-method-for-group gnus-newsgroup-name) |
| 122 | (`(nnvirtual . ,_) | 138 | (`(nnvirtual . ,_) |
| 123 | (car (nnvirtual-map-article (gnus-summary-article-number)))) | 139 | (save-excursion |
| 140 | (car (nnvirtual-map-article (gnus-summary-article-number))))) | ||
| 124 | (`(nnir . ,_) | 141 | (`(nnir . ,_) |
| 125 | (nnir-article-group (gnus-summary-article-number))) | 142 | (save-excursion |
| 143 | (nnir-article-group (gnus-summary-article-number)))) | ||
| 126 | (_ gnus-newsgroup-name))) | 144 | (_ gnus-newsgroup-name))) |
| 127 | (header (with-current-buffer gnus-summary-buffer | 145 | (header (with-current-buffer gnus-summary-buffer |
| 128 | (gnus-summary-article-header))) | 146 | (gnus-summary-article-header))) |
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index a508e761cb2..09b873c49d4 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el | |||
| @@ -539,8 +539,7 @@ When FILES is given, scan these files instead." | |||
| 539 | (with-temp-buffer | 539 | (with-temp-buffer |
| 540 | (condition-case nil | 540 | (condition-case nil |
| 541 | (progn | 541 | (progn |
| 542 | (insert-file-contents-literally org-id-locations-file) | 542 | (insert-file-contents org-id-locations-file) |
| 543 | (goto-char (point-min)) | ||
| 544 | (setq org-id-locations (read (current-buffer)))) | 543 | (setq org-id-locations (read (current-buffer)))) |
| 545 | (error | 544 | (error |
| 546 | (message "Could not read org-id-values from %s. Setting it to nil." | 545 | (message "Could not read org-id-values from %s. Setting it to nil." |
diff --git a/lisp/org/org-irc.el b/lisp/org/org-irc.el index 5889f6d2fec..3617ae92422 100644 --- a/lisp/org/org-irc.el +++ b/lisp/org/org-irc.el | |||
| @@ -50,18 +50,20 @@ | |||
| 50 | 50 | ||
| 51 | (require 'org) | 51 | (require 'org) |
| 52 | 52 | ||
| 53 | ;; Declare the function form ERC that we use. | 53 | (declare-function erc-buffer-filter "erc" (predicate &optional proc)) |
| 54 | (declare-function erc-channel-p "erc" (channel)) | ||
| 55 | (declare-function erc-cmd-JOIN "erc" (channel &optional key)) | ||
| 54 | (declare-function erc-current-logfile "erc-log" (&optional buffer)) | 56 | (declare-function erc-current-logfile "erc-log" (&optional buffer)) |
| 55 | (declare-function erc-prompt "erc" ()) | ||
| 56 | (declare-function erc-default-target "erc" ()) | 57 | (declare-function erc-default-target "erc" ()) |
| 57 | (declare-function erc-channel-p "erc" (channel)) | ||
| 58 | (declare-function erc-buffer-filter "erc" (predicate &optional proc)) | ||
| 59 | (declare-function erc-server-buffer "erc" ()) | ||
| 60 | (declare-function erc-get-server-nickname-list "erc" ()) | 58 | (declare-function erc-get-server-nickname-list "erc" ()) |
| 61 | (declare-function erc-cmd-JOIN "erc" (channel &optional key)) | 59 | (declare-function erc-logging-enabled "erc-log" (&optional buffer)) |
| 60 | (declare-function erc-prompt "erc" ()) | ||
| 61 | (declare-function erc-save-buffer-in-logs "erc-log" (&optional buffer)) | ||
| 62 | (declare-function erc-server-buffer "erc" ()) | ||
| 62 | 63 | ||
| 63 | (defvar org-irc-client 'erc | 64 | (defvar org-irc-client 'erc |
| 64 | "The IRC client to act on.") | 65 | "The IRC client to act on.") |
| 66 | |||
| 65 | (defvar org-irc-link-to-logs nil | 67 | (defvar org-irc-link-to-logs nil |
| 66 | "Non-nil will store a link to the logs, nil will store an irc: style link.") | 68 | "Non-nil will store a link to the logs, nil will store an irc: style link.") |
| 67 | 69 | ||
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 8ea569f99c8..5b292d0ca46 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -149,7 +149,7 @@ | |||
| 149 | (declare-function org-remove-indentation "org" (code &optional n)) | 149 | (declare-function org-remove-indentation "org" (code &optional n)) |
| 150 | (declare-function org-show-subtree "org" ()) | 150 | (declare-function org-show-subtree "org" ()) |
| 151 | (declare-function org-sort-remove-invisible "org" (S)) | 151 | (declare-function org-sort-remove-invisible "org" (S)) |
| 152 | (declare-function org-time-string-to-seconds "org" (s &optional zone)) | 152 | (declare-function org-time-string-to-seconds "org" (s)) |
| 153 | (declare-function org-timer-hms-to-secs "org-timer" (hms)) | 153 | (declare-function org-timer-hms-to-secs "org-timer" (hms)) |
| 154 | (declare-function org-timer-item "org-timer" (&optional arg)) | 154 | (declare-function org-timer-item "org-timer" (&optional arg)) |
| 155 | (declare-function org-trim "org" (s &optional keep-lead)) | 155 | (declare-function org-trim "org" (s &optional keep-lead)) |
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 1118214c4f1..ff6d8c41d4b 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el | |||
| @@ -51,8 +51,8 @@ Otherwise, return nil." | |||
| 51 | SEPARATORS is a regular expression. When nil, it defaults to | 51 | SEPARATORS is a regular expression. When nil, it defaults to |
| 52 | \"[ \f\t\n\r\v]+\". | 52 | \"[ \f\t\n\r\v]+\". |
| 53 | 53 | ||
| 54 | Unlike to `split-string', matching SEPARATORS at the beginning | 54 | Unlike `split-string', matching SEPARATORS at the beginning and |
| 55 | and end of string are ignored." | 55 | end of string are ignored." |
| 56 | (let ((separators (or separators "[ \f\t\n\r\v]+"))) | 56 | (let ((separators (or separators "[ \f\t\n\r\v]+"))) |
| 57 | (when (string-match (concat "\\`" separators) string) | 57 | (when (string-match (concat "\\`" separators) string) |
| 58 | (setq string (replace-match "" nil nil string))) | 58 | (setq string (replace-match "" nil nil string))) |
| @@ -108,16 +108,15 @@ text properties." | |||
| 108 | (value (if (stringp display) display | 108 | (value (if (stringp display) display |
| 109 | (cl-some #'stringp display)))) | 109 | (cl-some #'stringp display)))) |
| 110 | (when value | 110 | (when value |
| 111 | (apply | 111 | (apply #'propertize |
| 112 | #'propertize | 112 | ;; Displayed string could contain |
| 113 | ;; Displayed string could contain | 113 | ;; invisible parts, but no nested |
| 114 | ;; invisible parts, but no nested display. | 114 | ;; display. |
| 115 | (funcall prune-invisible value) | 115 | (funcall prune-invisible value) |
| 116 | (plist-put props | 116 | 'display |
| 117 | 'display | 117 | (and (not (stringp display)) |
| 118 | (and (not (stringp display)) | 118 | (cl-remove-if #'stringp display)) |
| 119 | (cl-remove-if #'stringp | 119 | props)))))))) |
| 120 | display))))))))))) | ||
| 121 | ;; `display' property overrides `invisible' one. So we first | 120 | ;; `display' property overrides `invisible' one. So we first |
| 122 | ;; replace characters with `display' property. Then we remove | 121 | ;; replace characters with `display' property. Then we remove |
| 123 | ;; invisible characters. | 122 | ;; invisible characters. |
| @@ -125,7 +124,7 @@ text properties." | |||
| 125 | 124 | ||
| 126 | (defun org-string-width (string) | 125 | (defun org-string-width (string) |
| 127 | "Return width of STRING when displayed in the current buffer. | 126 | "Return width of STRING when displayed in the current buffer. |
| 128 | Unlike to `string-width', this function takes into consideration | 127 | Unlike `string-width', this function takes into consideration |
| 129 | `invisible' and `display' text properties." | 128 | `invisible' and `display' text properties." |
| 130 | (string-width (org-string-display string))) | 129 | (string-width (org-string-display string))) |
| 131 | 130 | ||
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 99d7c6f7fda..4191d9aadcf 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -581,14 +581,15 @@ Escaping happens when a line starts with \"*\", \"#+\", \",*\" or | |||
| 581 | (interactive "r") | 581 | (interactive "r") |
| 582 | (save-excursion | 582 | (save-excursion |
| 583 | (goto-char end) | 583 | (goto-char end) |
| 584 | (while (re-search-backward "^[ \t]*,?\\(\\*\\|#\\+\\)" beg t) | 584 | (while (re-search-backward "^[ \t]*\\(,*\\(?:\\*\\|#\\+\\)\\)" beg t) |
| 585 | (save-excursion (replace-match ",\\1" nil nil nil 1))))) | 585 | (save-excursion (replace-match ",\\1" nil nil nil 1))))) |
| 586 | 586 | ||
| 587 | (defun org-escape-code-in-string (s) | 587 | (defun org-escape-code-in-string (s) |
| 588 | "Escape lines in string S. | 588 | "Escape lines in string S. |
| 589 | Escaping happens when a line starts with \"*\", \"#+\", \",*\" or | 589 | Escaping happens when a line starts with \"*\", \"#+\", \",*\" or |
| 590 | \",#+\" by appending a comma to it." | 590 | \",#+\" by appending a comma to it." |
| 591 | (replace-regexp-in-string "^[ \t]*,?\\(\\*\\|#\\+\\)" ",\\1" s nil nil 1)) | 591 | (replace-regexp-in-string "^[ \t]*\\(,*\\(?:\\*\\|#\\+\\)\\)" ",\\1" |
| 592 | s nil nil 1)) | ||
| 592 | 593 | ||
| 593 | (defun org-unescape-code-in-region (beg end) | 594 | (defun org-unescape-code-in-region (beg end) |
| 594 | "Un-escape lines between BEG and END. | 595 | "Un-escape lines between BEG and END. |
| @@ -597,7 +598,7 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." | |||
| 597 | (interactive "r") | 598 | (interactive "r") |
| 598 | (save-excursion | 599 | (save-excursion |
| 599 | (goto-char end) | 600 | (goto-char end) |
| 600 | (while (re-search-backward "^[ \t]*,?\\(,\\)\\(?:\\*\\|#\\+\\)" beg t) | 601 | (while (re-search-backward "^[ \t]*,*\\(,\\)\\(?:\\*\\|#\\+\\)" beg t) |
| 601 | (save-excursion (replace-match "" nil nil nil 1))))) | 602 | (save-excursion (replace-match "" nil nil nil 1))))) |
| 602 | 603 | ||
| 603 | (defun org-unescape-code-in-string (s) | 604 | (defun org-unescape-code-in-string (s) |
| @@ -605,7 +606,7 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"." | |||
| 605 | Un-escaping happens by removing the first comma on lines starting | 606 | Un-escaping happens by removing the first comma on lines starting |
| 606 | with \",*\", \",#+\", \",,*\" and \",,#+\"." | 607 | with \",*\", \",#+\", \",,*\" and \",,#+\"." |
| 607 | (replace-regexp-in-string | 608 | (replace-regexp-in-string |
| 608 | "^[ \t]*,?\\(,\\)\\(?:\\*\\|#\\+\\)" "" s nil nil 1)) | 609 | "^[ \t]*,*\\(,\\)\\(?:\\*\\|#\\+\\)" "" s nil nil 1)) |
| 609 | 610 | ||
| 610 | 611 | ||
| 611 | 612 | ||
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 8dc648eaecd..6ebd6da9d0a 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -1087,22 +1087,18 @@ Before doing so, re-align the table if necessary." | |||
| 1087 | (interactive) | 1087 | (interactive) |
| 1088 | (org-table-maybe-eval-formula) | 1088 | (org-table-maybe-eval-formula) |
| 1089 | (org-table-maybe-recalculate-line) | 1089 | (org-table-maybe-recalculate-line) |
| 1090 | (if (or (looking-at "[ \t]*$") | 1090 | (if (and org-table-automatic-realign |
| 1091 | (save-excursion (skip-chars-backward " \t") (bolp))) | 1091 | org-table-may-need-update) |
| 1092 | (newline) | 1092 | (org-table-align)) |
| 1093 | (if (and org-table-automatic-realign | 1093 | (let ((col (org-table-current-column))) |
| 1094 | org-table-may-need-update) | 1094 | (beginning-of-line 2) |
| 1095 | (org-table-align)) | 1095 | (when (or (not (org-at-table-p)) |
| 1096 | (let ((col (org-table-current-column))) | ||
| 1097 | (beginning-of-line 2) | ||
| 1098 | (if (or (not (org-at-table-p)) | ||
| 1099 | (org-at-table-hline-p)) | 1096 | (org-at-table-hline-p)) |
| 1100 | (progn | 1097 | (beginning-of-line 0) |
| 1101 | (beginning-of-line 0) | 1098 | (org-table-insert-row 'below)) |
| 1102 | (org-table-insert-row 'below))) | 1099 | (org-table-goto-column col) |
| 1103 | (org-table-goto-column col) | 1100 | (skip-chars-backward "^|\n\r") |
| 1104 | (skip-chars-backward "^|\n\r") | 1101 | (when (looking-at " ") (forward-char)))) |
| 1105 | (if (looking-at " ") (forward-char 1))))) | ||
| 1106 | 1102 | ||
| 1107 | ;;;###autoload | 1103 | ;;;###autoload |
| 1108 | (defun org-table-copy-down (n) | 1104 | (defun org-table-copy-down (n) |
| @@ -3242,7 +3238,7 @@ existing formula for column %s" | |||
| 3242 | (goto-char beg) | 3238 | (goto-char beg) |
| 3243 | ;; Mark named fields untouchable. Also check if several | 3239 | ;; Mark named fields untouchable. Also check if several |
| 3244 | ;; field/range formulas try to set the same field. | 3240 | ;; field/range formulas try to set the same field. |
| 3245 | (remove-text-properties beg end '(org-untouchable t)) | 3241 | (remove-text-properties beg end '(:org-untouchable t)) |
| 3246 | (let ((current-line (count-lines org-table-current-begin-pos | 3242 | (let ((current-line (count-lines org-table-current-begin-pos |
| 3247 | (line-beginning-position))) | 3243 | (line-beginning-position))) |
| 3248 | seen-fields) | 3244 | seen-fields) |
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 30318ba92c8..749cbe063e8 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el | |||
| @@ -5,13 +5,13 @@ | |||
| 5 | (defun org-release () | 5 | (defun org-release () |
| 6 | "The release version of Org. | 6 | "The release version of Org. |
| 7 | Inserted by installing Org mode or when a release is made." | 7 | Inserted by installing Org mode or when a release is made." |
| 8 | (let ((org-release "9.1.2")) | 8 | (let ((org-release "9.1.4")) |
| 9 | org-release)) | 9 | org-release)) |
| 10 | ;;;###autoload | 10 | ;;;###autoload |
| 11 | (defun org-git-version () | 11 | (defun org-git-version () |
| 12 | "The Git version of org-mode. | 12 | "The Git version of org-mode. |
| 13 | Inserted by installing Org or when a release is made." | 13 | Inserted by installing Org or when a release is made." |
| 14 | (let ((org-git-version "release_9.1.2-40-g6ca906")) | 14 | (let ((org-git-version "release_9.1.4-44-gfe7310")) |
| 15 | org-git-version)) | 15 | org-git-version)) |
| 16 | 16 | ||
| 17 | (provide 'org-version) | 17 | (provide 'org-version) |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 35405b4bf81..07727f68c40 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -182,7 +182,8 @@ Stars are put in group 1 and the trimmed body in group 2.") | |||
| 182 | (declare-function org-export-get-environment "ox" (&optional backend subtreep ext-plist)) | 182 | (declare-function org-export-get-environment "ox" (&optional backend subtreep ext-plist)) |
| 183 | (declare-function org-latex-make-preamble "ox-latex" (info &optional template snippet?)) | 183 | (declare-function org-latex-make-preamble "ox-latex" (info &optional template snippet?)) |
| 184 | 184 | ||
| 185 | (defvar ffap-url-regexp) ;Silence byte-compiler | 185 | (defvar ffap-url-regexp) |
| 186 | (defvar org-element-paragraph-separate) | ||
| 186 | 187 | ||
| 187 | (defsubst org-uniquify (list) | 188 | (defsubst org-uniquify (list) |
| 188 | "Non-destructively remove duplicate elements from LIST." | 189 | "Non-destructively remove duplicate elements from LIST." |
| @@ -1284,7 +1285,7 @@ star at the beginning of the headline, you can do this: | |||
| 1284 | This list will be checked before `org-speed-commands-default' | 1285 | This list will be checked before `org-speed-commands-default' |
| 1285 | when the variable `org-use-speed-commands' is non-nil | 1286 | when the variable `org-use-speed-commands' is non-nil |
| 1286 | and when the cursor is at the beginning of a headline. | 1287 | and when the cursor is at the beginning of a headline. |
| 1287 | The car if each entry is a string with a single letter, which must | 1288 | The car of each entry is a string with a single letter, which must |
| 1288 | be assigned to `self-insert-command' in the global map. | 1289 | be assigned to `self-insert-command' in the global map. |
| 1289 | The cdr is either a command to be called interactively, a function | 1290 | The cdr is either a command to be called interactively, a function |
| 1290 | to be called, or a form to be evaluated. | 1291 | to be called, or a form to be evaluated. |
| @@ -5290,7 +5291,8 @@ is available. This option applies only if FILE is a URL." | |||
| 5290 | ;; Move point to after the url-retrieve header. | 5291 | ;; Move point to after the url-retrieve header. |
| 5291 | (search-forward "\n\n" nil :move) | 5292 | (search-forward "\n\n" nil :move) |
| 5292 | ;; Search for the success code only in the url-retrieve header. | 5293 | ;; Search for the success code only in the url-retrieve header. |
| 5293 | (if (save-excursion (re-search-backward "HTTP.*\\s-+200\\s-OK" nil :noerror)) | 5294 | (if (save-excursion |
| 5295 | (re-search-backward "HTTP.*\\s-+200\\s-OK" nil :noerror)) | ||
| 5294 | ;; Update the cache `org--file-cache' and return contents. | 5296 | ;; Update the cache `org--file-cache' and return contents. |
| 5295 | (puthash file | 5297 | (puthash file |
| 5296 | (buffer-substring-no-properties (point) (point-max)) | 5298 | (buffer-substring-no-properties (point) (point-max)) |
| @@ -5300,13 +5302,14 @@ is available. This option applies only if FILE is a URL." | |||
| 5300 | file)))) | 5302 | file)))) |
| 5301 | (t | 5303 | (t |
| 5302 | (with-temp-buffer | 5304 | (with-temp-buffer |
| 5303 | (condition-case err | 5305 | (condition-case nil |
| 5304 | (progn | 5306 | (progn |
| 5305 | (insert-file-contents file) | 5307 | (insert-file-contents file) |
| 5306 | (buffer-string)) | 5308 | (buffer-string)) |
| 5307 | (file-error | 5309 | (file-error |
| 5308 | (funcall (if noerror #'message #'user-error) | 5310 | (funcall (if noerror #'message #'user-error) |
| 5309 | (error-message-string err))))))))) | 5311 | "Unable to read file %S" |
| 5312 | file)))))))) | ||
| 5310 | 5313 | ||
| 5311 | (defun org-extract-log-state-settings (x) | 5314 | (defun org-extract-log-state-settings (x) |
| 5312 | "Extract the log state setting from a TODO keyword string. | 5315 | "Extract the log state setting from a TODO keyword string. |
| @@ -5750,18 +5753,27 @@ This should be called after the variable `org-link-parameters' has changed." | |||
| 5750 | (verbatim? (member marker '("~" "=")))) | 5753 | (verbatim? (member marker '("~" "=")))) |
| 5751 | (when (save-excursion | 5754 | (when (save-excursion |
| 5752 | (goto-char (match-beginning 0)) | 5755 | (goto-char (match-beginning 0)) |
| 5753 | ;; Do not match headline stars. Do not consider | ||
| 5754 | ;; stars of a headline as closing marker for bold | ||
| 5755 | ;; markup either. Do not match table hlines. | ||
| 5756 | (and | 5756 | (and |
| 5757 | (not (looking-at-p org-outline-regexp-bol)) | 5757 | ;; Do not match table hlines. |
| 5758 | (not (and (equal marker "+") | 5758 | (not (and (equal marker "+") |
| 5759 | (org-match-line | 5759 | (org-match-line |
| 5760 | "^[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) | 5760 | "[ \t]*\\(|[-+]+|?\\|\\+[-+]+\\+\\)[ \t]*$"))) |
| 5761 | ;; Do not match headline stars. Do not consider | ||
| 5762 | ;; stars of a headline as closing marker for bold | ||
| 5763 | ;; markup either. | ||
| 5764 | (not (and (equal marker "*") | ||
| 5765 | (save-excursion | ||
| 5766 | (forward-char) | ||
| 5767 | (skip-chars-backward "*") | ||
| 5768 | (looking-at-p org-outline-regexp-bol)))) | ||
| 5769 | ;; Match full emphasis markup regexp. | ||
| 5761 | (looking-at (if verbatim? org-verbatim-re org-emph-re)) | 5770 | (looking-at (if verbatim? org-verbatim-re org-emph-re)) |
| 5762 | (not (string-match-p | 5771 | ;; Do not span over paragraph boundaries. |
| 5763 | (concat org-outline-regexp-bol "\\'") | 5772 | (not (string-match-p org-element-paragraph-separate |
| 5764 | (match-string 0))))) | 5773 | (match-string 2))) |
| 5774 | ;; Do not span over cells in table rows. | ||
| 5775 | (not (and (save-match-data (org-match-line "[ \t]*|")) | ||
| 5776 | (string-match-p "|" (match-string 4)))))) | ||
| 5765 | (pcase-let ((`(,_ ,face ,_) (assoc marker org-emphasis-alist))) | 5777 | (pcase-let ((`(,_ ,face ,_) (assoc marker org-emphasis-alist))) |
| 5766 | (font-lock-prepend-text-property | 5778 | (font-lock-prepend-text-property |
| 5767 | (match-beginning 2) (match-end 2) 'face face) | 5779 | (match-beginning 2) (match-end 2) 'face face) |
| @@ -7945,8 +7957,7 @@ unchecked check box." | |||
| 7945 | (org-insert-heading (or (and (equal arg '(16)) '(16)) | 7957 | (org-insert-heading (or (and (equal arg '(16)) '(16)) |
| 7946 | force-heading)) | 7958 | force-heading)) |
| 7947 | (save-excursion | 7959 | (save-excursion |
| 7948 | (org-back-to-heading) | 7960 | (org-forward-heading-same-level -1) |
| 7949 | (outline-previous-heading) | ||
| 7950 | (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) | 7961 | (let ((case-fold-search nil)) (looking-at org-todo-line-regexp))) |
| 7951 | (let* ((new-mark-x | 7962 | (let* ((new-mark-x |
| 7952 | (if (or (equal arg '(4)) | 7963 | (if (or (equal arg '(4)) |
| @@ -9636,28 +9647,37 @@ active region." | |||
| 9636 | (move-beginning-of-line 2) | 9647 | (move-beginning-of-line 2) |
| 9637 | (set-mark (point))))) | 9648 | (set-mark (point))))) |
| 9638 | (setq org-store-link-plist nil) | 9649 | (setq org-store-link-plist nil) |
| 9639 | (let (link cpltxt desc description search | 9650 | (let (link cpltxt desc description search txt custom-id agenda-link) |
| 9640 | txt custom-id agenda-link sfuns sfunsn) | ||
| 9641 | (cond | 9651 | (cond |
| 9642 | 9652 | ;; Store a link using an external link type, if any function is | |
| 9643 | ;; Store a link using an external link type | 9653 | ;; available. If more than one can generate a link from current |
| 9654 | ;; location, ask which one to use. | ||
| 9644 | ((and (not (equal arg '(16))) | 9655 | ((and (not (equal arg '(16))) |
| 9645 | (setq sfuns | 9656 | (let ((results-alist nil)) |
| 9646 | (delq | 9657 | (dolist (f (org-store-link-functions)) |
| 9647 | nil (mapcar (lambda (f) | 9658 | (when (funcall f) |
| 9648 | (let (fs) (if (funcall f) (push f fs)))) | 9659 | ;; XXX: return value is not link's plist, so we |
| 9649 | (org-store-link-functions))) | 9660 | ;; store the new value before it is modified. It |
| 9650 | sfunsn (mapcar (lambda (fu) (symbol-name (car fu))) sfuns)) | 9661 | ;; would be cleaner to ask store link functions to |
| 9651 | (or (and (cdr sfuns) | 9662 | ;; return the plist instead. |
| 9652 | (funcall (intern | 9663 | (push (cons f (copy-sequence org-store-link-plist)) |
| 9653 | (completing-read | 9664 | results-alist))) |
| 9654 | "Which function for creating the link? " | 9665 | (pcase results-alist |
| 9655 | sfunsn nil t (car sfunsn))))) | 9666 | (`nil nil) |
| 9656 | (funcall (caar sfuns))) | 9667 | (`((,_ . ,_)) t) ;single choice: nothing to do |
| 9657 | (setq link (plist-get org-store-link-plist :link) | 9668 | (`((,name . ,_) . ,_) |
| 9658 | desc (or (plist-get org-store-link-plist | 9669 | ;; Reinstate link plist associated to the chosen |
| 9659 | :description) | 9670 | ;; function. |
| 9660 | link)))) | 9671 | (apply #'org-store-link-props |
| 9672 | (cdr (assoc-string | ||
| 9673 | (completing-read | ||
| 9674 | "Which function for creating the link? " | ||
| 9675 | (mapcar #'car results-alist) nil t name) | ||
| 9676 | results-alist))) | ||
| 9677 | t)))) | ||
| 9678 | (setq link (plist-get org-store-link-plist :link)) | ||
| 9679 | (setq desc (or (plist-get org-store-link-plist :description) | ||
| 9680 | link))) | ||
| 9661 | 9681 | ||
| 9662 | ;; Store a link from a source code buffer. | 9682 | ;; Store a link from a source code buffer. |
| 9663 | ((org-src-edit-buffer-p) | 9683 | ((org-src-edit-buffer-p) |
| @@ -9845,7 +9865,9 @@ active region." | |||
| 9845 | (car org-stored-links))))) | 9865 | (car org-stored-links))))) |
| 9846 | 9866 | ||
| 9847 | (defun org-store-link-props (&rest plist) | 9867 | (defun org-store-link-props (&rest plist) |
| 9848 | "Store link properties, extract names, addresses and dates." | 9868 | "Store link properties. |
| 9869 | The properties are pre-processed by extracting names, addresses | ||
| 9870 | and dates." | ||
| 9849 | (let ((x (plist-get plist :from))) | 9871 | (let ((x (plist-get plist :from))) |
| 9850 | (when x | 9872 | (when x |
| 9851 | (let ((adr (mail-extract-address-components x))) | 9873 | (let ((adr (mail-extract-address-components x))) |
| @@ -14610,7 +14632,7 @@ it as a time string and apply `float-time' to it. If S is nil, just return 0." | |||
| 14610 | ((numberp s) s) | 14632 | ((numberp s) s) |
| 14611 | ((stringp s) | 14633 | ((stringp s) |
| 14612 | (condition-case nil | 14634 | (condition-case nil |
| 14613 | (float-time (apply #'encode-time (org-parse-time-string s nil t))) | 14635 | (float-time (apply #'encode-time (org-parse-time-string s))) |
| 14614 | (error 0.))) | 14636 | (error 0.))) |
| 14615 | (t 0.))) | 14637 | (t 0.))) |
| 14616 | 14638 | ||
| @@ -17369,8 +17391,8 @@ both scheduled and deadline timestamps." | |||
| 17369 | 'timestamp) | 17391 | 'timestamp) |
| 17370 | (org-at-planning-p)) | 17392 | (org-at-planning-p)) |
| 17371 | (time-less-p | 17393 | (time-less-p |
| 17372 | (org-time-string-to-time match t) | 17394 | (org-time-string-to-time match) |
| 17373 | (org-time-string-to-time d t))))))) | 17395 | (org-time-string-to-time d))))))) |
| 17374 | (message "%d entries before %s" | 17396 | (message "%d entries before %s" |
| 17375 | (org-occur regexp nil callback) | 17397 | (org-occur regexp nil callback) |
| 17376 | d))) | 17398 | d))) |
| @@ -17391,8 +17413,8 @@ both scheduled and deadline timestamps." | |||
| 17391 | 'timestamp) | 17413 | 'timestamp) |
| 17392 | (org-at-planning-p)) | 17414 | (org-at-planning-p)) |
| 17393 | (not (time-less-p | 17415 | (not (time-less-p |
| 17394 | (org-time-string-to-time match t) | 17416 | (org-time-string-to-time match) |
| 17395 | (org-time-string-to-time d t)))))))) | 17417 | (org-time-string-to-time d)))))))) |
| 17396 | (message "%d entries after %s" | 17418 | (message "%d entries after %s" |
| 17397 | (org-occur regexp nil callback) | 17419 | (org-occur regexp nil callback) |
| 17398 | d))) | 17420 | d))) |
| @@ -17415,11 +17437,11 @@ both scheduled and deadline timestamps." | |||
| 17415 | 'timestamp) | 17437 | 'timestamp) |
| 17416 | (org-at-planning-p)) | 17438 | (org-at-planning-p)) |
| 17417 | (not (time-less-p | 17439 | (not (time-less-p |
| 17418 | (org-time-string-to-time match t) | 17440 | (org-time-string-to-time match) |
| 17419 | (org-time-string-to-time start-date t))) | 17441 | (org-time-string-to-time start-date))) |
| 17420 | (time-less-p | 17442 | (time-less-p |
| 17421 | (org-time-string-to-time match t) | 17443 | (org-time-string-to-time match) |
| 17422 | (org-time-string-to-time end-date t)))))))) | 17444 | (org-time-string-to-time end-date)))))))) |
| 17423 | (message "%d entries between %s and %s" | 17445 | (message "%d entries between %s and %s" |
| 17424 | (org-occur regexp nil callback) start-date end-date))) | 17446 | (org-occur regexp nil callback) start-date end-date))) |
| 17425 | 17447 | ||
| @@ -17504,19 +17526,13 @@ days in order to avoid rounding problems." | |||
| 17504 | (push m l)) | 17526 | (push m l)) |
| 17505 | (apply 'format fmt (nreverse l)))) | 17527 | (apply 'format fmt (nreverse l)))) |
| 17506 | 17528 | ||
| 17507 | (defun org-time-string-to-time (s &optional zone) | 17529 | (defun org-time-string-to-time (s) |
| 17508 | "Convert timestamp string S into internal time. | 17530 | "Convert timestamp string S into internal time." |
| 17509 | The optional ZONE is omitted or nil for Emacs local time, t for | 17531 | (apply #'encode-time (org-parse-time-string s))) |
| 17510 | Universal Time, ‘wall’ for system wall clock time, or a string as | ||
| 17511 | in the TZ environment variable." | ||
| 17512 | (apply #'encode-time (org-parse-time-string s nil zone))) | ||
| 17513 | 17532 | ||
| 17514 | (defun org-time-string-to-seconds (s &optional zone) | 17533 | (defun org-time-string-to-seconds (s) |
| 17515 | "Convert a timestamp string S into a number of seconds. | 17534 | "Convert a timestamp string S into a number of seconds." |
| 17516 | The optional ZONE is omitted or nil for Emacs local time, t for | 17535 | (float-time (org-time-string-to-time s))) |
| 17517 | Universal Time, ‘wall’ for system wall clock time, or a string as | ||
| 17518 | in the TZ environment variable." | ||
| 17519 | (float-time (org-time-string-to-time s zone))) | ||
| 17520 | 17536 | ||
| 17521 | (org-define-error 'org-diary-sexp-no-match "Unable to match diary sexp") | 17537 | (org-define-error 'org-diary-sexp-no-match "Unable to match diary sexp") |
| 17522 | 17538 | ||
| @@ -17733,17 +17749,13 @@ day number." | |||
| 17733 | (list (nth 4 d) (nth 3 d) (nth 5 d)))) | 17749 | (list (nth 4 d) (nth 3 d) (nth 5 d)))) |
| 17734 | ((listp d) (list (nth 4 d) (nth 3 d) (nth 5 d))))) | 17750 | ((listp d) (list (nth 4 d) (nth 3 d) (nth 5 d))))) |
| 17735 | 17751 | ||
| 17736 | (defun org-parse-time-string (s &optional nodefault zone) | 17752 | (defun org-parse-time-string (s &optional nodefault) |
| 17737 | "Parse the standard Org time string. | 17753 | "Parse the standard Org time string. |
| 17738 | 17754 | ||
| 17739 | This should be a lot faster than the normal `parse-time-string'. | 17755 | This should be a lot faster than the normal `parse-time-string'. |
| 17740 | 17756 | ||
| 17741 | If time is not given, defaults to 0:00. However, with optional | 17757 | If time is not given, defaults to 0:00. However, with optional |
| 17742 | NODEFAULT, hour and minute fields will be nil if not given. | 17758 | NODEFAULT, hour and minute fields will be nil if not given." |
| 17743 | |||
| 17744 | The optional ZONE is omitted or nil for Emacs local time, t for | ||
| 17745 | Universal Time, ‘wall’ for system wall clock time, or a string as | ||
| 17746 | in the TZ environment variable." | ||
| 17747 | (cond ((string-match org-ts-regexp0 s) | 17759 | (cond ((string-match org-ts-regexp0 s) |
| 17748 | (list 0 | 17760 | (list 0 |
| 17749 | (when (or (match-beginning 8) (not nodefault)) | 17761 | (when (or (match-beginning 8) (not nodefault)) |
| @@ -17753,7 +17765,7 @@ in the TZ environment variable." | |||
| 17753 | (string-to-number (match-string 4 s)) | 17765 | (string-to-number (match-string 4 s)) |
| 17754 | (string-to-number (match-string 3 s)) | 17766 | (string-to-number (match-string 3 s)) |
| 17755 | (string-to-number (match-string 2 s)) | 17767 | (string-to-number (match-string 2 s)) |
| 17756 | nil nil zone)) | 17768 | nil nil nil)) |
| 17757 | ((string-match "^<[^>]+>$" s) | 17769 | ((string-match "^<[^>]+>$" s) |
| 17758 | ;; FIXME: `decode-time' needs to be called with ZONE as its | 17770 | ;; FIXME: `decode-time' needs to be called with ZONE as its |
| 17759 | ;; second argument. However, this requires at least Emacs | 17771 | ;; second argument. However, this requires at least Emacs |
| @@ -19327,9 +19339,9 @@ boundaries." | |||
| 19327 | ;; "file:" links. Also check link abbreviations since | 19339 | ;; "file:" links. Also check link abbreviations since |
| 19328 | ;; some might expand to "file" links. | 19340 | ;; some might expand to "file" links. |
| 19329 | (file-types-re (format "[][]\\[\\(?:file\\|[./~]%s\\)" | 19341 | (file-types-re (format "[][]\\[\\(?:file\\|[./~]%s\\)" |
| 19330 | (and link-abbrevs | 19342 | (if (not link-abbrevs) "" |
| 19331 | (format "\\|\\(?:%s:\\)" | 19343 | (format "\\|\\(?:%s:\\)" |
| 19332 | (regexp-opt link-abbrevs)))))) | 19344 | (regexp-opt link-abbrevs)))))) |
| 19333 | (while (re-search-forward file-types-re end t) | 19345 | (while (re-search-forward file-types-re end t) |
| 19334 | (let ((link (save-match-data (org-element-context)))) | 19346 | (let ((link (save-match-data (org-element-context)))) |
| 19335 | ;; Check if we're at an inline image, i.e., an image file | 19347 | ;; Check if we're at an inline image, i.e., an image file |
| @@ -20782,8 +20794,8 @@ This command does many different things, depending on context: | |||
| 20782 | '(babel-call clock dynamic-block footnote-definition | 20794 | '(babel-call clock dynamic-block footnote-definition |
| 20783 | footnote-reference inline-babel-call inline-src-block | 20795 | footnote-reference inline-babel-call inline-src-block |
| 20784 | inlinetask item keyword node-property paragraph | 20796 | inlinetask item keyword node-property paragraph |
| 20785 | plain-list property-drawer radio-target src-block | 20797 | plain-list planning property-drawer radio-target |
| 20786 | statistics-cookie table table-cell table-row | 20798 | src-block statistics-cookie table table-cell table-row |
| 20787 | timestamp) | 20799 | timestamp) |
| 20788 | t)) | 20800 | t)) |
| 20789 | (type (org-element-type context))) | 20801 | (type (org-element-type context))) |
| @@ -20935,7 +20947,8 @@ Use `\\[org-edit-special]' to edit table.el tables")) | |||
| 20935 | (cond (arg (call-interactively #'org-table-recalculate)) | 20947 | (cond (arg (call-interactively #'org-table-recalculate)) |
| 20936 | ((org-table-maybe-recalculate-line)) | 20948 | ((org-table-maybe-recalculate-line)) |
| 20937 | (t (org-table-align)))))) | 20949 | (t (org-table-align)))))) |
| 20938 | (`timestamp (org-timestamp-change 0 'day)) | 20950 | ((or `timestamp (and `planning (guard (org-at-timestamp-p 'lax)))) |
| 20951 | (org-timestamp-change 0 'day)) | ||
| 20939 | ((and `nil (guard (org-at-heading-p))) | 20952 | ((and `nil (guard (org-at-heading-p))) |
| 20940 | ;; When point is on an unsupported object type, we can miss | 20953 | ;; When point is on an unsupported object type, we can miss |
| 20941 | ;; the fact that it also is at a heading. Handle it here. | 20954 | ;; the fact that it also is at a heading. Handle it here. |
| @@ -21027,13 +21040,17 @@ object (e.g., within a comment). In these case, you need to use | |||
| 21027 | (let ((context (if org-return-follows-link (org-element-context) | 21040 | (let ((context (if org-return-follows-link (org-element-context) |
| 21028 | (org-element-at-point)))) | 21041 | (org-element-at-point)))) |
| 21029 | (cond | 21042 | (cond |
| 21030 | ;; In a table, call `org-table-next-row'. | 21043 | ;; In a table, call `org-table-next-row'. However, before first |
| 21044 | ;; column or after last one, split the table. | ||
| 21031 | ((or (and (eq (org-element-type context) 'table) | 21045 | ((or (and (eq (org-element-type context) 'table) |
| 21032 | (>= (point) (org-element-property :contents-begin context)) | 21046 | (>= (point) (org-element-property :contents-begin context)) |
| 21033 | (< (point) (org-element-property :contents-end context))) | 21047 | (< (point) (org-element-property :contents-end context))) |
| 21034 | (org-element-lineage context '(table-row table-cell) t)) | 21048 | (org-element-lineage context '(table-row table-cell) t)) |
| 21035 | (org-table-justify-field-maybe) | 21049 | (if (or (looking-at-p "[ \t]*$") |
| 21036 | (call-interactively #'org-table-next-row)) | 21050 | (save-excursion (skip-chars-backward " \t") (bolp))) |
| 21051 | (insert "\n") | ||
| 21052 | (org-table-justify-field-maybe) | ||
| 21053 | (call-interactively #'org-table-next-row))) | ||
| 21037 | ;; On a link or a timestamp, call `org-open-at-point' if | 21054 | ;; On a link or a timestamp, call `org-open-at-point' if |
| 21038 | ;; `org-return-follows-link' allows it. Tolerate fuzzy | 21055 | ;; `org-return-follows-link' allows it. Tolerate fuzzy |
| 21039 | ;; locations, e.g., in a comment, as `org-open-at-point'. | 21056 | ;; locations, e.g., in a comment, as `org-open-at-point'. |
| @@ -21374,7 +21391,7 @@ an argument, unconditionally call `org-insert-heading'." | |||
| 21374 | ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))] | 21391 | ["Next keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))] |
| 21375 | ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))]) | 21392 | ["Previous keyword set" org-shiftcontrolright (and (> (length org-todo-sets) 1) (org-at-heading-p))]) |
| 21376 | ["Show TODO Tree" org-show-todo-tree :active t :keys "C-c / t"] | 21393 | ["Show TODO Tree" org-show-todo-tree :active t :keys "C-c / t"] |
| 21377 | ["Global TODO list" org-todo-list :active t :keys "C-c a t"] | 21394 | ["Global TODO list" org-todo-list :active t :keys "\\[org-agenda] t"] |
| 21378 | "--" | 21395 | "--" |
| 21379 | ["Enforce dependencies" (customize-variable 'org-enforce-todo-dependencies) | 21396 | ["Enforce dependencies" (customize-variable 'org-enforce-todo-dependencies) |
| 21380 | :selected org-enforce-todo-dependencies :style toggle :active t] | 21397 | :selected org-enforce-todo-dependencies :style toggle :active t] |
| @@ -21453,8 +21470,8 @@ an argument, unconditionally call `org-insert-heading'." | |||
| 21453 | "--" | 21470 | "--" |
| 21454 | ["Export/Publish..." org-export-dispatch t] | 21471 | ["Export/Publish..." org-export-dispatch t] |
| 21455 | ("LaTeX" | 21472 | ("LaTeX" |
| 21456 | ["Org CDLaTeX mode" org-cdlatex-mode :style toggle | 21473 | ["Org CDLaTeX mode" org-cdlatex-mode :active (require 'cdlatex nil t) |
| 21457 | :selected org-cdlatex-mode] | 21474 | :style toggle :selected org-cdlatex-mode] |
| 21458 | ["Insert Environment" cdlatex-environment (fboundp 'cdlatex-environment)] | 21475 | ["Insert Environment" cdlatex-environment (fboundp 'cdlatex-environment)] |
| 21459 | ["Insert math symbol" cdlatex-math-symbol (fboundp 'cdlatex-math-symbol)] | 21476 | ["Insert math symbol" cdlatex-math-symbol (fboundp 'cdlatex-math-symbol)] |
| 21460 | ["Modify math symbol" org-cdlatex-math-modify | 21477 | ["Modify math symbol" org-cdlatex-math-modify |
| @@ -21464,7 +21481,7 @@ an argument, unconditionally call `org-insert-heading'." | |||
| 21464 | ("MobileOrg" | 21481 | ("MobileOrg" |
| 21465 | ["Push Files and Views" org-mobile-push t] | 21482 | ["Push Files and Views" org-mobile-push t] |
| 21466 | ["Get Captured and Flagged" org-mobile-pull t] | 21483 | ["Get Captured and Flagged" org-mobile-pull t] |
| 21467 | ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c a ?"] | 21484 | ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "\\[org-agenda] ?"] |
| 21468 | "--" | 21485 | "--" |
| 21469 | ["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t]) | 21486 | ["Setup" (progn (require 'org-mobile) (customize-group 'org-mobile)) t]) |
| 21470 | "--" | 21487 | "--" |
| @@ -21568,7 +21585,9 @@ Your bug report will be posted to the Org mailing list. | |||
| 21568 | ["Cycle through agenda files" org-cycle-agenda-files t] | 21585 | ["Cycle through agenda files" org-cycle-agenda-files t] |
| 21569 | ["Occur in all agenda files" org-occur-in-agenda-files t] | 21586 | ["Occur in all agenda files" org-occur-in-agenda-files t] |
| 21570 | "--") | 21587 | "--") |
| 21571 | (mapcar 'org-file-menu-entry (org-agenda-files t)))))))) | 21588 | (mapcar 'org-file-menu-entry |
| 21589 | ;; Prevent initialization from failing. | ||
| 21590 | (ignore-errors (org-agenda-files t))))))))) | ||
| 21572 | 21591 | ||
| 21573 | ;;;; Documentation | 21592 | ;;;; Documentation |
| 21574 | 21593 | ||
| @@ -22764,7 +22783,6 @@ assumed to be significant there." | |||
| 22764 | ;; `org-setup-filling' installs filling and auto-filling related | 22783 | ;; `org-setup-filling' installs filling and auto-filling related |
| 22765 | ;; variables during `org-mode' initialization. | 22784 | ;; variables during `org-mode' initialization. |
| 22766 | 22785 | ||
| 22767 | (defvar org-element-paragraph-separate) ; org-element.el | ||
| 22768 | (defun org-setup-filling () | 22786 | (defun org-setup-filling () |
| 22769 | (require 'org-element) | 22787 | (require 'org-element) |
| 22770 | ;; Prevent auto-fill from inserting unwanted new items. | 22788 | ;; Prevent auto-fill from inserting unwanted new items. |
| @@ -23617,7 +23635,9 @@ depending on context." | |||
| 23617 | (skip-chars-forward " \r\t\n")))) | 23635 | (skip-chars-forward " \r\t\n")))) |
| 23618 | (narrow-to-region (org-element-property :contents-begin element) | 23636 | (narrow-to-region (org-element-property :contents-begin element) |
| 23619 | contents-end)) | 23637 | contents-end)) |
| 23620 | (call-interactively #'forward-sentence)))))) | 23638 | ;; End of heading is considered as the end of a sentence. |
| 23639 | (let ((sentence-end (concat (sentence-end) "\\|^\\*+ .*$"))) | ||
| 23640 | (call-interactively #'forward-sentence))))))) | ||
| 23621 | 23641 | ||
| 23622 | (define-key org-mode-map "\M-a" 'org-backward-sentence) | 23642 | (define-key org-mode-map "\M-a" 'org-backward-sentence) |
| 23623 | (define-key org-mode-map "\M-e" 'org-forward-sentence) | 23643 | (define-key org-mode-map "\M-e" 'org-forward-sentence) |
| @@ -24230,10 +24250,11 @@ convenience: | |||
| 24230 | (backward-char) | 24250 | (backward-char) |
| 24231 | (org-backward-paragraph)) | 24251 | (org-backward-paragraph)) |
| 24232 | ((<= (point) post-affiliated) (goto-char begin)) | 24252 | ((<= (point) post-affiliated) (goto-char begin)) |
| 24253 | ;; Special behavior: on a table or a property drawer, move to | ||
| 24254 | ;; its beginning. | ||
| 24233 | ((memq type '(node-property table-row)) | 24255 | ((memq type '(node-property table-row)) |
| 24234 | (goto-char (org-element-property | 24256 | (goto-char (org-element-property |
| 24235 | :post-affiliated (org-element-property :parent element)))) | 24257 | :post-affiliated (org-element-property :parent element)))) |
| 24236 | ((memq type '(property-drawer table)) (goto-char begin)) | ||
| 24237 | (special? | 24258 | (special? |
| 24238 | (if (<= (point) contents-begin) (goto-char post-affiliated) | 24259 | (if (<= (point) contents-begin) (goto-char post-affiliated) |
| 24239 | ;; Inside a verse block, see blank lines as paragraph | 24260 | ;; Inside a verse block, see blank lines as paragraph |
| @@ -24244,8 +24265,7 @@ convenience: | |||
| 24244 | (skip-chars-forward " \r\t\n" origin) | 24265 | (skip-chars-forward " \r\t\n" origin) |
| 24245 | (if (= (point) origin) (goto-char contents-begin) | 24266 | (if (= (point) origin) (goto-char contents-begin) |
| 24246 | (beginning-of-line)))))) | 24267 | (beginning-of-line)))))) |
| 24247 | ((eq type 'paragraph) | 24268 | ((eq type 'paragraph) (goto-char contents-begin) |
| 24248 | (goto-char contents-begin) | ||
| 24249 | ;; When at first paragraph in an item or a footnote definition, | 24269 | ;; When at first paragraph in an item or a footnote definition, |
| 24250 | ;; move directly to beginning of line. | 24270 | ;; move directly to beginning of line. |
| 24251 | (let ((parent-contents | 24271 | (let ((parent-contents |
| @@ -24253,9 +24273,9 @@ convenience: | |||
| 24253 | :contents-begin (org-element-property :parent element)))) | 24273 | :contents-begin (org-element-property :parent element)))) |
| 24254 | (when (and parent-contents (= parent-contents contents-begin)) | 24274 | (when (and parent-contents (= parent-contents contents-begin)) |
| 24255 | (beginning-of-line)))) | 24275 | (beginning-of-line)))) |
| 24256 | ;; At the end of a greater element, move to the beginning of the | 24276 | ;; At the end of a greater element, move to the beginning of |
| 24257 | ;; last element within. | 24277 | ;; the last element within. |
| 24258 | ((>= (point) contents-end) | 24278 | ((and contents-end (>= (point) contents-end)) |
| 24259 | (goto-char (1- contents-end)) | 24279 | (goto-char (1- contents-end)) |
| 24260 | (org-backward-paragraph)) | 24280 | (org-backward-paragraph)) |
| 24261 | (t (goto-char (or post-affiliated begin)))) | 24281 | (t (goto-char (or post-affiliated begin)))) |
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el index 9e04387d9a2..e83eb197a82 100644 --- a/lisp/org/ox-ascii.el +++ b/lisp/org/ox-ascii.el | |||
| @@ -177,7 +177,8 @@ Inner margin is applied between each headline." | |||
| 177 | 177 | ||
| 178 | (defcustom org-ascii-quote-margin 6 | 178 | (defcustom org-ascii-quote-margin 6 |
| 179 | "Width of margin used for quoting text, in characters. | 179 | "Width of margin used for quoting text, in characters. |
| 180 | This margin is applied on both sides of the text." | 180 | This margin is applied on both sides of the text. It is also |
| 181 | applied on the left side of contents in descriptive lists." | ||
| 181 | :group 'org-export-ascii | 182 | :group 'org-export-ascii |
| 182 | :version "24.4" | 183 | :version "24.4" |
| 183 | :package-version '(Org . "8.0") | 184 | :package-version '(Org . "8.0") |
| @@ -551,79 +552,69 @@ INFO is a plist used as a communication channel." | |||
| 551 | (`inlinetask (plist-get info :ascii-inlinetask-width)) | 552 | (`inlinetask (plist-get info :ascii-inlinetask-width)) |
| 552 | (`headline | 553 | (`headline |
| 553 | (- (plist-get info :ascii-text-width) | 554 | (- (plist-get info :ascii-text-width) |
| 554 | (let ((low-level-rank (org-export-low-level-p element info))) | 555 | (let ((low-level-rank (org-export-low-level-p element info))) |
| 555 | (if low-level-rank (* low-level-rank 2) | 556 | (if low-level-rank (* low-level-rank 2) |
| 556 | (plist-get info :ascii-global-margin))))) | 557 | (plist-get info :ascii-global-margin))))) |
| 557 | ;; Elements with a relative width: store maximum text width in | 558 | ;; Elements with a relative width: store maximum text width in |
| 558 | ;; TOTAL-WIDTH. | 559 | ;; TOTAL-WIDTH. |
| 559 | (_ | 560 | (_ |
| 560 | (let* ((genealogy (org-element-lineage element nil t)) | 561 | (let* ((genealogy (org-element-lineage element nil t)) |
| 561 | ;; Total width is determined by the presence, or not, of an | 562 | ;; Total width is determined by the presence, or not, of an |
| 562 | ;; inline task among ELEMENT parents. | 563 | ;; inline task among ELEMENT parents. |
| 563 | (total-width | 564 | (total-width |
| 564 | (if (cl-some (lambda (parent) | 565 | (if (cl-some (lambda (parent) |
| 565 | (eq (org-element-type parent) 'inlinetask)) | 566 | (eq (org-element-type parent) 'inlinetask)) |
| 566 | genealogy) | 567 | genealogy) |
| 567 | (plist-get info :ascii-inlinetask-width) | 568 | (plist-get info :ascii-inlinetask-width) |
| 568 | ;; No inlinetask: Remove global margin from text width. | 569 | ;; No inlinetask: Remove global margin from text width. |
| 569 | (- (plist-get info :ascii-text-width) | 570 | (- (plist-get info :ascii-text-width) |
| 570 | (plist-get info :ascii-global-margin) | 571 | (plist-get info :ascii-global-margin) |
| 571 | (let ((parent (org-export-get-parent-headline element))) | 572 | (let ((parent (org-export-get-parent-headline element))) |
| 572 | ;; Inner margin doesn't apply to text before first | 573 | ;; Inner margin doesn't apply to text before first |
| 573 | ;; headline. | 574 | ;; headline. |
| 574 | (if (not parent) 0 | 575 | (if (not parent) 0 |
| 575 | (let ((low-level-rank | 576 | (let ((low-level-rank |
| 576 | (org-export-low-level-p parent info))) | 577 | (org-export-low-level-p parent info))) |
| 577 | ;; Inner margin doesn't apply to contents of | 578 | ;; Inner margin doesn't apply to contents of |
| 578 | ;; low level headlines, since they've got their | 579 | ;; low level headlines, since they've got their |
| 579 | ;; own indentation mechanism. | 580 | ;; own indentation mechanism. |
| 580 | (if low-level-rank (* low-level-rank 2) | 581 | (if low-level-rank (* low-level-rank 2) |
| 581 | (plist-get info :ascii-inner-margin))))))))) | 582 | (plist-get info :ascii-inner-margin))))))))) |
| 582 | (- total-width | 583 | (- total-width |
| 583 | ;; Each `quote-block' and `verse-block' above narrows text | 584 | ;; Each `quote-block' and `verse-block' above narrows text |
| 584 | ;; width by twice the standard margin size. | 585 | ;; width by twice the standard margin size. |
| 585 | (+ (* (cl-count-if (lambda (parent) | 586 | (+ (* (cl-count-if (lambda (parent) |
| 586 | (memq (org-element-type parent) | 587 | (memq (org-element-type parent) |
| 587 | '(quote-block verse-block))) | 588 | '(quote-block verse-block))) |
| 588 | genealogy) | 589 | genealogy) |
| 589 | 2 | 590 | 2 |
| 590 | (plist-get info :ascii-quote-margin)) | 591 | (plist-get info :ascii-quote-margin)) |
| 591 | ;; Apply list margin once per "top-level" plain-list | 592 | ;; Apply list margin once per "top-level" plain-list |
| 592 | ;; containing current line | 593 | ;; containing current line |
| 593 | (* (cl-count-if | 594 | (* (cl-count-if |
| 594 | (lambda (e) | 595 | (lambda (e) |
| 595 | (and (eq (org-element-type e) 'plain-list) | 596 | (and (eq (org-element-type e) 'plain-list) |
| 596 | (not (eq (org-element-type (org-export-get-parent e)) | 597 | (not (eq (org-element-type (org-export-get-parent e)) |
| 597 | 'item)))) | 598 | 'item)))) |
| 598 | genealogy) | 599 | genealogy) |
| 599 | (plist-get info :ascii-list-margin)) | 600 | (plist-get info :ascii-list-margin)) |
| 600 | ;; Text width within a plain-list is restricted by | 601 | ;; Compute indentation offset due to current list. It is |
| 601 | ;; indentation of current item. If that's the case, | 602 | ;; `org-ascii-quote-margin' per descriptive item in the |
| 602 | ;; compute it with the help of `:structure' property from | 603 | ;; genealogy, bullet's length otherwise. |
| 603 | ;; parent item, if any. | 604 | (let ((indentation 0)) |
| 604 | (let ((item | 605 | (dolist (e genealogy) |
| 605 | (if (eq (org-element-type element) 'item) element | 606 | (cond |
| 606 | (cl-find-if (lambda (parent) | 607 | ((not (eq 'item (org-element-type e)))) |
| 607 | (eq (org-element-type parent) 'item)) | 608 | ((eq (org-element-property :type (org-export-get-parent e)) |
| 608 | genealogy)))) | 609 | 'descriptive) |
| 609 | (if (not item) 0 | 610 | (cl-incf indentation org-ascii-quote-margin)) |
| 610 | ;; Compute indentation offset of the current item, | 611 | (t |
| 611 | ;; that is the sum of the difference between its | 612 | (cl-incf indentation |
| 612 | ;; indentation and the indentation of the top item in | 613 | (+ (string-width |
| 613 | ;; the list and current item bullet's length. Also | 614 | (or (org-ascii--checkbox e info) "")) |
| 614 | ;; remove checkbox length, and tag length (for | 615 | (string-width |
| 615 | ;; description lists) or bullet length. | 616 | (org-element-property :bullet e))))))) |
| 616 | (let ((struct (org-element-property :structure item)) | 617 | indentation))))))) |
| 617 | (beg-item (org-element-property :begin item))) | ||
| 618 | (+ (- (org-list-get-ind beg-item struct) | ||
| 619 | (org-list-get-ind | ||
| 620 | (org-list-get-top-point struct) struct)) | ||
| 621 | (string-width (or (org-ascii--checkbox item info) | ||
| 622 | "")) | ||
| 623 | (string-width | ||
| 624 | (let ((tag (org-element-property :tag item))) | ||
| 625 | (if tag (org-export-data tag info) | ||
| 626 | (org-element-property :bullet item)))))))))))))) | ||
| 627 | 618 | ||
| 628 | (defun org-ascii--current-justification (element) | 619 | (defun org-ascii--current-justification (element) |
| 629 | "Return expected justification for ELEMENT's contents. | 620 | "Return expected justification for ELEMENT's contents. |
| @@ -1458,40 +1449,54 @@ contextual information." | |||
| 1458 | (bullet | 1449 | (bullet |
| 1459 | ;; First parent of ITEM is always the plain-list. Get | 1450 | ;; First parent of ITEM is always the plain-list. Get |
| 1460 | ;; `:type' property from it. | 1451 | ;; `:type' property from it. |
| 1461 | (org-list-bullet-string | 1452 | (pcase list-type |
| 1462 | (pcase list-type | 1453 | (`descriptive |
| 1463 | (`descriptive | 1454 | (concat checkbox |
| 1464 | (concat checkbox | 1455 | (org-export-data (org-element-property :tag item) |
| 1465 | (org-export-data (org-element-property :tag item) info) | 1456 | info))) |
| 1466 | ": ")) | 1457 | (`ordered |
| 1467 | (`ordered | 1458 | ;; Return correct number for ITEM, paying attention to |
| 1468 | ;; Return correct number for ITEM, paying attention to | 1459 | ;; counters. |
| 1469 | ;; counters. | 1460 | (let* ((struct (org-element-property :structure item)) |
| 1470 | (let* ((struct (org-element-property :structure item)) | 1461 | (bul (org-list-bullet-string |
| 1471 | (bul (org-element-property :bullet item)) | 1462 | (org-element-property :bullet item))) |
| 1472 | (num (number-to-string | 1463 | (num (number-to-string |
| 1473 | (car (last (org-list-get-item-number | 1464 | (car (last (org-list-get-item-number |
| 1474 | (org-element-property :begin item) | 1465 | (org-element-property :begin item) |
| 1475 | struct | 1466 | struct |
| 1476 | (org-list-prevs-alist struct) | 1467 | (org-list-prevs-alist struct) |
| 1477 | (org-list-parents-alist struct))))))) | 1468 | (org-list-parents-alist struct))))))) |
| 1478 | (replace-regexp-in-string "[0-9]+" num bul))) | 1469 | (replace-regexp-in-string "[0-9]+" num bul))) |
| 1479 | (_ (let ((bul (org-element-property :bullet item))) | 1470 | (_ (let ((bul (org-list-bullet-string |
| 1480 | ;; Change bullets into more visible form if UTF-8 is active. | 1471 | (org-element-property :bullet item)))) |
| 1481 | (if (not utf8p) bul | 1472 | ;; Change bullets into more visible form if UTF-8 is active. |
| 1473 | (if (not utf8p) bul | ||
| 1474 | (replace-regexp-in-string | ||
| 1475 | "-" "•" | ||
| 1482 | (replace-regexp-in-string | 1476 | (replace-regexp-in-string |
| 1483 | "-" "" | 1477 | "+" "" |
| 1484 | (replace-regexp-in-string | 1478 | (replace-regexp-in-string "*" "‣" bul)))))))) |
| 1485 | "+" "⁃" | 1479 | (indentation (if (eq list-type 'descriptive) org-ascii-quote-margin |
| 1486 | (replace-regexp-in-string "*" "‣" bul)))))))))) | 1480 | (string-width bullet)))) |
| 1487 | (concat | 1481 | (concat |
| 1488 | bullet | 1482 | bullet |
| 1489 | (unless (eq list-type 'descriptive) checkbox) | 1483 | checkbox |
| 1490 | ;; Contents: Pay attention to indentation. Note: check-boxes are | 1484 | ;; Contents: Pay attention to indentation. Note: check-boxes are |
| 1491 | ;; already taken care of at the paragraph level so they don't | 1485 | ;; already taken care of at the paragraph level so they don't |
| 1492 | ;; interfere with indentation. | 1486 | ;; interfere with indentation. |
| 1493 | (let ((contents (org-ascii--indent-string contents (string-width bullet)))) | 1487 | (let ((contents (org-ascii--indent-string contents indentation))) |
| 1494 | (if (eq (org-element-type (car (org-element-contents item))) 'paragraph) | 1488 | ;; Determine if contents should follow the bullet or start |
| 1489 | ;; a new line. Do the former when the first contributing | ||
| 1490 | ;; element to contents is a paragraph. In descriptive lists | ||
| 1491 | ;; however, contents always start a new line. | ||
| 1492 | (if (and (not (eq list-type 'descriptive)) | ||
| 1493 | (org-string-nw-p contents) | ||
| 1494 | (eq 'paragraph | ||
| 1495 | (org-element-type | ||
| 1496 | (cl-some (lambda (e) | ||
| 1497 | (and (org-string-nw-p (org-export-data e info)) | ||
| 1498 | e)) | ||
| 1499 | (org-element-contents item))))) | ||
| 1495 | (org-trim contents) | 1500 | (org-trim contents) |
| 1496 | (concat "\n" contents)))))) | 1501 | (concat "\n" contents)))))) |
| 1497 | 1502 | ||
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 8ce4fb6adcd..bf08de10af7 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el | |||
| @@ -2154,21 +2154,17 @@ CODE is a string representing the source code to colorize. LANG | |||
| 2154 | is the language used for CODE, as a string, or nil." | 2154 | is the language used for CODE, as a string, or nil." |
| 2155 | (when code | 2155 | (when code |
| 2156 | (cond | 2156 | (cond |
| 2157 | ;; Case 1: No lang. Possibly an example block. | 2157 | ;; No language. Possibly an example block. |
| 2158 | ((not lang) | 2158 | ((not lang) (org-html-encode-plain-text code)) |
| 2159 | ;; Simple transcoding. | 2159 | ;; Plain text explicitly set. |
| 2160 | (org-html-encode-plain-text code)) | 2160 | ((not org-html-htmlize-output-type) (org-html-encode-plain-text code)) |
| 2161 | ;; Case 2: No htmlize or an inferior version of htmlize | 2161 | ;; No htmlize library or an inferior version of htmlize. |
| 2162 | ((not (and (or (require 'htmlize nil t) | 2162 | ((not (and (or (require 'htmlize nil t) |
| 2163 | (error "Please install htmlize from https://github.com/hniksic/emacs-htmlize")) | 2163 | (error "Please install htmlize from \ |
| 2164 | https://github.com/hniksic/emacs-htmlize")) | ||
| 2164 | (fboundp 'htmlize-region-for-paste))) | 2165 | (fboundp 'htmlize-region-for-paste))) |
| 2165 | ;; Emit a warning. | 2166 | ;; Emit a warning. |
| 2166 | (message "Cannot fontify src block (htmlize.el >= 1.34 required)") | 2167 | (message "Cannot fontify src block (htmlize.el >= 1.34 required)") |
| 2167 | ;; Simple transcoding. | ||
| 2168 | (org-html-encode-plain-text code)) | ||
| 2169 | ;; Case 3: plain text explicitly set | ||
| 2170 | ((not org-html-htmlize-output-type) | ||
| 2171 | ;; Simple transcoding. | ||
| 2172 | (org-html-encode-plain-text code)) | 2168 | (org-html-encode-plain-text code)) |
| 2173 | (t | 2169 | (t |
| 2174 | ;; Map language | 2170 | ;; Map language |
| @@ -2177,7 +2173,6 @@ is the language used for CODE, as a string, or nil." | |||
| 2177 | (cond | 2173 | (cond |
| 2178 | ;; Case 1: Language is not associated with any Emacs mode | 2174 | ;; Case 1: Language is not associated with any Emacs mode |
| 2179 | ((not (functionp lang-mode)) | 2175 | ((not (functionp lang-mode)) |
| 2180 | ;; Simple transcoding. | ||
| 2181 | (org-html-encode-plain-text code)) | 2176 | (org-html-encode-plain-text code)) |
| 2182 | ;; Case 2: Default. Fontify code. | 2177 | ;; Case 2: Default. Fontify code. |
| 2183 | (t | 2178 | (t |
| @@ -2207,7 +2202,7 @@ is the language used for CODE, as a string, or nil." | |||
| 2207 | (org-html-htmlize-region-for-paste | 2202 | (org-html-htmlize-region-for-paste |
| 2208 | (point-min) (point-max)))))) | 2203 | (point-min) (point-max)))))) |
| 2209 | ;; Strip any enclosing <pre></pre> tags. | 2204 | ;; Strip any enclosing <pre></pre> tags. |
| 2210 | (let* ((beg (and (string-match "\\`<pre[^>]*>\n*" code) (match-end 0))) | 2205 | (let* ((beg (and (string-match "\\`<pre[^>]*>\n?" code) (match-end 0))) |
| 2211 | (end (and beg (string-match "</pre>\\'" code)))) | 2206 | (end (and beg (string-match "</pre>\\'" code)))) |
| 2212 | (if (and beg end) (substring code beg end) code))))))))) | 2207 | (if (and beg end) (substring code beg end) code))))))))) |
| 2213 | 2208 | ||
| @@ -2220,7 +2215,7 @@ alist between line numbers and references (as returned by | |||
| 2220 | `org-export-unravel-code'), a boolean specifying if labels should | 2215 | `org-export-unravel-code'), a boolean specifying if labels should |
| 2221 | appear in the source code, and the number associated to the first | 2216 | appear in the source code, and the number associated to the first |
| 2222 | line of code." | 2217 | line of code." |
| 2223 | (let* ((code-lines (org-split-string code "\n")) | 2218 | (let* ((code-lines (split-string code "\n")) |
| 2224 | (code-length (length code-lines)) | 2219 | (code-length (length code-lines)) |
| 2225 | (num-fmt | 2220 | (num-fmt |
| 2226 | (and num-start | 2221 | (and num-start |
| @@ -2328,15 +2323,7 @@ INFO is a plist used as a communication channel." | |||
| 2328 | (org-element-property :priority headline))) | 2323 | (org-element-property :priority headline))) |
| 2329 | (text (org-export-data-with-backend | 2324 | (text (org-export-data-with-backend |
| 2330 | (org-export-get-alt-title headline info) | 2325 | (org-export-get-alt-title headline info) |
| 2331 | ;; Create an anonymous back-end that will ignore any | 2326 | (org-export-toc-entry-backend 'html) |
| 2332 | ;; footnote-reference, link, radio-target and target | ||
| 2333 | ;; in table of contents. | ||
| 2334 | (org-export-create-backend | ||
| 2335 | :parent 'html | ||
| 2336 | :transcoders '((footnote-reference . ignore) | ||
| 2337 | (link . (lambda (object c i) c)) | ||
| 2338 | (radio-target . (lambda (object c i) c)) | ||
| 2339 | (target . ignore))) | ||
| 2340 | info)) | 2327 | info)) |
| 2341 | (tags (and (eq (plist-get info :with-tags) t) | 2328 | (tags (and (eq (plist-get info :with-tags) t) |
| 2342 | (org-export-get-tags headline info)))) | 2329 | (org-export-get-tags headline info)))) |
| @@ -2966,10 +2953,7 @@ images, set it to: | |||
| 2966 | DESC is the description part of the link, or the empty string. | 2953 | DESC is the description part of the link, or the empty string. |
| 2967 | INFO is a plist holding contextual information. See | 2954 | INFO is a plist holding contextual information. See |
| 2968 | `org-export-data'." | 2955 | `org-export-data'." |
| 2969 | (let* ((home (when (plist-get info :html-link-home) | 2956 | (let* ((link-org-files-as-html-maybe |
| 2970 | (org-trim (plist-get info :html-link-home)))) | ||
| 2971 | (use-abs-url (plist-get info :html-link-use-abs-url)) | ||
| 2972 | (link-org-files-as-html-maybe | ||
| 2973 | (lambda (raw-path info) | 2957 | (lambda (raw-path info) |
| 2974 | ;; Treat links to `file.org' as links to `file.html', if | 2958 | ;; Treat links to `file.org' as links to `file.html', if |
| 2975 | ;; needed. See `org-html-link-org-files-as-html'. | 2959 | ;; needed. See `org-html-link-org-files-as-html'. |
| @@ -2989,16 +2973,22 @@ INFO is a plist holding contextual information. See | |||
| 2989 | ((member type '("http" "https" "ftp" "mailto" "news")) | 2973 | ((member type '("http" "https" "ftp" "mailto" "news")) |
| 2990 | (url-encode-url (org-link-unescape (concat type ":" raw-path)))) | 2974 | (url-encode-url (org-link-unescape (concat type ":" raw-path)))) |
| 2991 | ((string= type "file") | 2975 | ((string= type "file") |
| 2992 | ;; Treat links to ".org" files as ".html", if needed. | 2976 | ;; During publishing, turn absolute file names belonging |
| 2977 | ;; to base directory into relative file names. Otherwise, | ||
| 2978 | ;; append "file" protocol to absolute file name. | ||
| 2993 | (setq raw-path | 2979 | (setq raw-path |
| 2994 | (funcall link-org-files-as-html-maybe raw-path info)) | 2980 | (org-export-file-uri |
| 2995 | ;; If file path is absolute, prepend it with protocol | 2981 | (org-publish-file-relative-name raw-path info))) |
| 2996 | ;; component - "file://". | 2982 | ;; Possibly append `:html-link-home' to relative file |
| 2997 | (cond | 2983 | ;; name. |
| 2998 | ((file-name-absolute-p raw-path) | 2984 | (let ((home (and (plist-get info :html-link-home) |
| 2999 | (setq raw-path (org-export-file-uri raw-path))) | 2985 | (org-trim (plist-get info :html-link-home))))) |
| 3000 | ((and home use-abs-url) | 2986 | (when (and home |
| 3001 | (setq raw-path (concat (file-name-as-directory home) raw-path)))) | 2987 | (plist-get info :html-link-use-abs-url) |
| 2988 | (file-name-absolute-p raw-path)) | ||
| 2989 | (setq raw-path (concat (file-name-as-directory home) raw-path)))) | ||
| 2990 | ;; Maybe turn ".org" into ".html". | ||
| 2991 | (setq raw-path (funcall link-org-files-as-html-maybe raw-path info)) | ||
| 3002 | ;; Add search option, if any. A search option can be | 2992 | ;; Add search option, if any. A search option can be |
| 3003 | ;; relative to a custom-id, a headline title, a name or | 2993 | ;; relative to a custom-id, a headline title, a name or |
| 3004 | ;; a target. | 2994 | ;; a target. |
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index fb8f7be087f..6fb3041d587 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el | |||
| @@ -285,6 +285,10 @@ This function shouldn't be used for floats. See | |||
| 285 | output | 285 | output |
| 286 | (concat (format "%s\n.br\n" label) output)))) | 286 | (concat (format "%s\n.br\n" label) output)))) |
| 287 | 287 | ||
| 288 | (defun org-man--protect-text (text) | ||
| 289 | "Protect minus and backslash characters in string TEXT." | ||
| 290 | (replace-regexp-in-string "-" "\\-" text nil t)) | ||
| 291 | |||
| 288 | 292 | ||
| 289 | 293 | ||
| 290 | ;;; Template | 294 | ;;; Template |
| @@ -350,10 +354,9 @@ holding contextual information." | |||
| 350 | ;;; Code | 354 | ;;; Code |
| 351 | 355 | ||
| 352 | (defun org-man-code (code _contents _info) | 356 | (defun org-man-code (code _contents _info) |
| 353 | "Transcode a CODE object from Org to Man. | 357 | "Transcode a CODE object from Org to Man." |
| 354 | CONTENTS is nil. INFO is a plist used as a communication | 358 | (format "\\fC%s\\fP" |
| 355 | channel." | 359 | (org-man--protect-text (org-element-property :value code)))) |
| 356 | (format "\\fC%s\\fP" code)) | ||
| 357 | 360 | ||
| 358 | 361 | ||
| 359 | ;;; Drawer | 362 | ;;; Drawer |
| @@ -1029,11 +1032,10 @@ holding contextual information." | |||
| 1029 | 1032 | ||
| 1030 | ;;; Verbatim | 1033 | ;;; Verbatim |
| 1031 | 1034 | ||
| 1032 | (defun org-man-verbatim (_verbatim contents _info) | 1035 | (defun org-man-verbatim (verbatim _contents _info) |
| 1033 | "Transcode a VERBATIM object from Org to Man. | 1036 | "Transcode a VERBATIM object from Org to Man." |
| 1034 | CONTENTS is nil. INFO is a plist used as a communication | 1037 | (format "\\fI%s\\fP" |
| 1035 | channel." | 1038 | (org-man--protect-text (org-element-property :value verbatim)))) |
| 1036 | (format ".nf\n%s\n.fi" contents)) | ||
| 1037 | 1039 | ||
| 1038 | 1040 | ||
| 1039 | ;;; Verse Block | 1041 | ;;; Verse Block |
diff --git a/lisp/org/ox-md.el b/lisp/org/ox-md.el index 5ba52e7faf3..12188387355 100644 --- a/lisp/org/ox-md.el +++ b/lisp/org/ox-md.el | |||
| @@ -240,7 +240,7 @@ a communication channel." | |||
| 240 | (format "<a id=\"%s\"></a>" | 240 | (format "<a id=\"%s\"></a>" |
| 241 | (or (org-element-property :CUSTOM_ID headline) | 241 | (or (org-element-property :CUSTOM_ID headline) |
| 242 | (org-export-get-reference headline info)))))) | 242 | (org-export-get-reference headline info)))))) |
| 243 | (concat (org-md--headline-title style level title anchor tags) | 243 | (concat (org-md--headline-title style level heading anchor tags) |
| 244 | contents))))))) | 244 | contents))))))) |
| 245 | 245 | ||
| 246 | 246 | ||
| @@ -582,16 +582,7 @@ contents according to the current headline." | |||
| 582 | (format "[%s](#%s)" | 582 | (format "[%s](#%s)" |
| 583 | (org-export-data-with-backend | 583 | (org-export-data-with-backend |
| 584 | (org-export-get-alt-title headline info) | 584 | (org-export-get-alt-title headline info) |
| 585 | ;; Create an anonymous back-end that will | 585 | (org-export-toc-entry-backend 'md) |
| 586 | ;; ignore any footnote-reference, link, | ||
| 587 | ;; radio-target and target in table of | ||
| 588 | ;; contents. | ||
| 589 | (org-export-create-backend | ||
| 590 | :parent 'md | ||
| 591 | :transcoders '((footnote-reference . ignore) | ||
| 592 | (link . (lambda (object c i) c)) | ||
| 593 | (radio-target . (lambda (object c i) c)) | ||
| 594 | (target . ignore))) | ||
| 595 | info) | 586 | info) |
| 596 | (or (org-element-property :CUSTOM_ID headline) | 587 | (or (org-element-property :CUSTOM_ID headline) |
| 597 | (org-export-get-reference headline info)))) | 588 | (org-export-get-reference headline info)))) |
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index 7355eaab6de..a19bab29c16 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el | |||
| @@ -1159,12 +1159,8 @@ table of contents as a string, or nil." | |||
| 1159 | ;; Likewise, links, footnote references and regular targets are also | 1159 | ;; Likewise, links, footnote references and regular targets are also |
| 1160 | ;; suppressed. | 1160 | ;; suppressed. |
| 1161 | (let* ((headlines (org-export-collect-headlines info depth scope)) | 1161 | (let* ((headlines (org-export-collect-headlines info depth scope)) |
| 1162 | (backend (org-export-create-backend | 1162 | (backend (org-export-toc-entry-backend |
| 1163 | :parent (org-export-backend-name (plist-get info :back-end)) | 1163 | (org-export-backend-name (plist-get info :back-end))))) |
| 1164 | :transcoders '((footnote-reference . ignore) | ||
| 1165 | (link . (lambda (object c i) c)) | ||
| 1166 | (radio-target . (lambda (object c i) c)) | ||
| 1167 | (target . ignore))))) | ||
| 1168 | (when headlines | 1164 | (when headlines |
| 1169 | (org-odt--format-toc | 1165 | (org-odt--format-toc |
| 1170 | (and (not scope) (org-export-translate "Table of Contents" :utf-8 info)) | 1166 | (and (not scope) (org-export-translate "Table of Contents" :utf-8 info)) |
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index 957b0da7c59..c2416dba381 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el | |||
| @@ -349,7 +349,6 @@ You can overwrite this default per project in your | |||
| 349 | 349 | ||
| 350 | 350 | ||
| 351 | 351 | ||
| 352 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 353 | ;;; Timestamp-related functions | 352 | ;;; Timestamp-related functions |
| 354 | 353 | ||
| 355 | (defun org-publish-timestamp-filename (filename &optional pub-dir pub-func) | 354 | (defun org-publish-timestamp-filename (filename &optional pub-dir pub-func) |
| @@ -392,7 +391,6 @@ If there is no timestamp, create one." | |||
| 392 | 391 | ||
| 393 | 392 | ||
| 394 | 393 | ||
| 395 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 396 | ;;; Getting project information out of `org-publish-project-alist' | 394 | ;;; Getting project information out of `org-publish-project-alist' |
| 397 | 395 | ||
| 398 | (defun org-publish-property (property project &optional default) | 396 | (defun org-publish-property (property project &optional default) |
| @@ -525,7 +523,6 @@ publishing FILENAME." | |||
| 525 | 523 | ||
| 526 | 524 | ||
| 527 | 525 | ||
| 528 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 529 | ;;; Tools for publishing functions in back-ends | 526 | ;;; Tools for publishing functions in back-ends |
| 530 | 527 | ||
| 531 | (defun org-publish-org-to (backend filename extension plist &optional pub-dir) | 528 | (defun org-publish-org-to (backend filename extension plist &optional pub-dir) |
| @@ -899,7 +896,6 @@ representation for the files to include, as returned by | |||
| 899 | (org-list-to-org list))) | 896 | (org-list-to-org list))) |
| 900 | 897 | ||
| 901 | 898 | ||
| 902 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 903 | ;;; Interactive publishing functions | 899 | ;;; Interactive publishing functions |
| 904 | 900 | ||
| 905 | ;;;###autoload | 901 | ;;;###autoload |
| @@ -1154,7 +1150,8 @@ references with `org-export-get-reference'." | |||
| 1154 | (let* ((filename (file-truename file)) | 1150 | (let* ((filename (file-truename file)) |
| 1155 | (crossrefs | 1151 | (crossrefs |
| 1156 | (org-publish-cache-get-file-property filename :crossrefs nil t)) | 1152 | (org-publish-cache-get-file-property filename :crossrefs nil t)) |
| 1157 | (cells (org-export-string-to-search-cell search))) | 1153 | (cells |
| 1154 | (org-export-string-to-search-cell (org-link-unescape search)))) | ||
| 1158 | (or | 1155 | (or |
| 1159 | ;; Look for reference associated to search cells triggered by | 1156 | ;; Look for reference associated to search cells triggered by |
| 1160 | ;; LINK. It can match when targeted file has been published | 1157 | ;; LINK. It can match when targeted file has been published |
| @@ -1169,6 +1166,17 @@ references with `org-export-get-reference'." | |||
| 1169 | (org-publish-cache-set-file-property filename :crossrefs crossrefs) | 1166 | (org-publish-cache-set-file-property filename :crossrefs crossrefs) |
| 1170 | (org-export-format-reference new)))))) | 1167 | (org-export-format-reference new)))))) |
| 1171 | 1168 | ||
| 1169 | (defun org-publish-file-relative-name (filename info) | ||
| 1170 | "Convert FILENAME to be relative to current project's base directory. | ||
| 1171 | INFO is the plist containing the current export state. The | ||
| 1172 | function does not change relative file names." | ||
| 1173 | (let ((base (plist-get info :base-directory))) | ||
| 1174 | (if (and base | ||
| 1175 | (file-name-absolute-p filename) | ||
| 1176 | (file-in-directory-p filename base)) | ||
| 1177 | (file-relative-name filename base) | ||
| 1178 | filename))) | ||
| 1179 | |||
| 1172 | 1180 | ||
| 1173 | 1181 | ||
| 1174 | ;;; Caching functions | 1182 | ;;; Caching functions |
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index b5903a52160..60618c1c30e 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el | |||
| @@ -83,7 +83,8 @@ | |||
| 83 | :filters-alist | 83 | :filters-alist |
| 84 | '((:filter-headline . org-texinfo--filter-section-blank-lines) | 84 | '((:filter-headline . org-texinfo--filter-section-blank-lines) |
| 85 | (:filter-parse-tree . org-texinfo--normalize-headlines) | 85 | (:filter-parse-tree . org-texinfo--normalize-headlines) |
| 86 | (:filter-section . org-texinfo--filter-section-blank-lines)) | 86 | (:filter-section . org-texinfo--filter-section-blank-lines) |
| 87 | (:filter-final-output . org-texinfo--untabify)) | ||
| 87 | :menu-entry | 88 | :menu-entry |
| 88 | '(?i "Export to Texinfo" | 89 | '(?i "Export to Texinfo" |
| 89 | ((?t "As TEXI file" org-texinfo-export-to-texinfo) | 90 | ((?t "As TEXI file" org-texinfo-export-to-texinfo) |
| @@ -405,6 +406,10 @@ If two strings share the same prefix (e.g. \"ISO-8859-1\" and | |||
| 405 | 406 | ||
| 406 | ;;; Internal Functions | 407 | ;;; Internal Functions |
| 407 | 408 | ||
| 409 | (defun org-texinfo--untabify (s _backend _info) | ||
| 410 | "Remove TAB characters in string S." | ||
| 411 | (replace-regexp-in-string "\t" (make-string tab-width ?\s) s)) | ||
| 412 | |||
| 408 | (defun org-texinfo--filter-section-blank-lines (headline _backend _info) | 413 | (defun org-texinfo--filter-section-blank-lines (headline _backend _info) |
| 409 | "Filter controlling number of blank lines after a section." | 414 | "Filter controlling number of blank lines after a section." |
| 410 | (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" "\n\n" headline)) | 415 | (replace-regexp-in-string "\n\\(?:\n[ \t]*\\)*\\'" "\n\n" headline)) |
| @@ -499,8 +504,12 @@ export state, as a plist." | |||
| 499 | (org-export-create-backend | 504 | (org-export-create-backend |
| 500 | :parent 'texinfo | 505 | :parent 'texinfo |
| 501 | :transcoders '((footnote-reference . ignore) | 506 | :transcoders '((footnote-reference . ignore) |
| 502 | (link . (lambda (object c i) c)) | 507 | (link . (lambda (l c i) |
| 503 | (radio-target . (lambda (object c i) c)) | 508 | (or c |
| 509 | (org-export-data | ||
| 510 | (org-element-property :raw-link l) | ||
| 511 | i)))) | ||
| 512 | (radio-target . (lambda (_r c _i) c)) | ||
| 504 | (target . ignore))) | 513 | (target . ignore))) |
| 505 | info)) | 514 | info)) |
| 506 | 515 | ||
| @@ -519,18 +528,27 @@ strings (e.g., returned by `org-export-get-caption')." | |||
| 519 | (let* ((backend | 528 | (let* ((backend |
| 520 | (org-export-create-backend | 529 | (org-export-create-backend |
| 521 | :parent 'texinfo | 530 | :parent 'texinfo |
| 522 | :transcoders '((link . (lambda (object c i) c)) | 531 | :transcoders '((link . (lambda (l c i) |
| 523 | (radio-target . (lambda (object c i) c)) | 532 | (or c |
| 533 | (org-export-data | ||
| 534 | (org-element-property :raw-link l) | ||
| 535 | i)))) | ||
| 536 | (radio-target . (lambda (_r c _i) c)) | ||
| 524 | (target . ignore)))) | 537 | (target . ignore)))) |
| 525 | (short-backend | 538 | (short-backend |
| 526 | (org-export-create-backend | 539 | (org-export-create-backend |
| 527 | :parent 'texinfo | 540 | :parent 'texinfo |
| 528 | :transcoders '((footnote-reference . ignore) | 541 | :transcoders |
| 529 | (inline-src-block . ignore) | 542 | '((footnote-reference . ignore) |
| 530 | (link . (lambda (object c i) c)) | 543 | (inline-src-block . ignore) |
| 531 | (radio-target . (lambda (object c i) c)) | 544 | (link . (lambda (l c i) |
| 532 | (target . ignore) | 545 | (or c |
| 533 | (verbatim . ignore)))) | 546 | (org-export-data |
| 547 | (org-element-property :raw-link l) | ||
| 548 | i)))) | ||
| 549 | (radio-target . (lambda (_r c _i) c)) | ||
| 550 | (target . ignore) | ||
| 551 | (verbatim . ignore)))) | ||
| 534 | (short-str | 552 | (short-str |
| 535 | (if (and short caption) | 553 | (if (and short caption) |
| 536 | (format "@shortcaption{%s}\n" | 554 | (format "@shortcaption{%s}\n" |
| @@ -1017,15 +1035,17 @@ CONTENTS is nil. INFO is a plist holding contextual information." | |||
| 1017 | 1035 | ||
| 1018 | (defun org-texinfo--@ref (datum description info) | 1036 | (defun org-texinfo--@ref (datum description info) |
| 1019 | "Return @ref command for element or object DATUM. | 1037 | "Return @ref command for element or object DATUM. |
| 1020 | DESCRIPTION is the name of the section to print, as a string." | 1038 | DESCRIPTION is the printed name of the section, as a string, or |
| 1039 | nil." | ||
| 1021 | (let ((node-name (org-texinfo--get-node datum info)) | 1040 | (let ((node-name (org-texinfo--get-node datum info)) |
| 1022 | ;; Sanitize DESCRIPTION for cross-reference use. In | 1041 | ;; Sanitize DESCRIPTION for cross-reference use. In |
| 1023 | ;; particular, remove colons as they seem to cause (even | 1042 | ;; particular, remove colons as they seem to cause pain (even |
| 1024 | ;; within @asis{...} to the Texinfo reader. | 1043 | ;; within @asis{...}) to the Texinfo reader. |
| 1025 | (title (replace-regexp-in-string | 1044 | (title (and description |
| 1026 | "[ \t]*:+" "" | 1045 | (replace-regexp-in-string |
| 1027 | (replace-regexp-in-string "," "@comma{}" description)))) | 1046 | "[ \t]*:+" "" |
| 1028 | (if (equal title node-name) | 1047 | (replace-regexp-in-string "," "@comma{}" description))))) |
| 1048 | (if (or (not title) (equal title node-name)) | ||
| 1029 | (format "@ref{%s}" node-name) | 1049 | (format "@ref{%s}" node-name) |
| 1030 | (format "@ref{%s, , %s}" node-name title)))) | 1050 | (format "@ref{%s, , %s}" node-name title)))) |
| 1031 | 1051 | ||
| @@ -1073,20 +1093,8 @@ INFO is a plist holding contextual information. See | |||
| 1073 | (org-element-type | 1093 | (org-element-type |
| 1074 | (org-element-property :parent destination)))))) | 1094 | (org-element-property :parent destination)))))) |
| 1075 | (let ((headline (org-element-lineage destination '(headline) t))) | 1095 | (let ((headline (org-element-lineage destination '(headline) t))) |
| 1076 | (org-texinfo--@ref | 1096 | (org-texinfo--@ref headline desc info))) |
| 1077 | headline | 1097 | (_ (org-texinfo--@ref destination desc info))))) |
| 1078 | (or desc (org-texinfo--sanitize-title | ||
| 1079 | (org-element-property :title headline) info)) | ||
| 1080 | info))) | ||
| 1081 | (_ | ||
| 1082 | (org-texinfo--@ref | ||
| 1083 | destination | ||
| 1084 | (or desc | ||
| 1085 | (pcase (org-export-get-ordinal destination info) | ||
| 1086 | ((and (pred integerp) n) (number-to-string n)) | ||
| 1087 | ((and (pred consp) n) (mapconcat #'number-to-string n ".")) | ||
| 1088 | (_ "???"))) ;cannot guess the description | ||
| 1089 | info))))) | ||
| 1090 | ((string= type "mailto") | 1098 | ((string= type "mailto") |
| 1091 | (format "@email{%s}" | 1099 | (format "@email{%s}" |
| 1092 | (concat (org-texinfo--sanitize-content path) | 1100 | (concat (org-texinfo--sanitize-content path) |
| @@ -1167,19 +1175,19 @@ is an integer, build the menu recursively, down to this depth." | |||
| 1167 | (cond | 1175 | (cond |
| 1168 | ((not level) | 1176 | ((not level) |
| 1169 | (org-texinfo--format-entries (org-texinfo--menu-entries scope info) info)) | 1177 | (org-texinfo--format-entries (org-texinfo--menu-entries scope info) info)) |
| 1170 | ((zerop level) nil) | 1178 | ((zerop level) "\n") |
| 1171 | (t | 1179 | (t |
| 1172 | (org-element-normalize-string | 1180 | (mapconcat |
| 1173 | (mapconcat | 1181 | (lambda (h) |
| 1174 | (lambda (h) | 1182 | (let ((entries (org-texinfo--menu-entries h info))) |
| 1175 | (let ((entries (org-texinfo--menu-entries h info))) | 1183 | (when entries |
| 1176 | (when entries | 1184 | (concat |
| 1177 | (concat | 1185 | (format "%s\n\n%s\n" |
| 1178 | (format "%s\n\n%s\n" | 1186 | (org-export-data (org-export-get-alt-title h info) info) |
| 1179 | (org-export-data (org-export-get-alt-title h info) info) | 1187 | (org-texinfo--format-entries entries info)) |
| 1180 | (org-texinfo--format-entries entries info)) | 1188 | (org-texinfo--build-menu h info (1- level)))))) |
| 1181 | (org-texinfo--build-menu h info (1- level)))))) | 1189 | (org-texinfo--menu-entries scope info) |
| 1182 | (org-texinfo--menu-entries scope info) "\n"))))) | 1190 | "")))) |
| 1183 | 1191 | ||
| 1184 | (defun org-texinfo--format-entries (entries info) | 1192 | (defun org-texinfo--format-entries (entries info) |
| 1185 | "Format all direct menu entries in SCOPE, as a string. | 1193 | "Format all direct menu entries in SCOPE, as a string. |
diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 1c43577cddf..8ea47d8ba6d 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el | |||
| @@ -3954,9 +3954,7 @@ INFO is a plist holding contextual information." | |||
| 3954 | (defun org-export-numbered-headline-p (headline info) | 3954 | (defun org-export-numbered-headline-p (headline info) |
| 3955 | "Return a non-nil value if HEADLINE element should be numbered. | 3955 | "Return a non-nil value if HEADLINE element should be numbered. |
| 3956 | INFO is a plist used as a communication channel." | 3956 | INFO is a plist used as a communication channel." |
| 3957 | (unless (cl-some | 3957 | (unless (org-not-nil (org-export-get-node-property :UNNUMBERED headline t)) |
| 3958 | (lambda (head) (org-not-nil (org-element-property :UNNUMBERED head))) | ||
| 3959 | (org-element-lineage headline nil t)) | ||
| 3960 | (let ((sec-num (plist-get info :section-numbers)) | 3958 | (let ((sec-num (plist-get info :section-numbers)) |
| 3961 | (level (org-export-get-relative-level headline info))) | 3959 | (level (org-export-get-relative-level headline info))) |
| 3962 | (if (wholenump sec-num) (<= level sec-num) sec-num)))) | 3960 | (if (wholenump sec-num) (<= level sec-num) sec-num)))) |
| @@ -4055,11 +4053,15 @@ used as a communication channel." | |||
| 4055 | (memq (org-element-type (org-export-get-previous-element blob info)) | 4053 | (memq (org-element-type (org-export-get-previous-element blob info)) |
| 4056 | '(nil section))) | 4054 | '(nil section))) |
| 4057 | 4055 | ||
| 4058 | (defun org-export-last-sibling-p (blob info) | 4056 | (defun org-export-last-sibling-p (datum info) |
| 4059 | "Non-nil when BLOB is the last sibling in its parent. | 4057 | "Non-nil when DATUM is the last sibling in its parent. |
| 4060 | BLOB is an element or an object. INFO is a plist used as | 4058 | DATUM is an element or an object. INFO is a plist used as |
| 4061 | a communication channel." | 4059 | a communication channel." |
| 4062 | (not (org-export-get-next-element blob info))) | 4060 | (let ((next (org-export-get-next-element datum info))) |
| 4061 | (or (not next) | ||
| 4062 | (and (eq 'headline (org-element-type datum)) | ||
| 4063 | (> (org-element-property :level datum) | ||
| 4064 | (org-element-property :level next)))))) | ||
| 4063 | 4065 | ||
| 4064 | 4066 | ||
| 4065 | ;;;; For Keywords | 4067 | ;;;; For Keywords |
| @@ -5176,7 +5178,7 @@ return nil." | |||
| 5176 | info 'first-match))) | 5178 | info 'first-match))) |
| 5177 | 5179 | ||
| 5178 | 5180 | ||
| 5179 | ;;;; For Tables Of Contents | 5181 | ;;;; For Tables of Contents |
| 5180 | ;; | 5182 | ;; |
| 5181 | ;; `org-export-collect-headlines' builds a list of all exportable | 5183 | ;; `org-export-collect-headlines' builds a list of all exportable |
| 5182 | ;; headline elements, maybe limited to a certain depth. One can then | 5184 | ;; headline elements, maybe limited to a certain depth. One can then |
| @@ -5186,6 +5188,9 @@ return nil." | |||
| 5186 | ;; Once the generic function `org-export-collect-elements' is defined, | 5188 | ;; Once the generic function `org-export-collect-elements' is defined, |
| 5187 | ;; `org-export-collect-tables', `org-export-collect-figures' and | 5189 | ;; `org-export-collect-tables', `org-export-collect-figures' and |
| 5188 | ;; `org-export-collect-listings' can be derived from it. | 5190 | ;; `org-export-collect-listings' can be derived from it. |
| 5191 | ;; | ||
| 5192 | ;; `org-export-toc-entry-backend' builds a special anonymous back-end | ||
| 5193 | ;; useful to export table of contents' entries. | ||
| 5189 | 5194 | ||
| 5190 | (defun org-export-collect-headlines (info &optional n scope) | 5195 | (defun org-export-collect-headlines (info &optional n scope) |
| 5191 | "Collect headlines in order to build a table of contents. | 5196 | "Collect headlines in order to build a table of contents. |
| @@ -5271,6 +5276,32 @@ INFO is a plist used as a communication channel. | |||
| 5271 | Return a list of src-block elements with a caption." | 5276 | Return a list of src-block elements with a caption." |
| 5272 | (org-export-collect-elements 'src-block info)) | 5277 | (org-export-collect-elements 'src-block info)) |
| 5273 | 5278 | ||
| 5279 | (defun org-export-toc-entry-backend (parent &rest transcoders) | ||
| 5280 | "Return an export back-end appropriate for table of contents entries. | ||
| 5281 | |||
| 5282 | PARENT is an export back-end the returned back-end should inherit | ||
| 5283 | from. | ||
| 5284 | |||
| 5285 | By default, the back-end removes footnote references and targets. | ||
| 5286 | It also changes links and radio targets into regular text. | ||
| 5287 | TRANSCODERS optional argument, when non-nil, specifies additional | ||
| 5288 | transcoders. A transcoder follows the pattern (TYPE . FUNCTION) | ||
| 5289 | where type is an element or object type and FUNCTION the function | ||
| 5290 | transcoding it." | ||
| 5291 | (declare (indent 1)) | ||
| 5292 | (org-export-create-backend | ||
| 5293 | :parent parent | ||
| 5294 | :transcoders | ||
| 5295 | (append transcoders | ||
| 5296 | `((footnote-reference . ,#'ignore) | ||
| 5297 | (link . ,(lambda (l c i) | ||
| 5298 | (or c | ||
| 5299 | (org-export-data | ||
| 5300 | (org-element-property :raw-link l) | ||
| 5301 | i)))) | ||
| 5302 | (radio-target . ,(lambda (_r c _) c)) | ||
| 5303 | (target . ,#'ignore))))) | ||
| 5304 | |||
| 5274 | 5305 | ||
| 5275 | ;;;; Smart Quotes | 5306 | ;;;; Smart Quotes |
| 5276 | ;; | 5307 | ;; |
| @@ -5657,6 +5688,7 @@ them." | |||
| 5657 | ("zh-TW" :html "作者" :utf-8 "作者")) | 5688 | ("zh-TW" :html "作者" :utf-8 "作者")) |
| 5658 | ("Continued from previous page" | 5689 | ("Continued from previous page" |
| 5659 | ("ar" :default "تتمة الصفحة السابقة") | 5690 | ("ar" :default "تتمة الصفحة السابقة") |
| 5691 | ("cs" :default "Pokračování z předchozí strany") | ||
| 5660 | ("de" :default "Fortsetzung von vorheriger Seite") | 5692 | ("de" :default "Fortsetzung von vorheriger Seite") |
| 5661 | ("es" :html "Continúa de la página anterior" :ascii "Continua de la pagina anterior" :default "Continúa de la página anterior") | 5693 | ("es" :html "Continúa de la página anterior" :ascii "Continua de la pagina anterior" :default "Continúa de la página anterior") |
| 5662 | ("fr" :default "Suite de la page précédente") | 5694 | ("fr" :default "Suite de la page précédente") |
| @@ -5669,6 +5701,7 @@ them." | |||
| 5669 | ("sl" :default "Nadaljevanje s prejšnje strani")) | 5701 | ("sl" :default "Nadaljevanje s prejšnje strani")) |
| 5670 | ("Continued on next page" | 5702 | ("Continued on next page" |
| 5671 | ("ar" :default "التتمة في الصفحة التالية") | 5703 | ("ar" :default "التتمة في الصفحة التالية") |
| 5704 | ("cs" :default "Pokračuje na další stránce") | ||
| 5672 | ("de" :default "Fortsetzung nächste Seite") | 5705 | ("de" :default "Fortsetzung nächste Seite") |
| 5673 | ("es" :html "Continúa en la siguiente página" :ascii "Continua en la siguiente pagina" :default "Continúa en la siguiente página") | 5706 | ("es" :html "Continúa en la siguiente página" :ascii "Continua en la siguiente pagina" :default "Continúa en la siguiente página") |
| 5674 | ("fr" :default "Suite page suivante") | 5707 | ("fr" :default "Suite page suivante") |
| @@ -5680,6 +5713,7 @@ them." | |||
| 5680 | :utf-8 "(Продолжение следует)") | 5713 | :utf-8 "(Продолжение следует)") |
| 5681 | ("sl" :default "Nadaljevanje na naslednji strani")) | 5714 | ("sl" :default "Nadaljevanje na naslednji strani")) |
| 5682 | ("Created" | 5715 | ("Created" |
| 5716 | ("cs" :default "Vytvořeno") | ||
| 5683 | ("sl" :default "Ustvarjeno")) | 5717 | ("sl" :default "Ustvarjeno")) |
| 5684 | ("Date" | 5718 | ("Date" |
| 5685 | ("ar" :default "بتاريخ") | 5719 | ("ar" :default "بتاريخ") |
| @@ -5709,6 +5743,7 @@ them." | |||
| 5709 | ("zh-TW" :html "日期" :utf-8 "日期")) | 5743 | ("zh-TW" :html "日期" :utf-8 "日期")) |
| 5710 | ("Equation" | 5744 | ("Equation" |
| 5711 | ("ar" :default "معادلة") | 5745 | ("ar" :default "معادلة") |
| 5746 | ("cs" :default "Rovnice") | ||
| 5712 | ("da" :default "Ligning") | 5747 | ("da" :default "Ligning") |
| 5713 | ("de" :default "Gleichung") | 5748 | ("de" :default "Gleichung") |
| 5714 | ("es" :ascii "Ecuacion" :html "Ecuación" :default "Ecuación") | 5749 | ("es" :ascii "Ecuacion" :html "Ecuación" :default "Ecuación") |
| @@ -5727,6 +5762,7 @@ them." | |||
| 5727 | ("zh-CN" :html "方程" :utf-8 "方程")) | 5762 | ("zh-CN" :html "方程" :utf-8 "方程")) |
| 5728 | ("Figure" | 5763 | ("Figure" |
| 5729 | ("ar" :default "شكل") | 5764 | ("ar" :default "شكل") |
| 5765 | ("cs" :default "Obrázek") | ||
| 5730 | ("da" :default "Figur") | 5766 | ("da" :default "Figur") |
| 5731 | ("de" :default "Abbildung") | 5767 | ("de" :default "Abbildung") |
| 5732 | ("es" :default "Figura") | 5768 | ("es" :default "Figura") |
| @@ -5742,6 +5778,7 @@ them." | |||
| 5742 | ("zh-CN" :html "图" :utf-8 "图")) | 5778 | ("zh-CN" :html "图" :utf-8 "图")) |
| 5743 | ("Figure %d:" | 5779 | ("Figure %d:" |
| 5744 | ("ar" :default "شكل %d:") | 5780 | ("ar" :default "شكل %d:") |
| 5781 | ("cs" :default "Obrázek %d:") | ||
| 5745 | ("da" :default "Figur %d") | 5782 | ("da" :default "Figur %d") |
| 5746 | ("de" :default "Abbildung %d:") | 5783 | ("de" :default "Abbildung %d:") |
| 5747 | ("es" :default "Figura %d:") | 5784 | ("es" :default "Figura %d:") |
| @@ -5760,7 +5797,7 @@ them." | |||
| 5760 | ("Footnotes" | 5797 | ("Footnotes" |
| 5761 | ("ar" :default "الهوامش") | 5798 | ("ar" :default "الهوامش") |
| 5762 | ("ca" :html "Peus de pàgina") | 5799 | ("ca" :html "Peus de pàgina") |
| 5763 | ("cs" :default "Pozn\xe1mky pod carou") | 5800 | ("cs" :default "Poznámky pod čarou") |
| 5764 | ("da" :default "Fodnoter") | 5801 | ("da" :default "Fodnoter") |
| 5765 | ("de" :html "Fußnoten" :default "Fußnoten") | 5802 | ("de" :html "Fußnoten" :default "Fußnoten") |
| 5766 | ("eo" :default "Piednotoj") | 5803 | ("eo" :default "Piednotoj") |
| @@ -5787,6 +5824,7 @@ them." | |||
| 5787 | ("zh-TW" :html "腳註" :utf-8 "腳註")) | 5824 | ("zh-TW" :html "腳註" :utf-8 "腳註")) |
| 5788 | ("List of Listings" | 5825 | ("List of Listings" |
| 5789 | ("ar" :default "قائمة بالبرامج") | 5826 | ("ar" :default "قائمة بالبرامج") |
| 5827 | ("cs" :default "Seznam programů") | ||
| 5790 | ("da" :default "Programmer") | 5828 | ("da" :default "Programmer") |
| 5791 | ("de" :default "Programmauflistungsverzeichnis") | 5829 | ("de" :default "Programmauflistungsverzeichnis") |
| 5792 | ("es" :ascii "Indice de Listados de programas" :html "Índice de Listados de programas" :default "Índice de Listados de programas") | 5830 | ("es" :ascii "Indice de Listados de programas" :html "Índice de Listados de programas" :default "Índice de Listados de programas") |
| @@ -5801,6 +5839,7 @@ them." | |||
| 5801 | ("zh-CN" :html "代码目录" :utf-8 "代码目录")) | 5839 | ("zh-CN" :html "代码目录" :utf-8 "代码目录")) |
| 5802 | ("List of Tables" | 5840 | ("List of Tables" |
| 5803 | ("ar" :default "قائمة بالجداول") | 5841 | ("ar" :default "قائمة بالجداول") |
| 5842 | ("cs" :default "Seznam tabulek") | ||
| 5804 | ("da" :default "Tabeller") | 5843 | ("da" :default "Tabeller") |
| 5805 | ("de" :default "Tabellenverzeichnis") | 5844 | ("de" :default "Tabellenverzeichnis") |
| 5806 | ("es" :ascii "Indice de tablas" :html "Índice de tablas" :default "Índice de tablas") | 5845 | ("es" :ascii "Indice de tablas" :html "Índice de tablas" :default "Índice de tablas") |
| @@ -5819,6 +5858,7 @@ them." | |||
| 5819 | ("zh-CN" :html "表格目录" :utf-8 "表格目录")) | 5858 | ("zh-CN" :html "表格目录" :utf-8 "表格目录")) |
| 5820 | ("Listing" | 5859 | ("Listing" |
| 5821 | ("ar" :default "برنامج") | 5860 | ("ar" :default "برنامج") |
| 5861 | ("cs" :default "Program") | ||
| 5822 | ("da" :default "Program") | 5862 | ("da" :default "Program") |
| 5823 | ("de" :default "Programmlisting") | 5863 | ("de" :default "Programmlisting") |
| 5824 | ("es" :default "Listado de programa") | 5864 | ("es" :default "Listado de programa") |
| @@ -5834,6 +5874,7 @@ them." | |||
| 5834 | ("zh-CN" :html "代码" :utf-8 "代码")) | 5874 | ("zh-CN" :html "代码" :utf-8 "代码")) |
| 5835 | ("Listing %d:" | 5875 | ("Listing %d:" |
| 5836 | ("ar" :default "برنامج %d:") | 5876 | ("ar" :default "برنامج %d:") |
| 5877 | ("cs" :default "Program %d:") | ||
| 5837 | ("da" :default "Program %d") | 5878 | ("da" :default "Program %d") |
| 5838 | ("de" :default "Programmlisting %d") | 5879 | ("de" :default "Programmlisting %d") |
| 5839 | ("es" :default "Listado de programa %d") | 5880 | ("es" :default "Listado de programa %d") |
| @@ -5849,20 +5890,24 @@ them." | |||
| 5849 | ("zh-CN" :html "代码%d " :utf-8 "代码%d ")) | 5890 | ("zh-CN" :html "代码%d " :utf-8 "代码%d ")) |
| 5850 | ("References" | 5891 | ("References" |
| 5851 | ("ar" :default "المراجع") | 5892 | ("ar" :default "المراجع") |
| 5893 | ("cs" :default "Reference") | ||
| 5852 | ("fr" :ascii "References" :default "Références") | 5894 | ("fr" :ascii "References" :default "Références") |
| 5853 | ("de" :default "Quellen") | 5895 | ("de" :default "Quellen") |
| 5854 | ("es" :default "Referencias") | 5896 | ("es" :default "Referencias") |
| 5855 | ("sl" :default "Reference")) | 5897 | ("sl" :default "Reference")) |
| 5856 | ("See figure %s" | 5898 | ("See figure %s" |
| 5899 | ("cs" :default "Viz obrázek %s") | ||
| 5857 | ("fr" :default "cf. figure %s" | 5900 | ("fr" :default "cf. figure %s" |
| 5858 | :html "cf. figure %s" :latex "cf.~figure~%s") | 5901 | :html "cf. figure %s" :latex "cf.~figure~%s") |
| 5859 | ("sl" :default "Glej sliko %s")) | 5902 | ("sl" :default "Glej sliko %s")) |
| 5860 | ("See listing %s" | 5903 | ("See listing %s" |
| 5904 | ("cs" :default "Viz program %s") | ||
| 5861 | ("fr" :default "cf. programme %s" | 5905 | ("fr" :default "cf. programme %s" |
| 5862 | :html "cf. programme %s" :latex "cf.~programme~%s") | 5906 | :html "cf. programme %s" :latex "cf.~programme~%s") |
| 5863 | ("sl" :default "Glej izpis programa %s")) | 5907 | ("sl" :default "Glej izpis programa %s")) |
| 5864 | ("See section %s" | 5908 | ("See section %s" |
| 5865 | ("ar" :default "انظر قسم %s") | 5909 | ("ar" :default "انظر قسم %s") |
| 5910 | ("cs" :default "Viz sekce %s") | ||
| 5866 | ("da" :default "jævnfør afsnit %s") | 5911 | ("da" :default "jævnfør afsnit %s") |
| 5867 | ("de" :default "siehe Abschnitt %s") | 5912 | ("de" :default "siehe Abschnitt %s") |
| 5868 | ("es" :ascii "Vea seccion %s" :html "Vea sección %s" :default "Vea sección %s") | 5913 | ("es" :ascii "Vea seccion %s" :html "Vea sección %s" :default "Vea sección %s") |
| @@ -5876,11 +5921,13 @@ them." | |||
| 5876 | ("sl" :default "Glej poglavje %d") | 5921 | ("sl" :default "Glej poglavje %d") |
| 5877 | ("zh-CN" :html "参见第%s节" :utf-8 "参见第%s节")) | 5922 | ("zh-CN" :html "参见第%s节" :utf-8 "参见第%s节")) |
| 5878 | ("See table %s" | 5923 | ("See table %s" |
| 5924 | ("cs" :default "Viz tabulka %s") | ||
| 5879 | ("fr" :default "cf. tableau %s" | 5925 | ("fr" :default "cf. tableau %s" |
| 5880 | :html "cf. tableau %s" :latex "cf.~tableau~%s") | 5926 | :html "cf. tableau %s" :latex "cf.~tableau~%s") |
| 5881 | ("sl" :default "Glej tabelo %s")) | 5927 | ("sl" :default "Glej tabelo %s")) |
| 5882 | ("Table" | 5928 | ("Table" |
| 5883 | ("ar" :default "جدول") | 5929 | ("ar" :default "جدول") |
| 5930 | ("cs" :default "Tabulka") | ||
| 5884 | ("de" :default "Tabelle") | 5931 | ("de" :default "Tabelle") |
| 5885 | ("es" :default "Tabla") | 5932 | ("es" :default "Tabla") |
| 5886 | ("et" :default "Tabel") | 5933 | ("et" :default "Tabel") |
| @@ -5893,6 +5940,7 @@ them." | |||
| 5893 | ("zh-CN" :html "表" :utf-8 "表")) | 5940 | ("zh-CN" :html "表" :utf-8 "表")) |
| 5894 | ("Table %d:" | 5941 | ("Table %d:" |
| 5895 | ("ar" :default "جدول %d:") | 5942 | ("ar" :default "جدول %d:") |
| 5943 | ("cs" :default "Tabulka %d:") | ||
| 5896 | ("da" :default "Tabel %d") | 5944 | ("da" :default "Tabel %d") |
| 5897 | ("de" :default "Tabelle %d") | 5945 | ("de" :default "Tabelle %d") |
| 5898 | ("es" :default "Tabla %d") | 5946 | ("es" :default "Tabla %d") |