* ob-tangle.el (org-babel-spec-to-string): Don't trim
whitespace when `org-src-preserve-indentation' is non-nil
* ob-python.el (org-babel-expand-body:python): Don't trim
whitespace when `org-src-preserve-indentation' is non-nil
Based on report and patches by Antti Kaihola.
- this is required due to recent changes to org-babel-map-src-blocks
- thanks to Dan for pointing this out
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): rename `lang'
to `language'
* lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): format
string specifying the link-comment preceding a code block
(org-babel-tangle-comment-format-end): format string specifying the
link-comment following a code block
(org-babel-tangle-collect-blocks): storing more information in the
spec of a tangling code block
(org-babel-spec-to-string): now makes use of customizable
link-comment formats
This commit introduces a new set of :comments header arguments
- no :: retains its behavior of not tangling any comments
- yes :: retains its behavior of wrapping the code in links back to
the original org-mode file
- link :: is synonymous with "yes"
- org :: does not wrap the code in links back to the original org
file, but does include preceding text from the org-mode
file as a comment before the code block
- both :: turns on both the "link" and "org" options
* lisp/ob-tangle.el (org-babel-tangle-pad-newline): can be used to
control the amount of extra newlines inserted into tangled code
(org-babel-tangle-collect-blocks): now conditionally collects
information to be used for "org" style comments
(org-babel-spec-to-string): now inserts "org" style comments, and
obeys the newline configuration variable when inserting whitespace
* doc/org.texi (comments): documenting the new :comments header
arguments
Hello!
We need this change to get org-mode compiling with recent XEmacs 21.5. On
previous 21.5 and current 21.4, the problem manifests itself at runtime, not
compile time, like so:
(set-file-modes "/tmp/aidan/foo.el" ?\755)
=> Wrong type argument: integerp, ?í
One old reason to go for the ?\755 syntax instead of the #o755 syntax under
GNU Emacs was to be that older versions of GNU Emacs didn’t support #o755,
but, to my knowledge, every released GNU Emacs since March 2000 has
supported the latter syntax.
Best,
Aidan Kehoe, the XEmacs project.
ChangeLog addition:
2010-08-21 Aidan Kehoe <kehoea@parhasard.net>
* ob-tangle.el (org-babel-tangle): Change the MODE argument to
#'set-file-modes to use integer, not character syntax, avoiding
compile problems with recent XEmacs.
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): finds a
file ensuing that the latest changes on disk are represented
(org-babel-with-temp-filebuffer): now only kills the buffer of the
tangled file, and doesn't kill said buffer if the file is already
being visited
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): a macro for
quickly visiting files with cleanup
(org-babel-tangle): now using the locally defined
with-temp-filebuffer macro
Thanks to Austin Frank for suggesting these features and to Jonathan
Arkell for an implementation suggestion
This commit
- adds `org-babel-goto-named-result' for jumping to named results
- adds TAB-completion to `org-babel-goto-named-src-block'
- standardizes on "-src-" instead of "-source-" in all babel functions
- adds `org-babel-[next/previous]-src-block' functions and keybindings
- documents the above in orgcard.tex
* doc/orgcard.tex: update documentation of babel keybindings
* lisp/ob-exp.el (org-exp-res/src-name-cleanup): standardized on
"-src-" instead of "-source-"
* lisp/ob-keys.el (org-babel-key-bindings): updating keybindings for
new movement functions
* lisp/ob-lob.el (org-babel-lob-ingest): standardized on "-src-"
instead of "-source-"
* lisp/ob-ref.el (org-babel-ref-resolve-reference): standardized on
"-src-" instead of "-source-"
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): standardized on
"-src-" instead of "-source-"
* lisp/ob.el (org-babel-src-name-regexp): standardized on "-src-"
instead of "-source-"
(org-babel-src-name-w-name-regexp): adding regexp for matching
source names along with their names
(org-babel-get-src-block-info): using new named source block regexp
(org-babel-result-regexp): adding optional whitespace after result
regexp
(org-babel-result-w-name-regexp): adding regexp for matching results
which have names
(org-babel-named-src-block-regexp-for-name): standardized on "-src-"
instead of "-source-"
(org-babel-map-src-blocks): standardized on "-src-" instead of
"-source-"
(org-babel-where-is-src-block-head): standardized on "-src-" instead of
"-source-"
(org-babel-goto-named-src-block): standardized on "-src-" instead of
"-source-", also added completing read
(org-babel-src-block-names): collects source block names from a file
or the current buffer
(org-babel-goto-named-result): function for jumping to a named
result
(org-babel-result-names): returns results names from a file or the
current buffer
(org-babel-next-src-block): jump to the next source block
(org-babel-previous-src-block): jump to the previous source block
* lisp/ob-tangle.el (org-babel-tangle): applying optional target-file
argument through integration into the default header arguments
(allowing overwriting through standard header-argument merging), and
allowing a default setting of (:tangle . "no") to be overwritten
when a target-file is specified.
* lisp/ob-tangle.el (org-babel-post-tangle-hook): adding hook which
can be used to call functions from inside of code files tangled by
org-babel-tangle
(org-babel-tangle): added call to org-babel-post-tangle-hook
* lisp/ob-tangle.el (org-babel-spec-to-string): removed
`org-babel-tangle-w-comments', now just use the :comments header arg
to control the insertion of comments on tangling