* lisp/ox.el (org-export--missing-definitions):
(org-export--install-footnote-definitions): New functions
(org-export--merge-external-footnote-definitions): Remove function
(org-export-as):
(org-export--prune-tree): Use new functions.
* testing/lisp/test-ox.el (test-org-export/footnotes): Add tests.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107940>
* lisp/org-colview.el (org-columns-edit-value): Small refactoring. Use
new function.
(org-columns--call): New function.
(org-columns-eval): Remove function.
(org-columns-next-allowed-value): Use new function.
* lisp/org-macs.el (org-replace-match-keep-properties): Remove function.
This function is unused through the code base and doesn't specifically
belong to a public API.
* lisp/org.el (org-find-if): Remove function.
(org-key):
* contrib/lisp/org-contacts.el (org-contacts-db-need-update-p):
(org-contacts-filter):
(org-contacts-test-completion-prefix):
(org-contacts-remove-ignored-property-values): Use `cl-find-if'
* lisp/org-compat.el (org-find-if): Mark function as an obsolete alias
for `cl-find-if'.
* lisp/org.el (org-set-effort): Use `equal' instead of `string='.
Since (string= "nil" nil) is non-nil, a "nil" heading could be mistaken
for the current clocked task if `org-clock-current-task' is not bound,
or if there is no current clocked task.
* lisp/ox.el (org-export-get-footnote-definition): When a definition is
empty, but does exist, return the empty string instead of raising an
error.
* testing/lisp/test-ox.el (test-org-export/get-footnote-definition): New
test.
Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107873>
* doc/org.texi (Sources and destinations): Document new signature.
* lisp/ox-publish.el (org-publish-project-alist): Update docstring.
(org-publish-projects): Call preparation and
completion functions with the project properties as the sole argument.
`project-plist' used to be dynamically scoped. This is no longer
possible due to the switch to lexical binding.
Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107856>
* lisp/ob-lob.el (org-babel-lob-files): Remove variable.
(org-babel-library-of-babel): Fix docstring.
Since its creation, `org-babel-lob-files' has been a no-op. Since no-one
noticed it during those 7 years, it can safely be removed.
Reported-by: "Charles C. Berry" <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/107824>
* lisp/ob-exp.el (org-babel-exp--at-source): New macro.
(org-babel-exp-in-export-file): Remove macro.
(org-babel-exp-src-block): Remove unused argument. Use new macro.
(org-babel-exp-process-buffer): Apply signature change above. Put
temporary properties on top of Babel code so as to find original
location without relying on heuristics.
(org-babel-exp-results): Use new macro.
Export process has to know context of Babel code being evaluated (e.g.,
so as to retrieve parameters from node properties). However, evaluating
previous code can drastically change the buffer. The library used some
heuristics to find the original location. Those are not necessary
anymore.
* lisp/ob-sql.el (org-babel-sql-dbstring-mssql): Format Microsoft
`sqlcmd' command line args.
(org-babel-sql-convert-standard-filename): Convert a Posix path to
Windows long path in Cygwin environment, or do nothing.
(org-babel-execute:sql): Add `mssql' engine support and remove support
for `msosql' engine.
The `osql' command line tool was last updated in 2004,
https://technet.microsoft.com/en-us/library/aa214012(v=sql.80).aspx, and
could not output the query result in a way that morden `org-table.el'
expects. The `sqlcmd' is the preferred command line tool to connect the
Microsoft SQL Server and it also has a Linux version,
https://msdn.microsoft.com/en-us/library/hh568447(v=sql.110).aspx.
TINYCHANGE
* lisp/ob-lob.el (org-babel-default-lob-header-args): Merge value with
`org-babel-default-header-args' since this variable is meant to
replace the latter.
(org-babel-lob-ingest): Make sure `org-babel-default-lob-header-args' is
used instead of `org-babel-default-header-args'.
(org-babel-lob--src-info): New function.
(org-babel-lob-get-info): Use new function. Make return value
a replacement for `org-babel-get-src-block-info'.
(org-babel-lob-execute): Use `org-babel-execute-src-block' instead of
duplicating functionalities.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Apply changes to
`org-babel-lob-get-info' return value.
* testing/examples/ob-header-arg-defaults.org:
* testing/lisp/test-ob-header-arg-defaults.el (test-ob-header-arg-defaults/tree/accumulate/call):
(test-ob-header-arg-defaults/tree/complex/call):
(test-ob-header-arg-defaults/tree/overwrite/call):
* testing/lisp/test-ob-lob.el (test-ob-lob/caching-call-line):
(test-ob-lob/named-caching-call-line): Update tests.
The purpose of this commit is to make Babel calls more
predictable (e.g., wrt property inheritance) and to remove code
duplication. Also, Babel calls results are no longer treated as Emacs
Lisp values.
* lisp/org-element.el (org-element-inline-babel-call-parser): Empty
arguments return nil instead of the empty string, so as to be on par
with `org-element-babel-call-parser'.
* lisp/org-timer.el (org-timer-set-timer): The user can always set the
timer with a numeric prefix argument.
Before, when the effort property has been set, the user lost control to
explicitly set the timer to a different time.
* lisp/ob-core.el (org-babel-goto-named-src-block): The user prompt
(i.e. `initial-input' arg of `completing-read') will be the name of
the results block, noweb reference, call reference, or symbol if
point is in such.
* testing/lisp/test-ob.el (test-ob/goto-named-src-block): Simulate
interactive use of `org-babel-goto-named-src-block'.
* lisp/org.el (org-insert-heading): Do not reveal gratuitously too much
context before inserting an item.
* testing/lisp/test-org.el (test-org/insert-heading): Add test.
Reported-by: Steinar Bang <sb@dod.no>
<http://permalink.gmane.org/gmane.emacs.orgmode/107665>
* lisp/org-element.el (org-element--parse-paired-brackets): New function.
(org-element-inline-babel-call-parser):
(org-element-inline-src-block-parser): Use new function.
* testing/lisp/test-org-element.el (test-org-element/inline-src-block-parser):
Add test.
Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107629>
* lisp/org.el (org-get-tags-at): Use non-greedy match up to colon to
match all tags (and not just the last.)
* testing/lisp/test-org.el (test-org/tags-at): One test to cover the
issue.
* lisp/ox-texinfo.el (texinfo): Add transcoders.
(org-texinfo-text-markup-alist): Allow `strike-though' and `underline'
as keys. Remove unused `comment'.
(org-texinfo-strike-through):
(org-texinfo-underline): New functions.
By default, new markup produce no Texinfo code, but can be customized by
users for specific uses.
* lisp/org-colview.el (org-columns--summary-min-age):
(org-columns--summary-max-age):
(org-columns--summary-mean-age): Fix argument name in docstrings.
* lisp/org.el (org-deadline-close): A timestamp is close if the days
between now and the timestamp are less then or equal to the days of
lead time.
* testing/lisp/test-org.el: Add tests for org-deadline-close.
* lisp/org.el (org-deadline-close): A timestamp is close if the days
between now and the timestamp are less then or equal to the days of
lead time.
* testing/lisp/test-org.el: Add tests for org-deadline-close.
* lisp/org.el (org-align-tags-here): Fix tag width calculation for
multi-column chars.
Some characters have multiple column width. Calculating string width
with points gives a wrong value than actual display width. Use
`string-width' instead.
Here is an ECM for this problem. `M-x org-update-statistics-cookies` or
`C-c #` on bar moves the tag on the headline.
* foo [0/0] 🔤
** child
* bar [0/0] :日本語:
** child
12345678901234567890123456789012345678901234567890123456789012345678901234567890
1 2 3 4 5 6 7 8
* lisp/org.el (org-get-heading): Prevent removing false-positive TODO
keywords due to case-insensitivity.
* testing/lisp/test-org.el (test-org/get-heading): New test.
* lisp/org.el (org-compile-file): %f meant relative name of compiled
file. %F is its full name. Also always set `default-directory' to
the directory of the source.
Reported-by: Stig Brautaset <stig@brautaset.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/107348>
* lisp/org-compat.el (org-get-x-clipboard): Use `gui-get-selection',
which obsoletes `x-get-selection'. Define the former as an alias for
the latter for backward compatibility.
* lisp/org-agenda.el (org-agenda-change-all-lines): Preserve bulk mark
overlay when replacing an entry.
Reported-by: Jesse Johnson <holocronweaver@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107299>
* lisp/ox-latex.el (org-latex--delayed-footnotes-definitions): Fix typo
in docstring.
(org-latex-footnote-defined-format): New defcustom.
(org-latex-footnote-reference): Refer to repeated footnotes using
labels. Format using new defcustom.
* etc/ORG-NEWS: Mention change.
* doc/org.texi (Publishing options): Add new defcustom.
* lisp/ox.el (org-export-get-loc): Refactor code. Speed-up processing
when the element doesn't require line numbering.
* testing/lisp/test-ox.el (test-org-gen-loc-list): Reformat code.
* lisp/org-element.el (org-element-example-block-parser): Use cons cell
for :number-lines specifying offset in addition to type (new/continue).
('continue . offset) for :number-lines will add this offset count to
the last line number. ('new . offset) for :number-lines will reset the
line number counting starting at offset
(org-element-src-block-parser): same for SRC block as EXAMPLE block
* lisp/ox-html.el (org-html-format-code):
* lisp/ox-latex.el (org-latex-src-block):
* lisp/ox-odt.el (org-odt-format-code):
* lisp/ox.el (org-export-resolve-coderef):
(org-export-get-loc):
(org-export-format-code-default):
* contrib/lisp/ox-groff.el (org-groff-src-block): Use new cons cell
for :number-lines.
* testing/lisp/test-ox.el (ert-deftest test-org-export/get-loc): Tests for
changes
(test-org-gen-loc-list): Helper function for `test-org-export/get-loc'.
* org-clock.el (org-clock-get-clock-string): When `org-clock-effort'
is nil, arrange the format string components separately, similar to
how they are arranged when o-c-e is not-nil.
* ox-html.el (org-html--build-pre/postamble): Find the spec based on the
language case-insensitively.
Note that the default org-html-preamble-format and
org-export-default-language are incompatible.
* lisp/org-table.el (orgtbl-setup): Hijack DEL key. We also hijack
`delete-backward-char' but major modes derived from `prog-mode'
usually bypass it.
Reported-by: Alex G <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107232>
* ox-html.el (org-html-with-latex): Add dvisvgm support.
(org-html-with-latex): Add dvisvgm support.
(org-html-format-latex): "ltxpng" -> "ltximg".
(org-html-latex-environment): Add dvisvgm support.
(org-html-latex-fragment): Add dvisvgm support.
* org.el (org-preview-latex-default-process): New variable.
(org-latex-create-formula-image-program): Rename it to `org-preview-latex-default-process'.
(org-latex-preview-ltximg-directory): Rename it to `org-preview-latex-image-directory'.
(org-preview-latex-image-directory): New variable.
(org--format-latex-make-overlay): Add optional image-type, which used to deal with svg.
(org-toggle-latex-fragment): "org-ltxpng" -> "org-ltximg".
(org-format-latex): Add dvisvgm support.
(org-create-formula-image): Big refactor, merge dvipng and imagemagick
backend's feature. Add dvisvgm feature.
(org-preview-latex-process-alist): Add new variable, which used to set
latex preview processes.
(org-create-formula-image-with-dvipng):
(org-create-formula-image-with-imagemagick): Useless, removed.
* org.texi (@LaTeX{} fragments):
(Previewing @LaTeX{} fragments):
(Math formatting in HTML export):
(Working with @LaTeX{} math snippets): Add dvisvgm information.
* lisp/org-table.el (orgtbl-self-insert-command): Properly overwrite
white spaces when there is room for it. This is on par with what
`org-self-insert-command' does in Org tables.
Reported-by: Alex <agrambot@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107112>
* lisp/org.el (org-compile-file):
(org-file-newer-than-p): New functions.
* lisp/ox-latex.el (org-latex-compile): Use new functions.
* lisp/ox-man.el (org-man-compile): Use new functions.
(org-man-collect-errors): Remove it.
* lisp/ox-texinfo.el (org-texinfo-compile): Use new functions.
(org-texinfo-collect-errors): Remove function as it is not accurate
enough (e.g., it doesn't handle internationalization).
* org-macro.el (org-macro--vc-modified-time): New function.
* org-macro.el (org-macro-initialize-templates): Add support for new
function.
* doc/org.texi (Macro replacement): Document new behavior.
* etc/ORG-NEWS: Mention new behavior.
* lisp/org-capture.el (`org-capture-templates'): Adjust the
`org-capture-templates' defcustom template to support specifying the capture
target file using either a literal pathname, a function, a variable or a
form, as documented. Previously the Customize UI supported specifying only a
literal pathname.
(org-capture-templates): Clarify the documentation for the `function' method
for setting up the capture target.
* doc/org.texi (Template elements): Clarify the `function' method for setting up
the capture target.
* lisp/org-compat.el (org-select-frame-set-input-focus): Check for
w32-focus-frame to quiet byte compiler.
Don't use declare-function because this function was marked obsolete in
Emacs 23.1 (44fe0f6).
* lisp/org-gnus.el (org-gnus-nnimap-cached-article-number): Check that
nnimap-group-overview-filename, which was removed from Emacs in 2010,
is defined before calling.
* lisp/org.el (org-export-backend-options): Add back removed
declare-function call.
* lisp/ob-awk.el (orgtbl-to-generic):
* lisp/ob-core.el (orgtbl-to-generic):
* lisp/ob-gnuplot.el (orgtbl-to-generic): Remove BACKEND argument from
declare-function calls.
The last backport added this argument to match orgtbl-to-generic's
signature in Emacs's version of Org, but the BACKEND argument to
orgtbl-to-generic was later removed in 9209aa3 (org-table: Use "ox.el"
internally for radio tables, 2014-08-24).
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Do not treat
each save as meant to save source buffer.
Reported-by: David Dynerman <david@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/106998>
* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
template to recognize that the code expects this alist's elements to be
two-element lists like (?a b), not conses like (?a . b).
The Customize UI previously incorrectly presented the latter. When
saved, this led to the agenda bulk-commands menu correctly presenting
the accelerator key 'a' but then erroring when it tried to execute the
associated command 'b'.
* lisp/org-clock.el (org-clock-drawer-name): When
`org-clock-into-drawer' is a number and `org-log-into-drawer' is t,
default to "LOGBOOK".
* testing/lisp/test-org-clock.el (test-org-clock/into-drawer):
(test-org-clock/drawer-name): New tests.
* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file):
The tramp macro `with-parsed-tramp-file-name' invokes a bunch of
tramp functions. These are now declared and tramp is explicitly
required.
* lisp/org-clock.el (org-clock-find-position): Create a default
"LOGBOOK" drawer when `org-clock-into-drawer' is a numeric value.
Reported-by: Carlos Noguera <carlos.francisco.noguera@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106886>
* lisp/ox-html.el (org-html-style-default): Add languages.
The standard CSS for HTML export only supported a couple of
programming languages to have a language name "hover" on src
blocks. This patch adds all languages supported per Org
manual, those from org.el's org-babel-load-languages-alist,
additional language identifiers in ob-*.el and languages
which have a) an emacs mode and b) are supported by the LaTeX
listings package. Additional a language "conf" is supported
for generic configuraiton files; an emacs mode exists for
this, but for LaTeX listings a language " " has to be faked.
As this patch is for HTML, this is no impediment.
Thanks for reporting the missing support to Tianxian XIONG.
* lisp/org.el (org-occur): Fix infloop when regexp matches a single
char. Improve docstring.
(org-check-before-date):
(org-check-after-date):
(org-check-dates-range): Match correct object since point may be at the
beginning of the next one.
* testing/lisp/test-org.el (test-org/occur): New test.
* lisp/org-capture.el (org-capture):
(org-mks): Replace `error' with `user-error'.
When `org-capture` is aborted by user with 'q' or 'C-g', `user-error' is
better than `error' when exiting.
TINYCHANGE
* lisp/ob-paltuml (org-babel-execute:plantuml): add new output formats
of plantuml:
- pdf : this needs extra java mudules to run which are mentioned on the
plantml website (http://fr.plantuml.com/pdf.html)
- vdx
- xmi
- scxml
- html
- txt (ascii art)
- utxt (ascii art using unicode)
The output format is based on the extension of the output file.
* lisp/org.el (org-flag-drawer): Do not require point to be at a drawer
in order to call the function with an optional argument.
* testing/lisp/test-org.el (test-org/flag-drawer): Narrow test.
* lisp/org.el (org-show-set-visibility): Always show point, even when it
is hidden in a block or a drawer.
* testing/lisp/test-org.el (test-org/show-set-visibility): Add tests.
Reported-by: Derek Feichtinger <dfeich@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106744>
* lisp/org.el (org-show-context-detail): Change default visibility span
for agenda context.
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-todo):
(org-agenda-add-note):
(org-agenda-priority):
(org-agenda-set-tags):
(org-agenda-set-property):
(org-agenda-set-effort):
(org-agenda-toggle-archive-tag):
(org-agenda-clock-in): Special visibility is taken care of by
`org-show-context'. Do not hard-code anything else.
* contrib/lisp/org-contacts.el (org-contacts-gnus-article-from-goto):
Special visibility is taken care of by `org-show-context'. Do not
hard-code anything else.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Handle
`org-export-babel-evaluate' handling.
(org-babel-exp-results): Ignore `org-export-babel-evaluate' since it is
handled as a higher level.
* lisp/ox.el (org-export-as): Allow to short-circuit babel evaluation if
`org-export-babel-evaluate' is nil.
* testing/lisp/test-ob-exp.el (ob-export/babel-evaluate): New test.
Reported-by: Nicolas Richard <nrichard@ulb.ac.be>
<http://permalink.gmane.org/gmane.emacs.orgmode/106767>
* lisp/ox.el (org-export-format-reference): Internal references are
always 10 character long.
This reduces further possible reference clashes with user-defined
labels.
* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file):
Remove the `(ignore v)'. This creates a byte-compiler warning for
supposedly unused `v', but allows remote execution.
* ob-comint.el: (tramp-flush-directory-property declaration): The
file is now "tramp-cache".
* ob-comint.el (org-babel-comint-eval-invisibly-and-wait-for-file):
Remove unused let binding for `v' (which is let bound by
`with-parsed-tramp-file-name').
Bug reported by Vikas Rawal
Subject: Using tramp to run R source code blocks on remote server
Archived-At: <http://permalink.gmane.org/gmane.emacs.orgmode/106557>
* lisp/org.el (org-yank): Update docstring for change in default value
of org-yank-adjusted-subtrees.
The default value was changed to nil in 2949012 (Change default values
of some variables., 2009-02-01).
Reported-by: Jorge Peixoto de Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106610>
* lisp/ob-emacs-lisp.el (org-babel-header-args:emacs-lisp):
(org-babel-default-header-args:emacs-lisp): New variables.
(org-babel-execute:emacs-lisp): Add an optional argument to the eval
function.
* lisp/org-agenda.el (org-agenda-mark-clocking-task):
(org-agenda-clock-goto): `org-clock-current-task' may not be defined, so
check that first.
Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106504>
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/tags):
(pcomplete/org-mode/tag): Use new `org-current-tag-alist' instead of
`org-tag-alist' so as to take `org-tag-persistent-alist' into
consideration.
* lisp/org.el (org-current-tag-alist): New variable.
(org-set-tags):
(org-global-tags-completion-table):
(org-agenda-prepare-buffers): Use new variable.
(org-set-regexps-and-options): Use new variable. Handle STARTUP early
so that "#+STARTUP: noptag" is taken into consideration.
* lisp/org-agenda.el (org-agenda-bulk-action): Use new variable.
* lisp/org-mobile.el (org-mobile-create-index-file): `org-tag-alist' is
no longer buffer-local.
* testing/lisp/test-org.el (test-org/set-regexps-and-options): Add
tests.
* lisp/org.el (org-tag-string-to-alist):
(org-tag-alist-to-string):
(org-tag-alist-to-groups): New functions.
(org-set-regexps-and-options): Use new functions.
(org--setup-process-tags): Remove function.
(org--setup-collect-keywords): Return tag groups as a string instead of
a list so as to be compatible with new functions.
* lisp/org-mobile.el (org-mobile-create-index-file): Use new functions.
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/tags): Use new
functions.
(pcomplete/org-mode/tag): Small refactoring.
* testing/lisp/test-org.el (test-org/tag-string-to-alist):
(test-org/tag-alist-to-string):
(test-org/tag-alist-to-groups): New tests.