Commit Graph

23622 Commits

Author SHA1 Message Date
Bastien Guerry d18071b4ff lisp/org-agenda.el: Make tags filtering case-sensitive
* lisp/org-agenda.el (org-agenda-filter)
(org-agenda-get-represented-tags)
(org-agenda-filter-make-matcher-tag-exp): Make tags filtering
case-sensitive.

This fixes a bug introduced in commit 13a1a4fb9.
2021-05-01 08:33:20 +02:00
Pablo Barraza Cornejo 390063d8df ox-html.el/inline-image export: Fix caption numbering
* lisp/ox-html.el (org-html-standalone-image-p): Remove quote which
causes `org-html-standalone-image-p' to not check if
`org-html-standalone-image-predicate' is fbound and see if it's
initialized.

TINYCHANGE
2021-05-01 00:38:39 -04:00
Kyle Meyer df84100d0c org-display-inline-images: Silence byte-compiler on Emacs <26
* lisp/org.el (org-display-inline-images): Guard image-map use with
boundp check rather than version check.

Guarding with a boundp will pacify the byte-compiler and is a direct
check that the thing we care about is available, so there's no need to
rely on the version check.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
2021-05-01 00:38:39 -04:00
Kyle Meyer 869b7a21b9 org-open-file: Avoid make-process for Emacs 24 compatibility
* lisp/org.el (org-open-file): Select a pipe connection type with
process-connection-type rather than make-process, which isn't
available until Emacs 25.

This uses the alternative approach suggested by Eli Zaretskii in the
thread that led to 5db61eb0f (org.el: Avoid xdg-open silent failure,
2021-03-21): https://orgmode.org/list/83y2g96ta6.fsf@gnu.org

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
2021-05-01 00:38:39 -04:00
Kyle Meyer 45a3d7a900 org-tags-expand: Mark unused argument to silence byte-compiler
* lisp/org.el (org-tags-expand): Mark DOWNCASED as unused.
2021-05-01 00:07:09 -04:00
Nicolas Goaziou e266fac1ed ox-texinfo: Property display images with relative file names
* lisp/ox-texinfo.el (org-texinfo--inline-image): Make sure to remove
leading "./" from file name.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00873.html>
2021-04-30 15:50:25 +02:00
Dr. Arne Babenhauserheide 8ab1e30dbc contrib/lisp/ox-rss.el (org-rss-headline): Handle empty date
* contrib/lisp/ox-rss.el (org-rss-headline): Handle empty date.

TINYCHANGE
Reported-by: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Link: https://orgmode.org/list/875z49echi.fsf@web.de/
2021-04-30 09:03:10 +02:00
Aaron L. Zeng e2ffee96d2 ol.el: Fix confusing variable name
* ol.el (org-link--open-help): Fix a confusing variable name.  No
behavior changes.

TINYCHANGE
2021-04-30 08:51:54 +02:00
tbanel 38f87a26b5 ob-C.el: Fix a number a regressions related to table parameters
* ob-C.el (org-babel-C-expand-C, org-babel-C-header-to-C,
org-babel-C-expand-D): Add a `TYPE' parameter to
`org-babel-C-header-to-C' so that the helper functions return the
correct type.  Previoulsy for tables of non-strings the helper
functions would attempt to return a string, leading to compilation
errors.

* ob-C.el (org-babel-C-header-to-C): Correctly quote header elements.
Before, if the elisp value was not a string, it would not quote it,
leading to a syntax error.

* ob-C.el (org-babel-C-utility-header-to-C): Include `string.h' in
header `get_column_num' requires `strcmp', leading to compilation
errors.

* ob-C.el (org-babel-C-var-to-C): prefered declaration of a table in D
differs from C and C++. Example in C: `int table[2][3] = ...;'. In D:
`int[3][2] table=...;'

