Commit Graph

580 Commits

Author SHA1 Message Date
Stefan Kangas 2e1c984153 Prefer HTTPS to HTTP in most links 2021-03-21 15:21:22 -04:00
Kyle Meyer d477f61ee1 Merge branch 'km/from-emacs-master' 2021-03-14 22:07:30 -04:00
Stefan Monnier a85b4cc5c6 Backport commit 7d0dc3183 from Emacs
* lisp/ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Remove always-nil variable `arg-2`.

* lisp/ol-gnus.el (org-gnus-store-link):
Remove always-nil variables `newsgroup` and `xarchive`.

* lisp/ol.el (org-store-link):
Remove always-nil variable `description`.

* lisp/org-clock.el (org-clock-special-range):
Remove always-nil variables `m1` and `m`.

* lisp/org-crypt.el (org--matcher-tags-todo-only): Declare var.

* lisp/org-protocol.el (org-protocol-open-source):
Remove always-nil variable `result`.

* lisp/ox-odt.el (org-odt-format-label):
Remove always-nil variable `short-caption`.
(org-odt-link--inline-formula):
Remove always-nil variables `width` and `height`.

* lisp/ox.el (org-export--missing-definitions):
Remove always-nil variable `seen`.

* lisp/: Delete some always-nil variables
7d0dc31833d471a6f86e947d3165d3fd1452a184
Stefan Monnier
Thu Mar 11 13:07:37 2021 -0500
2021-03-14 17:54:17 -04:00
Kyle Meyer 291993888d Merge branch 'maint' 2021-01-01 15:02:10 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Fatih Aydin dc1e037cd1 ox: Add Turkish translation
* lisp/ox.el (org-export-dictionary): Add Turkish translation.

TINYCHANGE
2020-12-10 23:24:02 -05:00
Karol Wójcik 93325df0ba ox.el: Add missing polish translations in export dictionary
* lisp/ox.el (org-export-dictionary): Add missing polish translations.

TINYCHANGE

Signed-off-by: Karol Wójcik <karol.wojcik@tuta.io>
2020-11-06 00:48:02 -05:00
Protesilaos Stavrou 7ebb2d5629 Review face for export dispatcher highlighted keys
* lisp/org-faces.el (org-dispatcher-highlight): Define new face.

* lisp/ox.el (org-export--dispatch-ui): Apply org-dispatcher-highlight
face.

The intent is to decouple the dispatcher's interface from the generic
org-warning face.  The dispatcher's active keys are thus made easier
to tell apart, without interfering with other applications of
org-warning.
2020-10-24 13:44:42 +02:00
Stefan Kangas 9a6689f9ce Backport commit c6fa0ad31 from Emacs
; Prefer https to http in many URLs
c6fa0ad315e38167cb81a4d8c143cc53ad783cc3
Stefan Kangas
Thu Oct 1 15:28:15 2020 +0200
2020-10-04 15:06:39 -04:00
Alexandru-Sergiu Marton fe41103d50 ox: Add Romanian smart quotes
* lisp/ox.el (org-export-smart-quotes-alist): Add Romanian variants for
  smart quotes.

TINYCHANGE
2020-07-13 18:17:37 +02:00
Kyle Meyer 3cbbbd784f Merge branch 'maint' 2020-06-27 00:03:29 -04:00
Kyle Meyer 591ea3eafb ox: Prevent dispatcher from starting in scrolled window
* lisp/ox.el (org-export--dispatch-ui): Restore buffer position after
inserting text to avoid auto-scrolling at start.

When filling in the dispatch buffer, point ends up at the end of the
buffer, which can cause the buffer to be re-centered on point when
org-fit-window-to-buffer is called, in particular if scroll-margin is
above zero and there is a vertical split.  Avoid this by putting point
where it was before the buffer was refreshed.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
https://orgmode.org/list/87tv3a56vv.fsf@gmail.com
2020-06-26 23:59:24 -04:00
Stanley Jaddoe bbf9c062a4 ox: Add Dutch translations
* lisp/ox.el (org-export-dictionary): Add missing Dutch (nl) translations.

