Commit Graph

24432 Commits

Author SHA1 Message Date
Bastien 177745e4c9 doc/org-manual.org (Citations handling): New section
* doc/org-manual.org (Citations handling): New section.
2021-09-27 12:15:43 +02:00
Bastien 80798fcdbb oc.el (org-cite-register-processor): Silence a compiler warning
* lisp/oc.el:
(org-cite-register-processor): Silence a compiler warning.
2021-09-27 12:15:09 +02:00
Bastien ca441be377 lisp/oc.el: Fix typo in comment string
* lisp/oc.el: Fix typo in comment string.
2021-09-27 12:08:15 +02:00
Bastien 2db02f9931 Merge branch 'bugfix' 2021-09-27 12:02:40 +02:00
Bastien 529a1bd829 doc/org-manual.org: Reintroduce lost footnote definition.
* doc/org-manual.org (Footnotes): Reintroduce lost footnote
definition.

Reported-by: Tim Landscheidt <tim@tim-landscheidt.de>
<https://list.orgmode.org/877dhx2qzj.fsf@vagabond.tim-landscheidt.de/>
2021-09-27 12:01:07 +02:00
Christopher League c305bb7418 org-agenda: Allow org-agenda-overriding-header to be a function
* org-agenda.el (org-agenda--insert-overriding-header): Allow
`org-agenda-overriding-header' to be a function in addition to a
string or nil. When the custom agenda is created or updated, call that
function and insert the string it returns as the agenda header.

This allows custom commands to produce dynamic headers that include
up-to-date information. For example, this produces a header with a
current timestamp:

(push '("DHD" "Dynamic header demo"
        ((alltodo
          ""
          ((org-agenda-overriding-header
            (lambda ()
              (propertize
               (format-time-string "-- Get crackin’, it’s %H:%M:%S!!\n")
               'face 'org-agenda-structure)))))))
      org-agenda-custom-commands)

User is free to add any face properties, use Org links, and include a
blank line or not. I am using this to count how many items are in
various inboxes and display them in an agenda.
2021-09-27 11:59:33 +02:00
Daniel Fleischer 7d67719d68 org-manual: comment about latex code-block export
* doc/org-manual.org: when using the latex Minted package, one needs to
set the '-shell-escape' flag in 'org-latex-pdf-process'.

Signed-off-by: Daniel Fleischer <danflscr@gmail.com>
2021-09-27 11:59:33 +02:00
Kyle Meyer 41f76092c6 ob-core: Make recent change compatible with older Emacs versions
* lisp/ob-core.el (org-babel-disassemble-tables): Avoid length> for
compatibility with Emacs versions before 28.

length> and friends were added to Emacs in 0f790464d5 (Add new
predicates for sequence lengths, 2020-12-27), which hasn't yet made it
into a release.
2021-09-26 23:24:23 -04:00
Kyle Meyer d9d5594c24 Merge branch 'km/from-emacs-master' 2021-09-26 23:24:13 -04:00
Stefan Kangas 1f3722c6b5 Backport commit c78e16962 from Emacs
; Adjust overly long docstrings to fit 80 characters
c78e16962e63895d340f80cf245fad568a7da770
Stefan Kangas
Sun Sep 26 13:23:57 2021 +0200
2021-09-26 22:49:55 -04:00
Stefan Kangas b2da9ea3b6 Backport commit 0da8118dc from Emacs
* lisp/org.el (org-revert-all-org-buffers): Use command substitution.

Use command substitution instead of raw keys in more places
0da8118dcbf3c54dd6ecc9c0e3314a56ca82ec51
Stefan Kangas
Fri Sep 24 21:26:08 2021 +0200
2021-09-26 22:49:55 -04:00
Lars Ingebrigtsen 63a5af9e8e Backport commit 85e9e5f61 from Emacs
* lisp/ox-html.el (org-html-htmlize-output-type):
* lisp/org-agenda.el (org-agenda-do-in-region): Don't quote t and nil.

Don't quote nil and t in doc strings and comments
85e9e5f616fb0fd0819a04006d6d2a0fb6d93ad7
Lars Ingebrigtsen
Tue Sep 21 22:11:43 2021 +0200
2021-09-26 22:49:55 -04:00
Lars Ingebrigtsen d9fcd078ff Backport commit 43c1ee90c from Emacs
* lisp/org-agenda.el (org-search-view): Don't use `format' on
strings that have no % format directives in them.

