Commit graph

17102 commits

Author SHA1 Message Date
Ihor Radchenko db167b9999
Do not use mark-whole-buffer noninteractively
* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
2021-09-27 22:31:01 +08:00
Ihor Radchenko 14fb761d78
Do not use mark-whole-buffer noninteractively
* lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in
7b85a64da is only for interactive use and causes compiler warning.
Replace it using noninteractive commands.
2021-09-27 22:28:45 +08:00
Bastien 981bcbfc14 Merge branch 'bugfix' 2021-09-27 14:47:41 +02:00
Bastien d13556e5ed lisp/org.el (org-return): Enable `delete-selection'
* lisp/org.el (org-return): Enable `delete-selection'.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
<https://list.orgmode.org/87zgvz6lz7.fsf@gmail.com/>
2021-09-27 14:47:11 +02:00
TEC c90f96c00d
org: Support displaying X% width images
* lisp/org.el (org-display-inline-image--width): Instead of interpreting
an image :width of X% as X pixels, take it as X% of the text width of
the buffer.
2021-09-27 20:18:50 +08:00
TEC c76a7eed23
org: Refactor width in `org-display-inline-images'
* lisp/org.el (org-display-inline-images,
org-display-inline-image--width): Extract the width determination in
`org-display-inline-images' into a new function
`org-display-inline-image--width' where I have taken the opportunity to
refactor the width-determination code.
2021-09-27 20:17:49 +08:00
TEC e816ae1ff5
org: Display proportional image widths
* lisp/org.el (org-display-inline-images): When the image width is given
as a float less than 2, interpret the value as that portion of the text
area width.  This works well with cases such as "#+attr_latex: :width
0.6\linewidth" as this will now be interpreted as 60% of the text area
width.  The upper bound is set to 2 not 1, as more than 100% of the text
width can be realistic, e.g. "1.2\linewidth" in LaTeX, but more than
200% seems unrealistic.
2021-09-27 19:57:57 +08: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
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
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
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 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
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
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
Nicholas Vollmer 4d1a77aec6 org-attach: Fix byte-comp function warning
* (org-attach.el): Declare function for byte compiler.
2021-09-25 22:46:34 +02:00
Nicholas Vollmer 74a5af619c Fix byte-comp function warnings
* (org.el, org-table.el org-keys.el) Declare functions for byte compiler.
2021-09-25 21:31:25 +02:00
Nicholas Vollmer d8b9bd05ba Fix byte-comp function warnings
* (org.el, org-table.el org-keys.el) Declare functions for byte compiler.
2021-09-25 21:30:32 +02:00
Bastien 769a557ceb Merge branch 'bugfix' 2021-09-25 18:17:46 +02:00
Ihor Radchenko 399481bad1 Do not ignore user-defined display-buffer-alist in org-insert-link
* lisp/ol.el (org-insert-link): Handle case when *Org Links* window is
not created.
* lisp/org-macs.el (org-no-popups): Do not override
`display-buffer-alist'. Use `pop-up-windows' instead.
2021-09-25 18:17:32 +02:00
Bastien 777c1c3cb5 Merge branch 'bugfix' 2021-09-25 18:02:19 +02:00
Max Nikulin ec7c16a060 ox-latex: Allow percent sign in 'src-block' caption
* lisp/ox-latex.el (org-latex-src-block): Prevent leak of percent sign
from caption to `format' first argument causing export failure due to
insufficient argument number.  The fix covers only the case of verbatim
environment.
* testing/lisp/test-ox.el
(test-org-export/latex-src-block-verbatim-caption): New test for src
block LaTeX export with cases of various formatting of caption and
verbatim environment.  Check that percent signs in caption and source
block body do not lead to errors.

Reported-by: Charest, Luc <charest.luc@hydroquebec.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2021-08/msg00017.html>
2021-09-25 18:02:08 +02:00
Ihor Radchenko a3c912cb29 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].

* lisp/org-agenda.el (org-agenda-todo): Avoid reintroducing the bug
fixed in c670379adf.

* testing/lisp/test-org.el: Add test checking the reported bug.

[1] https://orgmode.org/list/CAOn=hbcaW1R6vtun-E2r4LS=j3dp=VjqmjGtzy8UC1SyPArKbA@mail.gmail.com
2021-09-25 17:23:53 +02:00
Bastien 179ae6b232 Merge branch 'bugfix' 2021-09-25 17:16:49 +02:00
Ihor Radchenko 6a2c48704b Avoid infinite loop in org-agenda-dim-blocked-tasks
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): When the blocked
task is the last line in agenda buffer and no trailing newline is
present, (move-beginning-of-line 2) would not move the point causing
infinite loop.  Now, such case is handled correctly.
2021-09-25 17:16:38 +02:00
David Lukes b967a05fbc org-indent: Allow indentation per level to be 0
* lisp/org-indent.el (org-indent--compute-prefixes): Prefixes should
only be computed when `org-indent-indentation-per-level' is greater than
0.  For one thing, the current algorithm leads to an error otherwise,
and for another, this makes it possible to use org-indent just to
preserve indentation on continuation lines, without adding any
additional indentation per level (by setting the option to 0).