TINYCHANGE
2020-05-15 21:53:06 +02:00
Nicolas Goaziou 912c696cd9 ox: Fix b4e91b7e94
* lisp/ox.el (org-export--get-inbuffer-options): Add missing PLIST.
2020-04-27 10:39:05 +02:00
Nicolas Goaziou 31068373dc export: Remove `org-export-special-keywords'
* lisp/ox.el (org-export-special-keywords):
(org-export--get-inbuffer-options): Do not use `org-export-special-keywords'.
2020-04-26 22:59:24 +02:00
Nicolas Goaziou 0826461bc1 ox: Small refactoring
* lisp/ox.el (org-export--list-bound-variables): Use
`org-collect-keywords'.
2020-04-26 22:42:26 +02:00
Nicolas Goaziou b4e91b7e94 New function: org-collect-keywords
* lisp/org.el (org-set-regexps-and-options): Use new function.
(org-collect-keywords):
(org--collect-keywords-1): New functions.
* lisp/ox.el (org-export--get-inbuffer-options): Use new function.
2020-04-26 18:06:15 +02:00
Claudiu ba7d20fcc3 ox: add Romanian translation
* lisp/ox.el (org-export-dictionary): Add Romanian translation.

TINYCHANGE
2020-04-21 18:36:19 +02:00
Nicolas Goaziou 041138e47c Remove `org-export-link-as-file'
* lisp/ol.el (org-link-parameters): Remove reference to the function.
* lisp/ox.el (org-export-link-as-file): Remove function.
* testing/lisp/test-ox.el (test-org-export/link-as-file): Remove test.

