Commit graph

23696 commits

Author SHA1 Message Date
Stefan Kangas 00bc3097cd Backport commit affe9b225 from Emacs
* lisp/org-agenda.el (org-agenda-mode):
* lisp/org-table.el (org-table-edit-formulas, orgtbl-mode):
* lisp/org.el: Don't call easy-menu-add, an obsolete XEmacs compat
alias.

Make XEmacs compat aliases easy-menu-{add,remove} obsolete
affe9b225de711429248a73f920dc9f38b15c932
Stefan Kangas
Tue Nov 24 18:06:05 2020 +0100
2020-11-26 19:31:48 -05:00
Gustav Wikström 9a154910ed fix cycling when providing numeric argument to org-shifttab
* lisp/org.el (org-shifttab): Make sure to run the org-cycle-hook
also when providing numeric arguments.
2020-11-25 10:13:56 +01:00
Daniele Nicolodi 15469774dd org-table: Add mode flag to enable Calc units simplification mode
* org-table.el (org-table-eval-formula): Add the `u` mode flag to
enable Calc's units simplification mode.

* test-org-table.el (test-org-table/mode-string-u): Add Unit test for
the new mode flag.

* org-manual.org: Document new mode flag.
2020-11-24 20:59:39 -05:00
Daniele Nicolodi abd9949431 org-table: Simplify mode string parsing
* org-table.el (org-table-eval-formula): Simplify mode string parsing
and reduce scope of local variables.
2020-11-24 20:58:27 -05:00
Daniele Nicolodi bd7e16ca21 org-table: Remove unused org-tbl-calc-modes variable declaration
* org-table.el (org-tbl-calc-modes): Remove variable declaration as
the varialble is used only within `org-table-eval-formula'.

* org-table.el (org-table-eval-formula): Rename `org-tbl-calc-modes`
local variable without the `org-tbl-` prefix and use the gained screen
real estate to avoid indirection through covenience macro. This
requires moving the mode lookup table from `org-table--set-calc-mode`
to here.

* org-table.el (org-table--set-calc-mode): Drop convenience macro.
Note that the macro was not working as intended when the caller tried
to add a new entry in the plist as in this case the macro would create
a new plist with the added entry but return the old one.
2020-11-24 20:58:27 -05:00
Ian Martins 3a2db67597 Merge branch 'ian' 2020-11-23 15:47:55 -05:00
Ian Martins 96d2e01e7d lisp/ob-java.el: Fix java over tramp
* lisp/ob-java.el(org-babel-execute:java): Previously the source file
was always written to the local machine so execution on the remote
machine was not possible.  Now we write the source file to the remote
temp directory when the current directory is remote.
2020-11-23 15:12:24 -05:00
Kyle Meyer 6e5399d54f Merge branch 'maint' 2020-11-22 22:25:11 -05:00
Cheong Yiu Fung 2d23d55ac5 ox-odt.el: quote output file name
* lisp/ox-odt.el (org-odt-do-convert): Add `shell-quote-argument'
around output file name.

TINYCHANGE
2020-11-22 22:24:51 -05:00
Stefan Kangas 0abb6de0cf Backport commit 430eb2f85 from Emacs
* lisp/org.el (org-org-menu, org-create-customize-menu):
Remove Emacs 20 compat code.

Remove Emacs 20 compat code from org.el
430eb2f850b26f7df8473de4d929b5665673a0a2
Stefan Kangas
Fri Nov 20 16:11:33 2020 +0100
2020-11-22 21:17:28 -05:00
Kyle Meyer 0d525cbc7c Merge branch 'maint' 2020-11-19 23:04:32 -05:00
Dieter Faulbaum 5272d97e5c manual: Repeat cookies should be in the same order as the repeats
* doc/org-manual.org (Repeated tasks): Reorder repeat cookies so that
their order matches the order of the labels at the beginning of the
sentence.