TINYCHANGE
2021-09-25 16:40:28 +02:00
Utkarsh Singh e626185081 org-table.el: Fix usage of user-error
* lisp/org-table.el (org-table-convert-region): Don't use `if' because
  Elisp has no concept of continuable errors.
2021-09-25 16:23:54 +02:00
Pedro Bruel bf1c4c7575 Include support for evaluating julia code
* lisp/ob-julia.el: included from org-contrib
* testing/lisp/test-ob-julia.el: start adapting from testing/lisp/test-ob-python.el
2021-09-25 16:00:02 +02:00
Bastien 26b0297f65 Merge branch 'bugfix' 2021-09-25 15:53:16 +02:00
Maxim Nikulin 3f5605e66c org-agenda.el: Avoid dependency on subr-x
* lisp/org-agenda.el (org-agenda-highlight-todo): Do not use `string-empty-p'.

Restore compatibility with Emacs-24.3.
2021-09-25 15:53:07 +02:00
Ihor Radchenko c9dc6603a4
Fix org-babel-header-args:haskell not being an alist
* lisp/ob-haskell.el (org-babel-header-args:haskell): The old value of
the variable was not argument alist, as expected by Org babel code.

Fixes https://orgmode.org/list/87fsty7750.fsf@gmail.com
2021-09-21 16:51:54 +08:00
Bastien fb7574178c lisp/ob-gnuplot.el: Add Ihor Radchenko as maintainer 2021-09-20 09:27:50 +02:00
Kyle Meyer f5392c4f2b Merge branch 'km/from-emacs-master' 2021-09-19 22:39:03 -04:00
Marco Wahl d3d2e56bd6 oc: Replace an obsolete alias
* lisp/oc.el (org-cite--allowed-p): The replace removes the respective
  warning at compilation.
2021-09-20 00:38:28 +02:00
Marco Wahl 4063d4c2d7 org: Rename for more consistency
* lisp/org.el (org-get-previous-sibling): Rename from
  org-get-last-sibling to be more consistent with the rest of Emacs.
  org-get-last-sibling stays as obsolete alias.
2021-09-20 00:27:02 +02:00
Morgan Willcock 3a77e59fc9
ox-ascii: Justify correctly with indent-tabs-mode
* lisp/ox-ascii.el (org-ascii--justify-lines): Ensure that
`indent-tabs-mode' is nil when applying indentation to justify lines.
As other parts of ox-ascii use spaces for adjustments, if
`indent-tabs-mode' is respected, ox-ascii will produce an an
inconsistently formatted export.  It's preferable to just force spaces
by binding `indent-tabs-mode' to nil.