The current implementation is not satisfactory, and not useful in the
code base. Using a pre-export hook turning custom link type into
"file" is enough for now. See "attachement" links for an example.
2020-02-28 01:30:30 +01:00
Nicolas Goaziou ee0dba6402 Small fix to headline search string
* lisp/ol.el (org-link-heading-search-string):
(org-link-search):
* lisp/ox.el (org-export-search-cells): Replace statistics cookies
with a space before squeezing spaces so as to handle properly, e.g.,
"wordCOOKIEword".
2020-02-23 12:51:07 +01:00
Nicolas Goaziou ab9166ad29 Extend export tooling in link parameters
* lisp/ol.el (org-link-parameters): Allow a fourth "info" argument for
`:export' property.  Expound docstring.
* lisp/ox.el (org-export-custom-protocol-maybe): Accept a fourth
optional argument.
* lisp/ox-ascii.el (org-ascii--describe-links):
(org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link):
* contrib/lisp/ox-groff.el (org-groff-link): Provide expected fourth
argument.
* lisp/ox.el (org-export-link-as-file): New function.
* lisp/ol.el (org-link-parameters): Add reference to new function in docstring.
* testing/lisp/test-ox.el (test-org-export/link-as-file): Add tests.
(test-org-export/custom-protocol-maybe): Update tests.
2020-02-19 18:41:37 +01:00
Bastien 6a1f6ee1f8 Tiny formatting fixes
* lisp/ox.el (org-export-table-dimensions):
* lisp/ox-texinfo.el (org-texinfo-template):
* lisp/ox-md.el (org-md-link):
* lisp/ox-icalendar.el (org-icalendar-use-UTC-date-time-p):
* lisp/ox-ascii.el (org-ascii-fixed-width):
* lisp/org.el (org-context):
* lisp/org-table.el (org-table-eval-formula)
(org-table-export):
* lisp/org-refile.el:
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data):
* lisp/org-num.el (org-num):
* lisp/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org-macro.el (org-macro):
* lisp/org-lint.el (org-lint):
* lisp/org-keys.el (org-keys):
* lisp/org-duration.el:
* lisp/org-clock.el (org-clock-get-last-clock-out-time)
(org-clock-update-mode-line, org-find-open-clocks):
* lisp/org-agenda.el (org-diary)
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)
(org-agenda-highlight-todo, org-cmp-alpha)
(org-agenda-filter-by-category):
* lisp/ol.el (org-link-expand-abbrev, ol):
* lisp/ol-docview.el (ol-docview):
* lisp/ol-bibtex.el (org-execute-file-search-in-bibtex)
(org-bibtex, org-bibtex-read):
* lisp/ol-bbdb.el (org-bbdb-anniversary-description):
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org):
* lisp/ob-table.el (org-babel-table-truncate-at-newline):
* lisp/ob-stan.el:
* lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar):
* lisp/ob-sql.el:
* lisp/ob-shen.el:
* lisp/ob-shell.el (org-babel-prep-session:shell)
(org-babel-prep-session:shell):
* lisp/ob-sed.el (org-babel-execute:sed)
(org-babel-execute:sed):
* lisp/ob-screen.el:
* lisp/ob-sass.el:
* lisp/ob-ruby.el (org-babel-prep-session:ruby)
(org-babel-prep-session:ruby):
* lisp/ob-ref.el (org-babel-ref-resolve, ob-ref):
* lisp/ob-python.el (org-babel-prep-session:python)
(org-babel-prep-session:python):
* lisp/ob-plantuml.el:
* lisp/ob-picolisp.el:
* lisp/ob-perl.el:
* lisp/ob-org.el:
* lisp/ob-octave.el (org-babel-prep-session:octave)
(org-babel-prep-session:octave)
(org-babel-octave-evaluate-session):
* lisp/ob-ocaml.el:
* lisp/ob-mscgen.el (org-babel-execute:mscgen)
(org-babel-execute:mscgen):
* lisp/ob-maxima.el:
(ob-maxima):
* lisp/ob-matlab.el:
* lisp/ob-makefile.el:
* lisp/ob-lua.el (org-babel-prep-session:lua)
(org-babel-prep-session:lua):
* lisp/ob-lisp.el:
* lisp/ob-ledger.el:
* lisp/ob-latex.el (org-babel-expand-body:latex)
(org-babel-expand-body:latex, ob-latex):
* lisp/ob-js.el:
* lisp/ob-java.el:
* lisp/ob-io.el (org-babel-prep-session:io)
(org-babel-prep-session:io):
* lisp/ob-hledger.el:
* lisp/ob-haskell.el:
* lisp/ob-groovy.el (org-babel-groovy-wrapper-method)
(org-babel-groovy-evaluate):
* lisp/ob-gnuplot.el:
* lisp/ob-fortran.el (org-babel-expand-body:fortran)
(org-babel-expand-body:fortran):
* lisp/ob-forth.el (org-babel-forth-session-execute):
* lisp/ob-exp.el (ob-exp):
* lisp/ob-eval.el:
* lisp/ob-emacs-lisp.el:
* lisp/ob-ebnf.el:
* lisp/ob-dot.el:
* lisp/ob-ditaa.el:
* lisp/ob-css.el:
* lisp/ob-core.el (org-babel-put-rownames):
* lisp/ob-coq.el:
* lisp/ob-comint.el:
* lisp/ob-calc.el:
* lisp/ob-awk.el:
* lisp/ob-asymptote.el:
* lisp/ob-abc.el:
* lisp/ob-R.el (org-babel-prep-session:R): Formatting fixes.
2020-02-18 22:57:37 +01:00
Bastien bfe2f919fa Fix 2508dfa6 2020-02-12 11:54:49 +01:00
Nicolas Goaziou a70fff50d0 Merge branch 'maint' 2020-02-11 19:02:53 +01:00
Nicolas Goaziou 1af8c5a0df ox: Fix extra character deletion after link
* lisp/ox.el (org-export--update-included-link): Account
for :post-blank property when inserting back the link.
* testing/lisp/test-ox.el (test-org-export/expand-include/links): Add
test.

Fixes bug#39173.
2020-02-11 18:59:52 +01:00
Bastien 2508dfa644 Factor out org-scroll and use it in ox.el, org-agenda/attach.el
* lisp/ox.el (org-export--dispatch-ui): Update message in the
header line to promote the use of C-v and M-v while SPC and
DEL are still allowed for backward compatibility reasons.

* lisp/org-macs.el (org-scroll): New function.

* lisp/org-attach.el (org-attach): Use `org-scroll'.

* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Allow C-v, M-v, C-n and C-p to scroll.

This change adverize C-v, M-v, C-n and C-p as the default keys
for scrolling the window, while SPC and DEL are still available
in the export dispatch window.

In particular, don't use SPC as a way to scroll the window in
the agenda commands dispatch window, as this key might be used
for a custom agenda command.
2020-02-11 01:04:28 +01:00
Bastien 185e184e15 ox.el: Remove obsolete comment
* lisp/ox.el: Remove obsolete comment.
2020-02-11 01:00:05 +01:00
Bastien ceb8086301 Small refactoring
* lisp/org-macs.el (org-scroll): New function.

* lisp/ox.el (org-export--dispatch-action):
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Use the new function.
2020-02-10 23:22:51 +01:00
Kyle Meyer ff5fc050d3 Update copyright year to 2020 2020-01-01 13:38:46 -05:00
Takaaki ISHIKAWA c7ad3f8845 ox.el: Replace error with user-error to exit org-export-dispatch
* lisp/ox.el (org-export--dispatch-action): Replace error with
user-error a user-error so that user can quit `org-export-dispatch'
without entering debugging mode.

Modified from a patch proposal by Takaaki Ishikawa.
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00071.html>
2019-12-09 05:33:00 -05:00
Kyle Meyer a01a8f55d8 Merge branch 'maint' 2019-10-27 15:55:30 -04:00
Juanma Barranquero 9c611fd8ac Backport commit 41ba8231e from Emacs
* lisp/ob-scheme.el (org-babel-scheme-get-buffer-impl):
* lisp/ob-shell.el (org-babel--variable-assignments:sh-generic)
(org-babel--variable-assignments:bash_array)
(org-babel--variable-assignments:bash_assoc)
(org-babel--variable-assignments:bash):
* lisp/org-clock.el (org-day-of-week):
(table--put-cell-valign-property): Fix typos.
* lisp/ob-core.el (org-babel-named-src-block-regexp-for-name)
(org-babel-named-data-regexp-for-name): Doc fix.
(org-babel-src-block-names, org-babel-result-names): Fix typos.

lisp/*.el: Fix typos and improve some docstrings
41ba8231ef072571e1a6feabc15d113e5cf57556
Juanma Barranquero
Sun Oct 20 12:12:27 2019 +0200
2019-10-27 15:54:59 -04:00
Kyle Meyer d215c3a8c0 Merge branch 'maint' 2019-09-29 15:49:08 -04:00
Juanma Barranquero 001306c1c0 Backport commit 79a01866a from Emacs
* lisp/org-agenda.el (org-agenda-change-all-lines)
(org-agenda-today-p):
* lisp/org-id.el (org-id-get):
* lisp/org.el (org-highlight-latex-and-related)
(org--valid-property-p):
* lisp/ox-beamer.el (org-beamer--get-label):
* lisp/ox-latex.el (org-latex--caption-above-p):
* lisp/ox-odt.el (org-odt--copy-image-file)
(org-odt--copy-formula-file):
* lisp/ox.el (org-export-with-timestamps): Fix typos in docstrings.

lisp/*.el, src/*.c: Fix typos in docstrings
79a01866a01754b9f566af76ef96e80cd90d094b
Juanma Barranquero
Thu Sep 19 04:32:25 2019 +0200
2019-09-29 15:47:57 -04:00
Nicolas Goaziou 1ff9cab0a3 Merge branch 'maint' 2019-07-09 12:43:29 +02:00
Nicolas Goaziou 9bde6350d1 ox: Add post-blanks when latex is verbatim
* lisp/ox.el (org-export--remove-uninterpreted-data): Add post-blanks
  when latex is verbatim.
2019-07-09 12:42:46 +02:00
Nicolas Goaziou 439782ae00 Merge branch 'maint' 2019-06-12 18:22:50 +02:00
Thomas Plass 0d7d12ffe6 ox: Make `org-export-table-cell-alignment' more robust
* lisp/ox.el (org-export-table-cell-alignment): Make
`org-export-table-cell-alignment' handle tables with rows containing
unequal numbers of cells.

Patch modeled after previous fix for `org-export-table-cell-width'.