TINYCHANGE
2020-11-19 23:03:49 -05:00
Greg Minshall a5d765481d doc/org-manual.org: add reference to org-table-transpose-table-at-point
* doc/org-manual.org (Built-in Table Editor): Add
org-table-transpose-table-at-point to list of miscellaneous commands.
2020-11-19 22:54:21 -05:00
Stefan Kangas 1a480e01a4 Remove redundant 'function's around lambda
* contrib/lisp/org-secretary.el (join):
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-project-plan):
* lisp/org-clock.el (org-resolve-clocks):
* lisp/org-element.el (org-element--interpret-affiliated-keywords):
* lisp/org-list.el (org-list-struct, org-list-get-item-number)
(org-list-separating-blank-lines-number)
(org-list-struct-fix-bul, org-list-struct-apply-struct):
* lisp/org.el (org-agenda-files, org-toggle-heading):
* lisp/ox-ascii.el (org-ascii-table-row):
* lisp/ox-beamer.el (org-beamer--format-section)
(org-beamer-template):
* lisp/ox-odt.el (org-odt--render-image/formula):
* testing/org-batch-test-init.el (load-path): Remove redundant
'function's around lambda.
2020-11-18 22:02:19 -05:00
Ian Martins 93087e0b3a lisp/ob-java.el: Make the default to write to the current directory
* lisp/ob-java.el(org-babel-default-header-args:java): Add :dir
default.
(org-babel-execute:java): Check for existence of :dir in params using
alist-get instead of assq because we want a nil cdr to be false.
* testing/lisp/test-ob-java.el
(ob-java/simple, ob-java/simple-with-bracket)
(ob-java/simple-with-quote, ob-java/simple-return-int)
(ob-java/simple-return-float, ob-java/simple-return-string)
(ob-java/simple-with-main, ob-java/simple-with-two-methods)
(ob-java/simple-with-no-main, ob-java/simple-with-main-args-array)
(ob-java/simple-with-main-whitespace, ob-java/simple-with-class)
(ob-java/simple-with-non-public-class)
(ob-java/simple-with-class-and-package)
(ob-java/simple-with-class-attr)
(ob-java/simple-with-class-attr-with-package, ob-java/one-arg)
(ob-java/args-quoted-string, ob-java/integer-var)
(ob-java/var-with-main, ob-java/var-with-class)
(ob-java/var-with-class-and-package)
(ob-java/var-with-class-and-hanging-curlies, ob-java/two-vars)
(ob-java/string-var, ob-java/multiline-string-var)
(ob-java/return-vector-using-list, ob-java/return-vector-using-array)
(ob-java/read-return-list, ob-java/read-list-return-array)
(ob-java/read-return-list-with-package)
(ob-java/output-list-with-spaces, ob-java/list-var, ob-java/vector-var)
(ob-java/matrix-var, ob-java/matrix-var-with-header)
(ob-java/output-table-with-header, ob-java/inhomogeneous_table)
(ob-java/import_library, ob-java/import_library_inline)
(ob-java/tangle): Set :dir to nil to prevent tests from writing files
outside of temporary directory.
(ob-java/tangle-with-package, ob-java/simple-dir):
(ob-java/simple-dir-with-package): Move :dir param to be consistent
with other tests.

