* lisp/org-list.el (org-list-send-list): Parse list from its true beginning.
* lisp/org.el (org-ctrl-c-ctrl-c): Maybe send the list when at a list item.
* doc/org.texi (Radio lists): Fix bug in description of radio lists.
* lisp/org.el (org-insert-link): Correctly determine if we should use
a relative path.
Aidan Gauland writes:
> If I create a link with C-c C-l and give it a relative "file:" link, a
> link is created with an absolute path. For example, C-c C-l
> file:../foo.org <RET> foo puts
> [[file:~/path/to/working-directory/foo.org][foo]] in the buffer. I was
> expecting [[file:../foo.org][foo]].
For some reason ob-R refuses to compile when it requires ob-comint.
When (require 'ob-comint) is not included in ob-R.el everything
compiles without error, but warnings are thrown because the
arguments to a macro defined in ob-comint are mis-interpreted as
functions.
When (require 'ob-comint) is added to ob-R.el then it throws errors
complaining that the last argument to a function is nil and should
be a string. I don't understand this error at all and can't fix it.
* lisp/org.el (org-babel-load-languages): this variable controls which
languages will be loaded by org-babel. It is customizable through
the customize interface.
(org-babel-do-load-languages): load those languages in
org-babel-load-languages and disable those with nil cdr's
* lisp/babel/ob.el (org-confirm-babel-evaluate): variable used to
control evaluation of code blocks, default value it t, meaning all
code block evaluation requires confirmation
(org-babel-confirm-evaluate): function used to request confirmation
of code block evaluation from the user
(org-babel-execute-src-block): this function is the single point of
entry for evaluation of code blocks (whether initiated through lob
call, through direct code block evaluation, or as part of file
exportation). Every time this function is called it will now
request confirmation from the user. The newly added
`org-confirm-babel-evaluate' variable can be used to configure this
behavior.
(org-babel-no-eval-on-ctrl-c-ctrl-c): This variable can be used to
inhibit evaluation of code blocks with C-c C-c.
* lisp/org.el (org-ctrl-c-ctrl-c): added documentation of code block
evaluation behavior
* lisp/babel/ob-keys.el (org-babel-key-bindings): adding keybindings
for executing code blocks and for opening their results
* lisp/org.el (org-entry-get-with-inheritance): New argument LITERAL-NIL.
(org-entry-get): Pass `literal-nil' into
`org-entry-get-with-inheritance'.
(org-todo): React to nil values of the LOGGING property.
* lisp/org.el (org-switchb): Renamed from `org-iswitchb'. Improve
docstring.
(org-iswitchb): New alias.
(org-ido-switchb): Make alias point to `org-switchb'.
* lisp/org.el (org-time-string-to-absolute): Ignore cyclic repeater
when displaying items on todays agenda date.
Ignore the cyclic repeater when displaying items on today's agenda
date. If you have a weekly task and miss the date the agenda view
will show more than a week late now instead of resetting on the
cyclic repeating date. This makes it much more obvious when you
missed a repeating task after the repeater.
* lisp/org-html.el (org-export-html-preprocess): Call org-format-latex,
possibly with a protect-only argument.
* lisp/org.el (org-format-latex): New argument PROTECT-ONLY.
with the switch #+OPTIONS: LaTeX:verbatim ,
LaTeX code will be exported verbatim to HTML, so that jsmath can grab
and convert it.
Proposed by Christian Moe.
* lisp/org-macs.el (org-not-nil): Return the value if not interpreted
as nil.
* lisp/org.el (org-entry-get):
(org-entry-get-with-inheritance): Interpret the value "nil"
as nil for properties.
Bernt Hansen writes:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> > On Jun 25, 2010, at 3:23 PM, Robert Goldman wrote:
> >
> > > Question: what is the proper way to get a NIL into a property? Are
> > > we
> > > to use () instead of "nil"? Or are property values always interpreted
> > > as strings?
> > >
> > > Apologies in advance if this is a stupid question!
> >
> > Not a stupid question at all.
> >
> > There is no way, currently. Property values are string - the only
> > way to make
> > org-entry-get return nil is to not have the property defined at all.
>
> I've wanted a similar thing in the past for the LOGGING property where
> the parent task has special logging set via the LOGGING property but I
> want to undo that for some of the child tasks so they use the default
> logging setup.
>
> Having a way to undefine a property would be good in general I think.
-Bernt
* lisp/org-macs.el (org-not-nil): New function.
* lisp/org.el (org-block-todo-from-children-or-siblings-or-parent):
Use `org-not-nil' to interpret a property value of nil.
Robert Goldman writes:
> I have found what I believe to be a bug in handling ordered subtasks.
> Here is the behavior:
>
> I have a top level set of tasks that is ordered.
>
> One of the outline items below the top level set is a grab bag of tasks
> that will be performed in parallel. So this task is NOT ordered
> (ORDERED: nil).
>
> The problem is that the blocking behavior from ordered tasks seems to be
> inherited from the top level task list into the second level of the
> outline, even though the ORDERED property at the second level is
> explicitly overridden.
>
> I am attaching an org file that displays this issue. To see the
> problem, put your cursor on the "Bar" task and attempt to change its
> status to DONE.
The problem was here that the value of the property is the string
"nil", which is of course not nil.
This patches introduces a special case to interpret "nil" as nil.
* lisp/org.el (org-timestamp-change): New optional argument UPDOWN.
Use this to identify calls from org-timestamp-up/down, so that we can
skip by rounding minutes in this case.
(org-timestamp-up):
(org-timestamp-down):
(org-timestamp-up-day):
(org-timestamp-down-day): Call org-timestamp-change with the
updown argument.
This function used to look only if there was a prefix argument in the
current interactive call. Now we have an explicit marker indicating
that the function is called from the updown commands.
* lisp/org-agenda.el (org-agenda-action): Make `c' key call org-capture.
* lisp/org-capture.el: New file.
* lisp/org-compat.el (org-get-x-clipboard): Function moved here from
remember.el.
* lisp/org-mks.el: New file
* lisp/org.el (org-set-regexps-and-options): Allow statistic cookies as
part of complex headlines.
(org-find-olp): New argument THIS-BUFFER. When set, assume that the
OLP does not contain a file name.
* lisp/org.el (org-mode): Set `comment-start' instead of changing the
syntax of the `#' character.
Leo writes:
> Setting a comment starter without a corresponding comment ender is
> problematic and the # creeps in mysteriously under auto-fill. For
> example, in my current running emacs, this happens almost certainly in
> all org files that has # in their header. The only (temporary) solution
> seems to reboot emacs (which is painful and disruptive).
>
> If you try eval (forward-comment 1) at the beginning of an org file that
> has some "#+..." it will move to the end of file (the whole file is
> regarded as one single comment). So when auto-fill a long text, it will
> find the common prefix to be #.
>
> In addition, I don't think org mode has clear comment syntax or ideas on
> what to do with it.
>
> I can't see any gain from (modify-syntax-entry ?# "<") so I am proposing
> removing it entirely and get rid of this mysterious and annoying bug
> once and for all.
>
> The attached patch may (though I think it is quite safe) cause some bugs
> but those will be fixable unlike the one mentioned above.
>
> Best wishes,
>
> Leo
(org-agenda-get-scheduled):
* lisp/org.el (org-time-string-to-seconds):
For deadline and scheduled agenda display ignore the cyclic repeater
when calculating how many days late the task is. If you have a weekly
task and miss the date the agenda view will show more than a week late
now instead of resetting on the cyclic repeating date. This makes it
much more obvious when you missed a repeating task after the repeater.
Thanks to Bernt Hansen for this patch.
* org.el (org-raise-scripts): Do not fontify sub/superscripts of text
with face `org-special-keyword'. Makes property keys as :LAST_REPEAT:
display correctly.
This patch adds a modification hook to remove inline-image overlays if
the underlying text is modified. This prevents blind editing of text
behind images.
* lisp/org.el (org-raise-scripts): Do not act in links.
Matt Lundin writes:
> Git commit 70d24c5d03 causes underscores
> in hyperlinks to display parts of link and description as subscripts.
> E.g., this link...
>
> [[http://www.samplepage.com/an_underscore][Some description words]]
>
> ...displays the word "Some" in the description as a subscript. With M-x
> visible-mode, the substring "underscore][Some" is displayed as a
> subscript.
* lisp/org.el (org-edit-special): Make sure source code editing goes
before table formula editing.
* lisp/org-table.el (org-table-fedit-map): "C-c '" will now also exit
the formula editor.
* lisp/org.el (org-read-date-analyze): Fix regular expression for
matching american dates
Daniel E. Doherty writes:
> In playing around with the date prompt (C-.), I ran across the following
> puzzling behavior from rather simple inputs.
>
> I entered the following on June 1, 2010. Here is a date entered as
> "3/15": <2011-03-15 Tue>. It interpreted it as the upcoming March 15 as
> expected.
>
> But here is a date entered as "5/21": <2021-06-05 Sat>. Note how it
> interpreted the "21" as the year 2021, not at all what I expected from
> the documentation or the analogous "3/15" example.
>
> Maybe there is some underlying logic here that I'm not getting. Perhaps
> it has to do with how 2-digit years are interpreted?
>
> What's going on here? I am using org-version 6.36trans on emacs 23.1.
What was going on here is that the regular expression for matching
american-style dates was wrong. It was looking for month numbers in
the second field and day numbers in the first field - wrong, of
course.
* lisp/org-macs.el (org-rm-props): Add org-emphasis to the properties
that must be removed.
* lisp/org.el (org-do-emphasis-faces): Add org-emphasis property to
items that have emphasis done wit font-lock.
(org-fontify-entities): Do not do anything in commented lines.
(org-unfontify-region): Decompose the region as well, because we do
composition during font-lock.
(org-raise-scripts): Do nothing inside an emphasis string.
Reported by Eric Fraga in http://article.gmane.org/gmane.emacs.orgmode/25940
* lisp/org-compat.el (org-string-match-p):
(org-looking-at-p): New functions.
* lisp/org-table.el (org-table-align): Handle raised text with
invisible characters.
* lisp/org.el (org-script-display): Add raise properties for tables.
(org-raise-scripts): Handle raising differently inside tables.
Pretty display of subscripts and superscripts no longer messes up
table alignment. This is achieved by two things:
1. Inside tables, the raised characters are not made smaller, they
remains at the same size. Instead they are raise/lowered more, by
a full half character height to still be clearly readable as
subscript or superscript.
2. The invisible characters are taken into account when computing the
field width.
* lisp/org.el (org-ctrl-k-protect-subtree): New option.
(org-kill-line): Protect hidden subtrees if the user wants it.
* doc/org.texi (Headlines): Mention the special behavior of C-k
in headlines.
Scott Otterson writes:
> For what must be the dozenth time, I've just accidentally deleted a
> large tree by typing C-k while in a headline.
>
> This is really easy to do because emacs users have "C-k deletes to the
> end of the line" worn deeply into their neural pathways -- it's so
> automatic for me that the keystroke is close to subconscious. A
> mistaken C-k is especially hard to detect because org-mode displays
> the result exactly like what your subconscious expects, that is, a
> collapsed headline is deleted to the end -- and the tree underneath is
> wiped out with no noticeable warning.
>
> Feature request: add an option preventing tree deletion with C-k
> without user confirmation. Actually, I'd like an option to prevent it
> period.
>
> If this option is already in there, then you're encouraged to tell me
> to RTFM. But then also please tell me where it is, because I can't
> find it.
Carsten replies
> This is now possible due to the variable
> `org-ctrl-k-protect-subtree'. But I predict that you are going to set
> it to nil again soon :D
* doc/org.texi (Subscripts and superscripts): Document that `C-c C-x \'
will also format sub and superscripts.
* doc/orgcard.tex: Document that `C-c C-x \'
will also format sub and superscripts.
* lisp/org.el (org-use-sub-superscripts):
(org-pretty-entities-include-sub-superscripts): Move here from
org-exp.el.
(org-set-regexps-and-options): Parse subscript option and set
`org-use-sub-superscripts' as a local variable.
(org-match-sexp-depth):
(org-create-multibrace-regexp):
(org-match-substring-regexp):
(org-match-substring-with-braces-regexp): Moved here from org-exp.el
(org-set-font-lock-defaults): Call `org-raise-scripts'.
(org-remove-font-lock-display-properties): New function.
(org-unfontify-region): Call
`org-remove-font-lock-display-properties'.
(org-script-display): New constant.
(org-raise-scripts): New function.
When turning on entity display with `C-c C-x \', sub- and superscripts
will also be displayed in a smaller font, and raised/lowered.
* lisp/org-latex.el (org-export-latex-fontify): Avoid fontifying
several stars in a row.
* lisp/org.el (org-emphasis-alist): Mention
`org-export-docbook-emphasis-alist' in the docstring.
* lisp/org.el (org-store-link): Don't call org-store-link
interactively when called through remember from the agenda
Samuel Wales writes:
> For months, I found ID properties where they didn't belong.
> Finally I found that they are added when I do M-x
> org-remember in an agenda buffer, to the headline under
> point. Feels like a bug. [...]
The new function `org-agenda-file-p' checks if a given file is an org
agenda file. Such a function is very useful in hooks, for example if
you want to export agenda files automatically when saving:
(defun th-org-mode-init ()
;; Update appointments and export to iCalendar when saving.
(when (org-agenda-file-p)
(add-hook 'after-save-hook 'th-org-agenda-to-appt t t)
(add-hook 'after-save-hook 'org-export-icalendar-this-file t t)))
(add-hook 'org-agenda-mode-hook 'th-org-agenda-mode-init)
Org-refile-cache fails when org-refile-use-outline-path is set to file.
Specifically, org-refile-cache-check-set throws a markerp error when it
encounters file targets, since they have nil instead a marker object.
This patch applies the test only to targets with markers (i.e.,
headings).
The function org-get-refile-targets was building org-refile-cache even
if org-refile-use-cache was set to nil. This caused every refile
attempt to call org-refile-cache-clear and to produce the message
"Refile cache has been cleared."
Tom writes:
> if I have a heading like this:
>
>
> ** TODO test task
> stuff
> SCHEDULED: <2010-05-15 Sat 07:35 +1d>
>
>
> Then an empty line is inserted below the heading (before "stuff") if
> org-indent-mode is on and logging is set like this:
>
>
> (setq org-log-repeat nil)
> (setq org-log-done 'time)
>
>
>
> I tested it with a clean config using only the settings above.
This patch fixes the problem first reported by Tassilo Horn in
[mid:87y6fhxc47.fsf@thinkpad.tsdh.de]. Problem was that
`org-refile-cache-get' returned an invalid refile target table after
the refile cache was cleared.
Baoqui Cui writes:
> "robut@iinet.net.au" <robut@iinet.net.au> writes:
>
> I very much like the idea of native inline image display in Org-mode but can't
> seem to make it work.
>
> Given a 6.36 snapshot or 6.36 release and these org file contents
>
> * Test image
> Test image
> [[Screenshot.png]]
>
>
> I hoped org would display that image after C-c C-x C-v. Rather Org-mode returns
> "No images to display inline".
>
> I've tried different ways of linking that image, different image formats,
> relative vs complete paths, and my regular .emacs vs a near empty one and
> always the same result. If I toggle iimage-mode the image displays fine per se
> but does not affect how Org-mode works.
>
> Seems clear I am missing something simple. What?
>
> I like the idea of inline image display too, but hit the similar
> problems. After reading the code in org.el, I found that the inline
> image file link has to start with either "file:" or "./".
>
> For example, the following two links are OK:
>
> [[file:~/images/myImage.png]]
> [[./figures/org-mode-unicorn.svg]]
>
> but the following two are not:
>
> [[Screenshot.png]]
> [[~/images/myImage.png]]
>
> Here is a small patch that seems to work well for me, but I'd like
> Carsten to check whether it may break anything
Patch by David Maus, who writes:
> Org enters an infinite loop when `org-replace-escapes' is called with
> a table containing a replace string that contains the escape sequence
> it should be replaced with.
>
> Example:
> ,----
> | (org-replace-escapes "%m" '(("%m" . "87zl0qq1f3.wl%maus.david@gmail.com")))
> `----
>
> I stumpled upon when I tried to store a link to a internet message
> whose message id contained the sequence "%m" (perfectly valid for a
> message id) while using "%m" as message description.
>
> Attached patch fixes this by
>
> 1. detecting such 'self reference' and replacing the offending
> sequence in the replace string by a string with a text property
> that contains the original sequence
>
> 2. replacing occurences of substrings with this text property by the
> original sequence.
This behavior is now parallel to the treatment of outline nodes.
This commit also introduces another change. When an outline node or a
plain list item is folded by outline and contains hidden children,
M-left/right will refuse to act on this item. You must either open
the tree, or use the subtree commands M-S-left and M-S-right.
Based on a patch by Matti De Craene, but significantly modified after
a discussion involving Bernt Hansen and others.
The definition of "makes sense is here:
- either the user is logging repeats (org-log-repeat)
- or the entry contains clock data, in which case the LAST_REPEAT is
needed to display clocking time properly.
Request by Dan Griswold, with some support from Bernt Hansen
The target state can now be fixed locally with the REPEAT_TO_STATE
property, or globally with the variable `org-todo-repeat-to-state'.
This was a request by John Wiegley.