TINYCHANGE
2019-06-12 18:22:00 +02:00
Nicolas Goaziou 3ecf1fb7b9 ox: Silence byte-compiler
* lisp/ox.el (org-export-resolve-link): Use `org-link-make-string'
  instead of `org-make-link-string'.
2019-06-10 09:43:37 +02:00
Nicolas Goaziou bba9116cb8 org-element: Parse affiliated keywords according to granularity
* lisp/org-element.el (org-element--current-element): Parse affiliated
  keywords according to granularity.
* lisp/ox.el (org-export-get-caption): Refactor code.
* testing/lisp/test-org-element.el (test-org-element/affiliated-keywords-parser):
  Add tests.

Reported-by: ihor <ihor@antonovs.family>
<http://lists.gnu.org/r/emacs-orgmode/2019-06/msg00023.html>
2019-06-09 00:51:53 +02:00
Sacha Chua a41e9950ae Add :target option for the TOC keyword
* doc/org-manual.org, etc/ORG_NEWS: Document :target option
  for the TOC keyword.

* lisp/ox.el (org-export-resolve-link): New function.

* lisp/ox-ascii.el (org-ascii-keyword): Added :target to the TOC
  keyword.
  (org-ascii--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-html.el (org-html-keyword): Added :target to the TOC keyword.

* lisp/ox-md.el (org-md-keyword): Added :target to the TOC keyword.
  (org-md--build-toc): Changed LOCAL argument to SCOPE.

* lisp/ox-odt.el (org-odt-keyword): Added :target to the TOC keyword.

* testing/lisp/test-ox.el (test-org-export/collect-headlines): Added
  tests for specifying scope by CUSTOM_ID or by fuzzy matching.
  (test-org-export/resolve-link): New test.
2019-05-30 15:25:46 +02:00
Nicolas Goaziou 99aa99426d Merge branch 'maint' 2019-05-30 14:59:58 +02:00
Nicolas Goaziou 967801e2b8 ox: Make `org-export-table-cell-width' more robust
* lisp/ox.el (org-export-table-cell-width): Make
  `org-export-table-cell-width' robust against malformed tables.

Reported-by: michael <m.schoenwaelder@posteo.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00215.html>
2019-05-30 14:59:10 +02:00
Nicolas Goaziou 50986c4863 ox: Resolve fuzzy links pointing to pseudo-elements
* lisp/ox.el (org-export-resolve-fuzzy-link): Look for name also in
  pseudo-elements.
2019-05-13 00:50:54 +02:00
Kyle Meyer c2f3f1912e Merge branch 'maint' 2019-03-17 22:56:24 -04:00
Paul Eggert 602f2280e3 Backport commit 3c94c7bc0 and db9c924d3 from Emacs
* lisp/ob-core.el (org-babel-string-read):
* lisp/org-agenda.el:
(org-agenda-add-entry-to-org-agenda-diary-file):
* lisp/org-element.el (org-element-keyword-parser):
* lisp/org-list.el (org-list-indent-item-generic):
* lisp/org-mhe.el (org-mhe-get-message-folder-from-index):
* lisp/org-mobile.el (org-mobile-apply):
* lisp/org-mouse.el (org-mouse-context-menu):
* lisp/org-plot.el (org-plot/gnuplot):
* lisp/org-protocol.el (org-protocol-flatten-greedy):
* lisp/org-table.el (org-table-copy-down)
(org-table-formula-make-cmp-string)
(org-table-get-stored-formulas, org-table-recalculate)
(org-table-edit-formulas):
* lisp/org.el (org-translate-link-from-planner)
(org-fill-line-break-nobreak-p):
* lisp/ox-ascii.el (org-ascii-item):
* lisp/ox-latex.el (org-latex-clean-invalid-line-breaks):
* lisp/ox.el (org-export-expand-include-keyword):
Fix regular-expression infelicities and typos.

Fix regular-expression glitches and typos
3c94c7bc02fcacb4a101188dddb0c44d53444178
Paul Eggert
Mon Mar 4 18:00:58 2019 -0800

More regexp corrections and tweaks
db9c924d3d53f46846ad8fd74a5d08f4586a520e
Paul Eggert
Fri Mar 8 09:09:40 2019 -0800

Note(km): These two commits are ported together because, with respect
to Org files, db9c924d3 is a fix of an error from 3c94c7bc0.
2019-03-17 22:52:27 -04:00
Nicolas Goaziou a486d9cbd7 Move link-related core functions out of "org.el"
* contrib/lisp/org-wl.el (org-wl-store-link-message):
* lisp/Makefile (clean-install):
* lisp/ob-core.el (org-link-bracket-re):
(org-babel-open-src-block-result):
(org-babel-read-element):
(org-babel-read-link):
(org-babel-result-end):
* lisp/ob-tangle.el (org-link-bracket-re):
(org-babel-tangle-single-block):
(org-link-analytic-bracket-re):
(org-babel-detangle):
(org-babel-tangle-jump-to-org):
* lisp/ol.el:
* lisp/org-agenda.el (org-agenda-get-some-entry-text):
(org-diary):
(org-agenda-format-item):
(org-agenda-open-link):
(org-agenda-switch-to):
(org-agenda-to-appt):
* lisp/org-bbdb.el (org-bbdb-store-link):
* lisp/org-bibtex.el (org-bibtex-store-link):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-clock.el (org-clocktable-write-default):
(org-clock-get-table-data):
* lisp/org-compat.el (org-doi-server-url):
(org-email-link-description-format):
(org-make-link-description-function):
(org-from-is-user-regexp):
(org-descriptive-links):
(org-url-hexify-p):
(org-context-in-file-links):
(org-keep-stored-link-after-insertion):
(org-display-internal-link-with-indirect-buffer):
(org-confirm-shell-link-function):
(org-confirm-shell-link-not-regexp):
(org-confirm-elisp-link-function):
(org-confirm-elisp-link-not-regexp):
(org-file-complete-link):
(org-email-link-description):
(org-make-link-string):
(org-store-link-props):
(org-add-link-props):
(org-make-link-regexps):
(org-angle-link-re):
(org-plain-link-re):
(org-bracket-link-regexp):
(org-bracket-link-analytic-regexp):
(org-any-link-re):
* lisp/org-docview.el (org-docview-store-link):
(org-docview-complete-link):
* lisp/org-element.el (org-element-link-parser):
* lisp/org-eshell.el (org-eshell-store-link):
* lisp/org-eww.el (org-eww-store-link):
(org-eww-copy-for-org-mode):
* lisp/org-footnote.el (org-footnote-next-reference-or-definition):
* lisp/org-gnus.el (org-gnus-article-link):
(org-gnus-store-link):
* lisp/org-id.el (org-id-store-link):
* lisp/org-info.el (org-info-store-link):
* lisp/org-irc.el (org-irc-erc-store-link):
* lisp/org-mhe.el (org-mhe-store-link):
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead):
* lisp/org-protocol.el (org-protocol-do-capture):
* lisp/org-rmail.el (org-rmail-store-link):
* lisp/org-w3m.el (org-w3m-store-link):
(org-w3m-copy-for-org-mode):
2019-03-10 18:00:27 +01:00
Nicolas Goaziou f330259c5b Merge branch 'maint' 2019-02-28 19:40:19 +01:00
Nicolas Goaziou 92c3b76dd8 ox: Insert templates with lower case keywords
* lisp/ox.el (org-export-insert-default-template): Insert lower case
  keywords.
2019-02-28 19:39:39 +01:00
Nicolas Goaziou 819864aebb Merge branch 'maint' 2019-02-27 21:56:36 +01:00