Eric Abrahamsen
6de5bcee87
Skip entries with no ID when updating ID locations
...
* lisp/org-id.el (org-id-update-id-locations): Saves a little chatter
about duplicate "nil" IDs.
2020-02-19 22:37:25 +01:00
Bastien
86cbaff2b8
org-manual.org: Enhance the "Subscripts and Superscripts" section
...
* doc/org-manual.org (Subscripts and Superscripts): Be more
explicit about the interaction between the relevant options.
2020-02-19 22:27:44 +01:00
Bastien
6f943b1da5
org.el (org-use-sub-superscripts): Remove old comment in docstring
...
* lisp/org.el (org-use-sub-superscripts): Remove old comment
in docstring.
2020-02-19 22:26:47 +01:00
Bastien
bc75b75d9f
org.el (org-special-ctrl-k): Enhance docstring
...
* lisp/org.el (org-special-ctrl-k): Enhance docstring.
Thanks to Marco Wahl for suggesting this change.
2020-02-19 21:43:31 +01:00
Nicolas Goaziou
0c55d3f421
Remove special syntax from context in file links
...
* lisp/ol.el (org-link--clear-syntax-from-context): New function.
(org-store-link): Use new function.
2020-02-19 18:42:50 +01:00
Nicolas Goaziou
12c09be3a6
Refactor context part in file links
...
* lisp/ol.el (org-link--context-from-region):
(org-link--squeeze-white-spaces): New functions.
(org-link-heading-search-string): Refactor code. Always start with an asterisk.
(org-store-link): Use new functions.
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead):
* testing/lisp/test-org-clock.el (test-org-clock/clocktable/link):
Update tests.
2020-02-19 18:42:50 +01:00
Nicolas Goaziou
8c4e270df2
ol: Refuse to define reserved internal link types
...
* lisp/ol.el (org-link-set-parameters): Raise an error when trying to
define reserved internal link types.
2020-02-19 18:42:50 +01:00
Nicolas Goaziou
f4bed78a19
Move custom links to new tooling
...
* contrib/lisp/ol-bookmark.el (org-bookmark-open):
* contrib/lisp/ol-elisp-symbol.el (elisp-symbol-open):
* contrib/lisp/ol-git-link.el (org-gitbare-open):
(org-git-open):
* contrib/lisp/ol-man.el (org-man-open):
* contrib/lisp/ol-mew.el (org-mew-open):
* contrib/lisp/ol-notmuch.el (org-notmuch-open):
(org-notmuch-search-open):
(org-notmuch-tree-open):
* contrib/lisp/ol-vm.el (org-vm-open):
(org-vm-imap-open):
* contrib/lisp/ol-wl.el (org-wl-open):
* contrib/lisp/org-mac-link.el (org-mac-together-item-open):
(org-mac-addressbook-item-open):
(org-mac-skim-open):
(org-mac-acrobat-open):
(org-mac-outlook-message-open):
(org-mac-evernote-note-open):
(org-devonthink-item-open):
(org-mac-message-open):
* contrib/lisp/org-mairix.el (org-mairix-open):
* lisp/ol-bbdb.el (org-bbdb-export):
(org-bbdb-open):
* lisp/ol-bibtex.el (org-bibtex-open):
* lisp/ol-docview.el (org-docview-open):
* lisp/ol-eshell.el (org-eshell-open):
* lisp/ol-eww.el ("eww"):
* lisp/ol-gnus.el (org-gnus-open):
* lisp/ol-info.el (org-info-open):
* lisp/ol-irc.el (org-irc-visit):
* lisp/ol-mhe.el (org-mhe-open):
* lisp/ol-rmail.el ("rmail"):
(org-rmail-open):
* lisp/ol.el (org-link--open-doi):
(org-link--open-elisp):
(org-link--open-help):
(org-link--open-shell):
* lisp/org-id.el (org-id-open):
* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe): Use
new tooling.
* doc/org-manual.org (Adding Hyperlink Types): Adapt example.
2020-02-19 18:42:50 +01:00
Nicolas Goaziou
afd3b04ecc
ol: Extend open tooling in link parameters
...
* lisp/ol.el (org-link-parameters): Extend :follow parameter to handle
a second argument.
(org-link-open): Call custom-link functions after internal ones.
(org-link-open-as-file): New function.
(org-link-parameters): Reference new function.
(org-link-open): Use new function.
2020-02-19 18:42:47 +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
fcf018a2c4
Delete mk/eldo.el
...
This has been moved to worg.
2020-02-19 18:32:23 +01:00
Bastien
9d58806fab
Fix 5acf4d4692
2020-02-19 18:10:41 +01:00
Bastien
88d218a5a0
Fix 5acf4d4692
2020-02-19 18:10:26 +01:00
Bastien
ac1498ec6e
etc/ORG-NEWS: Document `ob-shell-return-value-is-exit-status'
...
* etc/ORG-NEWS: Document `ob-shell-return-value-is-exit-status'.
2020-02-19 16:57:15 +01:00
Bastien
4533d783c2
ob-shell.el: New option `ob-shell-return-value-is-exit-status'
...
* lisp/ob-shell.el (ob-shell-return-value-is-exit-status): New
option.
(org-babel-execute:shell, org-babel-sh-evaluate): Use it.
In a shell source code block, when there is no :results header or when
the :results header is "value", the code block should return the value
of the source block, called in "functional mode", i.e. with the code
being called as a function and returning a value. See this part of
the manual:
‘value’
Default. Functional mode. Org gets the value by wrapping the code
in a function definition in the language of the source block. That
is why when using ‘:results value’, code should execute like a
function and return a value. For languages like Python, an
explicit ‘return’ statement is mandatory when using ‘:results
value’. Result is the value returned by the last statement in the
code block.
Strictly speaking, the "return value" of a shell source code block
should be the exit status of the last command in the block. As the
manpage for bash says: "the return value of a simple command is its
status".
This patch allows this strict interpretation of "value" for shell
blocks, while sticking to the current behavior of returning the shell
output of the code block.
Thanks to Vladimir Nikishkin for asking a question about this and to
Eric Fraga and Tim Cross for their inputs on this issue.
2020-02-19 16:57:15 +01:00
stardiviner
4f31aa2d3b
ob-python.el: Fix session initiation when using python-mode.el
...
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Fixes
new session initiation when org-babel-python-mode is
python-mode.el.
2020-02-19 07:39:28 -08:00
Bastien
39f1c1f1e1
Merge branch 'maint'
2020-02-19 14:35:05 +01:00
Bastien
10607d45ae
org.el: Fix typo in docstring
...
* lisp/org.el (org-special-ctrl-k): Fix typo in docstring.
2020-02-19 14:34:58 +01:00
Bastien
5af2d215ff
Revert "org-capture.el: Conditionally throw an error on missing annotation"
...
This reverts commit 78ec8da52a
.
2020-02-19 13:37:24 +01:00
Bastien
0b9fcc603f
Revert "org-capture.el: Don't throw an error abusively"
...
This reverts commit 26ba4f7d7f
.
2020-02-19 13:37:17 +01:00
Bastien
26ba4f7d7f
org-capture.el: Don't throw an error abusively
...
* lisp/org-capture.el (org-capture-fill-template): Don't throw
a user error when immediately finishing a template from which
an initial annotation is missing, warn instead.
This fixes 78ec8da52a
. Thanks to Eric Fraga for reporting this.
2020-02-19 13:32:49 +01:00
Bastien
4150832d43
Merge branch 'maint'
2020-02-19 10:56:20 +01:00
Bastien
f90642e828
test-ob.el: Fix and enhance tests
...
* testing/lisp/test-ob.el (test-ob/string-to-number): Fix and
enhance tests.
2020-02-19 10:56:10 +01:00
Bastien
d0018ce62c
ob-core.el: Fix `org-babel--string-to-number'
...
* lisp/ob-core.el (org-babel--string-to-number): Prevent
strings containing whitespaces after being trimmed to be
interpreted as numbers.
2020-02-19 10:55:36 +01:00
Bastien
09877e5be2
Merge branch 'maint'
2020-02-19 10:39:51 +01:00
Bastien
6b2a7cb20b
ob-core.el: Correctly interpret all numbers
...
* lisp/ob-core.el (org-babel--string-to-number): Correctly
interpret all numbers.
Thanks to Vladimir Nikishkin for reporting this.
2020-02-19 10:39:37 +01:00
Bastien
093e65ecc7
Merge branch 'maint'
2020-02-19 00:35:34 +01:00
Bastien
7e52b76612
org-agenda: Fix logic of `org-agenda-filter-make-matcher'
...
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Fix
logic: only use 'or when including several categories as e.g.
'("+cat1" "+cat2").
This fixes 06cf532f4
.
2020-02-19 00:35:20 +01:00
Bastien
6381fc96cf
Delete obsolete utilities
...
mk/fake_change_log.pl
mk/git-changelog
mk/make_emacs_changelog
mk/set-version.pl
2020-02-18 23:46:22 +01:00
Bastien
45f6844cdf
mk/org-fixup.el: Create autoloads from ol*.el files too
...
* mk/org-fixup.el (org-make-org-loaddefs): Create autoloads from
ol*.el files too.
2020-02-18 23:46:10 +01:00
Bastien
fae16ed8f5
Add `generated-autoload-file' buffer local variable
...
* lisp/org.el:
* lisp/org-num.el:
* lisp/org-macs.el:
* lisp/org-list.el:
* lisp/org-lint.el:
* lisp/org-keys.el:
* lisp/org-goto.el:
* lisp/org-duration.el:
* lisp/org-compat.el:
* lisp/org-colview.el:
* lisp/org-capture.el:
* lisp/org-agenda.el:
* lisp/ol.el: Add `generated-autoload-file' buffer local variable.
This is needed when compiling Org files within GNU Emacs.
2020-02-18 23:37:24 +01:00
Bastien
273a7775cd
Various minor fixes
...
* mk/eldo.el: Update copyright year and fix formatting.
* lisp/ox-man.el: Don't set generated-autoload-file as a
buffer local variable.
* lisp/org-refile.el: Place ;;;###autoload correctly.
* lisp/ob-lilypond.el (org-babel-lilypond-switch-extension):
Formatting fix.
2020-02-18 23:24:09 +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
325962c003
org.el: New option `org-startup-numeroted' and #+startup: num
...
* lisp/org.el (org-startup-numeroted): New option.
(org-startup-options): New "num" and "nonum" startup keywords.
(org-mode): Startup according `org-startup-numeroted' or the
local #+startup setup.
* doc/org-manual.org (Dynamic Headline Numbering)
(Summary of In-Buffer Settings): Document
`org-startup-numeroted' and #startup: num.
* etc/ORG-NEWS: Document the new startup option.
Thanks to Guillaume MULLER for this idea.
2020-02-18 13:27:33 +01:00
Bastien
44e17c420b
Merge branch 'maint'
2020-02-18 10:31:49 +01:00
Stefan Kangas
2129ece3b5
org-agenda.el: Fix typo
...
* lisp/org-agenda.el (org-agenda-add-entry-text-descriptive-links):
Fix typo.
2020-02-18 10:31:37 +01:00
Bastien
cb2774d1a8
org-capture.el: Fix possibly missing final newline
...
* lisp/org-capture.el (org-capture-finalize): When capturing
an entry, fix missing final newline when the user has deleted
it.
This continues the fix done in d8c51531c
.
2020-02-18 01:25:59 +01:00
Bastien
fc3f1e6b28
Revert "ob-python: Session returns empty string if no return value"
...
This reverts commit 5fc4576548
.
2020-02-17 23:46:49 +01:00
Bastien
b8a2ad9288
org-agenda.el: New hook `org-agenda-filter-hook'
...
* lisp/org-agenda.el (org-agenda-filter-hook): New hook.
(org-agenda-finalize): Enhance docstring.
(org-agenda-filter): Use the new hook.
(org-agenda-filter-expand-tags, org-agenda-filter-apply): ):
Fix docstrings.
* etc/ORG-NEWS: Document the new hook.
2020-02-17 18:40:11 +01:00
Jack Kamm
5fc4576548
ob-python: Session returns empty string if no return value
...
* lisp/ob-python.el (org-babel-python--eval-ast): Change sessions to
return an empty string, instead of None, if there is no return value.
2020-02-17 18:30:47 +01:00
Bastien
a85f1603ec
Merge branch 'maint'
2020-02-17 16:36:12 +01:00
Bastien
6accd0ef62
Fix fb188adda
2020-02-17 16:36:01 +01:00
Bastien
cdf7d6414d
Merge branch 'maint'
2020-02-17 16:29:38 +01:00
Bastien
016aa96f99
Revert "org-compat.el: Require 'org-agenda in a timely fashion"
...
This reverts commit 2f30ecffdf
.
2020-02-17 16:29:21 +01:00
Bastien
19cdef520e
Merge branch 'maint'
2020-02-17 14:51:47 +01:00
Bastien
2f30ecffdf
org-compat.el: Require 'org-agenda in a timely fashion
...
* lisp/org-compat.el ("calendar"): Require 'org-agenda before
adding `org--setup-calendar-bindings' to `calendar-mode-hook'.
This fixes Emacs bug#38592.
2020-02-17 14:49:15 +01:00
Bastien
f25b40621b
Merge branch 'maint'
2020-02-17 14:23:00 +01:00
Bastien
fb188adda0
org.el: Move `org-agenda-diary-file' to org-agenda.el
...
* lisp/org-agenda.el (org-agenda-diary-file): Move from org.el.
* lisp/org-colview.el (org-agenda-diary-file): Move to org-agenda.el.
2020-02-17 14:22:30 +01:00
Bastien
055742562c
org-colview.el: Allow text rescaling
...
* lisp/org-colview.el (org-columns-header-line-remap): New
variable.
(org-columns--display-here): Don't rigidly inherit the :height
from the default face, allow text-scale-* to also rescale the
temporary column view header-line.
(org-columns-remove-overlays): If
`org-columns-header-line-remap' is non-nil, remove the
header-line face relative remapping.
* etc/ORG-NEWS (Allow text rescaling in column view): Document
the ability to scale text in column view.
Thanks to Marco Wahl for this suggestion.
2020-02-17 13:59:19 +01:00
Bastien
5dd7721242
Use `org-switch-to-buffer-other-window' in a few places
...
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org-attach.el (org-attach):
* lisp/ob-lilypond.el (org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-mark-error-line): Use
`org-switch-to-buffer-other-window' instead of
`switch-to-buffer-other-window'.
2020-02-17 09:04:19 +01:00