Most languages write tempfiles to babel's temporary directory, but
ob-java originally had to write them to the current directory instead.
I suspect this is because java puts the source file in package
directories, and babel doesn't expect subdirectories in the babel
temporary directory.  This change brings back the original behavior.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
Ref: https://orgmode.org/list/87mtzk9n30.fsf@iki.fi
2020-11-17 06:38:56 -05:00
Kyle Meyer c0588fc42d Merge branch 'maint' 2020-11-17 00:52:52 -05:00
Kyle Meyer 104d92199e agenda: Fix toggling of archive files
* lisp/org-agenda.el (org-agenda-archives-mode): Turn archive mode off
if with-files in non-nil but files are already included so that a
repeated `vA` can toggle in the same manner as a repeated `va`.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Ref: https://orgmode.org/list/87o8jxz5hu.fsf@gmail.com
2020-11-17 00:49:22 -05:00
Titus von der Malsburg 8bade78ce6 lisp/org.el: Allow hiding #+SUBTITLE: keyword via `org-hidden-keywords'
* lisp/org.el: Allow users to include 'subtitle in
`org-hidden-keywords' to hide #+SUBTITLE: keyword.

This way #+SUBTITLE is treated like similar keywords for title, date,
e-mail, and author.
2020-11-16 23:31:06 -05:00
Bastien b04667a370 contrib/lisp/: Fix some headers
* contrib/lisp/ox-rss.el:
* contrib/lisp/org-registry.el:
* contrib/lisp/org-expiry.el:
* contrib/lisp/ol-elisp-symbol.el: Fix header.
2020-11-16 09:28:15 +01:00
Ian Martins dc2238144f ob-java.el: Allow for more whitespace in java code
* lisp/ob-java.el (org-babel-java--package-re)
(org-babel-java--imports-re, org-babel-java--class-re)
(org-babel-java--main-re, org-babel-java--any-method-re):
Updated regexps to allow for more whitespace in the content of java
code blocks.  Convert regexps to `rx' to improve clarity.
* testing/lisp/test-ob-java.el (ob-java/simple-with-main-whitespace):
Added test case with excessive whitespace.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>
Ref: https://orgmode.org/list/87o8k68w05.fsf@iki.fi
2020-11-15 06:22:18 -05:00
Ian Martins c38fda993d ob-java.el: Do not wrap a main method in a main method
* lisp/ob-java.el (org-babel-expand-body:java): The code was checking
for existence of a class declaration before wrapping the content of
the code block in a main method, but it should be checking for
existence of a main method.
2020-11-15 06:22:18 -05:00
Kyle Meyer ff8683aa35 Merge branch 'maint' 2020-11-14 15:56:08 -05:00
Juri Linkov 9bb93006ea Backport commit 844e82f5a from Emacs
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): Use :ruby header arg.
(org-babel-execute:ruby): Call org-babel-ruby-initiate-session with
`params'.
(org-babel-ruby-command): Mention :ruby header argument.

* lisp/org/ob-ruby.el (org-babel-ruby-initiate-session): Use :ruby header arg.
844e82f5a837a16c64e32ff9dd41a9e9b3ad3432
Juri Linkov
Sat Nov 14 22:18:38 2020 +0200
2020-11-14 15:50:30 -05:00
Kyle Meyer 23896ba683 ox-odt: Drop another (function (lambda ...))
* lisp/ox-odt.el (org-odt--image-size): Drop unnecessary `function'
call around `lambda'.

The previous commit from Emacs removed a (function (lambda ...))
instance immediately above.  Do the same here.
2020-11-14 15:44:26 -05:00
Stefan Kangas a97bb27f32 Backport commit 61dca6e92 from Emacs
* lisp/org/ox-odt.el (org-odt--image-size): Don't quote lambdas.

Don't quote lambdas in several places
61dca6e92ac972b832e889fbeab9b6131fc896fa
Stefan Kangas
Sat Nov 14 17:04:23 2020 +0100
2020-11-14 15:44:24 -05:00
Juri Linkov fd4eec036d Backport commit 79d04ae13 from Emacs
* lisp/org-element.el (org-element-parse-secondary-string):
Don't set buffer-local variables buffer-file-name and buffer-file-truename
in temporary buffer.

Don't set file name variable in org-element-parse-secondary-string (bug#44524)
79d04ae13ff33a93f631061d912168e9703251dd
Juri Linkov
Tue Nov 10 21:27:37 2020 +0200
2020-11-14 15:44:23 -05:00
Kyle Meyer 2a4578b103 Merge branch 'maint' 2020-11-12 23:28:02 -05:00
Chen Li 1cc2222045 ol-wl: add maildir and rss to folder types
* contrib/lisp/ol-wl.el (org-wl-folder-types): Add maildir and rss.

with this commit, org-link can open maildir and rss folder.

more to read: http://wanderlust.github.io/wl-docs/wl.html#Folders~
2020-11-12 23:19:59 -05:00
Kyle Meyer b1883de538 Merge branch 'maint' 2020-11-12 01:01:21 -05:00
Kyle Meyer 262777294f archive: Account for org-odd-levels-only in datetree calculations
* lisp/org-archive.el (org-archive-subtree): Honor org-odd-levels-only
when filling in org-archive-location placeholders with stars.
* testing/lisp/test-org-archive.el (test-org-archive/datetree): Add test.

Reported-by: Charles Tam <me@charlest.net>
Ref: https://orgmode.org/list/CAKu+9YVus=wPKGMY_vWp_7ND+oK7ZrRhN=1TXa2Cok3=8se1gg@mail.gmail.com
2020-11-12 00:59:53 -05:00
Kyle Meyer f6cf6bb6e2 manual: Mention org-agenda-set-effort
* doc/org-manual.org (Remote editing): Add entry for
org-agenda-set-effort.

Reported-by: Ian Garmaise <ian.g@phorixsol.com>
Ref: https://orgmode.org/list/CALWEx6WuTe_b2c-em8jTzx5k=XHGy1L=87tn5Ge9g3oHPp1fVA@mail.gmail.com
2020-11-12 00:45:57 -05:00
Jack Kamm 5371b30fe5 ol.el: New option to set org-link-file-path-type to a function
* lisp/ol.el (org-link-file-path-type): Add new option.
(org-insert-link): Handle function option for org-link-file-path-type.
2020-11-11 17:00:25 -08:00
stardiviner e9c3993ee5 org-contacts.el: Add new link type "contact:"
* contrib/lisp/org-contacts.el (org-contacts-link-store): Store a link
of org-contacts in Org file.

* contrib/lisp/org-contacts.el (org-contacts-link-open): Open contact:
link in Org file.

* contrib/lisp/org-contacts.el (org-contacts-link-complete): Insert a
contact: link with completion of contacts.

* contrib/lisp/org-contacts.el (org-contacts-link-face): Set different
face for contact: link.
2020-11-11 09:35:01 +01:00
Bastien d3710f73f1 Merge branch 'maint' 2020-11-11 09:14:07 +01:00
Bastien ff5fd323b1 contrib/lisp/ox-taskjuggler.el: Use non-obsolete variable names
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task):
Use non-obsolete variable names.
2020-11-11 09:13:42 +01:00
Bastien 56ce1fc99b Merge branch 'maint' 2020-11-11 09:12:21 +01:00
Bastien 370cf49cd2 lisp/org.el: Use non-obsolete variable names
* lisp/org.el (org-set-regexps-and-options): Use non-obsolete
variable names.
2020-11-11 09:11:52 +01:00
Kyle Meyer a0aacaac2e Merge branch 'maint' into master 2020-11-09 01:08:02 -05:00
Kyle Meyer 95af0a244f agenda: Consistently clear temporary agenda name
* lisp/org-agenda.el (org-agenda--get-buffer-name): New function.
(org-agenda-list): Move buffer name logic to shared function.
(org-search-view):
(org-todo-list):
(org-tags-view): Use org-agenda--get-buffer-name.
* testing/lisp/test-org-agenda.el
(test-org-agenda/sticky-agenda-name): Add test.

The different agenda commands repeat similar logic for determining the
buffer name, mixing in a tailored sticky buffer format.  However, only
org-agenda-list falls back to "*Org Agenda*" when org-agenda-sticky is
nil.  As a result, a buffer generated with org-follow-timestamp-link,
which gets a custom name, is not reset when commands other than
org-agenda-list generate a new agenda.

Move the logic from org-agenda-list to a helper function and use it
across the agenda-generating commands.

Reported-by: Garjola Dindi <garjola@garjola.net>
Ref: https://orgmode.org/list/87tuuj4lo9.fsf@pc-117-162.ovh.com
2020-11-09 01:07:35 -05:00
Kyle Meyer 04c35ce791 faces: Fix summary lines of two docstrings
* lisp/org-faces.el (org-document-info):
(org-document-info-keyword): Rework the docstrings to follow the Elisp
convention of using a standalone summary line.
2020-11-07 17:00:03 -05:00
Titus von der Malsburg e2fe596839 lisp/org.el: Display subtitle lines with document info faces
* lisp/org.el: The #+SUBTITLE: keyword is now displayed with
`org-document-info-keyword' and its value with
`org-document-info' (instead of `org-meta-line').
* lisp/org-faces.el (org-document-info):
(org-document-info-keyword): Update docstrings to include #+SUBTITLE:.

