Rename `org-on-heading-p' and `org-on-target-p' to
`org-at-heading-p' and `org-at-target-p' to be more
consistent with the org-at-*-p family.
Also define two aliases.
* org.el (org-at-drawer-p): New function.
(org-end-of-line): Use it.
This function make the behavior of C-e in folded drawers consistent
with C-e in folded subtrees: in this case, point moves to the last
invisible characters of the line, not to the last character.
* org.el (org-ctrl-c-ctrl-c): Preserve symmetry when adding
and removing checkboxes with `C-u C-c C-c' on the first item
of a list. Also, don't reinitialize checkboxes that are
already ticked.
Thanks to Nicolas Goaziou for these fixes.
* lisp/org-list.el (org-list-write-struct): Add an optional argument
for structure changes happening outside the function.
* lisp/org.el (org-ctrl-c-ctrl-c): Now, C-u C-c C-c on the first item
of a sub-list should toggle check-box presence of every item in the
same sub-list. Also fix check-box insertion on a single item.
* org.el (org-loop-over-headlines-in-active-region): Fix
docstring.
(org-todo, org-deadline, org-schedule): Honor the 'start-level
value of `org-loop-over-headlines-in-active-region'.
* lisp/org.el: Honour existing restrictions when regenerating the agenda
Narrowed org buffers are now retained when regenerating the agenda
with org-agenda-redo
* org.el (org-scan-tags): New parameter `start-level' to
scan only through headlines of that level.
(org-map-entries): New allowed value `region-start-level' for
the `scope' parameter, to allow scanning through headlines of
the same level than the first headline in the region.
(org-loop-over-headlines-in-active-region): New allowed value
'start-level.
This change gives more flexibility when looping over the active
region for commands like `org-schedule', `org-deadline', etc.
By setting `org-loop-over-headlines-in-active-region' to
̀start-level', those command will act upon headlines that are
of the same level than the first one in the region.
* org.el (org-open-at-point): Escape link path for http:, https:,
ftp:, news:, and doi: links only if the path contains space or
non-ascii character.
This should take care of mistakenly double-escaped links as reported
by Jeff Horn in <http://article.gmane.org/gmane.emacs.orgmode/48731>.
We are just guessing here and push the responsibility for proper
escaping to the target application.
* org.el (org-refile-get-targets): Ignore headlines without a true
headline.
This fixes a bug reported by Nathan Neff in
<http://article.gmane.org/gmane.emacs.orgmode/50035>.
Headlines with just a keyword are ignored as possible refile target.
* org.el (org-block-regexp)
(org-heading-keyword-regexp-format)
(org-heading-keyword-maybe-regexp-format): Move up to keep the
byte-compiler happy.
* org-special-blocks.el (org-html): Require 'org-html.
(org-open-par, org-close-par-maybe): Declare as functions.
* ob.el (org-reduce): Declare as a function.
(org-current-export-file): Declare.
* ob-ref.el (org-babel-update-intermediate): Make a defvar.
* doc/org.texi (External links): Document the link types file+sys and
file+emacs, slightly narrow used page width.
* lisp/org.el (org-offer-links-in-entry): Make list when assigning a
single link.
"M-1 C-c C-o" or (org-open-at-point 1) or (org-offer-links-in-entry 1)
on a headline followed by two links enters Lisp error. Both changes
are remainders of the commit release_6.33f-189-g3e0c61d.
* lisp/ob.el (org-babel-insert-result): Do not examplize wrapped
scalar results, simply wrap them.
(org-babel-result-end): Find the end of results wrapped in a RESULTS
drawer.
Thanks to Thorsten Jolitz for contributing support for this new
language.
* Makefile (LISPF): Add ob-picolisp to the Makefile.
* contrib/babel/langs/ob-picolisp.el: Remove from contrib.
* lisp/ob-picolisp.el: Add to core lisp directory.
* lisp/org.el (org-babel-load-languages): Add Pico Lisp to the list of
supported code block languages.
* lisp/org.el (org-todo): Interpret 0 prefix arg as note inhibitor.
Sometimes I want to quickly make a few TODOs done in the agenda and I
want to bypass the note taking I have normally set up. With this
change, I can press `0 t d' in the agenda to do this.
* org.el (org-set-outline-overlay-data): Use outline-flag-region to make a
region invisible. This ensures all necessary actions, especially adding
isearch-open-invisible property, are applied.
This results in the following behavior.
#+property: var foo=1
#+property: var+ bar=2
#+begin_src emacs-lisp
(+ foo bar)
#+end_src
#+results:
: 3
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2
* overwriting a file-wide property
:PROPERTIES:
:var: foo=7
:END:
#+begin_src emacs-lisp
foo
#+end_src
#+results:
: 7
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=7
* appending to a file-wide property
:PROPERTIES:
:var+: baz=3
:END:
#+begin_src emacs-lisp
(+ foo bar baz)
#+end_src
#+results:
: 6
#+begin_src emacs-lisp
(org-entry-get (point) "var" t)
#+end_src
#+results:
: foo=1 bar=2 baz=3
* lisp/org.el (org-update-property-plist): Updates a given property
list with a property name and a property value.
(org-set-regexps-and-options): Use org-update-property-plist.
(org-entry-get): Use org-update-property-plist.
* testing/examples/property-inheritance.org: Example file for testing
appending property behavior.
* testing/lisp/test-property-inheritance.el: Tests of appending
property behavior.
* lisp/ob.el (org-babel-balanced-split): Allow splitting on single
characters as well as groups of two characters.
(org-babel-parse-multiple-vars): Split variables on single spaces.
Nick Dokos <nicholas.dokos@hp.com> writes:
> Eric Schulte <schulte.eric@gmail.com> wrote:
>
>> The attached updated patch fixes a bug in the original.
>>
>
> Minor problem in applying:
>
> ,----
> | $ git apply ~/Mail/inbox/724
> | /home/nick/Mail/inbox/724:671: trailing whitespace.
> | #+name:
> | /home/nick/Mail/inbox/724:599: new blank line at EOF.
> | +
> | warning: 2 lines add whitespace errors.
> `----
The attached version fixes these issues, Thanks -- Eric
>From 0e43d59ee8d46a63f86780a502de726271bc39de Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 28 Oct 2011 10:44:21 -0600
Subject: [PATCH] removing code block, results and call-line synonyms -- BREAKING CHANGE
Following a round of on-list discussion many code block synonyms have
been removed, moving forward the following syntax is valid.
- call lines are specified with #+call:
- code blocks are named with #+name:
- results are named with #+name:, however results generated by a code
block may still be labeled with #+results:, and tables named with
#+tblname: will be considered to be named results
The following function may be used to update an existing Org-mode
buffer to the new syntax.
(defun update-org-buffer ()
"Update an Org-mode buffer to the new data, code block and call line syntax."
(interactive)
(save-excursion
(flet ((to-re (lst) (concat "^[ \t]*#\\+" (regexp-opt lst t)
"\\(\\[\\([[:alnum:]]+\\)\\]\\)?\\:[ \t]*"))
(update (re new)
(goto-char (point-min))
(while (re-search-forward re nil t)
(replace-match new nil nil nil 1))))
(let ((old-re (to-re '("RESULTS" "DATA" "SRCNAME" "SOURCE")))
(lob-re (to-re '("LOB")))
(case-fold-search t))
(update old-re "name")
(update lob-re "call")))))
Note: If an old version of Org-mode (e.g., the one shipped with Emacs)
is installed on your system many of the important variables will
be pre-defined with a defvar and *will not* have their values
automatically updated, these include the following.
- org-babel-data-names
- org-babel-result-regexp
- org-babel-src-block-regexp
- org-babel-src-name-regexp
- org-babel-src-name-w-name-regexp
It may be necessary to either remove the source code of older
versions of Org-mode, or to explicitly evaluate the ob.el file.
* lisp/ob-exp.el (org-exp-res/src-name-cleanup): Updated
Documentation.
* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp): Updated
regular expression.
(org-babel-inline-lob-one-liner-regexp): Updated regular expression.
* lisp/ob-ref.el (org-babel-ref-resolve): Notice when something that
looks like a data results may actually be a code block.
* lisp/ob-table.el: Updated documentation.
* lisp/ob.el (org-babel-src-name-regexp): Simplified regexp.
(org-babel-get-src-block-info): Updated match strings.
(org-babel-data-names): Simplified acceptable names.
(org-babel-find-named-block): Indentation.
(org-babel-find-named-result): Updated to not return a code block as
a result.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Removing
references to old syntactic elements.
(org-additional-option-like-keywords): Removing references to old
syntactic elements.
* contrib/babel/library-of-babel.org: Updated to make use of the new
syntax.
* testing/examples/babel-dangerous.org: Updated to make use of the new
syntax.
* testing/examples/babel.org: Updated to make use of the new syntax.
* testing/examples/ob-awk-test.org: Updated to make use of the new
syntax.
* testing/examples/ob-fortran-test.org: Updated to make use of the new
syntax.
* testing/lisp/test-ob.el: Removed two bad tests which tested the
literal values of old regular expressions rather than their
behavior.
* lisp/org.el (org-try-cdlatex-tab): Don't try to expand a LaTeX
environment when at an item or an headline, but allow LaTeX
fragments.
(org-cycle): Try to call `cdlatex-tab' before cycling item's or
headline's visibility, in order to catch LaTeX fragments within.
This patch is based on the report and work of Maik Beckmann.