TINYCHANGE
2021-09-20 00:57:43 +08:00
Mark Dawson ef31364bc8
ob-tangle: Fix incorrect buff name in org-src edit
* lisp/ob-tangle.el (org-babel-tangle): Fix stringp error which happens
when confirming successful tangle when `org-babel-tangle' is called from
an org-src edit buffer.

TINYCHANGE
2021-09-19 20:58:49 +08:00
Marco Wahl 069bcba529 org: Fix functionality of org-insert-heading
* lisp/org.el (org-insert-heading): Fix insertion of headings when
  point is before any heading in the case of "respect content" insertion.

Kudos to Victor Stoichita. https://orgmode.org/list/87lf4594t3.fsf@svictor.net/
2021-09-18 14:54:09 +02:00
TEC b02f1eae19
oc: Allow citations following an item bullet
* lisp/oc.el (org-cite--allowed-p): Expand the allowed cases to include
"item", which lets one insert a citation following a bullet, e.g. "- ".
We just have to check to make sure the citation actually is at least one
character away from the bullet, or five if a checkbox is present.
2021-09-18 13:41:21 +08:00
Stefan Kangas 7aeadf2504 Backport commit 3f9f3ba43 from Emacs
* lisp/org-timer.el (org-timer-set-timer):
* lisp/ox.el (org-export-dispatch-last-position): Use command
substitution for 'universal-argument' instead of raw "C-u".

Docfix: use command substitution for 'universal-argument'
3f9f3ba4370bd4d0f33392befb35328327d73b1e
Stefan Kangas
Thu Sep 16 20:05:48 2021 +0200
2021-09-18 01:40:56 -04:00
Stefan Kangas b4ce4d6d82 Backport commit 25ebb9374 from Emacs
; More minor docfixes found by checkdoc
25ebb9374bdadf66153727831fc7ff131c8cf299
Stefan Kangas
Tue Sep 14 07:57:14 2021 +0200
2021-09-18 01:39:24 -04:00
Stefan Kangas 215d80d02b
Fix a small number of typos 2021-09-17 17:01:57 +08:00
Stefan Kangas 51cdd6e30f Various minor docfixes found by checkdoc 2021-09-16 21:24:59 +02:00
Marco Wahl a7a69b954c org: Simplify doc
* lisp/org.el (org-end-of-meta-data): Drop unnecessary part around
"regular drawer".

Issue reported by Tom Davey.  https://orgmode.org/list/014801d7aa5c$c9057450$5b105cf0$@tomdavey.com
2021-09-16 10:41:47 +02:00
Kyle Meyer a246a13187 Merge branch 'km/from-emacs-master' 2021-09-12 23:35:16 -04:00
Eli Zaretskii d2deb188a6 Backport commit ff4de1bd8 from Emacs
* lisp/org.el:
* lisp/org-list.el (org-list-to-generic):
* lisp/org-compat.el: In comments, quote 'like this'.

Fix quoting style in Lisp comments
ff4de1bd88b8be4a7071884910ff601eb10fbad5
Eli Zaretskii
Sun Sep 12 19:51:06 2021 +0300
2021-09-12 23:34:08 -04:00
Stefan Kangas 9961abf75a Backport commit fc4b956c7 from Emacs
; Fix symbol quoting typos
fc4b956c7cb2fba8ed2a18865a7686c6cfa5d030
Stefan Kangas
Sun Sep 12 18:36:49 2021 +0200
2021-09-12 23:34:07 -04:00
TEC d70f280678
org-macs: Allow for nil ffap-url-regexp
* lisp/org-macs.el (org-url-p): `ffap-url-regexp' is allowed to be nil,
which is taken to mean urls should not be matched.  When this is set,
`string-match-p' errors.  To consider this case correctly, we check that
`ffap-url-regexp' is non-nil before calling `string-match-p'.

