Commit Graph

22584 Commits

Author SHA1 Message Date
Nicolas Goaziou 3fcea865b4 news: rename and old entry
* etc/ORG-NEWS (Footnotes changes): Rename from "Footnotes". Since
this is a reserved name, the whole section disappear from export.
2020-04-19 01:44:50 +02:00
Nicolas Goaziou eb2d6a8cd4 Fix some fontification issues
* lisp/org.el (org-inside-LaTeX-fragment-p): properly find limit.

This commit partly reverts ad8e508e93.
2020-04-19 00:02:53 +02:00
Nicolas Goaziou 756ddff9e3 table: Small fix to column deletion
* lisp/org-table.el (org-table-delete-column): Do not assume row ends
right after the last vertical line.  Do not use `looking-back'.
* testing/lisp/test-org-table.el (test-org-table/delete-column): Add
test.
2020-04-18 18:33:07 +02:00
Nicolas Goaziou c7063b05f7 publish: Fix site-map file name
* lisp/ox-publish.el (org-publish-sitemap): Use `expand-file-name' to
build site-map file name.

Reported-by: juanjose.garcia.ripoll@csic.es (Juan José García Ripoll)
<http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00280.html>
2020-04-18 18:22:28 +02:00
Marco Wahl bb9dfdafeb org-table: Make column delete consistent with row delete
* lisp/org-table.el (org-table-delete-column): Stay in the column at
delete.  Exceptionally allow column delete when point is at eol
immediately to the right of a cell seperator.

A hint by Eric S Fraga led to this commit.
https://lists.gnu.org/archive/html/emacs-orgmode/2020-04/msg00283.html
2020-04-18 16:16:02 +02:00
Marco Wahl 22d2b0ac84 org-table: Insert column at point
* lisp/org-table.el (org-table-insert-column): Adjust the function to
insert the column at point (and not to the right.)

Org-manual, ORG-NEWS and testing are changed accordingly.
2020-04-18 00:13:24 +02:00
Kyle Meyer 4f9e07cbb4 manual: Correctly describe 'C-c -'s region behavior
* doc/org-manual.org (Plain Lists): Fix mismatch between the
documented and actual behavior by inverting the description of what
'C-c -' does, with and without a prefix argument, when the region is
active.

Reported-by: Jorge P. de Morais Neto <jorge+list@disroot.org>
  <87sgh7r3yl.fsf@disroot.org>
2020-04-13 23:56:36 -04:00
Kyle Meyer c77edde765 org-time-stamp-inactive: Remove inaccurate statements
* lisp/org.el (org-time-stamp-inactive): Drop incorrect statements in
docstring about differences between inactive and active timestamps.

S-cursor commands work on inactive time stamp, and clicking on an
inactive time stamp visits the day in the agenda, just as it does for
an active time stamp.

Reported-by: Jorge P. de Morais Neto <jorge@disroot.org>
  <87a73gstpz.fsf@disroot.org>
2020-04-12 18:26:31 -04:00
Kyle Meyer 5b1c5bd51d manual: Fix an incorrect key binding
* doc/org-manual.org (Sparse Trees): Fix binding for visible-only
export toggle.

Reported-by: Jorge P. de Morais Neto <jorge@disroot.org>
  <87a73gstpz.fsf@disroot.org>
2020-04-12 18:26:31 -04:00
Kyle Meyer 1de7eabf25 Revert "org-agenda.el: Fix handling of one-time delays"
* lisp/org-agenda.el (org-agenda-get-scheduled): Revert changes from
39c656870, which introduced a regression that prevents repeating tasks
from appearing for future dates.

The regression, reported in late February, seems likely to affect more
users than the one-time delay handling fixed by 39c656870
(org-agenda.el: Fix handling of one-time delays, 2020-02-01).  As we
don't have a proposed fix at the moment, let's revert 39c656870.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
  <87imjqdtpo.fsf@gmail.com>
