* lisp/org-element.el (org-element-headline-interpreter): Take into
consideration `org-odd-levels-only' when building a headline.
* lisp/ox-org.el (org-org-headline): Correctly set transcoded headline
level during subtree export.
* org-capture.el (org-capture): Store :return-to-wconf
earlier.
(org-capture-place-template): Don't store :return-to-wconf
when called from a capture template using `function', rely on
the early :return-to-wconf value store from `org-capture'.
Thanks to Brett Viren for raising this issue.
* org-agenda.el (org-agenda-show-new-time): Ignore invisible
text when inserting the new time as a text property.
* org-compat.el (org-move-to-column): New argument
`ignore-invisible' to turn on `buffer-invisibility-spec'.
Thanks to Marcin Borkowski and Karl Voit for reporting this.
* org-agenda.el (org-agenda-filter-make-matcher): When
filtering tags and hitting space, filter out entries with
tags, only keep those without tags.
Thanks to Serguei Son for reporting this regression.
* ox-odt.el (org-odt-table-style-format): Use %s for inserting
the rel-width property as a string.
(org-odt-template): Fall back on a string for :rel-width.
Thanks to Derek Feichtinger for reporting this bug.
* org.el (org-directory, org-default-notes-file)
(org-reverse-note-order): Don't use the `org-remember'
customization group.
(org-require-autoloaded-modules): Don't require
`org-remember'.
* org-capture.el: Update commentary section to reflect the
fact that org-remember.el is not used anymore.
* org.el (org-open-file): Reveal context around point when
opening a link to an Org file with a line number.
Thanks to François Pinard for suggesting this.
* org-agenda.el (org-agenda-drag-line-forward)
(org-agenda-drag-line-backward): Fix bugs: don't drag lines
without text and don't drag lines before/after hidden lines.
Thanks to Thomas Morgan for reporting bugs in this area.
* lisp/org.el (org-insert-comment, org-comment-or-uncomment-region):
Use `org-element-at-point' instead of `org-in-src-block-p' to check
if we're within a source block.
* testing/lisp/test-org.el: Add test.
* lisp/org.el (org-set-tags): Width of strings presenting on a buffer
should be calculated with `string-width' instead of `length'.
This fixes unaligned tags for the languages with multi-width
characters.
TINYCHANGE
* org.el (org-sort-entries): Mention the
`org-after-sorting-entries-or-items-hook' hook in the
docstring.
Thanks to Andreas Röhler for suggesting this.
* lisp/org.el (org-insert-comment, org-comment-or-uncomment-region):
use the relevant language’s major mode comment function if called from
within a source block.
This patch makes it easier to (un)comment lines of babel source. Now
M-; in a soucre code block should Just Work.
The modification to ‘org-insert-comment’ also fixes a bug, whereby the
function would eat blank lines after it. The first block, where ! is
the point, would lead to the second instead of the third:
#+name: orig
#+begin_src org
xxxxxxx
!
yyyyyy
#+end_src
#+name: bad
#+begin_src org
xxxxxxx
#
yyyyyy
#+end_src
#+name: desired
#+begin_src org
xxxxxxx
#
yyyyyy
#+end_src
Also, the ‘org-comment-or-uncomment-region’ change results in an
undesirably move of the point after the comment is created. This is
because ‘comment-region’ wraps the call to ‘comment-region-function’
in a ‘save-excursion’. The org mode code deletes and reinserts the
whole babel block, which confuses save-excursion. Org carefully puts
the point back in the proper place, but comment-region’s
save-excursion then substitutes its own erroneous placement.
* org.el (org-babel-load-file): Set `exported-file' correctly,
in case the file as been tangled using a buffer-local value.
* ob-tangle.el (org-babel-tangle-file): Return the list of
tangled files.
Thanks to Sam Flint for reporting this.
* lisp/ox.el (org-export-insert-default-template): Make sure strings
are properly quoted when inserting a template. Specifically,
default value for drawers should be d:(not "LOGBOOK"), not d:(not
LOGBOOK).
* lisp/org.el (org-flag-drawer): Rewrite function using Elements.
Also prevents flagging drawers within example blocks.
* testing/lisp/test-org.el (test-org/flag-drawer): Add test.
* lisp/org.el (org-display-inline-images): Modify link regular
expression to match images in description part. Update doc string to
explain link behavior.
* lisp/ob-tangle.el: (org-babel-tangle): don’t move point when called
with single prefix arg
Previously, C-u C-x C-v C-t would move point to the head of the source block.
* lisp/ox.el (org-export-table-cell-starts-colgroup-p,
org-export-table-cell-ends-colgroup-p,
org-export-table-row-starts-rowgroup-p,
org-export-table-row-ends-rowgroup-p): fix swapage of "row" and
"column" in the docstrings for these functions
* lisp/ob-core.el (org-every): Declared function for compiler.
(org-babel-safe-header-args): Moved before first use.
(org-babel-header-args-safe-fn): Moved before first use.
* lisp/ob-comint.el (org-babel-comint-in-buffer): don’t add to
comint-input-ring
Previously, babel code would be added to the comint input ring of a
babel session, making interactive use of the session difficult: one
had to page through the babel generated commands when browsing the
comint history with M-p/M-n. The session repl’s history should just
contain commands the user has specifically entered in the repl buffer,
and not those which are fed in from org mode. So, we bind
‘comint-input-filter’ to a function that always returns nil in the
‘org-babel-comint-in-buffer’ macro, to avoid any additions to the
input ring while executing code from babel.
* lisp/ob-comint.el (org-babel-comint-with-output,
org-babel-comint-in-buffer): clean up code.
This patch replaces some deeply nested ca/dr calls with ‘nth’, and
replaces a setq/unwind-protect/setq incantation with a simple let
binding. Finally, it also restructures ’org-babel-comint-in-buffer’
to not needlessly save/restore match and excursion data if the buffer
process is not live, and to use with-current-buffer instead of
save-excursion+set-buffer
(info "(elisp) Excursions")
* lisp/ox-latex.el (org-latex-listings): Don't quote const value.
Quoting it would set `org-export-latex' not to `minted' but `(quote
minted)' and thus breaking the export.
Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
* lisp/ox-latex.el (org-latex--translate): New function.
(org-latex-longtable-continued-on)
org-latex-longtable-continued-from): Remove variables.
(org-latex-table-row): Use new function.
* lisp/ox.el (org-export-dictionary): Add entries relative to
longtables. Fix some other entries.
* lisp/org.el (org-insert-heading): Do not error out when inserting is
to be done at one of the buffer's boundaries.
* testing/lisp/test-org.el: Add tests.
* lisp/org.el (org-insert-todo-heading-respect-content): Pass correct
prefix arg to always insert heading.
TINYCHANGE
This function used a second argument t, which is eventually passed to
org-insert-heading, adding a list item when inside a plain list. Use
the proper argument '(4) now, to always create a heading, just like
the function's name and documentation imply.
* 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.
* lisp/org.el (org-indent-region): BEGIN_SRC and END_SRC lines should
not be considered part of the source block for the purposes of
indentation.
TINYCHANGE
* lisp/ox-latex.el (org-latex-table-row): Implements the \endfirsthead
command so the caption only appears once, at the top of the table.
Subsequent pages of the table start with "Continued from previous
page".
* lisp/org-element.el (org-element-latex-or-entity-successor,
org-element-latex-fragment-parser): Use `org-latex-regexps' instead
of `org-format-latex-options'.
* testing/lisp/test-org-element.el: Fix tests.
`org-latex-regexps' defines the correct syntax for LaTeX code within
an Org buffer. On the other hand, `org-format-latex-options'
determines which syntax can be previewed within the buffer.
* lisp/ox-odt.el (org-odt-line-break, org-odt-plain-text): Remove
newline after line-break tag.
The exporter was pretty-printing the ODT XML with newlines after
forced line breaks, but LibreOffice would interpret those as
spaces. This led to a leading space after every manual line break.
* lisp/ob-ruby.el (org-babel-ruby-evaluate):
set conf.echo=false for the duration of evaluation.
* testing/lisp/test-ob-ruby.el (test-ob-ruby/session-output): new test.
* lisp/org-element.el (org-element-babel-call-parser,
org-element-inline-babel-call-parser): Do not call
`org-babel-lob-get-info' since it is out of parser's scope.
(org-element-babel-call-interpreter,
org-element-inline-babel-call-interpreter): Apply changes to parsers.
* lisp/ox-ascii.el: Remove comments at the beginning of the file since
the library is documented in Org manual.
* lisp/ox-beamer.el: Remove comments at the beginning of the file since
the library is documented in Org manual.
* lisp/ox-html.el: Remove comments at the beginning of the file since
the library is documented in Org manual.
* lisp/ox-icalendar.el: Remove comments at the beginning of the file since
the library is documented in Org manual.
* lisp/ox-md.el: Remove comments at the beginning of the file since
the library is documented in Org manual.
* lisp/ob-tangle.el (org-babel-under-commented-heading-p): Check if
the point is under a commented heading (including parents).
(org-babel-tangle-collect-blocks): Don't tangle blocks is under a
commented heading (including parents).
* lisp/org-element.el (org-element-center-block-parser,
org-element-drawer-parser, org-element-dynamic-block-parser,
org-element-item-parser, org-element-quote-block-parser,
org-element-comment-block-parser, org-element-export-block-parser,
org-element-verse-block-parser, org-element-special-block-parser,
org-element-example-block-parser, org-element-headline-parser,
org-element-inlinetask-parser): Remove :hiddenp property.
* lisp/org.el (org-end-of-line, org-down-element): Use an equivalent
of :hiddenp property.
* testing/lisp/test-org-element.el: Remove tests.
The property is removed because it is buggy (e.g., when there's a link
just after a block opening line) and not really useful.
* lisp/org.el (org-link-escape-chars): Add comment with escape numbers
alphabetically ordered.
(org-link-escape-chars-browser): Add comment with escape numbers.
(org-link-escape): Use better readable char constant instead of number
constant for percent char.
(org-link-escape-browser): New function to substitute duplicate source
code.
(org-open-at-point): Substitute duplicate source code.
* testing/README: Make comment in source code example clearer.
* testing/lisp/test-org.el (test-org/org-link-escape-chars-browser):
Change URL to real use case and use the new function
`org-link-escape-browser'.
Always call org-confirm-babel-evaluate from the head of the code
block being evaluated so that the info may be found with
e.g., (org-babel-get-src-block-info 'light)
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Call
org-confirm-babel-evaluate from code block head.
* lisp/ob-tangle.el (org-babel-tangle-use-relative-file-links):
Controls the use of relative paths in files and links in tangled
source code.
(org-babel-spec-to-string): Optionally use relative paths in files
and links.
* lisp/ob-core.el (org-babel-insert-header-arg): Optional arguments
for usage from Emacs Lisp programs. In addition this function will
now insert header arguments in the correct place instead of at the
current point.
- ensure body is expanded for n-repl as well
- declare n-repl functions
- remove require ob-tangle from ob-clojure
* lisp/ob-clojure.el (org-babel-clojure-backend): Customization
variable to select clojure backend
(nrepl-eval): Declared function.
(nrepl-current-connection-buffer): Declared function.
(org-babel-execute:clojure): Execution now uses customized backend.
* lisp/org.el (org-ctrl-c-ctrl-c): When using C-c C-c at an item with
point on a link, make sure checkbox, if any, is toggled.
Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
* lisp/org.el (org-property-drawer-re): Make less greedy to avoid
overreaching matches.
(org-clock-drawer-re): Make less greedy to avoid
overreaching matches.
And seems that you miss another 'padline' in function
'org-babel-spec-to-string', line 323. I attached small patch which
removes that line so I can tangle Org document with shell scripts.
* lisp/ob-tangle.el (org-babel-spec-to-string): Remove dangling
'padline' variable.
TINYPATCH
* lisp/org-table.el (org-table-convert-region): Interpret string SEPARATOR
as regular expression. Triple `C-u' prefix arg will read a regexp
from the user.
* doc/org.texi: Document that `C-c |' can take a regexp as a separator.
Patch modified from a proposal by Francois.
* lisp/ox-beamer.el (org-beamer--format-block): Return an error
message when using a special environment as a block type. Also
check for incomplete environment definitions.
The difference between elisp and every other language was causing
confusion, so simpler just to set these to nil.
* lisp/ob-emacs-lisp.el (org-babel-default-header-args:emacs-lisp):
Set to nil.
* lisp/ob-tangle.el (org-babel-spec-to-string): Remove padline
handling from here as there is insufficient information on context.
(org-babel-tangle): Moved padline handling here where we can test
for placement in the file.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Don't add "set
datafile missing..." with :missing, instead this header argument now
only changes the value of the *org-babel-gnuplot-missing* variable.
* lisp/ox.el (org-export--populate-ignore-list): Ignore text before
first headline if an :export: tag (or a select tag) is found within
the buffer.
* testing/lisp/test-ox.el: Add tests.