* 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.