Don't use `format' on strings without % format directives
43c1ee90cb3333dc2643e58cf607399b0abebf43
Lars Ingebrigtsen
Tue Sep 21 17:52:53 2021 +0200
2021-09-26 22:49:54 -04:00
Bastien c21dceb66d lisp/org.el: Fix some compiler warnings
Thanks to Ihor Radchenko for reporting them.
2021-09-26 22:14:47 +02:00
Max Nikulin 87a8229b4a org.el: Use org-contrib module instead of CONTRIB dir in docs
* lisp/org.el (org-modules, org-export-backends): Update docstrings
since CONTRIB directory was transformed into a package in NonGNU ELPA.

Reported by Michael Maurer
https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00195.html
2021-09-26 15:45:28 +02:00
Protesilaos Stavrou 2aa2615de5 Document new agenda faces in the ORG-NEWS 2021-09-26 14:45:07 +02:00
Bastien 69850c1e88 ob-core.el (org-babel--file-desc): Remove unused condition
* lisp/ob-core.el (org-babel--file-desc): Remove unused condition.
2021-09-26 14:44:21 +02:00
Bastien 578d99b2aa lisp/ob-tangle.el: Add variable declaration
This completes commit 0b4e357d6.
2021-09-26 14:34:41 +02:00
Bastien 98fd6d5fd5 Remove references to deleted packages
* testing/lisp/test-ob-vala.el: Delete file.

* mk/default.mk (BTEST_OB_LANGUAGES):
* lisp/ox-man.el (org-man-source-highlight-langs):
* lisp/org.el (org-babel-load-languages): Remove references to
deleted packages.
2021-09-26 14:13:28 +02:00
Bastien db67c7e923 Move some ob-*el files to the new org-contrib repo
* lisp/ob-vala.el:
* lisp/ob-shen.el:
* lisp/ob-picolisp.el:
* lisp/ob-mscgen.el:
* lisp/ob-ledger.el:
* lisp/ob-io.el:
* lisp/ob-hledger.el:
* lisp/ob-ebnf.el:
* lisp/ob-coq.el:
* lisp/ob-asymptote.el:
* lisp/ob-abc.el:
* lisp/ob-J.el: Delete.

See https://list.orgmode.org/87bl9rq29m.fsf@gnu.org/
2021-09-26 14:00:09 +02:00
Sébastien Miquel d74a82448b org.el (org-fontify-extend-region): Fix headline fontification in edge case
* lisp/org.el (org-fontify-extend-region): Fix fontification of
headline or meta line created by inserting a newline.