2020-04-12 01:43:26 -04:00
Kyle Meyer a5cb52b4f8 org-archive: Correct commentary in file header 2020-04-12 01:43:05 -04:00
Nicolas Goaziou 8b988ee3a5 org-list: Another fix to item insertion
* lisp/org-list.el (org-list-insert-item): Fix typos. Add a check to
determine if an item really belongs to the part being split.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.
2020-04-10 16:06:05 +02:00
Nicolas Goaziou 8eef99306a org-list: Fix last commit
* lisp/org-list.el (org-list-insert-item): This is a followup to
1ae1f8f2df.  It fixes an error when
insertion happens after the last item in the list.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.
2020-04-10 15:09:49 +02:00
Kyle Meyer 6f1b837492 Silence byte-compiler
These both show up when compiling files separately (e.g., 'make
single').

ob-core already assumes ob-tangle is loaded based on declared
functions, presumably because ob.el is given responsibility for
collectively loading these pieces.  org.el loads org-attach within the
body of a function before calling org-attach-dir.
2020-04-09 22:27:06 -04:00
Nicolas Goaziou 44ec473c19 Small fix
* lisp/org.el (org-set-tags-command): Also avoid using `looking-back',
in particular without a LIMIT argument.  This silences the
byte-compiler.

(cherry picked from commit 83518daf11)
2020-04-09 22:25:30 -04:00
Kyle Meyer 06c7a54f0b org-shift*: Honor org-support-shift-select for table cell movement
* lisp/org.el (org-support-shift-select): Mention table context.
(org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft): Don't move table cells when org-support-shift-select
is `always'.

Reported-by: Vladimir Panteleev <thecybershadow@gmail.com>
<CAHhfkvw8O4cSxe5CJXQ8L+ce+9wOhuM==Xv9rB2NVhsCgYANdA@mail.gmail.com>
2020-04-09 22:24:55 -04:00
Nicolas Goaziou 1ae1f8f2df org-list: Fix infloop when inserting item in post sub-list area
* lisp/org-list.el (org-list-insert-item): Do not infloop when
insertion happens in an item, after a sub-list.  Small refactoring.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add
tests.
2020-04-09 15:42:36 +02:00
Leo Vivier acd1635966 org: Fix docstring typo
* lisp/org.el (org-time-stamp-inactive): Change ‘active’ to ‘inactive’
in the docstring.

TINYCHANGE
2020-04-08 22:55:00 -04:00
Kyle Meyer 561e9efd06 agenda: Fix regression in handling of non-caterory filters
* lisp/org-agenda.el (org-agenda-filter-make-matcher): Combine filter
forms with `and' unless multiple positive categories are given.

06cf532f4 (org-agenda.el: Fix bug when using category filters,
2020-01-20) modified org-agenda-filter-make-matcher to group the form
with `or' rather than `and' for category filters.  This logic was
tweaked again in a follow-up commit, 7e52b7661 (org-agenda: Fix logic
of `org-agenda-filter-make-matcher', 2020-02-19), which was supposed
to restrict the use of `or' to _multiple_ positive categories.
However, the follow-up commit incorrectly affected all filter types.
Avoid the check for non-category types.

Also, fix the regexp so that it matches whenever there are multiple
positive categories, not just a single one.

Reported-by: Jorge P. de Morais Neto <jorge+list@disroot.org>
<87v9nhit6c.fsf@disroot.org>
2020-04-07 22:47:37 -04:00
Nicolas Goaziou e3373f4beb ob-core: Properly replace results in special blocks
* lisp/ob-core.el (org-babel-result-end): Handle results in special
blocks.
* testing/lisp/test-ob.el (test-ob/replace-special-block-result): New
test.
2020-04-07 01:21:33 +02:00
Nicolas Goaziou e1961c543a ox-koma-letter: Handle empty hyperref LaTeX template
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Value
for :latex-hyperref-template can be nil.  Handle this case.

Reported-by: Charles Millar <millarc@verizon.net>
<http://lists.gnu.org/r/emacs-orgmode/2020-04/msg00025.html>
2020-04-06 14:30:35 +02:00
Marco Wahl 6a3dffdf24 org-manual: Make doc consistent with code about column insert 2020-03-31 00:09:10 +02:00
Marco Wahl dc53b59a25 test-org-table: Test insert column with formula in place
*
testing/lisp/test-org-table.el (test-org-table/insert-column-with-formula):
New test.
2020-03-30 23:21:45 +02:00
Marco Wahl fe34a408f2 org-table: Fix formula at column insert
* lisp/org-table.el (org-table-insert-column): Fix the index.

Report and fix by Yu Han Quek.  https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00290.html

TINYCHANGE
2020-03-30 23:21:22 +02:00
Marco Wahl 50ae73854b ox-publish: Allow plain as lambda preparation/completion-function
* lisp/ox-publish.el (org-publish-projects): Check for function before
  check for cons to capture lambda's as such.

Reported by Arne Babenhauserheide
https://lists.gnu.org/archive/html/emacs-orgmode/2020-03/msg00284.html

(cherry picked from commit fffba5b7fd)
2020-03-30 12:21:39 +02:00
Nicolas Goaziou 685b2c4410 org-macro: Fix last commit
* lisp/org-macro.el (org-macro--set-template): Do not override value
with an empty one.

This is a followup to 965cdbfd4b.
2020-03-11 21:52:19 +01:00
Nicolas Goaziou 965cdbfd4b org-macro: Fix {{{author}}} expansion without AUTHOR keyword
* lisp/org-macro.el (org-macro--set-template): Allow setting a nil
value, which becomes an empty template.
* testing/lisp/test-org-macro.el (test-org-macro/author):
(test-org-macro/email):
(test-org-macro/title): New tests.

Reported-by: "Dauer, Michael" <michael.dauer@smartpm.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-03/msg00094.html>
2020-03-11 16:24:26 +01:00
Kyle Meyer 01ee25c605 manual: Fix description of a table range example
* doc/org-manual.org (Range references): Correct statement about the
number of fields that an example range includes.

Reported-by: Sebastian Miele <sebastian.miele@gmail.com>
<87eeu8kzyj.fsf@gmail.com>
2020-03-06 23:09:04 -05:00
Kyle Meyer d92d7ff697 manual: Clarify that table ranges are inclusive
* doc/org-manual.org (Range references): Note that field ranges
include the ends.

Suggested-by: Sebastian Miele <sebastian.miele@gmail.com>
<878skdrepp.fsf@gmail.com>
2020-03-06 23:08:24 -05:00
Tim Visher 70c1eec559 org-attach.el: Use `force' arg everywhere in `org-attach-delete-all'
* lisp/org-attach.el (org-attach-delete-all): Use `force' arg
throughout function.

`org-attach-delete-all` advertised a `force` option but passing it
only forced its way past the initial "Really remove all…" query.  This
was unexpected and not properly documented.

This extends the use of the `force` argument to the `delete-directory`
call and documents its meaning in the docstring.

TINYCHANGE
2020-03-05 23:24:14 -05:00
Štěpán Němec 7454d20189 org-eldoc: Use eldoc-documentation-functions when available
This reflects recent changes in GNU Emacs master branch:

2020-02-25T17:53:04-05:00!mvoteiza@udel.edu
c0fcbd2c11 (Expose ElDoc functions in a hook (Bug#28257))

* lisp/org-eldoc.el (org-eldoc-load):
Use 'eldoc-documentation-functions' when available.
2020-03-04 22:43:39 -05:00
Bastien f360f9ec58 doc/org-manual.org (How to create a useful backtrace): Fix typo
* doc/org-manual.org (How to create a useful backtrace): Fix typo.
2020-02-29 12:55:56 +01:00
Bastien 46886f22d9 doc/org-manual.org (Completion): Fix documentation
* doc/org-manual.org (Completion): Fix documentation.
2020-02-24 10:34:46 +01:00
Bastien 38928848c7 org-id.el: Fix typo in comment
* lisp/org-id.el (org-id-find-id-file): Fix typo in comment.
2020-02-23 14:29:38 +01:00
Bastien 05f294ec5b org.el: Two minor fixes
* lisp/org.el (org-set-tags-command): Fix point position after
setting tag at the beginning of a blank heading.
(org-kill-line): Prevent from throwing an error when killing
the headline while point is right after the * chars.
2020-02-21 16:12:11 +01:00
Bastien 88d218a5a0 Fix 5acf4d4692 2020-02-19 18:10:26 +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 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 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 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
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 6accd0ef62 Fix fb188adda 2020-02-17 16:36:01 +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 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 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 dfa7a3397b org-agenda.el: Fix call to `org-agenda-finalize-hook'
* lisp/org-agenda.el (org-agenda-finalize): Run functions in
`org-agenda-finalize-hook' at the very end.
2020-02-17 00:45:13 +01:00
Nicolas Goaziou 8f6ce817d8 ox-html: Fix author meta-data
* lisp/ox-html.el (org-html--build-meta-info): Prevent duplicates in
author meta-data.
2020-02-16 23:33:13 +01:00
Bastien 27e4d7ce48 Prevent infinite loop when showing new time in agenda
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Don't use
an overlay to make the task invisible, use text properties.
(org-agenda--mark-blocked-entry): Add text property
'org-filter-type to later use `org-agenda-filter-hide-line' if
necessary.
(org-agenda-filter-hide-line): Fix docstring.

The related bug was first reported in 2013 by Matt Lundin here:
https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00072.html

Then Andrew Hyatt reported it again, and provided a minimal recipe on
how to reproduce it consistently.

Thanks a lot to both of them.
2020-02-14 10:32:35 +01:00
Bastien 29f44df758 Fix fa24cd541 again 2020-02-14 08:36:54 +01:00