This patch is mainly based on Asa Zeren <asaizeren@gmail.com> patch of
Nov 5 2020, which was not commited at that time.
2021-04-29 15:31:51 +02:00
Maxim Nikulin 24a7ed50b3 org-protocol.el: Fix detection of old-style URIs
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Avoid
incorrect regexp in check whether command line argument uses new syntax.
Fix failures of org-protocol tests.

Question mark was not escaped in the previous version 928e67df7e,
so any string was matched by lazy "*".  Match in never used,
thus `string-match-p` would be better, but actually regexp is redundant
here.

It is not documented what browser or desktop environment adds extra
slash before "?".  Accordingly to
mid:A2B0655F-BF28-4943-BC05-99021BFDA1B3@robewald.de, Windows may be
involved.  Likely it happens with double slash after schema as in
org-protocol://capture?url=URL&title=TITLE due to subprotocol is
considered as host name and URI is normalized by adding a slash
as mandatory path part before "?" query.  So just reverting the original
commit will likely cause a regression.  Another guess is that
with single or triple slash (org-protocol:/capture?url=URL)
subprotocol is a part of path thus no "smart" actions are necessary.
2021-04-28 09:23:22 +02:00
Maxim Nikulin 5e8f039aaa test-org-protocol.el: Fix the case for parse parameters with complex argument
* testing/lisp/test-org-protocol.el
(test-org-protocol/org-protocol-parse-parameters): Specify that the case
simulating real life capture uses new style parameters string
to prevent test failure.

It looks like a typo survived since addition of this case in 2216f4d2c7.
2021-04-28 09:11:05 +02:00
Bastien Guerry ebcee052fd Revert "org.el (org-sort-remove-invisible): Remove spurious spaces"
This reverts commit 5be650714d.
2021-04-28 08:48:29 +02:00
Juan Manuel Macias 5be650714d org.el (org-sort-remove-invisible): Remove spurious spaces
* org.el (org-sort-remove-invisible): Remove spurious spaces.

TINYCHANGE
2021-04-28 07:45:05 +02:00
David Asabina 08e62edb3a org-protocol: Fix missing '+' in js snippet
* org-protocol (org-protocol-capture): Add missing plus-sign to
javascript snippet to allow readers of the doc string to use example
snippet with minimal edits.

TINYCHANGE
2021-04-28 07:38:08 +02:00
Nicolas Goaziou e9f03779bc ol-info: Fix description when storing "info" link
* lisp/ol-info.el (org-info-store-link): Fix typo.

Reported-by: Alex <alex.giorev@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00696.html>
2021-04-27 23:26:55 +02:00
Bastien Guerry b1ff9afc3b ox.el: Remove .gpg extension from the exported file-name
* ox.el (org-export-output-file-name): Remove .gpg extension.

Reported-by: Adalricus Ovicula <adalricus@inventati.org>
Link: https://orgmode.org/list/87a74x7g6v.fsf@xenon.ovicula/

This is a rework of the previous reverted commit e8c24b66a.
2021-04-27 10:21:05 +02:00
Bastien Guerry 82707041b0 Revert "ox.el: Remove .gpg extension from the exported file-name"
This reverts commit e8c24b66af.
2021-04-27 10:16:13 +02:00
Bastien Guerry e8c24b66af ox.el: Remove .gpg extension from the exported file-name
* ox.el (org-export-output-file-name): Remove .gpg extension.

Reported-by: Adalricus Ovicula <adalricus@inventati.org>
Link: https://orgmode.org/list/87a74x7g6v.fsf@xenon.ovicula/
2021-04-27 10:04:27 +02:00
Bastien Guerry 13a1a4fb96 Be more consistent about treating tags as case-sensitive
* lisp/org-agenda.el (org-agenda-finalize):
(org-agenda-format-item): Do not downcase tags.
(org-downcase-keep-props): Remove unused function.
(org-agenda-filter-expand-tags): Do not case-fold search.