Unrelated to the fix: `org-fontify-extend-region' is added to
`font-lock-extend-after-change-region-function' and doesn't need to
use `save-excursion'.
2021-09-26 13:23:17 +02:00
TEC df51e934ae
Merge branch 'bugfix' 2021-09-26 19:00:59 +08:00
TEC 6a558fc17b
org: Fix potential modified src match-data issue
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): When this is run on
a src block, a "leaky" major mode called in
`org-src-font-lock-fontify-block' can modify the match data.
This is problematic, as the match data already set is important for
font-lock.  To protect ourselves from this behaviour, we can wrap
`org-src-font-lock-fontify-block' in `save-match-data' to ensure that
the match data for the src block is conserved.
2021-09-26 19:00:47 +08:00
András Simonyi 5e58af5ddd oc-csl: Use citeproc-el to create CSL processor itemgetters
* lisp/oc-csl.el (org-cite-csl--processor): Citeproc-el now provides an
itemgetter constructor with all the required functionality and some more, so we
use it to create the itemgetter instead of `org-cite-csl--itemgetter' to avoid
code duplication and make use of the additional features, in particular the
ability to access bibliographies in `org-bibtex' format
(see <https://gewhere.github.io/org-bibtex>).
(org-cite-csl--itemgetter): Is removed since it is no longer used.
2021-09-26 12:35:39 +02:00
stardiviner b80b0a517d org-clock.el: Make org-notify support macOS notification
* lisp/org-clock.el (org-show-notification): Add support for macOS
notification.
2021-09-26 10:52:32 +02:00
Protesilaos Stavrou 4b7d80cb60 Add faces to improve contextuality of agenda views
* lisp/org-agenda.el (org-search-view)
(org-agenda-propertize-selected-todo-keywords, org-todo-list)
(org-tags-view): Implement new org-agenda-structure-filter and
org-agenda-structure-secondary faces.
(org-agenda-get-day-face): Add condition for rendering the current
date heading in org-agenda-date-weekend-today.

* lisp/org-faces.el (org-agenda-structure-secondary)
(org-agenda-date-weekend-today, org-agenda-structure-filter)
(org-imminent-deadline): Add new faces.
(org-agenda-deadline-faces): Use the 'org-imminent-deadline' for
current deadlines instead of the generic 'org-warning'.
2021-09-26 10:44:14 +02:00
Ihor Radchenko 54c2327f3a Allow :var header args to be assigned to cons cells
* lisp/ob-core.el (org-babel-disassemble-tables,
org-babel-gnuplot-process-vars): Use `proper-list-p' check instead of
`listp'.
(org-babel-disassemble-tables): Check list length before trying to
remove hline from a table assignment.
* testing/lisp/test-ob.el (test-ob/cons-cell-as-variable): Add the
test.
2021-09-26 10:21:20 +02:00
Matt Huszagh 78783f4e47 ob-core.el: Add ability to use closures as default header arguments
* lisp/ob-core.el (org-babel-default-header-args): Document ability to
use functions.
(eval-default-headers): New function to generate default header
arguments, which adds the ability to evaluate function arguments at
runtime.
(org-babel-get-src-block-info): Use new header argument evaluate
function when retreiving src block info.

* lisp/ob-exp.el (org-babel-exp-src-block): Must use new
eval-default-headers when exporting as well.

The closures are evaluated at runtime.
2021-09-26 10:13:38 +02:00
Ihor Radchenko 1c83f6fa02 Allow sexps with nested parenthesis in org-agenda-prefix-format
* lisp/org-agenda.el (org-compile-prefix-format): Use `read' instead
of pure regexp matching to determine bounds of %(sexp) expressions in
`org-agenda-prefix-format'.

Fixes https://orgmode.org/list/87fsy8yi1e.fsf@localhost/
2021-09-26 09:12:14 +02:00
Ihor Radchenko d3d80c5948 Add test checking org-log-done specs
* testing/lisp/test-org.el (test-org/org-log-done): New test
2021-09-26 09:05:17 +02:00
Ihor Radchenko 05ee1e6ee0 Do not rely on M-q binding for filling src-block
* lisp/org.el (org-fill-element): Use `fill-paragraph' instead of
simulating "M-q" binding.
(org-fill-paragraph): Return t as described in `fill-paragraph'
docstring.

Fixes https://orgmode.org/list/CAH7LOt0PO3js6_+Cbinm6EYNx0KFvpfiSS7Dwc1EXsfHfHkHVA@mail.gmail.com/
2021-09-26 09:04:46 +02:00
Bastien 46511212e9 Merge branch 'bugfix' 2021-09-26 08:59:43 +02:00
Ihor Radchenko 0b4e357d62 Avoid creating ID property during tangling
* lisp/ob-tangle.el (org-babel-tangle-single-block,
org-babel-tangle-comment-links): Suppress org-id-link-to-org-use-id
during tangling.  The links used during tangle process are transient
and do not really need to use ID.  Using ID may create unexpected
edits in the tangled Org buffer when org-id-link-to-org-use-id is set
to t.  Fixes [1].

[1] https://orgmode.org/list/9eb31da73b12fcaf6820484834cc8cd3@libre.brussels/T/#t
2021-09-26 08:59:24 +02:00
Bastien 3d35718bad Merge branch 'bugfix' 2021-09-26 08:57:27 +02:00
Ihor Radchenko f7d6db1bf6 org-bibtex-read: Do not add nil when there is no entry at point
* lisp/ol-bibtex.el (org-bibtex-read): Previously, when there is no
entry at point, `nil' would be added to `org-bibtex-entries' causing
errors later, i.e. upon calling org-bibtex-write.  Now, nil is never
pushed to `org-bibtex-entries'.

Fixes https://orgmode.org/list/874kd3288n.fsf@yandex.com
2021-09-26 08:57:16 +02:00
Bastien 72c9f1bf42 Merge branch 'bugfix' 2021-09-26 08:54:40 +02:00
Bastien dbbb93dfdf lisp/org-table.el: Fix positioning of "#+TBLFM:
* lisp/org-table.el (org-table-store-formulas): Fix positioning of
"#+TBLFM:".

Reported-by: tbanelwebmin <tbanelwebmin@free.fr>
<http://list.orgmode.org/43910853-03cb-c226-f46d-4736d0e6cca6@free.fr>
2021-09-26 08:53:36 +02:00
Bastien ef661702e7 Merge branch 'bugfix' 2021-09-26 08:25:05 +02:00
Ihor Radchenko aea7cab707 Fix duplicate logbook entry for repeated tasks
* lisp/org.el (org-add-log-setup): Always run `org-add-log-note' via
`post-command-hook'.  Otherwise, there is no way to know if a note was
requested for `this-command'.  Running `org-add-log-note' directly
would, for example, break `org-auto-repeat-maybe' as reported in [1].

[1] https://orgmode.org/list/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=VjqmjGtzy8UC1SyPArKbA@mail.gmail.com
2021-09-26 08:24:58 +02:00
Bastien acc49d539d Merge branch 'bugfix' 2021-09-26 08:03:09 +02:00
Ihor Radchenko e23815ba61 Correctly handle org-log-note-clock-out non-interactively
* lisp/org-clock.el (org-clock-out): Delay log popup to
after-command-hook to avoid messing up non-interactive calls.
`org-add-log-setup' without 'note argument would raise interactive
note buffer immediately, so we do pass the 'note argument.
2021-09-26 08:02:15 +02:00
Jim Porter be0cdd1e52 org-mouse: Support intermediate-state checkboxes
* lisp/org-mouse.el (org-mode-hook): Use regexp from
`org-set-font-lock-defaults' and set font-lock keywords more robustly.

TINYCHANGE
2021-09-26 07:56:00 +02:00
Rodrigo Morales e0535fa2d8 ob-sql.el (org-babel-expand-body:sql): Support :prologue :epilogue
* lisp/ob-sql.el (org-babel-expand-body:sql): Add support for
:prologue and :epilogue parameters.

TINYCHANGE
2021-09-26 07:50:47 +02:00
Sébastien Miquel 70e65a2028 org-src.el: Do not indent blank lines, except current one
* lisp/org-src.el (org-src--contents-for-write-back): Do not indent blank lines, except for the
current line maybe.
(org-src--preserve-blank-line): New variable, whether to preserve
indentation of the current blank line.
(org-src--edit-element): Set `org-src--preserve-blank-line'.
* lisp/org.el (org-indent-line): When tab acts natively, do some
preindentation, which signals `org-src--edit-element' to
preserve the indentation of current blank line.

Removing all the whitespace was the original behaviour for all blank lines, before `857ae366b3`.
2021-09-26 07:47:40 +02:00
Bastien ee0fd1ec31 Revert "org-src.el (org-src--contents-for-write-back): Do not indent blank lines"
This reverts commit 35690cd04f.
2021-09-26 07:47:24 +02:00
Sébastien Miquel 35690cd04f org-src.el (org-src--contents-for-write-back): Do not indent blank lines
* lisp/org-src.el (org-src--contents-for-write-back): Do not indent
blank lines, except for the current line.

This was the original behaviour for all blank lines, before `857ae366b3`.
2021-09-26 07:46:42 +02:00
Tom Gillespie 9364b2d894 lisp/ox-html.el: Restore org-svg class.
* lisp/ox-html.el (org-html--format-image): Restore org-svg class.
d96e897579 removed the org-svg class
which is necessary even when using <img> tags otherwise svg images
will render at absurdly large sizes.
2021-09-25 23:17:44 +02:00
Bastien faf1ba8cde Merge branch 'bugfix' 2021-09-25 23:09:50 +02:00
Ihor Radchenko 97de19f659 Fix not updating org-clock-marker after refiling from indirect buffer
* lisp/org.el (org-check-and-save-marker): Save markers in base buffer
of indirect buffer in addition to markers in current buffer.

Fixes bug reported in https://orgmode.org/list/CABa5=g4bvYQoTbBn96tFi9K827u_A+MweqYWWpib_tyFLBdG3g@mail.gmail.com/T/#t
2021-09-25 23:09:37 +02:00
Juan Manuel Macias 18f6ef8c3f ox.el: add smart quotes for greek
* lisp/ox.el (org-export-smart-quotes-alist): The correct quotes for
Greek have been established with the help of Protesilaos Stavrou, who
has contributed a style guide for the European institutions:
http://publications.europa.eu/code/el/el-4100107el.htmq On the correct
character for Greek second-level opening quotes, according to Yannis
Haralambous (`From Unicode to Typography, a Case Study: the Greek
Script' (1999, p. 20), a symbol equivalent to the Unicode character
U+201F is historically attested. But it seems that the current trend
in Greece is to apply the character U+201C, more commonly used in
other languages. Haralambous himself, in a recent consultation,
states: `[...] U+201C is a good choice for representing that grapheme
since it is used in most countries of the world...'
2021-09-25 22:54:05 +02:00