Reported-by: "Peder Stray" <peder.stray@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2021-09/msg00004.html>
2021-09-01 22:43:07 +08:00
Nick Dokos 1690fbd88f
org-colview: Fix dynblock match/maxlevel conflict
* lisp/org-coplview.el (org-columns--capture-view): Combine the match
and maxlevel arguments properly to construct the MATCH argument of
`org-map-entries'.

Specifying both `maxlevel' and `match' in a columnview dynamic block
does not work: the `match' argument is ignored in that case.  See the
link below for a (not so minimal) ECM.

Reported-by: Pablo A Perez-Fernandez
Link: https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags
2021-08-31 22:40:34 +08:00
Yasushi SHOJI 18bc3a65b2
ob-core: Document the option 'none' for :results handling
The commit d4b739fbf2 added the "none" header argument but didn't
add it to the `org-babel-insert-result' documentation string.  Put it
in the doc string so that users can discover it.

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
2021-08-31 21:40:51 +08:00
Marco Wahl b1a74d4c7a agenda: Fix whitespace 2021-08-31 00:07:59 +02:00
TEC a3ba79cd3a
oc-csl: Prevent ' from being a LaTeX active char
* lisp/oc-csl.el (org-cite-csl-finalizer): The hanging LaTeX package
we're using also affects punctuation and makes `,.'"`?!:;' active
characters throughout the entire document.  That means a LaTeX snippet
like \(f'(x)\) will now make the document fail to compile.
See <https://tex.stackexchange.com/questions/61732/hanging-package-chokes-on-apostrophes>
for more information.  Adding the [notquote] option stops \(f'(x)\) from
being an issue.

In time it could be worth looking into replacing the hanging package
with some use of \parshape.
2021-08-23 18:34:30 +08:00
TEC 818bec57eb
oc-csl: Define \citeprocitem for LaTeX export
* lisp/oc-csl.el (org-cite-csl-finalizer): In order for
citeproc-generated references to be treated the same as bib(la)tex
references by hyperref, we need to make use of \hyper@linkstart.
However, this requires \makeatletter and \makeatother, which can only be
used in the preamble.  To allow citeproc-el to use \hyper@linkstart, we
add a command definition in the preamble, \citeprocitem.
2021-08-23 18:34:30 +08:00
Marco Wahl 3664447eb2 org-compat: Silence byte compiler for Emacsversion < 28
Check availablility of function directory-empty-p directly instead of
relying on Emacs version.

Thanks Maxim and Kyle for the help.  See
https://orgmode.org/list/87pmun8t2o.fsf@kyleam.com/ .
2021-08-15 11:01:39 +02:00
DPDmancul f51bf65f0f ox: Italian smart quotes
* ox.el (org-export-smart-quotes-alist): Added support for italian smart quotes.
2021-08-11 22:44:32 +02:00
Nicolas Goaziou e7454ceb79 oc: Call select-style function with a citation argument
* lisp/oc.el (org-cite--keys-to-citation): New function.
(org-cite-make-insert-processor): Use new function.  Change signature
of SELECT-STYLE.

Reported-by: "Bruce D'Arcus" <bdarcus@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00638.html>
2021-08-11 12:11:34 +02:00
Nicolas Goaziou 490eba3a42 Remove spurious `provide'
Provide only features matching file names.
2021-08-11 11:31:54 +02:00
Nicolas Goaziou 733623761d oc-basic: Pacify byte-compilator
* lisp/oc-basic.el (org-cite-basic--parse-bibliography): Use
`org-buffer-hash' instead of `buffer-hash' since Org supports Emacs 25.1.
2021-08-11 11:29:34 +02:00
Nicolas Goaziou 100641bc5a oc-biblatex: Refactor code to simplify byte-compilation
* lisp/oc-biblatex.el (org-cite-biblatex-export-citation): Refactor
code.

Reported-by: Maxim Nikulin <manikulin@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-08/msg00100.html>
2021-08-11 11:27:51 +02:00
Max Nikulin 26d1711167 oc: Add missing `require'
* lisp/oc.el:
* lisp/oc-basic.el: Add some `require' to avoid compile warnings.
2021-08-11 11:15:17 +02:00
Max Nikulin 31c07bd3bd oc: rx compatibility with Emacs < 27.1
* lisp/oc.el (org-cite-adjust-note):
* lisp/oc-basic.el (org-cite-basic-goto):
* lisp/oc-biblatex.el (org-cite-biblatex-prepare-preamble):
* lisp/oc-csl.el (org-cite-csl--label-regexp): Avoid `rx' forms
introduced in Emacs-27.1 to keep compatibility with older versions.

Use `rx-to-string' instead of `rx' due to lack of support of  `regexp'
and `literal' forms with a variable as an argument.
2021-08-11 11:14:22 +02:00
Marco Wahl 01877f4804 org-compat: Fix org-directory-empty-p
* lisp/org-compat.el: Remove COUNT parameter in call of
directory-files.  COUNT not available in Emacs < 28.
2021-08-10 22:38:00 +02:00
Marco Wahl 81eb8c5f9e attach: Fix for Emacs<28
* lisp/org-compat.el: Introduce org-directory-empty-p which is directory-empty-p from Emacs 28.
* lisp/org-attach.el (org-attach-sync): Use org-directory-empty-p instead of directory-empty-p.
* etc/ORG-NEWS: Note about org-directory-empty-p.

Thanks Kyle identifying the issue.  Thanks Arthur for suggesting a
fix.
2021-08-10 22:20:48 +02:00
Kyle Meyer 926dbafe43 Merge branch 'km/from-emacs-master' 2021-08-08 18:07:20 -04:00
Lars Ingebrigtsen 0f7fcc9de0 Backport commit 6a3920c07 from Emacs
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Using `error' here will trigger users with `debug-on-error' so use
`user-error' instead (bug#49920).  It would probably be preferable
to rewrite this to not use the error system to do control flow.

Make `q' in `org-agenda' work even with `debug-on-error' set
6a3920c07eaae58408dd27e7db22bff7ad4d1f80
Lars Ingebrigtsen
Sat Aug 7 12:55:39 2021 +0200
2021-08-08 18:06:30 -04:00
Nicolas Goaziou a6d93cfb62 oc-natbib: Refactor code to ease byte-compilation
* lisp/oc-natbib.el (org-cite-natbib--style-to-command): Refactor code
so byte-compilation is faster, and, in some cases, do not end with
Bytecode overflow error.

Reported-by: Maxim Nikulin <manikulin@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-08/msg00100.html>
2021-08-08 16:10:14 +02:00
Nicolas Goaziou 4198cbd074 Strictly match language when loading Elisp code
* lisp/org.el (org-babel-load-file): Strictly check language before
loading source code.

Reported-by: dmg <dmg@turingmachine.org>
<http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00631.html>
2021-08-07 22:22:05 +02:00
Nicolas Goaziou a43d7a575d ox: Fix docstring
* lisp/ox.el (org-export-define-backend): Fix docstring.

Reported-by: Zachary Kanfer <zkanfer@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-08/msg00009.html>
2021-08-07 22:14:41 +02:00
Juan Manuel Macias 8c78db4910 ox: Fix spanish translation for `footnotes'
* lisp/ox.el (org-export-dictionary): tiny fix in spanish
translation (plural instead of singular).
2021-08-07 22:10:28 +02:00
Nicolas Goaziou 8df3e25db8 Revert "oc: Remove spurious `provide'"
This reverts commit ad006e2930.
2021-08-01 10:29:23 +02:00
Nicolas Goaziou ad006e2930 oc: Remove spurious `provide'
* lisp/oc-basic.el:
* lisp/oc-biblatex.el (biblatex):
* lisp/oc-csl.el:
* lisp/oc-natbib.el:
* lisp/oc.el: Provide only the full library name.
2021-08-01 10:07:39 +02:00
Nicolas Goaziou 3ba46cbe4a Merge branch 'maint' 2021-07-31 10:57:00 +02:00
Nicolas Goaziou dcc3a84a98 keys: Re-instate some RET bindings
* lisp/org-keys.el (org-mode-map): Re-instate S-RET and M-S-RET, which
are not translated from S-<return> and M-S-<return>, unlike
M-<return>/M-RET.

This is a followup to ee652a47df.

Reported-by: Kévin Le Gouguec <kevin.legouguec@gmail.com>
2021-07-31 10:55:01 +02:00
Nicolas Goaziou 18570684ad oc-basic: Improve <mouse-1> handling on citation keys
* lisp/oc-basic.el (org-cite-basic--set-keymap): New function.
(org-cite-basic--make-repair-keymap): Remove function.
(org-cite-basic-activate): Use new function.
2021-07-30 09:47:20 +02:00
Nicolas Goaziou c0dde2c800 oc-basic: Fix `org-cite-basic-goto'
* lisp/oc-basic.el (org-cite-basic-goto): Set BibTeX dialect before
calling `bibtex-search-entry'.
2021-07-30 08:52:34 +02:00
Nicolas Goaziou c839849aba footnote: Allow inserting footnotes at the end of table cells
* lisp/org-footnote.el (org-footnote--allow-reference-p): Allow
inserting footnotes at the end of table cells.
* testing/lisp/test-org-footnote.el (test-org-footnote/new): Add test.
2021-07-29 21:15:11 +02:00
Nicolas Goaziou 7ea9099725 oc: Allow inserting citations in table cells (part 2)
* lisp/oc.el (org-cite--allowed-p): Allow inserting a citation after
two or more spaces at the end of a table cell.
* testing/lisp/test-oc.el (test-org-cite/insert-capability): Add
tests.
2021-07-29 21:13:01 +02:00
Nicolas Goaziou 78c450247b oc: Allow inserting citations in captions
* lisp/oc.el (org-cite--allowed-p): Allow inserting citations in captions.
* testing/lisp/test-oc.el (test-org-cite/insert-capability): Add test.
2021-07-28 11:11:46 +02:00
Nicolas Goaziou af0fcb6833 element: Allow citations in table cells
* lisp/org-element.el (org-element-object-restrictions): Allow
citations in table cells.
* testing/lisp/test-org-element.el (test-org-element/citation-parser):
Add test.  Remove outdated test.
2021-07-28 10:32:29 +02:00
Juan Manuel Macias 40a20136d3 Prevent partial fontification when a link is displayed full
* lisp/org.el (org-activate-links): apply `face-property' variable in
other cases when handle invisible parts in bracket
links: `(add-face-text-property start end face-property)' suggestion
from Ihor Radchenko
2021-07-27 22:01:36 +02:00
Nicolas Goaziou 229b018b60 ox-latex: Do not duplicate \texttt on inline source blocks
* lisp/ox-latex.el (org-latex-inline-src-block): When
`org-latex-listings' is nil, simply translate source block as code,
without adding an additional \texttt command.

Reported-by: Maxim Nikulin <manikulin@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-07/msg00489.html>
2021-07-27 21:59:43 +02:00
Tom Gillespie c9dfed48a6
ob-core: tangle check LOB after current buffer
* lisp/ob-core.el (org-babel-expand-noweb-references): Fix order when
searching for named babel blocks so that blocks in the current buffer
are always found first. This fixes a bug where stale versions of
blocks that have been ingested into the library of babel were being
preferentially tangled instead of newly modified versions from the
current buffer.
2021-07-25 03:42:42 +08:00
TEC 604bfd9d75
oc-csl: be more caution about the csl etc location
* lisp/oc-csl.el (org-cite-ctl--etc-dir): The previous value of
`org-cite-ctl--etc-dir' is incorrect when using either package.el or
straight to manage Org. We can be a bit more considerate by just
checking if the initial location exists, and then trying the expected
location when using package.el/straight if it doesn't exist.
2021-07-15 03:36:24 +08:00
Kyle Meyer fc273bfce1 Merge branch 'maint' 2021-07-11 22:42:38 -04:00
Amin Bandali 1ee52c5eb6 Backport commit 348b2aed0 from Emacs
Update IRC-related references to point to Libera.Chat
348b2aed0c8c3630be4c15c8e70acf7ea9c023af
Amin Bandali
Sat Jul 3 23:39:18 2021 -0400
2021-07-11 22:40:57 -04:00
Marco Wahl 61e0837325 org-attach: Possibly delete empty attach directory
* lisp/org-attach.(org-attach-sync): Enable possible deletion of empty
attachment directories.  `org-attach-sync-delete-empty-dir' controls
the action: Never delete, Always delete or Query the user (default).
2021-07-09 21:03:44 +02:00
TEC 32739e35e3
ox-latex: Change default compiler to latexmk
* lisp/ox-latex.el (org-latex-pdf-process): Check for the presence of
latexmk when setting the default, and use it when available.  Fall back
to the current default.  This is important for the incoming citation
support, as PDF generation will now need to involve bibliography
generation.  By using latexmk this is taken care of for us.  The -%latex
part of the command is slightly hacky, but allows latexmk to behave more
intelligently for non-pdflatex options.  Note that latexmk also seems to
care about the order of the arguments.
2021-07-10 00:31:40 +08:00
Nicolas Goaziou 971c1359a5 oc-csl: Implement `csl' citation processor
* etc/csl/chicago-author-date.csl:
* etc/csl/locales-en-US.xml:
* lisp/oc-csl.el (csl): New files.
* etc/Makefile (ETCDIRS): Register new files.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou ae5f5151fe oc-biblatex: Implement `biblatex' citation processor
* lisp/oc-biblatex.el: New file.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou d6cb37f4be oc-natbib: Implement `natbib' citation processor
* lisp/oc-natbib.el: New file.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou c089c234bb Allow `org-edit-special' to open "bibliography" files
* lisp/org.el (org-edit-special): Also edit "bibliography" keywords.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou ef79a8d8e6 org-keys: Plug citation insertion
* lisp/org-keys.el: Add a key-binding for `org-cite-insert'.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou 524d8fe4c1 Plug citations into fontification process 2021-07-09 08:47:14 +02:00
Nicolas Goaziou a20a3ad5f1 Plug citations into `org-open-at-point'
* lisp/org.el (org-open-at-point): Follow citations and citation
references.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou 2c2b720394 ox: Plug citations into export process
* lisp/ox.el (org-export-as): Add citation pre-processing.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou 44156353c9 oc-basic: Implement `basic' citation processor
* lisp/oc-basic.el: New file.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou e844a6fd41 oc: Add Org Cite library
* lisp/oc.el: New file.
* testing/lisp/test-oc.el: New file.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou a922b1764d faces: Add org-cite' and org-cite-key' faces
* lisp/org-faces.el (org-cite):
(org-cite-key): New faces.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou 4c646a6bde ox: Introduce "raw" pseudo objects
* lisp/ox.el (org-export-raw-string): New function
(org-export-data):
(org-export-with-backend): React to raw objects.
* testing/lisp/test-ox.el (test-org-export/raw-string): New test.

A raw object is a pseudo-object (i.e., special object type that exists
only during export) with the property of being exported as-is, with no
processing from an export back-end.

It is particularly useful to add contents to, or pre-process objects
from, a parse tree.
2021-07-09 08:47:14 +02:00
Nicolas Goaziou fed07be5b8 element: Add citation support
* lisp/org-element.el (org-element-citation-key-re):
(org-element-citation-prefix-re): New variables.
(org-element--set-regexps): Set `org-element--object-regexp' so it
finds citations.
(org-element-all-objects): Add citation and citation-reference
objects.
(org-element-recursive-objects): Add citation object.
(org-element-object-restrictions): Add citation and citation-reference
to restrictions.
(org-element-secondary-value-alist): citation and citation references
can hold secondary strings.
(org-element-citation-parser):
(org-element-citation-interpreter):
(org-element-citation-reference-parser):
(org-element-citation-reference-interpreter): New functions.
(org-element--object-lex): Parse citations and citations references.
* testing/lisp/test-org-element.el (test-org-element/citation-parser):
(test-org-element/citation-reference-parser):
(test-org-element/citation-interpreter): New tests.

This patch adds support for [cite:@key], [cite:pre @key post]
[cite:global prefix; pre @key1 post; pre @key2 post; global suffix]
objects along with their [cite/style: ...] counterparts.
2021-07-09 08:47:14 +02:00
Allen Li 622f9fa76c org: Use crm for completing tags
* lisp/org-capture.el (org-capture-fill-template): Changed to use
completing-read-multiple.
* lisp/org.el (org-set-tags-command): Changed to use
completing-read-multiple.
(org-change-tag-in-region): Changed to use a simple completion table.
* testing/lisp/test-org.el (test-org/set-tags-command): Fixed tests.

Change various places which use `completing-read' to read tags using a
custom completion function to instead use `completing-read-multiple'
with a completion table instead.

This makes tab completion play better with alternative completion
frameworks such as vertico, selectrum, etc.

`org-change-tag-in-region' only reads a single tag, so it is changed
to use a completion table with `completing-read'.  This also makes it
play better with alternative completion frameworks.

Note that there is still one use for `org-tags-completion-function',
which is for completing tag matches.  Completing tag matches is
different from completing lists of tags since the separators (+, -,
etc) have semantic meaning.  This commit does not address that use
case.
2021-07-09 08:44:32 +02:00
Nicolas Goaziou fdb98a436b Merge branch 'maint' 2021-07-02 16:03:19 +02:00
Nicolas Goaziou ee652a47df org-keys: Remove fancy RET keybindings
There is no such binding as "S-RET", and "ESC ..." is translated to
"M-..." in both GUI and TUI. Finally, "M-<return>" is translated to
"M-RET" so we shouldn't use the former.
2021-07-02 16:01:05 +02:00
Nico Sonack f76d4d103f ob-fortran: Use a defcustom for fortran compiler
* lisp/ob-fortran.el (org-babel-fortran-compiler): Change `defvar' to
`defcustom' so that the fortran compiler is customizable like almost
all other org-babel compilers.

TINYCHANGE

Sometimes the compiler isn't `gfortran` (but e.g. `gfortran10`
etc.). Accomodate for that like we do with all other org-babel
language integrations.
2021-07-01 23:21:15 +02:00
Eric S Fraga d1900adfbe ol-bibtex: Added url and doi as optional entries for BiBTeX export
* lisp/ol-bibtex.el: :doi and :url entries added to optional list of
entries to export to BiBTeX when present in the properties.

* etc/ORG-NEWS: added news item noting this change.
2021-07-01 23:15:22 +02:00
Jacopo De Simoi 221c8e298f ob-tangle: Parse correctly tangle options
* lisp/ob-tangle.el (org-babel-effective-tangled-filename): Check for
  the "no" parameter in this function to avoid erroneous tangling of a
  single block (e.g. with C-u C-c C-v t) even with the parameter
  :tangle no

TINYCHANGE
2021-07-01 15:42:29 +02:00
Nicolas Goaziou b913f34ec3 Merge branch 'maint' 2021-07-01 12:13:13 +02:00
Nicolas Goaziou 565361eb69 org-keys: Do not bind <tab>, ever
Fixes: `org-mode-map` binds `<tab>` which is unnecessary and harmful,
since it takes precendence over bindings of TAB even in keymaps with
higher precedence.

Reported-by: Daniel Mendler <mail@daniel-mendler.de>
2021-07-01 12:11:28 +02:00
Nicolas Goaziou c3c89d569a Merge branch 'maint' 2021-06-30 22:03:29 +02:00
Ingo Lohmar 80374642e2 agenda: Fix timestamp agenda setting global agenda name
* lisp/org.el (org-follow-timestamp-link): Do not set global agenda name.

The tmp value for the agenda buffer name is used in `org-agenda-list'
to set `org-agenda-buffer-name'.  Wrap the call in a let-binding for
this symbol (like the agenda dispatcher does), since otherwise it
inadvertently sets the global value.
2021-06-30 22:02:57 +02:00
Marco Wahl 7666d6bb99 org-keys: improve the call for speed key "g"
* lisp/org-keys.el (org-speed-commands): Use the right argument to
  call the "goto variant" of org-refile with non-confusing user promt
  for speed key "g".
2021-06-29 13:38:14 +02:00
TEC 81c4befe62
ox-html: Resolve W3C warning, improve a11y
* lisp/ox-html.el (org-html-style-default, org-html-head): Remove
unwarranted type="text/css" from <style> (W3C warning).
(org-html-html5-fancy): Remove note about IE8- from docstring.
(org-html-footnote-section, org-html-template, org-html-toc,
org-html-footnote-reference): Add some ARIA roles to improve
accessibility.
2021-06-28 17:44:26 +08:00
Kyle Meyer 35183b634b Merge branch 'km/from-emacs-master' 2021-06-27 23:33:00 -04:00
Stephen Berman bb572a3e8c Backport commit 19f2f2699 from Emacs
* lisp/org-compat.el (org--setup-calendar-bindings): Fix logic
in test of 'org-agenda-diary-file' (bug#48199).

Prevent Org mode from mistakenly changing Calendar keymap
19f2f2699499d87186c6f580e4ec79205d59c096
Stephen Berman
Fri Jun 25 11:11:43 2021 +0200
2021-06-27 23:32:23 -04:00
Nicolas Goaziou 8e3e2f667f clock: Prevent "before first headline" error on clock-out note
* lisp/org-clock.el (org-clock-out): Possibly create a note at the
very end of the process, when there's no need for point to be on the
correct headline. Also call `org-clock-remove-empty-clock-drawer'
unconditionally instead of putting it in `org-clock-out-hook'.

Reported-by: Dave Dai <wenlong.dai@gmail.com>
<https://yhetil.org/orgmode/87pmwaang6.fsf@HUE.i-did-not-set--mail-host-address--so-tickle-me/»
2021-06-27 16:21:08 +02:00
Sébastien Miquel e2550506eb src: Use `replace-buffer-contents' only for emacs >= 27
* lisp/org-src.el (org-edit-src-save):
(org-edit-src-exit): Use `replace-buffer-contents' only for emacs >=
27.

It was introduced in emacs 26.1, but earlier versions made no
guarantees of correctness.
2021-06-27 15:53:22 +02:00