* lisp/org.el (org-tags-expand): Document `downcased' argument as
obsolete and do not allow to expand downcased tags.

* testing/lisp/test-org.el (test-org/tags-expand): Remove test for
downcased tags expansion.

* doc/org-manual.org (TODO keywords, tags, properties, etc.):
Suggest that user-defined are usually lowercase, but don't make it
a requirement.

Reported-by: David Masterson <dsmasterson92630@outlook.com>
Link: https://orgmode.org/list/SJ0PR03MB5455D8D0C4F71AA495A9ABF79B709@SJ0PR03MB5455.namprd03.prod.outlook.com/
2021-04-27 09:41:26 +02:00
Bastien Guerry 26d1d29cf9 lisp/org.el: Small refactoring
* lisp/org.el (org--get-expected-indentation): Use
`org-element-lineage' to check whether the point is right at the
beginning of a logbook drawer.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87pmygnr7h.fsf@localhost
2021-04-27 09:28:17 +02:00
Bastien Guerry 730a05f787 org.el: Fix indentation of new notes in a logbook drawer
* lisp/org.el (org--get-expected-indentation): Fix indentation of
new notes in a logbook drawer when org-adapt-indentation is set to
'headline-data.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/878s9p4xtt.fsf@gnu.org/
2021-04-27 08:41:04 +02:00
Bastien Guerry 43f6ced0da lisp/org.el: Indent list items in drawers correctly
* lisp/org.el (org-fixup-indentation): Indent list items in drawers
correctly, by respecting existing relative indentation.
2021-04-27 08:37:32 +02:00
Kyle Meyer 37f291ac08 guide: Fix kbd syntax
* doc/org-guide.org (HTML Export): Fix kdb syntax.
2021-04-26 22:52:16 -04:00
Cheong Yiu Fung 58cacdf0e0 org-manual.org: Fix syntax
* doc/org-manual.org (HTML export commands): Fix kbd representation.

TINYCHANGE
2021-04-26 22:52:06 -04:00
Bastien Guerry 058339d6e6 org-table.el: Fix a bug when displaying a table header
* lisp/org-table.el (org-table-row-get-visible-string): Fix wrong
beginning of the header string.
(org-table-header-set-header): Get the real beginning of the line.

Reported-by: "Oorja Sandhu" <oorja.sandhu@inoutbox.com>
Link: https://orgmode.org/list/7beea3b5-6fe5-4ba6-831e-19a88d87de6b@www.fastmail.com/
2021-04-26 21:51:12 +02:00
Bastien Guerry 29d21ea628 Revert "ox-html.el: Use classList and put in the public domain"
This reverts commit 4710541365.
2021-04-26 14:23:43 +02:00
tbanel c43041cf1a ob-C.el: Fix regression which mixes int, double, char* types
* lisp/ob-C.el (org-babel-C-val-to-C-type): Distinguish C, C++, D
  declarations of two-dimensions data.  C and C++ are row major,
  whereas D is column major.

  (org-babel-C-var-to-C): Generate a `typedef' (in C, C++) or an
  `alias' (in D) to carry the type of every two-dimensions matrices.

  (org-babel-C-header-to-C): Move to preferred D declaration,
  `string[n] header;' instead of `string header[n];'.  Use previously
  generated `typedef' or `alias' as the return type of the `data_h()'
  generated access utility functions.

Reported-by: Richard Sent <richard.j.sent@tutamail.com>
2021-04-22 09:51:27 +02:00
Kyle Meyer 9b4dbe5f03 mouse: Honor org-checkbox face
* lisp/org-mouse.el: Use org-checkbox rather than bold for checkbox
face for consistent checkbox appearance.

