* lisp/ox-html.el (org-html-format-list-item): Add the appropriate
class `on', `off' or `trans' (the tri-state checkbox types) to the
list elements in checkbox lists.
* org-agenda.el (org-agenda-mode): Disable `indent-tabs-mode'.
(org-agenda-dim-blocked-tasks): Make overlays intangible.
(org-agenda-show-new-time): Fix bug when deleting a timestamp
right after changing it.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)
(org-agenda-get-sexps, org-agenda-filter-by-regexp)
(org-agenda-filter-top-headline-apply): Fix indentation.
Thanks to Fletcher Charest and Nick Dokos for reporting issues
in this area.
There is one bug left: in a filtered agenda, changing a timestamp
will not always correctly display the warning. This happens when
the headline at point is followed by hidden headlines, because
`org-agenda-show-new-time' tries to set a text property at a
point where there is an overlay that hides then text. Because
the overlay is now intangible, the warning text will be displayed
too far on the right, and may be outside of the window.
* org-clock.el (org-clocktable-write-default): New parameter
":sort" to sort a column by a sorting type. E.g., a value of
:sort (1 . ?a) will sort the first column alphabetically. The
sorting line is the third one, table-wise, which is usually
the first line that contains user data.
* org.texi (The clock table): Document the new :sort
parameter.
* org.el (org-do-sort): Recognize [H]H:MM strings as time
values and allow sort-by-time to process them.
* org-table.el (org-table-sort-lines): Mention that sorting by
time also recognize [H]H:MM time values.
* lisp/ob-shell.el: added support to serialize vars as arrays or associative arrays as appropriate if it is using bash.
* testing/examples/ob-shell-test.org: a file containing a few code blocks both illustrating the use of arrays as well as serving as test for the new export functionality.
* testing/lisp/test-ob-shell.el: added a few unit tests that verify that this new logic only triggers for bash and no other shell at this time.
When variables are defined in a 'sh' code block, they are exported as strings. when the variable itself is an array or a table, then we simply get a shell variable that contains the list of all values in a non-structured form.
When calling the code block with bash, however, it will now export the list as an array, the table as an associative array. A scalar is exported the same way as before.
Signed-off-by: Pascal Fleury <fleury@google.com>
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* contrib/lisp/ox-groff.el (org-groff-link): "mailto" URI do not have
an authority part, we do not append "//".
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Append "//" after some link
types.
* lisp/ox-md.el (org-md-link):
* contrib/lisp/ox-groff.el (org-groff-link): Ditto. Also remove some
unused code, as search options are already stripped out link's path.
Since 3589f64e42, Org ignores "//" in
a link type so it has to be re-introduced upon exporting.
* lisp/org.el (org-make-target-link-regexp): Change regexp so
alphanumeric characters cannot be found next to a radio link.
(org-activate-target-links): Apply changes to radio link regexp.
* lisp/org-element.el (org-element--object-lex,
org-element-link-parser): Apply changes to radio link regexp.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
Update test.
Patch suggested by Daniel Clemente.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
* lisp/org-agenda.el (org-refile): Flip logic to allow instead of
prohibit the use of `org-refile' with the goto flat from non
org-mode buffers.
In commit 49da67d the condition was changed from only
`(unless goto ...)` to `(unless (and goto (listp arg)) ...)`
where the `and` condition is only true for non-empty lists, so that
calling `(org-refile t)` complains about not being inside an org-mode
buffer.
With this patch org-refile can be used (again) from anywhere when
passed the goto flag to jump to the chosen task.
TINYCHANGE
* lisp/ox-latex.el (org-latex-known-warnings): New variable.
(org-latex-known-errors): Remove variable.
(org-latex-compile): Report correctly when pdf file was not produced.
Catch all errors from process. Report some warnings.
(org-latex--collect-warnings): New function.
(org-latex--collect-errors): Remove function.
http://permalink.gmane.org/gmane.emacs.orgmode/77552
* lisp/org.el (org-make-link-regexps): Allow optional double slashes
after type. Small refactoring.
* testing/lisp/test-org-element.el (test-org-element/link-parser):
Update test.
This patch allows to write both [[file:/file.org]] and [[file:///file.org]].
See bug#16751.
* lisp/org.el (org-set-font-lock-defaults): Fix headline fontification
when keywords are stacked.
(org-toggle-comment): Properly toggle COMMENT keyword when a regular
keyword is already present.
(org-todo, org-agenda-prepare-buffers): Correctly match a commented
heading.
* lisp/org-colview.el (org-columns-capture-view): Correctly match
a commented heading.
* testing/lisp/test-org.el (test-org/toggle-comment): New test.
* lisp/ob-clojure.el (org-babel-expand-body:clojure): Don't handle
output here, since the result becomes double quoted with current
cider. Move to `org-babel-execute:clojure' instead.
(org-babel-execute:clojure): Use `nrepl-send-string-sync' instead
of `cider-eval-sync', which was removed.
* lisp/org-element.el (org-element-table-cell-parser,
org-element-table-cell-successor): Recognize cell even when last
vertical bar is missing.
* testing/lisp/test-org-element.el (test-org-element/table-cell-parser):
Add test.
Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84713
* lisp/ox-latex.el (org-latex-export-to-latex): Downcase the language
name when using minted highlighting for src block exports.
Minted, by convention, uses all lowercase names for languages. This
will handle mappings like "R" to "r" or "Python" to "python"
automatically. More complex renamings still need to be handled by
customizing `org-latex-minted-langs'.
Note that the `downcase' is only applied when using the "automatic"
name. Names in `org-latex-minted-langs' still need to be lower-case.
TINYCHANGE
* lisp/ox-latex.el (org-latex--inline-image): support a 'sideways
option for the float, and add case to handle it with a \sideaysfigure
in the export.
(org-latex--org-table): support "sideways" instead of deprecated
"sidewaystable". The latter is still handled for backward
compatibility.
* doc/org.texi (Tables in LaTeX export): Document use of :float
sideways.
(Images in LaTeX export): Document use of :float sideways.
This patch provides consistent :float sideways support for LaTeX
export of both figures and tables.
http://permalink.gmane.org/gmane.emacs.orgmode/84618
TINYCHANGE
* lisp/org.el (org-radio-target-regexp): Radio targets cannot begin or
end with whitespace.
(org-target-regexp): Update syntax according to previous rule.
(org-any-target-regexp): Fix fontification bug.
* testing/lisp/test-org-element.el (test-org-element/radio-target-parser):
Add test.
Variables are turned into defconst to emphasize the fact that they are
not subject to change.
Thanks to Daniel Clemente for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/84461
* lisp/org-element.el (org-element--cache-objects):
(org-element-context): Simplify structure of object cache.
This change avoids relying on buffer positions and artificial keys.
* ob-ocaml.el (org-babel-execute:ocaml): Capture the output, type, and
value when evaluating ocaml blocks. Return the one requested by
`results'.
(org-babel-ocaml-parse-output): Change the signature to take a type
and a value. Make the parsing of the type more robust.
* lisp/ox-publish.el (org-publish-find-title):
Fix (invalid-read-syntax "#").
Since 8e1386cead,
`org-element-interpret-data' no longer trims text properties attached
to strings. We need to remove them before writing the title into the
cache, as text properties are not readable.
* lisp/org-element.el (org-element-all-successors,
org-element-object-successor-alist): Remove variables.
(org-element-object-restrictions): Update value.
(org-element-bold-parser, org-element-code-parser,
org-element-entity-parser, org-element-export-snippet-parser,
org-element-footnote-reference-parser,
org-element-inline-babel-call-parser,
org-element-inline-src-block-parser, org-element-italic-parser,
org-element-latex-fragment-parser, org-element-line-break-parser,
org-element-link-parser, org-element-macro-parser,
org-element-radio-target-parser, org-element-statistics-cookie-parser,
org-element-strike-through-parser, org-element-subscript-parser,
org-element-superscript-parser, org-element-target-parser,
org-element-timestamp-parser, org-element-underline-parser,
org-element-verbatim-parser): Return nil when syntax at point is not
of the expected type.
(org-element-text-markup-successor,
org-element-latex-or-entity-successor,
org-element-export-snippet-successor,
org-element-footnote-reference-successor,
org-element-inline-babel-call-successor,
org-element-inline-src-block-successor,
org-element-line-break-successor, org-element-link-successor,
org-element-macro-successor, org-element-radio-target-successor,
org-element-statistics-cookie-successor,
org-element-sub/superscript-successor,
org-element-table-cell-successor, org-element-target-successor,
org-element-timestamp-successor,
org-element--get-next-object-candidates): Remove functions.
(org-element-timestamp-regexp, org-element--object-regexp): New
variables.
(org-element--object-lex): New function.
(org-element--parse-objects, org-element-context): Make use of new
tools.
This patch simplifies a lot object parsing and should improve
significantly `org-element-context''s speed.
http://permalink.gmane.org/gmane.emacs.orgmode/83872
* lisp/ox-html.el (org-html-htmlize-output-type): Add `nil'
option (no htmlization).
(org-html-fontify-code): Return plain text if
`org-html-htmlize-output-type' is `nil'.
* org-agenda.el (org-agenda-show-new-time): Don't use
`move-beginning-of-line' as it is slower and not needed.
Thanks to Matt Lundin for reporting this.
* lisp/ob-sh.el (org-babel-variable-assignments:sh): Check for
":hlines yes" and use header arg :hlines-string if
defined (default to "hline") and add this to the call of
`org-babel-sh-var-to-sh'.
(org-babel-sh-var-to-sh, org-babel-sh-var-to-string): Add additional
optional string argument `hline' and use it for the :hline parameter
in the call to `orgtbl-to-generic'.
* lisp/ob-lob.el (org-babel-lob-execute): Do not use defun subseq from
cl at runtime. Replace concatenation of sub-sequences by splicing
the modified params list into a copy of info (pre-must info be
preserved).
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars):
`org-babel-gnuplot-table-to-data´ expects a table, so we need to
construct one when Babel hands us a vector.
Thanks to Eric Fraga for reporting the bug.
http://permalink.gmane.org/gmane.emacs.orgmode/84072
* lisp/org.el (org-make-target-link-regexp): Allow radio links after
an apostrophe and mid-word. Small refactoring.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add
test.
See http://permalink.gmane.org/gmane.emacs.orgmode/84108.
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing):
Correctly extract filename.
This bug was introduced in 6062f9ea72.
Thanks to steckerhalter for reporting it.
* lisp/org.el (org-in-commented-heading-p): New function.
* lisp/ob-tangle.el (org-babel-under-commented-heading-p): Remove
function.
(org-babel-tangle-collect-blocks): Use new function.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Use new function.
* testing/lisp/test-org.el (test-org/in-commented-heading-p): New
test.
* lisp/org-element.el (org-element-all-successors,
org-element-object-restrictions): Prioritize `link' over other
successors in order to find radio links starting with another syntax
object (e.g., an entity). Also allow text markup within radio
targets.
(org-element-link-parser): Add contents to radio targets.
* lisp/org.el (org-make-target-link-regexp): Fix regexp so it can
match targets starting with an Org object (e.g., an entity).
(org-ctrl-c-ctrl-c): Fix function when applied on an object contained
within a radio target.
* testing/lisp/test-org-element.el (test-org-element/radio-target-parser): Add test.
* testing/lisp/test-ox.el (test-org-export/resolve-radio-link): Add test.
* lisp/org.el (org-mode): Change "\" and "~" characters syntax from
`punctuation' to `symbol' so they are on par with other characters used
in Org syntax (e.g., "/", "*"...).
This change is needed to correctly find radio links starting with an
entity:
<<<\alpha-test>>> \alpha-test
* lisp/ox-beamer.el (org-beamer-publish-to-pdf):
* lisp/ox-latex.el (org-latex-publish-to-pdf): Ensure ".tex" file is
generated in the same directory as the ".org" file.
Thanks to Rafael for reporting it. See
http://permalink.gmane.org/gmane.emacs.orgmode/84095.
* lisp/ox-latex.el (org-latex-headline): Hard-code "\underline" in
sections because "\uline" ("ulem" package) returns an error and
"\ul" ("soul" package) doesn't support chinese characters.
See http://permalink.gmane.org/gmane.emacs.orgmode/83962 for the
related thread.
* org-src.el (org-edit-src-exit): Place an undo boundary before
writing changes back to parent buffer.
The previous code attempted to preserve the undo information in the
indirect buffer editing the source code, but this interacts poorly
with the undo system, and can lead to undo operations scrambling the
buffer. The new approach means that edits made in the indirect buffer
cannot be undone piece-by-piece (instead, all changes made in the
indirect buffer constitute one “change” from the point of view of
undo), but the misbehavior of undo is (hopefully) now avoided.
* ox-latex.el (org-latex-text-markup-alist): Use \ul{...} for
underlining instead of \uline{...} as requiring the hyperref
package makes \uline{...} unusable on headline.
* org.el (org-latex-default-packages-alist): Add the "soul"
package.
Thanks to Konstantin Kliakhandler for reporting this.
* lisp/org.el (org-open-at-point): Correctly open fuzzy links when
path is hexified.
* testing/lisp/test-org.el (test-org/coderef): New test.
(test-org/fuzzy-links): Add test.
* org.el (org-refresh-properties): Don't add the property to
the whole subtree, only to the part between the beginning of
the headline and the end of the "content", before any other
headline. This fix a bug about properties displayed as
inherited in the agenda, where Org properties are checked
against text properties.
Thanks to Sébastien Vauban for reporting this.
* org-agenda.el (org-agenda-filter-hide-line): Hide from the
beginning of the line to the beginning of the next line.
(org-agenda-show-new-time): Use `move-beginning-of-line' and
`move-end-of-line'.
(org-agenda-drag-line-forward): Adapt to the new definition of
hidden filtered lines.
Thanks to Igor Sosa Mayor for reporting this bug and to Nick Dokos
and Matt Lundin for providing further information.
* org-compat.el (org-move-to-column): Always ignore invisible
text in agenda buffer, and when there is both a bracket link
and '(org-link) as a member of `buffer-invisibility-spec'.
Add a docstring.
* org.el (org-align-tags-here): Add docstring and remove
useless arguments when calling `org-move-to-column'.
* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row):
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-todo)
(org-agenda-priority, org-agenda-show-new-time)
(org-agenda-clock-in, org-agenda-clock-out): Remove useless
arguments when calling `org-move-to-column'.
This fixes the issue about S-RET not placing the cursor in the right
table field when M-x org-toggle-link-display RET removed '(org-link)
from `buffer-invisibility-spec' and some other discrepancies (like
S-M-<up> not restoring point correctly when there is a bracket link
before point, or M-x org-clock-display RET not aligning overlays
correctly, etc.
Thanks to Matt Lundin and Michael Brand for tracking issues
about this.
* lisp/ob-core.el (org-babel-exp-reference-buffer): New variable, as
a replacement for `org-current-export-file'.
(org-babel-check-confirm-evaluate): Use new variable.
* lisp/ob-exp.el (org-babel-exp-in-export-file): Use new variable.
(org-babel-exp-get-export-buffer): Remove function.
(org-babel-exp-process-buffer): Change signature.
* lisp/ob-ref.el (org-babel-ref-resolve): Use new variable during
export in order to properly resolve references.
* lisp/ox.el (org-export-execute-babel-code): Use new variable.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
Remove a cond branch as it is always
false (`org-current-export-file' couldn't be a string).
* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines): Update
test.
* testing/lisp/test-ob.el (test-ob/eval-header-argument): Update test.
* testing/lisp/test-ob-exp.el (ob-export/reference-in-post-header):
New test.
During export, Babel executes sequentially all blocks in the buffer
being exported. This can lead to modifications preventing some
references from being resolved. As a workaround, Babel stores
a pristine copy of the buffer in a variable so it can always find
needed references.
Before this patch, the variable storing this copy was
`org-current-export-file' and was dynamically bound in "ox.el". It
was used to resolve noweb references (`org-babel-expand-noweb-references')
but not regular references (`org-babel-ref-resolve').
Now, the variable is `org-babel-exp-reference-buffer' and it is bound
from `org-babel-exp-process-buffer'. It is used to resolve all
references. In particular, this allows to use references in :post
header.
Thanks to Jarmo Hurri for reporting it.
* org.el (org-refile): Rename first argument to arg, as its
use goes beyond is now more general. Only keep bracket links
descriptions in the displayed heading. Enhance docstring.
* org-clock.el (org-clock-get-table-data): When :link is `t'
in the clocktable parameters, bracket links in the clocktable
should only contain their description, other C-c C-o will try
to open the bracket link at point instead of the headline.
Thanks to Alexey Lebedeff for providing a preliminary patch for this.
* lisp/org-capture.el (org-capture-place-table-line): If the value of
`:table-line-pos' is a function name, used its return value to set the
position inside the table. The return value must be a string like
"II-3". Else `:table-line-pos' is 'eval'ed.
TINYCHANGE
* org-agenda.el (org-agenda-todo): Always restore the window
state after `org-agenda-change-all-lines' has been called.
`org-agenda-change-all-lines' is narrowing to the line it needs to
update. In the narrowed state, `org-agenda-finalize' is called,
which may lead to a change in the way the window is displayed. We
use `save-window-excursion' to ensure the window state is restored
correctly.
Thanks to Francesco Pizzolante for reporting this with a
detailed recipe.
* org-agenda.el (org-agenda-open-link): Don't throw an error
when trying to open a link when the point is on a place that
is not associated with a buffer.
* org-attach.el (org-attach-sync, org-attach-file-list): Allow
to attach files starting with a dot.
Thanks to Oleh for requesting this and providing a patch.
* org.el (org-entry-get): Only try to combine file properties
with local properties when the property drawer contains such
local property, not when the property drawer exists.
Before the fix, `org-entry-get' behavior was inconsistent,
returning `nil' when looking for a property in a subtree with
no property drawer, and returning the global properties in a
subtree with a property drawer, independantly of whether this
property drawer contained a reference to the property we are checking
against or not.
As a side-effect, inheritance was broken for the case that
Ilya reported in commit 475f2f53, because `org-entry-get' returned
a value (with the global properties of the file) too early.
Thanks to Ilya for raising this bug and to Achim for pointing
out that the previous fix was wrong.
* lisp/org-element.el (org-element-link-parser): "radio" links have
their path downcased to avoid introducing case mismatch with their
relative radio target. With this change it is also necessary to add
contents to them, since `:path' property no longer matches real
value of the link.
(org-element-radio-target-parser): Downcase value as explained above.
Store the initial value in a new `:raw-value' property.
* ox-latex.el (org-latex-link):
* ox-html.el (org-html-link):
* ox-beamer.el (org-beamer-link): Fix links to radio targets.
* ox-ascii.el (org-ascii-link): For links to a radio target,
use the link, not the target.
Thanks to Noah Slater for reporting this.
* org.el (org-store-link): Check `dired-mode' through
`derived-mode-p' to allow storing links from derived modes
like `sr-mode'.
Thanks to Thomas Holst for the idea.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Skip code under
a commented headline.
* testing/lisp/test-ob-exp.el (ob-export/export-under-commented-headline):
New test.
* lisp/org.el (org-open-at-point): Unescape optional part in file
links.
This patch allows to handle properly links like:
[[file:somefile.org::*headline%20with%20spaces]]
Thanks to Thomas Holst for reporting it.
* org-timer.el (org-timer-cancel-timer, org-timer-stop):
Enhance message.
(org-timer-set-timer): Use the number of minutes in the Effort
property as the default timer value. Three prefix arguments
will ignore the Effort value property.
* lisp/org-agenda.el (org-agenda-get-scheduled): If
`org-agenda-skip-scheduled-if-deadline-is-shown' is set to
'repeated-after-deadline, still show tasks without any deadline
The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task. This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.
TINYCHANGE
* lisp/org.el (org-entry-get-with-inheritance): Temporarily
let-bind `org-file-properties', `org-global-properties' and
`org-global-properties-fixed' to nil before calling `org-entry-get'
on entries up the hierarchy from the queried entry.
Problem was that when org-entry-get-with-inheritance went up the
hierarchy of entries from a given entry, checking whether the property
has been set in any of the entries, it was calling org-entry-get,
which always looks at file-scope and global-scope properties. So if
our property was set file-wide or system-wide, and somewhere up the
hierarchy there was an entry which set some properties _other_ than
the one we're looking up but did not set ours, org-entry-get would
fill in the global property value and report that our property was in
fact set in that entry. The search would stop, and if the property
was actually set further up the hierarchy (which should override
file-wide or system-wide settings), we would never get to that
up-the-hierarchy setting.
Illustration of fixed problem:
#+PROPERTY: myprop aaa
* headline A
:PROPERTIES:
:myprop: bbb
:END:
*** headline B
:PROPERTIES:
:otherprop: ccc
:END:
#+BEGIN_SRC emacs-lisp
(message (org-entry-get-with-inheritance "myprop"))
#+END_SRC
#+RESULTS:
: aaa
Result should be bbb, which it is after the fix.
* org.el (org-store-link): Fall back on an empty string when
no description is available.
This fixes a bug about tangling a source block outside of any
subtree when `org-id-link-to-org-use-id' is `t'.
Thanks to Sean Allred for reporting this.
* lisp/org-plot.el (org-plot-quote-tsv-field): Dump data as is when
`timeind' is set.
* lisp/org-plot.el (org-plot/gnuplot): By-pass type checking when
either `textind' or `timeind' is set.
The current org-plot relies on `org-table-number-regexp' and
`org-ts-regexp3' to check the index type. However, we already have
`timeind' to indicate that the index is the datatype of date/time.
By-pass the type checking in `org-plot/gnuplot' when either `textind'
or `timeind' is set. The whole point of the check is to determine the
type. We do not need that when we already know.
Also dump the date/time data with `org-plot-quote-tsv-field' as is,
without double quotes, when `timeind' is set. So that we can use
`timefmt' to read what we have. Currently we do not have a good way
to specify `timefmt' with the double quotes.
TINYCHANGE
* org.el (org-refresh-category-properties)
(org-complete-expand-structure-template)
(org-buffer-property-keys, org-context):
* org-mouse.el (org-mouse-context-menu):
* org-list.el (org-list-send-list):
* org-element.el (org-element--list-struct):
* org-archive.el (org-all-archive-files): Allow spaces before
any option keyword.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix
fontification of all option keywords.
Thanks to Alan Schmitt for raising the problem with fontification.
* org-capture.el (org-capture-finalize): Ensure to widen the
buffer when the target buffer is not initially narrowed.
Thanks to Adam Spiers and Thomas Proschinger for reporting this bug.
* org-capture.el (org-capture-finalize): Ensure to widen the
buffer when the target buffer is not initially narrowed.
Thanks to Adam Spiers and Thomas Proschinger for reporting this bug.
* lisp/org-archive.el (org-get-local-archive-location): Ignore
identation for ARCHIVE keywords.
* lisp/org-colview.el (org-columns-store-format): Ignore indentation
for COLUMNS keywords.
* lisp/org.el (org-mode): Keywords can start at any column.
(org-reftex-citation): Ignore indentation for BIBLIOGRAPHY keywords.
(org-make-options-regexp): Ignore indentation for all keywords.
* org-compat.el (org-move-to-column): Fix bug about ignoring
bracket links visibility status in tables with S-RET.
Thanks to Michael Brand for reporting this.
* org.el (org-delete-property): Don't suggest to delete the
CATEGORY property when the category is not explicitely set in
the property drawer. Also enforce matching when completing.
Thanks to Oleh for providing a preliminary patch for this.
* org.el (org-insert-heading): Fix regression: with two
universal prefixes, insert heading at the end of the subtree.
(org-insert-todo-heading): Bugfix: only enforce the first TODO
state when arg is '(4).
* lisp/org-element.el (org-element--cache-put): Do not store objects
within headlines in cache as headlines are not cached, and,
therefore, never removed. This prevents adding the same object in
cache multiple times without ever garbage collecting it.
* lisp/org-element.el (org-element-context): Fix parsing of bold
objects at the beginning of a headline.
* testing/lisp/test-org-element.el (test-org-element/context): Add
test.
* lisp/org-capture.el (org-capture-goto-last-stored): Use
`org-bookmark-names-plist'.
* lisp/org.el (org-refile-goto-last-stored): Use
`org-bookmark-names-plist'.
* lisp/org.el (org-open-at-point): Open "docview"-type links
correctly, i.e., without adding "file+" first.
(org-open-file-with-system, org-open-file-with-emacs): Change
signature. Deprecate functions.
* lisp/org-docview.el (org-docview-open): Open file even when no file
number is specified.
This change removes "file+emacs" and "file+sys" types from
`org-link-protocols', since they are not hard-coded in
`org-open-at-point'.
* org.el (org-emphasis-alist): Use `org-verbatim' for =text=
and `org-code' for ~text~.
* org.texi (Emphasis and monospace): Document the use of
=verbatim= and ~code~ to be consistent with
`org-element-text-markup-successor'.
Thanks to Yasushi for reporting this.
* ob-clojure.el (org-babel-execute:clojure): Don't use
`cider-current-ns' to set the current namespace.
Thanks to Volker Strobel for reporting this issue.
* lisp/org.el (org-open-at-point): White spaces after an object are
usually ignored by the function. Though, when point is right after
the object, still activate it.
* testing/lisp/test-org.el (test-org/custom-id): Fix test.
* lisp/org.el (org-open-at-point): On an unsupported object nested
within another object, try to open the parent object.
This should correctly open the following link, with point on the
verbatim object:
[[http://orgmode.org][=verbatim=]]
* lisp/org.el (org-open-at-point): Do not do anything when point is on
white spaces after an object.
* testing/lisp/test-org.el (test-org/custom-id): Modify test.
* lisp/ox-beamer.el (org-beamer-item): Insert the export snippet right
after the first \item, not all of them.
Thanks to Andreas Leha for reporting it.
* lisp/org-bibtex.el (org-bibtex-read): Check string length before
using aref.
If a field in a bibtex entry is empty:
@article(test,
description = "")
the function org-bibtex-read throws an exception because of
using aref on this empty string.
The solution is to check the length of the string before.
TINYCHANGE
Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
* lisp/org.el (org-open-at-point): Allow options when using
applications in links with options.
(org-open-file-with-system, org-open-file-with-emacs): Change
signature to be compatible with `org-open-file'
* lisp/org.el (org-open-at-point): Rewrite function using Element
parser.
(org-link-types): Add "help" type.
* testing/lisp/test-org-open-at-point.el: Remove file. Two tests are
not supported anymore (namely bracket-link-before and
plain-link-before) and the other tests are wrong (mixing id and
custom-id links).
* testing/examples/open-at-point.org: Remove file.
* testing/lisp/test-org.el (test-org/custom-id): Add test.
Unlike to the previous implementation, this one will only open links
under point or just before point, not links on the same line but
before point.
* lisp/org-element.el (org-element-context): If function is called at
the end of buffer, return any object that ends there.
* testing/lisp/test-org-element.el (test-org-element/context): Add
test.
* lisp/ox-latex.el (org-latex-custom-id-as-label): New variable.
(org-latex-headline): Optionally generate label keys based on
CUSTOM_ID, depending on value of :latex-custom-id-labels option
(org-latex-link): Optionally generate refs based on CUSTOM_ID,
depending on value of :latex-custom-id-labels option.
This change was discussed in the following thread:
http://thread.gmane.org/gmane.emacs.orgmode/82392
* lisp/org-element.el (org-element--parse-to): Fix cache parsing when
the next element to shift is at the contents beginning of its
parent. Refactor function.
* lisp/org-element.el (org-element-cache-sync-idle-time): Change
default value.
(org-element-cache-sync-duration, org-element-cache-sync-break,
org-element--cache-sync-requests, org-element--cache-sync-timer,
org-element--cache-sync-keys, org-element--cache-default-key,
org-element--cache-change-warning): New variables.
(org-element-cache-merge-changes-threshold,
org-element--cache-status): Removed variables.
(org-element--cache-key, org-element--cache-generate-key,
org-element--cache-key-less-p, org-element--cache-find,
org-element--cache-set-timer, org-element--cache-process-request,
org-element--cache-submit-request, org-element--parse-to,
org-element--cache-interrupt-p, org-element--cache-put,
org-element--cache-active-p): New functions.
(org-element--cache-compare): Adapt to new keys in AVL tree.
(org-element--cache-pending-changes-p,
org-element--cache-cancel-changes, org-element--cache-mapc,
org-element-cache-get, org-element-cache-put): Removed functions.
(org-element--cache-before-change): Use new variables.
(org-element--cache-after-change): Renamed from
`org-element--cache-record-change'.
(org-element-cache-get): Change signature.
(org-element-cache-put): Rewrite function. Use new tools.
(org-element-cache-reset): Adapt to new variables.
(org-element--cache-sync): Rewrite function.
* lisp/ox.el (org-export--generate-copy-script): Do not copy through
new cache-related variables.
(org-export-ignored-local-variables): New variable.
* testing/lisp/test-org-element.el (test-org-element/cache): New test.
Now only the part of the cache that needs to be accessed is updated
synchronously. Otherwise, it happens on idle time.
* lisp/org.el (org-link-escape-chars): Extend docstring.
(org-link-escape-chars-browser): Mention in docstring that it will
become a candidate for removal.
(org-link-escape-browser): Mention in docstring that it will become a
candidate for removal.
(org-open-at-point): Move `url-encode-url' and comments into
`org-link-escape-browser'.
* lisp/ox-html.el (org-html-link): Make use of
`org-link-escape-browser' like `org-open-at-point'.
* testing/lisp/test-org.el (test-org/org-link-escape-chars-browser):
Mention in docstring that it will become a candidate for removal.
* lisp/org-element.el (org-element-inlinetask-parser): Fix parsing
when regular and degenerate inlinetasks are mixed in the section.
* testing/lisp/test-org-element.el (test-org-element/inlinetask-parser):
Add tests.
Thanks to Anders Johansson for reporting it.
* org-colview.el (org-columns-display-here): Fix the column
view for numbers with a format specifier (e.g. {+; %5.1f}).
Thanks to OSiUX and Michael Brand for reporting this.
* lisp/ob-shell.el (org-babel-execute:shell): Pass the cmdline header
argument to `org-babel-sh-evaluate'.
(org-babel-sh-evaluate): Pass the cmdline header argument to
`call-process-shell-command'.
* org-src.el (org-edit-src-code): Throw a warning instead of
an error when loading the mode fails, otherwise the user is
left with unusable buffers.
Thanks to Florian Beck for suggesting this.
* lisp/org-element.el (org-element-normalize-contents): Do not ignore
empty lines when an object follows.
* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
Add test.
* ob-core.el (org-babel-insert-result): Use `org-babel-examplify-region'.
(org-babel-capitalize-examplize-region-markers): Rename to
`org-babel-capitalize-example-region-markers'.
(org-babel-examplize-region): Mark obsolete and rename to
`org-babel-examplify-region'.
* lisp/org.el (org-toggle-fixed-width): New function.
* testing/lisp/test-org.el (test-org/toggle-fixed-with): New test.
This replaces the old implementation removed in commit
6a00c96541.
* org-table.el (org-table-copy-down)
(org-table-find-dataline, org-table-move-row)
(org-table-insert-hline, org-table-kill-row): Use
`org-move-to-column' with the IGNORE-INVISIBLE arg set to `t',
so that abbreviated rows don't interfer with setting the
cursor back at the correct position.
Thanks to Jason Lewis for reporting one of these bugs.
* lisp/org.el (org-hide-macro-markers): new option
(org-fontify-macros): new function
(org-set-font-lock-defaults): call `org-fontify-macros'
* doc/org.texi: Document user option `org-hide-macro-markers'
TINYCHANGE
* org-agenda.el (org-agenda-find-same-or-today-or-agenda): Use
`org-agenda-backward-block'.
(org-agenda-backward-block): Renamed and rewritten from
`org-agenda-goto-block-beginning'.
(org-agenda-forward-block): New command.
(org-agenda-mode-map): Remap `backward-paragraph' and
`forward-paragraph' to `org-agenda-backward-block' and
`org-agenda-forward-block' respectively.
Thanks to Bart Bunting for raising this.
* lisp/org-element.el (org-element-interpret-data): Do not remove
properties by side-effect when interpreting a string, as it also
removes them from the parse tree, making the string unusable without
its :parent property.
If text properties get in the way, it is also possible to use
`substring-no-properties' but then, a compatibility function would be
required for XEmacs.
* lisp/ob-exp.el (org-babel-exp-process-buffer): Also check
`org-src-preserve-indentation' to know when to preserve indentation.
* testing/lisp/test-ob-exp.el (ob-export/export-and-indentation): New
test.
Thanks to John Hendy for reporting it.
* ob-clojure.el (org-babel-execute:clojure): Use
`org-babel-result-cond' to create the correct output.
Thanks to Soapy Smith who reported this and to Eric Schulte for providing the fix.
* lisp/ob-exp.el (org-babel-exp-code-template): Include switches in
template.
(org-babel-exp-code): Provide %switches placeholder.
* testing/lisp/test-ob-exp.el (ob-export/export-src-block-with-switches):
New test.
(ob-export/export-src-block-with-flags): Fix indentation.
This fixes dde6af3a62. The confusion
came from the fact that "flags" placeholder had two meanings:
the :flags value and the block's switches (e.g., "-n"). This patch
separates these two meanings.
* lisp/org-element.el (org-element-quote-section-parser,
org-element-quote-section-interpreter): Remove functions.
(org-element--current-element, org-element--parse-elements): Do not
handle quote sections at all.
* testing/lisp/test-org-element.el (test-org-element/quote-section-parser):
Remove test.
* lisp/ob-R.el (org-babel-expand-body:R): Added the opening of the
tryCatch() wrapper
* lisp/ob-R.el (org-babel-R-construct-graphics-device-call): Added
closing of the wrapper containing the error function.
Added tryCatch() wrapper around the execution of the source block so
that if an error occurs
- the R graphic device is closed even when an error occurs
- a graph containing the error message is created
- the error message is printed in the R session in the form
ERROR : the error message
TINYCHANGE
* lisp/ox-latex.el (org-latex-plain-list): Do not automatically
enclose value for :options attribute within square brackets.
Instead, append them verbatim next to the block name, as special
blocks do.
* doc/org.texi (@LaTeX{} specific attributes): Update manual.
* lisp/ob-ref.el (org-babel-ref-parse): If
`org-babel-current-src-block-location' is a marker, it can be from
another buffer, use marker-position instead in this case.
Introduced with r114064 on Emacs trunk. Not sure if this is a bug in
Org or Emacs, but the patch restores the previous behaviour.
* lisp/ox-beamer.el: Be more cautious about the order in which options
are defined, at this order will be the same when creating an export
template (see `org-export-insert-default-template').
* lisp/ox-html.el: Ditto.
* lisp/ox-latex.el: Ditto.
* lisp/ox.el: Ditto.
* lisp/ox.el (org-export-insert-default-template): Do not hard-code
alphabetical order for keywords in templates. Instead, follow order
specified in back-ends or `org-export-options-alist' for the default
case.
* org-compat.el (org-set-transient-map): Alias pointing at
`set-transient-map' if defined, at `set-temporary-overlay-map'
otherwise.
Thanks to Eric Abrahamsen for reporting this.
* lisp/org-element.el (org-element--cache-mapc): New function.
(org-element--cache-sync): Use new function.
`avl-tree-mapc' exists in Emacs 24's "avl-tree" but not in Emacs
23's. The new function implements it.
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-toggle-archive-tag)
(org-agenda-todo, org-agenda-priority, org-agenda-clock-in)
(org-agenda-clock-out): Put the cursor back on the correct
column, when possible.
(org-agenda-todo): When `org-clock-out-when-done' is `t', also
remove the current clock overlay.
* lisp/org-element.el (org-element--cache-sync): Call
`avl-tree-delete' with 2 arguments only as a 4-arguments call is
only compatible with Emacs 24.1 and later.
* org.el (org-provide-todo-statistics): Allow to set to a list
of two lists, one with TODO keywords, the other one with DONE
keywords.
(org-update-parent-todo-statistics): Correctly handle
`org-provide-todo-statistics' when it is set as a list of two
lists, for TODO and DONE keywords.
Thanks to Fletcher Charest for reporting this and requesting
this feature.
* org.el (org-insert-all-links): New parameters `pre' and
`post' to specify a string to preprend and append.
(org-insert-last-stored-link): New command.
(org-mode-map): Bind the new command to `C-c M-l'.
Thanks to Sébastien Vauban for requesting this and to Nick
Dokos for testing and fixing the patch.
* lisp/ob-exp.el (org-babel-exp-code): Fix export of src blocks with
flags.
* testing/lisp/test-ob-exp.el (ob-export/export-src-block-with-flags):
New test.
Thanks to Giuseppe Lipari for reporting it.
* org.el (org-outline-overlay-data): Set the insertion-type of end
bound marker of the function to t (means marker advances when you
insert text at it)
This is to conserve outline visibility property when changes are made
at the end bound of the data.
For example: try `org-babel-execute-subtree' on a folded outline:
The new result will be shown after the folded part of the outline
whereas the outline body should not be visible.
TINYCHANGE