Like the title, author, e-mail, date, the subtitle is information
that is displayed in the exported document, not meta information.
2020-11-07 16:59:46 -05:00
Kyle Meyer f0b8de9687 Merge branch 'maint' into master 2020-11-07 02:38:21 -05:00
Kyle Meyer 49f4c364fd manual: Re-attach a footnote to its definition
With the conflict resolution in 9410fbe06 (Merge branch 'maint',
2020-09-06), what was footnote definition 89 got moved to 161, but the
reference remained 89.  Re-link the footnote and definition, and then
renumber and sort the footnotes.
2020-11-07 02:36:37 -05:00
Kyle Meyer 8ba7cf17a2 manual: Drop orphan footnote definitions
* doc/org-manual.org (Footnotes): Drop two definitions whose
references were removed in the previous commit.
2020-11-07 02:33:38 -05:00
Ian Martins 3cc15f993f org-manual.org: Remove language list and fix Worg link
* doc/org-manual.org: Remove the language list and fix the Worg link
since the languages page has moved.  Renumber footnotes.

The language list in the manual is missing many languages.  Rather
than trying to keep the list up to date in two places that link to
each other, this removes the list from the manual which is updated
less frequently.  There were a few footnotes in the table, so this
also renumbers the remaining footnotes.

The languages page was moved in Worg to make it the index page in the
languages directory.  This updates the link in the manual to point to
its new location.
2020-11-06 07:19:04 -05:00
Kyle Meyer 3f1c044441 ob-core: Drop redundant Edebug specification list
* lisp/ob-core.el (org-babel-result-cond): Don't set specification
list with def-edebug-spec because it is already defined with a debug
declaration.
2020-11-06 00:49:07 -05:00
Karol Wójcik 93325df0ba ox.el: Add missing polish translations in export dictionary
* lisp/ox.el (org-export-dictionary): Add missing polish translations.

TINYCHANGE

Signed-off-by: Karol Wójcik <karol.wojcik@tuta.io>
2020-11-06 00:48:02 -05:00
Kyle Meyer 280a0245f8 Merge branch 'maint' into master 2020-11-06 00:35:26 -05:00
Kyle Meyer 51c4cc1a8a Prefer symbol for eval-after-load's FILE argument
Call eval-after-load with a symbol rather than a string to avoid
potential name conflicts with files that do not provide the feature
(e.g., if a user configures speedbar in a file named "speedbar.el")

Reported-by: John Foerch <jjfoerch@gmail.com>
Ref: https://orgmode.org/list/CAEeGWGKfrV7w9qtPRpAhFtiOCH-+8_ydEe11EoMAkUkbTq1fuA@mail.gmail.com
2020-11-06 00:32:16 -05:00
Gustav Wikström dad436c60b Make `org-goto-first-child' behave intuitively before first heading
* lisp/org.el (org-goto-first-child): Make it understand outline
level 0 as well.  The function now behaves intuitively also before
first heading.
2020-11-05 00:49:23 +01:00