Reported-by: Yaroslav Rogov <rogovyaroslav@gmail.com>
Link: https://orgmode.org/list/A7D22E5B-B1A3-4ADC-9808-121F0D0ECD60@gmail.com
2021-04-19 22:52:15 -04:00
Nicolas Goaziou bc3ed23d16 element: Interpret :post-blank property in strings
* lisp/org-element.el (org-element-interpret-data):
Interpret :post-blank property in strings.
* testing/lisp/test-org-element.el (test-org-element/interpret-data):
Add test.
2021-04-19 18:17:55 +02:00
Nicolas Goaziou a89d96e6a5 texinfo: Consider any variation on "Top" a reserved node name
* lisp/ox-texinfo.el (org-texinfo--get-node): Change node name if it
conflicts with variations like "top", since they also appear to be
reserved by Texinfo.
2021-04-19 14:32:53 +02:00
Erik Hetzner f6eca6505d manual: Fix publish options
* doc/org-manual.org (Publishing sample configuration):
* doc/org-guide.org (Publishing):
Fix stylesheet setting in publish: :style is not a valid option; use
:html-head instead. :table-of-contents is not a valid option; use
:with-toc instead. :publishing-function is required.
2021-04-19 10:08:37 +02:00
Nicolas Goaziou 140df469ed manual: Remove date keyword
* doc/org-manual.org: Remove date keyword.

It uses an invalid macro call.  Also, Texinfo export does not support
date keyword anyway.
2021-04-19 01:08:59 +02:00
Jorge P. de Morais Neto d317d77d8e manual: Fix typo about org-latex-images-centered
* doc/org-manual.org (Images in LaTeX export): Fix typo about
org-latex-images-centered.
2021-04-18 11:56:20 +02:00
Trevor Murphy 7e2eba8cc5 org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27
* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function): Check
  before invoking elisp eldoc functions from Emacs 28.

The previous check assumed that the presence of eldoc 1.11 bindings
implied elisp-mode bindings that come with Emacs>=28, but eldoc 1.11
is available on GNU Elpa so the assumption doesn't always hold.

TINYCHANGE
2021-04-17 15:14:39 -04:00
Kyle Meyer f12ca1a562 table: Restore temporary-goal-column after displaying header
* lisp/org-table.el (org-table-header-set-header): Restore
temporary-goal-column to prevent disrupting the expected next-line and
previous-line movement.

org-table-header-set-header, which org-table-header-line-mode adds to
post-command-hook, changes the value of temporary-goal-column to zero,
interfering with the logic in line-move-1.

Reported-by: Oorja Sandhu <oorja.sandhu@inoutbox.com>
Ref: https://orgmode.org/list/1b8b1a96-149e-4409-9738-fc45fad3a604@www.fastmail.com
2021-04-17 15:06:11 -04:00
Nicolas Goaziou bcc1b0f1bb ob-exp: Do not comma-escape inline source code
* lisp/ob-exp.el (org-babel-exp-code): Do not comma-escape inline
source code.
* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code): Add test.
2021-04-13 09:55:29 +02:00
Nicolas Goaziou 5d5d102254 Revert "element: Un-escape code in inline source blocks"
This reverts commit 4056e11ddc.

We shouldn't code escape inline source blocks, as escaping can be
inlined any time, at which point escape character is no longer treated
specially. E.g.,

    src_c{a
    ,* 2}

may become

    src_c{a ,* a}

where the comma is no longer an escape character.
2021-04-13 09:47:09 +02:00
Nicolas Goaziou 6dbd132e62 ox-texinfo: Fix footnotes ending on a special environment
* lisp/ox-texinfo.el (org-texinfo-footnote-reference): Prevent
a footnote from ending on an "@end" line.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00228.html>
2021-04-13 00:36:31 +02:00
Nicolas Goaziou 4056e11ddc element: Un-escape code in inline source blocks
* lisp/org-element.el (org-element-inline-src-block-parser): Un-escape
code in inline source blocks.
(org-element-inline-src-block-interpreter): Escape it again if
necessary.
* testing/lisp/test-org-element.el (test-org-element/inline-src-block-parser):
Add test.
2021-04-12 23:29:38 +02:00
Nicolas Goaziou 94be20a334 ox-texinfo: Fix references to low-level headlines
* lisp/ox-texinfo.el (org-texinfo-headline): Provide an anchor for
low-level headlines.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00206.html>
2021-04-10 12:28:08 +02:00
Nicolas Goaziou 19947a6e41 ox: Handle missing option value better
* lisp/ox.el (org-export--parse-option-keyword): Do not stop parsing
OPTIONS keyword when an option without a value is encountered.
* testing/lisp/test-ox.el (test-org-export/parse-option-keyword): Add
tset.

