* 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/
* 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
* 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/
* lisp/org-plot.el (org-plot/gnuplot): Expanding the `save-excursion'
block to include `org-plot/goto-nearest-table` prevents the current
point from being moved, and doesn't affect the rest of the function.
* lisp/org-plot.el (org-plot/gnuplot-script): The gnuplot process this
generated content is sent to may be operating in a different directory,
and hence this may write to a different file than intended. By
expanding the file name first, this is no longer a concern.
* lisp/org-plot.el (org-plot/gnuplot): When
`gnuplot-send-buffer-to-gnuplot` is called, it may emit the error
"kill-region: Text is read-only: #<buffer *gnuplot*>" when the plot
operation has been successful. This prevents `org-plot/gnuplot` from
executing the rest of the function, which is undesirable.
It's preferable just to ignore this error.
* lisp/org-plot.el (org-plot/redisplay-img-in-buffer): New function
which searches the current Org buffer for overlays of a certain image,
and refreshes those overlays.
(org-plot/gnuplot): Use `org-plot/redisplay-img-in-buffer' after
plotting to redisplay any associated inline images.
* lisp/ox-html.el (org-html-template): Added the support for a CSS
class name to the content tag which wraps the entire content. The CSS
class name can be set via in buffer HTML_CONTENT_CLASS property or
:html-content-class for org publish.
TINYCHANGE
* lisp/org-agenda.el (org-compile-prefix-format): Use non-greedy match
for %(expression).
Previously, format like "%-12.12s%(expr1) %(expr2)" would not be
parsed correctly because of greedy "(.+)" regexp used to match the
expressions.
* lisp/ox-html.el (org-html--format-image, org-html--svg-image): Remove
special treatment of SVGs with <object>, and just use <img>. This used
to be poorly supported, but since Firefox 4 / Chrome 28 / Safari 9 this
is no longer a concern (https://caniuse.com/svg-img) and the last
browser release that didn't support SVG images was in 2010 (SVG data
URIs took until 2015 to be fully supported, but this is a lesser
concern).
* 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>
* 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.
* lisp/ol-doi.el: New file.
* lisp/ol.el (org-link-doi-server-url): Move to new file.
(org-link--open-doi): Remove function.
* lisp/org.el (org-modules): Autoload new library for backward
compatibility.
Reported-by: yarnton--- via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
<http://lists.gnu.org/r/emacs-orgmode/2020-09/msg00908.html>
* lisp/org-agenda.el (org-get-entries-from-diary): Remove some
Emacs 21 compat code; 'list-diary-entries' was made obsolete in
favour of 'diary-list-entries' in 22.1 and removed in 24.1.
* 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
* lisp/org-macro.el (org-macro--makeargs): Fix Emacs-26 burping
because of a bug when functions are declared with 0 optional arguments
like (&optional &rest x).
* lisp/org-macro.el (org-macro--makeargs): New function.
(org-macro--set-templates): New function.
(org-macro--set-template): Remove function.
(org-macro-initialize-templates): Add optional argument to
signature. Add macro definitions as functions.
(org-macro-expand): Allow functions as macro definitions.
(org-macro--counter-increment): Handle nil argument.
* lisp/ox.el (org-export-as): Apply signature change for
`org-initialize-templates'.
The main difference with the previous behaviour is that missing
arguments are now treated as nil instead of the empty string.
See <http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00219.html>.
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.
* 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.
* 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.
* 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.
* 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.
* 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>
* 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>
* 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
* 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).
* org-agenda.el (org-agenda-format-item): Rename parameters so they
don't clash with dynamic variables used by
`org-prefix-format-compiled'.
TINYCHANGE
* doc/org-manual.org:
* lisp/org-protocol.el: Quote emacsclient arguments
in examples to prevent interpreting of ampersands as intent
to run processes in background by bash and similar shells.
Single quotes may cause a problem with cmd.exe, so use
double quotes despite they are a bit less safe in bash and Co.
* lisp/ox-html.el (org-html-format-drawer-function): Drop leftover
text from when an example used to be included.
adcebf38f (Fix errors reported by cus-test.el, 2013-11-14) dropped the
example but left the leading part.
Reported-by: Jean-Baptiste Mazon <jmazon@gmail.com>
Ref: https://orgmode.org/list/0e5569e6-15a7-d4c4-0558-8b0ef96a515c@gmail.com
* lisp/ob-exp.el (org-babel-exp-process-buffer): Signal user-error
with an informative message rather than letting
org-babel-exp-do-export call fail due to an invalid INFO argument.
* testing/lisp/test-ob-exp.el (ob-exp/unknown-call-reference): Add
test.
Reported-by: Greg Minshall <minshall@umich.edu>
Ref: https://orgmode.org/list/628738.1616259666@apollo2.minshall.org
* lisp/org.el (org-open-file): Use 'pipe :connection-type instead of
'pty to prevent killing of background process on handler exit.
(Bug#44824)
Problem happens only in some desktop environments where configured
through `org-file-apps' or mailcap handlers launches actual viewer
(as defined in .desktop files and obtained from mimeapps.list)
in background. E.g. xdg-open invokes "gio open" or kde-open5 for Gnome
or KDE accordingly and these handlers launches e.g. eog or okular in
background. As soon as main process exits, temporary terminal session
created by `start-process-shell-command' is terminated. As a result
background processes receive SIGHUP.
Previously command were executed with no buffer, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.
If handler main process fails then show a message with exit reason.
Output (including error messages) is ignored as before.
Gtk application tends to report significant amount of failed asserts
hardly informative for majority of users.
TINYCHANGE
* lisp/ox-html.el (org-html-inline-image-rules): Add webp as an inline
image format
Webp is an image format introduced in 2010, which now has widespread
support in browsers. ox-html can inline webp images identically to how
it does already for other image formats.
[km: updated package-version keyword and added NEWS entry]
Signed-off-by: Jay Kamat <jaygkamat@gmail.com>
* lisp/ob-sql.el (org-babel-execute:sql, org-babel-sql-dbstring-saphana):
Add basic support for SAP HANA to SQL blocks.
* testing/lisp/test-ob-sql.el: Basic tests for generated db connection
string.
This change adds basic support for SAP HANA to SQL blocks by
specifying saphana as :engine.
It also adds a new header arg `dbinstance' in order to specify the SAP
HANA instance to connect to.
- Removed the global (defvar date) and (defvar entry) so as not to
conflict with function arguments of that name. Instead I added such
`defvar`s in the body of each of the functions where it
seemed needed.
- I added some FIXMEs for some issues I found along the way.
- Added an `org-dlet` macro, just like I had done for `calendar-dlet`,
but I also use `defvar` "manually" at some places, when splitting an
existing `let` into a mix of `let`s and `dlet`s seemed too much trouble.
- Removed uses of `org-let and `org-let2` not only because I consider
them offensive to my sense of aesthetics but also because they're
basically incompatible with lexical scoping.
I replaced them with uses of `cl-progv` which are a bit more verbose.
Maybe we should define some `org-progv` macro on top of `cl-progv` to
make the code less verbose, but I didn't do that because I like the
fact that the current code makes uses of `eval` a bit more obvious
(since these behave differently with lexical scoping than with
lexical binding, it seemed worthwhile).
- Removed the use of `eval` in `org-store-agenda-views` which was only
placed there in order to use a macro before it's defined (it would
have been simpler/cleaner to just move that functions *after* the
macro, but with the new code the problem doesn't occur any more anyway).
- Replaced a few `(lambda...) with actual closures.
Detailed changes follow:
(date, entry): Don't declare as being globally dynbound.
(org-agenda-format-date-aligned): Remove unused var `weekyear`.
(org-agenda-mode): `run-mode-hooks` is always available nowadays.
(org-agenda-undo): Remove unused var `last-undo-buffer`.
(org-agenda): Rename arg to `keys` and then dyn-bind it as `org-keys`.
Remove unused vars `buf` and `key`.
(org-agenda): Use `pcase` and `cl-progv` instead of `org-let`.
(org-let, org-let2): Mark as obsolete.
(org-agenda-run-series): Use `cl-progv` instead of `org-let` and `org-let2`.
(org-agenda-run-series): New function.
(org--batch-agenda): New function extracted from `org-batch-agenda`.
(org-batch-agenda): Use it.
(org--batch-agenda-csv): New function extracted from `org-batch-agenda-csv`.
(org-batch-agenda-csv): Use it.
(org--batch-store-agenda-views): New function, extracted from
`org-batch-store-agenda-views`.
(org-store-agenda-views, org-batch-store-agenda-views): Use it.
(org--batch-store-agenda-views): Use `cl-progv` instead of
`org-eval-in-environment`.
(org-agenda-write): Use `cl-progv` instead of `org-let`.
Use `with-current-buffer`.
(org-agenda-filter-any): Use `cl-some` instead of `eval`.
(org-agenda-list): Remove unused var `e`.
(org-search-view): η-reduce.
(crm-separator): Declare var.
(org-agenda-skip-if): Remove unused var `beg`.
(org-agenda-list-stuck-projects): Use a closure rather than `(lambda..).
(diary-modify-entry-list-string-function, diary-file-name-prefix)
(diary-display-function): Declare vars.
(org-diary): Declare `date` and `entry` as dynbound.
(org-agenda-get-day-entries): Use `org-dlet`.
(org-agenda-get-timestamps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled, org-agenda-get-blocks):
Declare `date` as dynbound.
(org-agenda-get-sexps, org-class): Declare `date` and `entry` as dynbound.
(org-agenda-format-item): Declare the vars mentioned in
`org-compile-prefix-format` as dyn-bound.
Also binding `extra`, suggested by Kyle Meyer <kyle@kyleam.com>.
(org-compile-prefix-format): Remove unused var `e`.
Use `member` rather than or+equal.
(org-set-sorting-strategy): Minor simplification.
(org-entries-lessp): Use `org-dlet`.
(org-agenda-redo): Declare var `org-agenda-tag-filter-while-redo`.
(org-agenda-redo): Use `cl-progv` rather than `org-let`.
(org-agenda-filter): Remove unused var `rpl-fn`.
Use `org-pushnew-to-end` to replace `add-to-list` on lexical var.
(org-agenda-filter-by-tag): Remove unused var `n`.
(org-agenda-filter-apply): Use `org-dlet`.
(org-agenda-compute-starting-span): Remove unused var `dg`.
(org-agenda-forward-block): Remove unused var `pos`.
(org-archive-from-agenda): Declare var.
(org-agenda-refile): Remove unused var `pos`.
(org-agenda-headline-snapshot-before-repeat): Declare var.
(org-agenda-todo): Remove redundant use of `bound-and-true-p`.
(org-agenda-add-note): Remove unused var `hdmarker` and unused `arg`.
(org-agenda-change-all-lines): Remove unused var `pl`.
(org-agenda-priority): Remove unused var `marker`.
(org-agenda-set-effort): Remove unused var `newhead`.
(org-agenda-schedule): Remove unused var `type`.
(org-agenda-clock-cancel): Remove unused `arg`.
(org-agenda-execute-calendar-command): Use `org-dlet`.
(org-agenda-bulk-action): Use closures instead of `(lambda ...).
(org-agenda-show-the-flagging-note): Remove unused vars `heading` and
`newhead`.
(org-agenda-remove-flag): Avoid `setq`.
* testing/org-test.el (org--compile-when): New macro.
(org-test-jump): Use it so compilation doesn't fail or generate broken
code when `jump` is not available.
* testing/lisp/test-org-src.el:
* testing/lisp/test-org-attach.el:
* testing/lisp/test-org-agenda.el:
* testing/lisp/test-ob-java.el: Pass explicit filename to `require`
so as not to rely on ".../testing" being in `load-path` during compilation.
* lisp/org-num.el: Require` org`.
* lisp/org-macs.el (org-eval-in-environment): Declare obsolete.
(org-dlet, org-pushnew-to-end): New macros.
* doc/Makefile (org.texi, orgguide.texi, %_letter.tex): Simplify quoting.
* contrib/lisp/ob-sclang.el: Don't crash compilation when `sclang`
is not available.
* contrib/lisp/ob-clojure-literate.el: Don't crash compilation when `cider`
is not available.
* contrib/lisp/ob-arduino.el: Don't crash compilation when `arduino-mode`
is not available.
* .gitignore: Add files generated during `make packages/org`.
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
Overwrite existing output.
Make generation of texi from org overwrite output
18e1455c8ae851791a047dc56eef972cc24e5b6c
Glenn Morris
Sun Feb 28 15:13:07 2021 -0800
* lisp/ob-sqlite.el (org-babel-sqlite-expand-vars): Marked function as obsolete.
* lisp/ob-sql.el (org-babel-sql-expand-vars): Updated to support
expanding sqlite vars.
org-clocking-buffer and org-clock-is-active have the same definition.
org-clocking-buffer is defined in org-clock.el while
org-clock-is-active is defined in org.el. org-clock.el requires
org.el.
org-clocking-buffer is kept as an alias to preserve backward
compatibility with any user code.
* lisp/org-clock.el (org-clocking-buffer): Moved to org.el.
* lisp/org.el (org-clocking-buffer): Moved function.
(org-clock-is-active): Made into an alias.
It's annoying to accidentally quit Emacs with a running clock, then
resolve the clock the next time when Emacs is started.
* lisp/org-clock.el (org-clock-kill-emacs-query): New function.
(org-clock-ask-before-exiting): New user option.
[km: added package-version keyword, fixed function name typo]
* org.el (org-font-lock-add-priority-faces): Speed up regexp.
Only fontify priority cookies in headlines.
Note that the variable org-priority-regexp can't be modified since
it is used in the agenda and in org-get-priority.
TINYCHANGE
Suggested-by: Ihor Radchenko <yantar92@gmail.com>
* lisp/org.el: Don't require easymenu in Emacs 28 or later.
Minor fixes after preloading easymenu
b34d39170b67a7a285f7c8c2ea1b4128b531aad9
Stefan Kangas
Sat Feb 27 20:04:41 2021 +0100
* lisp/org.el: Don't require overlay; that's only needed in XEmacs.
Don't require overlay; that's only needed in XEmacs
2c639a35a6d71d190bea896bbeb14b279e8d8384
Stefan Kangas
Sat Feb 27 18:23:12 2021 +0100
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo-batch): New
function.
Distribute the real source for some doc/misc manuals (bug#45143)
fddd63f8b854f6bfa91403f69ba694ccb54197bc
Glenn Morris
Fri Feb 26 19:36:09 2021 -0800
While at it, I enabled lexical-binding in the affected files.
* lisp/org-agenda.el (org-let, org-let2): Move from org-macs and
use `declare`.
* lisp/org-macs.el (org-let, org-let2): Move these functions that are
inherently harmful to your karma to the only package that uses them.
(org-scroll): Use `pcase` to avoid `eval` and use more readable syntax
for those integers standing for events.
* lisp/org-element.el (org-element-map): Use `declare`.
Prefer `declare` over a `put` of `list-indent-function`.
8d5dfafab7dc40d4b74dc0b56d1b314fd8cac390
Stefan Monnier
Mon Feb 22 11:54:17 2021 -0500
* lisp/org-agenda.el (org-add-to-diary-list): Remove.
(org-diary-default-entry): Use diary-add-to-list directly.
org-agenda has compatibility kludges for the rename of
add-to-diary-list and the number of required arguments; both are no
longer needed. The fourth argument has been optional since 22.1, and
add-to-diary-list was marked as obsolete in favor of diary-add-to-list
in Emacs 23.1 and removed in Emacs 25.1.
* lisp/ob-latex.el (org-babel-latex-begin-env):
(org-babel-latex-pdf-svg-process): Shorten docstring to under 80
characters.
* lisp/org-plot.el (org-plot/preset-plot-types): Fill long lines and
add two spaces after periods.
With Emacs 28.0.50 the byte-compiler now warns about docstrings that
are too wide. The recent ports from the Emacs repo covered all of the
cases that have already made their way to the Emacs tree.
* lisp/org-agenda.el (org-agenda-goto-date): Restore DATE argument
(removed in 7.9.3e), replacing unused SPAN argument.
* testing/lisp/test-org-agenda.el (test-org-agenda/goto-date): Add
test.
Among other changes, 93fcfe4d3 (2012-08-30) switched
org-agenda-goto-date's DATE argument to SPAN, moving the org-read-date
call out of the interactive form. The new argument is unused, and
it's not clear that this part of the change was needed for the fix.
It prevents lisp callers from specifying a date, so move the
org-read-date call back to the interactive form.
Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
Ref: https://orgmode.org/list/87pn10t83u.fsf@m4x.org
* lisp/org.el (org-adapt-indentation): Adjust :safe value for
headline-data, avoid unnecessary quote in :type value, and follow the
convention for quoting symbols in docstrings.
* org-clock.el (org-clock-in): Under certain configurations of org,
Emacs doom, evil-org-mode and my custom settings, org-clock-in aborts
with an an error because indent-line-to is called with -2.
TINYCHANGE
* lisp/org-agenda.el (org-agenda-filter): Downcase tags in the search
string provided by user. This is needed because all the tags stored
in 'tags text property are downcased.
Example when old code did not work is a tag like COMMON. The user
would not expect a need to input +|-common in the agenda filter
instead of +|-COMMON. The latter would only result in
"COMMON filter ignored because tag/category is not represented".
* lisp/org-agenda.el (org-agenda-bulk-custom-functions): Add
documentation about argument collection for custom bulk functions.
(org-agenda-bulk-action): Support function to collect arguments for
custom bulk functions.
* etc/ORG-NEWS (Option ~org-agenda-bulk-custom-functions~ now supports
collecting bulk arguments): Add entry to NEWS.
Porting from Emacs's master to Org's maint branch has been on hold
leading up to the Emacs 27.2 release to avoid any required fixup syncs
carrying those commits into the emacs-27 branch. This merge brings
those changes into master. The km/from-emacs-master branch should be
merged to maint when Emacs 27.2 has been released (assuming Org 9.5
hasn't been released, in which case maint will be tracking 9.5.x and
already include these changes).
* lisp/ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Use `declare`.
* lisp/ob-core.el (org-babel-map-src-blocks): Use `declare`.
(org-babel-result-cond): Simplify edebug spec.
* lisp/org-clock.el (org-with-clock-position, org-with-clock):
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry):
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`.
Use `declare` instead of `def-edebug-spec` in most places
f8dbefbaa59bb17dd4a2dfa4d9ff560c46785792
Stefan Monnier
Fri Feb 12 16:08:01 2021 -0500
* lisp/org-table.el (org-table-edit-field):
* lisp/org.el (org-restart-font-lock): Assume font-lock-mode variable
is not void; it is preloaded.
Assume font-lock-mode variable is not void
bbe88cd82e4bbfd76df06223614ab74d1022c119
Stefan Kangas
Fri Feb 5 01:15:02 2021 +0100
* lisp/org-agenda.el (org-agenda-filter-by-category): Shorten doc
strings to not exceed 80-column limits. (Bug#44858)
Shorten some over-wide docstrings in functions and macros
34a73666d9559d948815a53b63dc36cc878d5aff
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
* lisp/org-indent.el
(org-indent-mode-turns-off-org-adapt-indentation)
(org-indent-mode-turns-on-hiding-stars):
* lisp/org-protocol.el (org-protocol-project-alist): Shorten doc
strings to not exceed 80-column limits. (Bug#44858)
Shorten over-wide docstrings in defcustoms
5ab5c3898778406103e7183bf41c7d018077092b
Stefan Kangas
Sat Dec 19 18:21:06 2020 +0100
* lisp/org-ctags.el (org-ctags-open-link-functions): Fix doc strings
to not exceed 80-column limits. (Bug#44858)
Fix over-wide doc strings
64d97212f42bc0305560a0ae2cc2f16a3a851117
Eli Zaretskii
Sat Dec 19 13:18:11 2020 +0200
* lisp/ob-core.el (org-babel--string-to-number): Put hyphen last in
alternative.
* lisp/org-agenda.el (org-agenda-filter): Escape '+' correctly.
Follow good regexp practice
46394dff7f01e7fe4af06a6c344e151af5c3eef4
Mattias Engdegård
Fri Dec 18 14:35:09 2020 +0100
* lisp/ob-java.el (org-babel-execute:java): Restore inspection of
:dir's value to decide whether to run from temporary directory.
My compatibility fix in the previous commit incorrectly changed the
documented and intended behavior for (:dir . nil).
Reported-by: Ian Martins <ianxm@jhu.edu>
* ob-sql.el (org-babel-execute:sql): Use `sql-postgres-program' as
postgresql executable (instead of psql) when defined. psql will be
the default.
[km: tweaked commit message, added bound-and-true-p guard]
TINYCHANGE
* lisp/org-capture.el (org-capture-set-target-location): Bind
org-end-time-was-given around the org-read-date call to get a return
value that uses the start time rather than doing custom adjustment of
the return value.
If org-capture-set-target-location detects that the answer to
org-read-date has a time range, it strips the end time from the answer
and calls org-read-date-analyze again. (org-read-date already calls
it underneath.) The regexp it uses, however, can easily match a date,
leading to a bogus result.
org-read-date-analyze is already capable of processing the time range
in a way that matches org-capture-set-target-location's intent: when
org-end-time-was-given is bound, org-read-date-analyze splits off the
end value of the range and stores it in org-end-time-was-given. Drop
the custom logic and let org-read-date-analyze handle the range.
Reported-by: Richard Lawrence <richard.lawrence@berkeley.edu>
Ref: https://orgmode.org/list/87h7obh4ct.fsf@aquinas
* ox-latex.el (org-latex-listings-langs): Change the binding for
`ocaml' to "[Objective]Caml"
The "[Objective]Caml" dialect syntax highlighting is different from the
"Caml" one (reflecting the added features of OCaml compared to
Caml-light).
TINYCHANGE
* ox-latex.el (org-latex-export-to-pdf): The documentation for
`org-latex-pdf-process' states that "%bib" will be expanded into the
current binding of `org-latex-bibtex-compiler'. However, the
`org-latex-export-to-pdf', where the expansion takes place, expects
"%bibtex" instead. This fix will accept "%bib" as well as "%bibtex"
as markers for `org-latex-bib-compiler'.
This fixes a regression from f6187deca (ox-latex: Small refactor,
2015-09-13).
TINYCHANGE
* lisp/org-macs.el (org-matcher-time): Handle hour ("h") time stamp
modifier.
* doc/org-manual.org (The date/time prompt): Document hour modifier.
This adds support for date expressions such as +12h to
org-matcher-time. The regexp this function uses to parse such relative
expressions already includes the "h" character but doesn't actually
handle that case.
AFAICT org-mode commit ec921a2a68 ("Support hourly repeat cookies")
neglected to add support here.
TINYCHANGE
* lisp/ox-html.el (org-html-meta-tags): Introduce this as a new option
which can be modified to set the meta tags added in HTML exports.
(org-html--build-meta-info): Make use of `org-html-meta-tags' instead of
hardcoded meta tags. This is leveraging the earlier restructuring of
`org-html--build-meta-info' into a much DRYer form, such that this
modification has a negligible impact on complexity and readability.
* lisp/ox-html.el (org-html--build-meta-info): Multi-line repeated
structure extracted to new function `org-html--build-meta-entry'.
The keyword value formatting is changed from `org-export-data' to
`org-html-encode-plain-text' to avoid potentially nesting HTML tags in
meta tags and the <title> element, which would violate W3C.
lisp/ob-java.el: Allow source block headers to override the java
compiler or runtime commands.
Currently the java compiler and runtime commands are customizable, but
cannot be overridden locally in source block hearders. ob-python
allows overriding the runtime command and I've found it to be useful.
This does the same for ob-java.
* lisp/ob-C.el (org-babel-C-utility-header-to-C): Add declaration of
strcmp() for C and C++.
* testing/examples/ob-C-test.org (Simple tests): Remove a spurious \n
new line.
* org-footnote.el (org-footnote-create-definition): Replace
`forward-line' with `org-end-of-meta-data' to skip over any
properties and/or drawers that may be present on the
`org-footnote-section' heading (default "Footnotes").
TINYCHANGE
* lisp/org.el (org-fast-tag-selection): Merge buffer local tags with
global alist of tags. And it obeys the option
org-complete-tags-always-offer-all-agenda-tags.
* doc/org-manual.org: Update the TAB key doc in tags selection UI.
* etc/ORG-NEWS: Mention the change in org-set-tags-command.
* lisp/org-duration.el (org-duration-units): Guard against recursive
load error when org-duration-units is set via the Customize interface
before org-duration is loaded.
This follows the same approach used by erc-nickserv-identify-mode in
the Emacs repository.
Reported-by: Mario Bourgoin <m.bourgoin@gmail.com>
Ref: https://orgmode.org/list/CAM0Tqh+u+L+UgZizJrH+a+W7Lo1stPJgTsRABxD3HobOnOCrNA@mail.gmail.com
* lisp/org-plot.el (org--plot/values-stats): Replace `log10' with
`log'.
(org--plot/nice-frequency-pick): Replace obsolete `case' with `cl-case`.
(org--plot/radar): Replace `s-join' with `mapconcat', removing the
implicit dependency on s.el.
(org-plot/gnuplot-script): Remove unused let bindings.
(org-plot/gnuplot-script): Replace free variable reference with
expression only using given variables.
de6d90224 (org-attach: Consider inlinetasks when calculating attach
dir, 2020-12-17) introduced a call to org-inlinetask-goto-beginning
and org-inlinetask-in-task-p, each behind a featurep guard.
* lisp/org-agenda.el: Remove `generated-autoload-file' local
variable.
* lisp/org-capture.el: Ditto.
This is a continuation of a4e6a6fa7 which fixes fae16ed8f.
Reported-by: Andrii Kolomoiets <andreyk.mad@gmail.com>
* lisp/org-lint.el (org-lint--display-reports): Remove
`tabulated-list-print' call. This is already taken care of by
`org-lint--refresh-reports' above.
* lisp/org-attach.el (org-attach): When inside inlinetask, return
attachment dir of that task. When outside inlinetask, return
attachment dir of the main task ignoring any inlinetasks above point.
The call to `org-back-to-heading-or-point-min` does not move point to
the actual heading when there is inlinetask above the point. The
result is incorrect return value or even creation of property drawer
below *...** END line of the last inline task before point.
* lisp/ox-html.el (org-html-style-default): Add the margin-top
property to pre.src:hover:before so that the programming language is
fully visible.
TINYCHANGE