This is a followup to 7116914427.
2021-04-10 12:06:47 +02:00
Tom Gillespie b523ad491d ob-tangle.el: Fix coderef removal during tangling
* lisp/ob-tangle.el (orb-babel-tangle-single-block): Regularize
behavior when removing coderefs during tangling. This fixes an issue
where trailing whitespace would be retained when coderefs were removed
for tangling.
2021-04-10 00:01:49 +02:00
Nicolas Goaziou 5469bc4e55 colview: Ignore operators associated to special properties
* lisp/org-colview.el (org-columns--compute-spec): Ignore operator
associated to a special properties.

This is a followup to e1b8d1d2b4.
2021-04-09 23:41:32 +02:00
Nicolas Goaziou 7116914427 ox: Do not choke on incomplete OPTIONS items
* lisp/ox.el (org-export--parse-option-keyword): Prevent "End of
file during parsing" error when an OPTIONS item is incomplete.
* lisp/org-lint.el (org-lint-unknown-options-item): Check for
incomplete options items.
* testing/lisp/test-org-lint.el (test-org-lint/unknown-options-item):
Add test.
2021-04-09 22:47:57 +02:00
Nicolas Goaziou f99f26306c ox-texinfo: Do not create menu for headlines without sectioning command
* lisp/ox-texinfo.el (org-texinfo--sectioning-structure): New function.
(org-texinfo-headline): Use new function.
(org-texinfo--menu-entries): Filter out headlines with no sectioning
command defined.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00196.html>
2021-04-09 22:29:50 +02:00
Nicolas Goaziou e1b8d1d2b4 org-colview: Do not choke when updating a special property
* lisp/org-colview.el (org-columns--compute-spec): Do not update
special properties, which are not set through property drawers.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00135.html>
2021-04-07 19:48:37 +02:00
Nicolas Goaziou 7575678959 ox-latex: Fix texttt usage in headlines
* lisp/ox-latex.el (org-latex-headline): Properly call
`org-latex--protect-texttt' on verbatim objects.

Reported-by: Greg Minshall <minshall@umich.edu>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00134.html>
2021-04-06 13:47:04 +02:00
Kyle Meyer 702e782cb6 org.el: Mark org-link-descriptive as buffer-local
* lisp/org.el (org-mode): Mark org-link-descriptive as buffer-local.

Calling org-toggle-link-display is an inherently buffer-local
operation because it works via the buffer-local
buffer-invisibility-spec, so toggling the global value leads to a
mismatched, invalid state in all other buffers.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Ref: https://orgmode.org/list/87lfeqzm3a.fsf@gmail.com
Reported-by: Ingo Lohmar <ingo.lohmar@posteo.net>
Ref: https://orgmode.org/list/87pmzdhl4b.fsf@kenko.localhost.com
2021-04-05 22:15:10 -04:00
TEC bcfe6f985c ox-latex: convert verbatim text in headings to texttt
* lisp/ox-latex.el (org-latex--protect-texttt): New function.
(org-latex--text-markup): Use new function.
(org-latex-headline): Convert any instances of \verb text with
\texttt.  This is required to work around LaTeX peculiarities that
would otherwise cause compilation to fail (see the code comment for
more information).
2021-04-04 00:16:42 +02:00
Nicolas Goaziou f7e0e17e82 ox-texinfo: Fix colons removal in menu entries
* lisp/ox-texinfo.el (org-texinfo--format-entries): Fix regexp
matching unwanted colons.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00008.html>
2021-04-01 17:10:52 +02:00