Merge from emacs-24; up to 2012-12-08T12:11:29Z!eliz@gnu.org

This commit is contained in:
Glenn Morris 2013-01-09 00:30:21 -08:00
commit fb9f714667
42 changed files with 1332 additions and 656 deletions

View file

@ -1,3 +1,18 @@
2013-01-09 Bastien Guerry <bzg@gnu.org>
* org.texi (Pushing to MobileOrg): Add footnote about using
symbolic links in `org-directory'.
(Timestamps, Deadlines and scheduling): Use `diary-float' instead
of the now obsolete alias `org-float'.
(TODO basics): Add `org-use-fast-todo-selection' to the variable
index. Fix description of TODO keywords cycling.
(Advanced features): Add missing argument for @item.
(Storing searches): Add index entries and a note about
*-tree agenda views.
(Structure editing): Document `org-mark-element' and
`org-mark-subtree'.
(Tag inheritance): Document `org-agenda-use-tag-inheritance'.
2013-01-08 Juri Linkov <juri@jurta.org>
* info.texi (Go to node): Mention the abbreviated format

View file

@ -2,7 +2,7 @@
@c %**start of header
@setfilename ../../info/org
@settitle The Org Manual
@set VERSION 7.9.2 (GNU Emacs 24.3)
@set VERSION 7.9.3+ (GNU Emacs 24.3)
@c Use proper quote and backtick for code sections in PDF output
@c Cf. Texinfo manual 14.2
@ -1470,6 +1470,13 @@ Move subtree up (swap with previous subtree of same
level).
@orgcmd{M-S-@key{down},org-move-subtree-down}
Move subtree down (swap with next subtree of same level).
@orgcmd{M-h,org-mark-element}
Mark the element at point. Hitting repeatedly will mark subsequent elements
of the one just marked. E.g. hitting @key{M-h} on a paragraph will mark it,
hitting @key{M-h} immediately again will mark the next one.
@orgcmd{C-c @@,org-mark-subtree}
Mark the subtree at point. Hitting repeatedly will mark subsequent subtrees
of the same level than the marked subtree.
@orgcmd{C-c C-x C-w,org-cut-subtree}
Kill subtree, i.e., remove it from buffer but save in kill ring.
With a numeric prefix argument N, kill N sequential subtrees.
@ -3747,6 +3754,8 @@ The most important commands to work with TODO entries are:
@table @kbd
@orgcmd{C-c C-t,org-todo}
@cindex cycling, of TODO states
@vindex org-use-fast-todo-selection
Rotate the TODO state of the current item among
@example
@ -3754,14 +3763,19 @@ Rotate the TODO state of the current item among
'--------------------------------'
@end example
The same rotation can also be done ``remotely'' from the timeline and
agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
If TODO keywords have fast access keys (see @ref{Fast access to TODO
states}), you will be prompted for a TODO keyword through the fast selection
interface; this is the default behavior when
@var{org-use-fast-todo-selection} is @code{non-nil}.
The same rotation can also be done ``remotely'' from the timeline and agenda
buffers with the @kbd{t} command key (@pxref{Agenda commands}).
@orgkey{C-u C-c C-t}
Select a specific keyword using completion or (if it has been set up)
the fast selection interface. For the latter, you need to assign keys
to TODO states, see @ref{Per-file keywords}, and @ref{Setting tags}, for
more information.
When TODO keywords have no selection keys, select a specific keyword using
completion; otherwise force cycling through TODO states with no prompt. When
@var{org-use-fast-todo-selection} is set to @code{prefix}, use the fast
selection interface.
@kindex S-@key{right}
@kindex S-@key{left}
@ -4617,9 +4631,8 @@ changes in the line.}:
@noindent
@vindex org-use-tag-inheritance
@vindex org-tags-exclude-from-inheritance
To limit tag inheritance to specific tags, or to turn it off entirely, use
the variables @code{org-use-tag-inheritance} and
@code{org-tags-exclude-from-inheritance}.
To limit tag inheritance to specific tags, use @code{org-tags-exclude-from-inheritance}.
To turn it off entirely, use @code{org-use-tag-inheritance}.
@vindex org-tags-match-list-sublevels
When a headline matches during a tags search while tag inheritance is turned
@ -4630,6 +4643,15 @@ of matches may then become very long. If you only want to see the first tags
match in a subtree, configure the variable
@code{org-tags-match-list-sublevels} (not recommended).
@vindex org-agenda-use-tag-inheritance
Tag inheritance is relevant when the agenda search tries to match a tag,
either in the @code{tags} or @code{tags-todo} agenda types. In other agenda
types, @code{org-use-tag-inheritance} has no effect. Still, you may want to
have your tags correctly set in the agenda, so that tag filtering works fine,
with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control
this: the default value includes all agenda types, but setting this to nil
can really speed up agenda generation.
@node Setting tags, Tag searches, Tag inheritance, Tags
@section Setting tags
@cindex setting tags
@ -5512,7 +5534,7 @@ example with optional time
@example
* 22:00-23:00 The nerd meeting on every 2nd Thursday of the month
<%%(org-float t 4 2)>
<%%(diary-float t 4 2)>
@end example
@item Time/Date range
@ -5850,7 +5872,7 @@ entries. Org mode will issue early and late warnings based on the
assumption that the timestamp represents the @i{nearest instance} of
the repeater. However, the use of diary sexp entries like
@c
@code{<%%(org-float t 42)>}
@code{<%%(diary-float t 42)>}
@c
in scheduling and deadline timestamps is limited. Org mode does not
know enough about the internals of each sexp function to issue early and
@ -6539,7 +6561,7 @@ suggestion.} for capturing new material.
@table @kbd
@orgcmd{C-c c,org-capture}
Call the command @code{org-capture}. Note that this keybinding is global and
not active by default; you need to install it. If you have templates
not active by default: you need to install it. If you have templates
@cindex date tree
defined @pxref{Capture templates}, it will offer these templates for
selection or use a new Org outline node as the default template. It will
@ -8621,6 +8643,13 @@ buffer, or a sparse tree (the latter covering of course only the current
buffer).
@kindex C-c a C
@vindex org-agenda-custom-commands
@cindex agenda views, main example
@cindex tags, as an agenda view
@cindex todo, as an agenda view
@cindex tags-todo
@cindex todo-tree
@cindex occur-tree
@cindex tags-tree
Custom commands are configured in the variable
@code{org-agenda-custom-commands}. You can customize this variable, for
@ -8681,6 +8710,9 @@ additional key (@kbd{l}, @kbd{p} or @kbd{k}) to select a name (Lisa,
Peter, or Kim) as additional tag to match.
@end table
Note that the @code{*-tree} agenda views need to be called from an
Org buffer as they operate on the current buffer only.
@node Block agenda, Setting Options, Storing searches, Custom agenda views
@subsection Block agenda
@cindex block agenda
@ -16537,14 +16569,18 @@ to the directory @code{org-mobile-directory}. By default this list contains
all agenda files (as listed in @code{org-agenda-files}), but additional files
can be included by customizing @code{org-mobile-files}. File names will be
staged with paths relative to @code{org-directory}, so all files should be
inside this directory. The push operation also creates a special Org file
@file{agendas.org} with all custom agenda view defined by the
user@footnote{While creating the agendas, Org mode will force ID properties
on all referenced entries, so that these entries can be uniquely identified
if @i{MobileOrg} flags them for further action. If you do not want to get
these properties in so many entries, you can set the variable
@code{org-mobile-force-id-on-agenda-items} to @code{nil}. Org mode will then
rely on outline paths, in the hope that these will be unique enough.}.
inside this directory@footnote{Symbolic links in @code{org-directory} need to
have the same name than their targets.}.
The push operation also creates a special Org file @file{agendas.org} with
all custom agenda view defined by the user@footnote{While creating the
agendas, Org mode will force ID properties on all referenced entries, so that
these entries can be uniquely identified if @i{MobileOrg} flags them for
further action. If you do not want to get these properties in so many
entries, you can set the variable @code{org-mobile-force-id-on-agenda-items}
to @code{nil}. Org mode will then rely on outline paths, in the hope that
these will be unique enough.}.
Finally, Org writes the file @file{index.org}, containing links to all other
files. @i{MobileOrg} first reads this file from the server, and then
downloads all agendas and Org files listed in it. To speed up the download,

View file

@ -1,10 +1,54 @@
ORG NEWS -- history of user-visible changes. -*- org -*-
#+LINK: doc http://orgmode.org/worg/doc.html#%s
Copyright (C) 2012-2013 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Org bug reports to emacs-orgmode@gnu.org.
* Version 7.9.3
** New option [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]]
[[doc::org-use-tag-inheritance][org-use-tag-inheritance]] controls whether tags are inherited when
org-tags-view is called (either in =tags=, =tags-tree= or =tags-todo=
agenda views.)
When generating other agenda types such as =agenda=, =todo= and
=todo-tree=, tags inheritance is not used when selecting the entries
to display. Still, you might want to have all tag information correct
in the agenda buffer, e.g. for tag filtering. In that case, add the
agenda type to this variable.
Setting this variable to nil should considerably speeds up the agenda
generation.
Note that the default was to display inherited tags in the agenda
lines even if `org-use-tag-inheritance' was nil. The default is now
to *never* display inherited tags in agenda lines, but to /know/ about
them when the agenda type is listed in [[doc::org-agenda-use-tag-inheritance][org-agenda-use-tag-inheritance]].
** New default value nil for [[doc::org-agenda-dim-blocked-tasks][org-agenda-dim-blocked-tasks]]
Using `nil' as the default value speeds up the agenda generation. You
can hit `#' (or `C-u #') in agenda buffers to temporarily dim (or turn
invisible) blocked tasks.
** New speedy keys for [[doc::org-speed-commands-default][org-speed-commands-default]]
You can now use `:' (instead of `;') for setting tags---this is
consistent with using the `:' key in agenda view.
You can now use `=' for [[doc::org-columns][org-columns]].
** =org-float= is now obsolete, use =diary-float= instead
** Enhanced compatibility with Emacs 22 and XEmacs
Thanks to Achim for his work on enhancing Org's compatibility with
various Emacsen. Things may not be perfect, but Org should work okay
in most environments.
* Version 7.9.2
** New ELPA repository for Org packages

Binary file not shown.

View file

@ -1,6 +1,6 @@
% Reference Card for Org Mode
\def\orgversionnumber{7.9.2}
\def\versionyear{2012} % latest update
\def\orgversionnumber{7.9.3}
\def\versionyear{2013} % latest update
\input emacsver.tex
%**start of header

View file

@ -1,3 +1,27 @@
2013-01-09 Glenn Morris <rgm@gnu.org>
* emacs-lisp/trace.el (trace-function-foreground)
(trace-function-background): Doc fix.
2013-01-09 Juri Linkov <juri@jurta.org>
* international/mule-cmds.el (read-char-by-name): Move let-binding
of completion-ignore-case around completing-read to fix regression
exhibited by the test case `C-x 8 RET *acc TAB' and caused by
`string-match-p' using the nil value of `case-fold-search' and
`completion-ignore-case' in `completion-pcm--all-completions'.
(Bug#12615).
2013-01-09 Glenn Morris <rgm@gnu.org>
* progmodes/compile.el (compilation-parse-errors):
Fix typo. (Bug#13369)
2013-01-09 Vitalie Spinu <spinuvit@gmail.com> (tiny change)
* comint.el (comint-send-input): Check size of buffer before
waiting for process output, in case already accepted. (Bug#13290)
2013-01-09 Paul Eggert <eggert@cs.ucla.edu>
Spelling fixes.

View file

@ -1847,9 +1847,9 @@ Similarly for Soar, Scheme, etc."
(let ((echo-len (- comint-last-input-end
comint-last-input-start)))
;; Wait for all input to be echoed:
(while (and (accept-process-output proc)
(> (+ comint-last-input-end echo-len)
(while (and (> (+ comint-last-input-end echo-len)
(point-max))
(accept-process-output proc)
(zerop
(compare-buffer-substrings
nil comint-last-input-start

View file

@ -266,7 +266,9 @@ and return values will be inserted into BUFFER. This function generates the
trace advice for FUNCTION and activates it together with any other advice
there might be!! The trace BUFFER will popup whenever FUNCTION is called.
Do not use this to trace functions that switch buffers or do any other
display oriented stuff, use `trace-function-background' instead."
display oriented stuff, use `trace-function-background' instead.
To untrace a function, use `untrace-function' or `untrace-all'."
(interactive (trace--read-args "Trace function: "))
(trace-function-internal function buffer nil context))
@ -280,7 +282,9 @@ and activates it together with any other advice there might be.
The trace output goes to BUFFER quietly, without changing
the window or buffer configuration.
BUFFER defaults to `trace-buffer'."
BUFFER defaults to `trace-buffer'.
To untrace a function, use `untrace-function' or `untrace-all'."
(interactive (trace--read-args "Trace function in background: "))
(trace-function-internal function buffer t context))

View file

@ -2946,14 +2946,14 @@ This function also accepts a hexadecimal number of Unicode code
point or a number in hash notation, e.g. #o21430 for octal,
#x2318 for hex, or #10r8984 for decimal."
(let* ((enable-recursive-minibuffers t)
(completion-ignore-case t)
(input
(completing-read
prompt
(lambda (string pred action)
(let ((completion-ignore-case t))
(if (eq action 'metadata)
'(metadata (category . unicode-name))
(complete-with-action action (ucs-names) string pred))))))
(if (eq action 'metadata)
'(metadata (category . unicode-name))
(complete-with-action action (ucs-names) string pred)))))
(char
(cond
((string-match-p "\\`[0-9a-fA-F]+\\'" input)

View file

@ -1,3 +1,357 @@
2013-01-09 Achim Gratz <Stromeko@Stromeko.de>
* org-compat.el (org-define-obsolete-function-alias)
(org-define-obsolete-variable-alias): Introduce new compatibility
macros to obsolete functions and variables.
* org-agenda.el, org-clock.el, org-id.el, org-lparse.el:
* org-protocol.el, org.el:
Use `org-define-obsolete-{function,variable}-alias' instead
of `define-obsolate{function,variable}-alias'.
* org-faces.el: Define face alias mode-line for XEmacs (it's
called modeline there).
* org-compat.el (org-condition-case-unless-debug): Do not use
defalias for special forms, the Emacs 22 byte-compiler does not
recognize them correctly when compiling macros. Use a macro
instead and rely on macro expansion. That however makes the
decision at compile time, which should be acceptable in this case
since it only affects debugging.
* org-compat.el (org-no-popups): New wrapper macro which let-binds
the correct variables to suppress popup windows depending on the
Emacs version in use. This is a compile-time decision when
byte-compiling.
* org.el (org-get-location, org-switch-to-buffer-other-window):
Use the wrapper `org-no-popups' to let-bind the correct variables
for suppression of popup windows.
* org-compat.el (user-error): Defalias to `error' for Emacsen that
don't have it.
* org-agenda.el (org-agenda-write): Use org-called-interactively-p
instead of called-interactively-p.
* org.el (org-find-invisible-foreground): Do not use the value of
variables `default-frame-alist', `initial-frame-alist' and
`window-system-default-frame-alist' when their symbol is not bound.
2013-01-09 Bastien Guerry <bzg@gnu.org>
* org-src.el (org-edit-src-code): Fix bug when trying to edit a
table.el table.
* org-agenda.el (org-agenda-finalize): Inhibit readonly for the
whole function.
* org.el (org-entry-get): Speed up by let-binding some variables
only if needed. Also fix a bug: consider an empty drawer as no drawer.
* org-agenda.el (org-search-view, org-agenda-get-todos)
(org-agenda-get-timestamps, org-agenda-get-sexps)
(org-agenda-get-progress, org-agenda-get-deadlines)
(org-agenda-get-scheduled, org-agenda-get-blocks)
(org-agenda-change-all-lines): Get local tags only.
(org-agenda-use-tag-inheritance): New option.
(org-agenda-finalize): When `org-agenda-use-tag-inheritance'
is non-nil, possibly reset tags in the agenda buffer.
(org-agenda-check-type): Enhance docstring.
* org.el (org-use-tag-inheritance): Fix typo in docstring.
* org-agenda.el (org-float): Don't alias `org-float'.
* org.el (org-scan-tags): The skipper already checks for archived
entries.
* org.el (org-refresh-properties): Rename from
`org-refresh-effort-properties' and use two new parameters.
(org-agenda-prepare-buffers): Use `org-refresh-properties'.
Also refresh the 'org-appt-warntime text property.
* org-clock.el (org-clock-in): Use the renamed defun.
* org-icalendar.el (org-icalendar-print-entries):
Refresh the 'org-appt-warntime property.
(org-icalendar-print-entries):
* org-agenda.el (org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Do not use `org-entry-get' to get the
"APPT_WARNTIME" property value.
* org.el (org-id-link-to-org-use-id): Fix compiler warning.
* org-agenda.el (org-agenda-format-item): Do not use
`org-get-effort' to get the effort text property.
(org-agenda-get-sexps): Use `org-back-to-heading' when setting tags.
* org-clock.el (org-clock-in): Refresh effort properties.
* org.el (org-refresh-effort-properties): New defun.
(org-get-effort): Delete.
(org-set-effort):
(org-property-next-allowed-value): Set the 'org-effort text property.
(org-agenda-prepare-buffers): Refresh effort properties.
* org.el (org-read-date): Let-bind `mouse-autoselect-window' to
nil so that the mouse doesn't jump when the option is set to t globally.
* org-agenda.el (org-agenda-dim-blocked-tasks): Default to nil.
(org-agenda-dim-blocked-tasks): Make interactive and allow an
optional parameter 'invisible to hide blocked tasks instead of
just dimming them.
(org-agenda-mode-map): Bind `org-agenda-dim-blocked-tasks' to "#".
* org-agenda.el (org-agenda-finalize): Don't try to align tags
when there are no tags. Only try to draw the habit consistency
graph when there is a habit in the buffer. Only mark clocking
task when there is one.
* org.el (org-adaptive-fill-function): DTRT in `message-mode'.
* org.el (org-get-priority): Save match data even when using
`org-get-priority-function'.
* org-mobile.el (org-mobile-create-index-file):
Possibly normalize `org-todo-keywords'.
* org-mobile.el (org-mobile-push): Use the correct agenda buffer names.
* org.el (org-store-link): Use `org-id-link-to-org-use-id' instead
of the obsolete variable name.
* org.el (org-fontify-meta-lines-and-blocks-1):
Fix bug when fontifying keywords with no value.
* org.el (org-goto-auto-isearch): Enhance docstring.
(org-goto-map): Make a defun, so that the customized value of
org-goto-auto-isearch is correctly initialized.
(org-goto): Initialize the keymap with `org-goto-map'.
(org-get-location): Use *Org Help* as a temporary buffer.
Tell whether auto-isearch is on or off.
* org-exp.el (org-export-as-org): Remove useless argument.
* org-docbook.el (org-export-as-docbook-batch)
(org-export-region-as-docbook, org-export-as-docbook-pdf):
Fix the number of arguments.
(org-export-as-docbook): Remove useless argument.
* org.el (org-speed-commands-default): Use ":" instead of ";" for
`org-set-tags-command', which is consistent with ":" in agenda
view. Use "=" for `org-columns".
* org.el (org-sparse-tree): Fix redundant information in prompt.
* org-exp.el (org-export-string): Fix number of arguments passed
to the org-export-as-* functions.
* org-latex.el (org-export-as-latex): Fix typo in docstring.
* org-list.el (org-cycle-include-plain-lists): Docstring enhancement.
* org.el (org-fontify-meta-lines-and-blocks-1): Fix fontification
bug when fontifying a keyword with no associated value.
(org-cycle-internal-local): Don't run hooks when cycling a plain
list before first headline.
(org-ctrl-c-ctrl-c): Throw a user error when trying to toggle a
blocked checkbox.
(org-indent-line): Fix table formulas indenting.
* org-agenda.el (org-agenda-open-link): Fix bug when no link is
matched. Return a message instead of an error.
(org-agenda-priority): Remove useless parameter and fix showing
priority in agenda buffers.
* org-macs.el (org-with-buffer-modified-unmodified): New macro.
* org.el (org-entry-blocked-p): Use the new macro.
* org-src.el (org-edit-src-exit): Don't comma-escape the content
of a fixed width region.
* org.el (org-blocker-hook): Update the docstring to mention that
functions in this hook should not modify the buffer.
(org-trigger-hook): Small docstring fix.
(org-entry-blocked-p): Use `with-buffer-modified-unmodified'
so that the function never modifies the buffer.
* org-agenda.el (org-agenda-open-link): Allow to open an internal
link by using the new `org-offer-links-in-entry' function.
* org.el (org-offer-links-in-entry): Do not open the link directly
through `org-open-link-from-string', only offer to select a link
and return a cons with the link (as a string) and the end of entry.
(org-open-at-point): Use `org-offer-links-in-entry' correctly.
* org.el (org-cycle-internal-local):
Fix bug: allow headings with leading blank characters.
* org-clock.el (org-clock-persist):
Docstring fix: document the 'history value.
* org.el (org-insert-link): Fix bug when inserting links to
headlines containing the ">" character.
* org-crypt.el (org-at-encrypted-entry-p): Fix search boundary.
* org-compat.el (org-delete-directory): New compatibility function
for Emacs 22, where `delete-directory' does not support recursive
deletion.
* org-odt.el (org-odt-cleanup-xml-buffers):
Use the new compatibility function.
* org.el (org-table-map-tables): Fix allowed blocks.
* org.el (org-edit-special):
* org-src.el (org-edit-src-code): Fix regression: allow editing
HTML and LaTeX source blocks again.
* org.el (org-nonsticky-props): Add `htmlize-link'.
(org-nonsticky-props): Add `htmlize-link'.
* org.el (org-edit-special):
* org-src.el (org-edit-src-code): Don't edit in verbatim blocks.
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command): Use `org-delete-backward-char'
instead of `backward-delete-char'.
* org-src.el (org-edit-src-code): Fix another bug about editing
special blocks "example" and "verbatim".
* org.el (org-structure-template-alist): Add verbatim.
(org-edit-special): Fix bug about editing special blocks
"example" and "verbatim".
* org.el (org-delete-backward-char, org-delete-char):
Save match data, `delete-backward-char' and `delete-char' don't.
* org.el (org-enable-table-editor, org-insert-heading)
(org-remove-timestamp-with-keyword, org-self-insert-command):
* org-table.el (org-table-fedit-lisp-indent)
(orgtbl-self-insert-command):
* org-latex.el (org-export-latex-subcontent):
* org-clock.el (org-clocktable-write-default):
* org-ascii.el (org-export-ascii-preprocess):
Use `delete-backward-char' instead of `backward-delete-char'.
* org.el (org-todo): Ignore the comment string when changing the
TODO state of a headline.
(org-edit-special): Fix docstring.
(org-in-src-block-p): Small enhancement.
* org-publish.el (org-publish-org-to): Call `org-export-as-*'
functions with the correct list of arguments.
* org-html.el (org-export-as-html): Delete obsolete arg `hidden'.
(org-export-as-html-and-open, org-export-as-html-batch)
(org-export-region-as-html): Don't use obsolete arg.
* org-ascii.el (org-export-as-ascii): Delete obsolete arg `hidden'.
(org-export-as-ascii-to-buffer): Don't use obsolete arg.
* org.el (org-in-fixed-width-region-p): Save match data.
(org-in-src-block-p): Use case-folding for searching the block
boundaries.
(org-activate-plain-links, org-activate-angle-links)
(org-activate-bracket-links): Prevent link activation in
source code blocks.
* org-odt.el (org-odt-cleanup-xml-buffers): Fix Emacs Bug#13197 by
setting the correct buffer before marking it unmodified to
silently kill him.
* org.el (org-set-font-lock-defaults): Don't activate links in
source code blocks and fixed-width regions.
* org-agenda.el (org-agenda-finalize): Fix links activation.
* org.el (org-open-at-point): Throw the correct error on
non-links. Use `user-error' instead of `error'.
* org.el (org-in-fixed-width-region-p): Define before use.
* org-src.el (org-in-src-block-p): Declare function.
* org-compat.el: Fix bug: don't use `eval-when-compile' when
aliasing `user-error'.
* org-agenda.el (org-agenda-skip): Only check if point is
inside a code block, not at a code block.
* org.el (org-in-fixed-width-region-p):
Rewrite using org-element.el.
* org.el (org-fill-paragraph): Fill correctly in source code block.
* org.el (org-in-fixed-width-region-p): New function.
(org-edit-special): Fix bug: make sure to DTRT in every
special environment. Also use the new function to check
against fixed-width environment.
* org-src.el (org-edit-src-code): Check if we are in a source code
block with `org-in-src-block-p'. Slightly reformat the docstring.
* org.el (org-in-src-block-p): Return t when point is at the
#+BEGIN_SRC/#+END_SRC lines unless the new optional parameter
'inside is set to t.
* ob-exp.el (obe-marker): Delete useless var.
* org-src.el (org-edit-src-code): Fix bug triggered by the sexp
(copy-marker nil) on Emacs <24.1.
2013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
* org-agenda.el (org-agenda-get-restriction-and-command):
* org-capture.el (org-capture-place-template):
* org-colview.el (org-dblock-write:columnview):
* org-mobile.el (org-mobile-locate-entry):
* org-table.el (org-table-convert-region):
* org.el (org-update-statistics-cookies): Use `point-marker'.
2013-01-09 Eric Schulte <eric.schulte@gmx.com>
* org-exp.el (org-export-string): Pass the dir option on through
to any subsequent export functions.
2013-01-09 Henning Weiss <hdweiss@gmail.com> (tiny change)
* org-mobile.el (org-mobile-sumo-agenda-command): Remove match
description from block agendas when they have a title.
2013-01-09 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-export-as-odt-batch): Init `org-odt-zip-dir'.
Fix Emacs Bug#13254.
* org-odt.el (org-odt-format-org-link): Add check for presence of
description in headline links.
2013-01-09 Michael Gauland <mike_gauland@stanfordalumni.org> (tiny change)
* org-src.el: Create a marker to pass to copy-marker.
2013-01-09 Nicolas Goaziou <n.goaziou@gmail.com>
* org.el (org-setup-filling): Set `auto-fill-inhibit-regexp' to
nil because `org-adaptive-fill-function' already determines which
lines should be filled.
* org.el (org-fill-paragraph): Small refactoring.
* org-element.el (org-element--parse-elements)
(org-element-at-point): Fix parsing of a list in a block in a list.
2013-01-09 Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
* org.el (org-copy-subtree, org-paste-subtree):
Fix whitespace handling when copying/pasting a subtree.
2012-12-20 Michael Albinus <michael.albinus@gmx.de>
* ob.el (org-babel-temp-file): Fix setting of
@ -129,9 +483,8 @@
* ob-haskell.el (org-export-as-latex): Don't use the obsoleted
argument `hidden'.
* org.el (org-refile): Run within `with-demoted-errors' so
that a corrupted bookmark file does not stop the refile
process.
* org.el (org-refile): Run within `with-demoted-errors' so that a
corrupted bookmark file does not stop the refile process.
* org-capture.el (org-capture-bookmark-last-stored-position):
Ditto for the capture process.

View file

@ -30,6 +30,7 @@
(eval-when-compile (require 'cl))
(defvar org-babel-error-buffer-name "*Org-Babel Error Output*")
(declare-function org-babel-temp-file "ob-core" (prefix &optional suffix))
(defun org-babel-eval-error-notify (exit-code stderr)
"Open a buffer to display STDERR and a message with the value of EXIT-CODE."
@ -142,6 +143,11 @@ specifies the value of ERROR-BUFFER."
shell-file-name
"/bin/sh"))
exit-status)
;; There is an error in `process-file' when `error-file' exists.
;; This is fixed in Emacs trunk as of 2012-12-21; let's use this
;; workaround for now.
(unless (file-remote-p default-directory)
(delete-file error-file))
(if (or replace
(and output-buffer
(not (or (bufferp output-buffer) (stringp output-buffer)))))

View file

@ -28,7 +28,6 @@
(eval-when-compile
(require 'cl))
(defvar obe-marker nil)
(defvar org-current-export-file)
(defvar org-babel-lob-one-liner-regexp)
(defvar org-babel-ref-split-regexp)

View file

@ -840,7 +840,7 @@ entry, the rest of the entry will not be searched."
:group 'org-agenda-daily/weekly
:type 'boolean)
(defcustom org-agenda-dim-blocked-tasks t
(defcustom org-agenda-dim-blocked-tasks nil
"Non-nil means dim blocked tasks in the agenda display.
This causes some overhead during agenda construction, but if you
have turned on `org-enforce-todo-dependencies',
@ -857,6 +857,7 @@ that is blocked because of checkboxes will never be made invisible, it
will only be dimmed."
:group 'org-agenda-daily/weekly
:group 'org-agenda-todo-list
:version "24.3"
:type '(choice
(const :tag "Do not dim" nil)
(const :tag "Dim to a gray face" t)
@ -889,7 +890,7 @@ you want to use two-columns display (see `org-agenda-menu-two-columns')."
:version "24.1"
:type 'boolean)
(define-obsolete-variable-alias 'org-agenda-menu-two-column 'org-agenda-menu-two-columns "24.3")
(org-define-obsolete-variable-alias 'org-agenda-menu-two-column 'org-agenda-menu-two-columns "24.3")
(defcustom org-agenda-menu-two-columns nil
"Non-nil means, use two columns to show custom commands in the dispatcher.
@ -899,7 +900,7 @@ to nil."
:version "24.1"
:type 'boolean)
(define-obsolete-variable-alias 'org-finalize-agenda-hook 'org-agenda-finalize-hook "24.3")
(org-define-obsolete-variable-alias 'org-finalize-agenda-hook 'org-agenda-finalize-hook "24.3")
(defcustom org-agenda-finalize-hook nil
"Hook run just before displaying an agenda buffer.
The buffer is still writable when the hook is called.
@ -1651,6 +1652,23 @@ When non-nil, this must be the number of minutes, e.g. 60 for one hour."
:group 'org-agenda-line-format
:type 'boolean)
(defcustom org-agenda-use-tag-inheritance '(todo search timeline agenda)
"List of agenda view types where to use tag inheritance.
In tags/tags-todo/tags-tree agenda views, tag inheritance is
controlled by `org-use-tag-inheritance'. In other agenda types,
`org-use-tag-inheritance' is not used when selecting the agenda
entries, but you may want the agenda to use the inherited tags
anyway, e.g. for later tag filtering.
The default value reset tags in every agenda type. Setting this
option to nil will speed up non-tags agenda view a lot.
Allowed value are 'todo, 'search, 'timeline and 'agenda."
:version "24.3"
:group 'org-agenda
:type '(repeat (symbol :tag "Agenda type")))
(defcustom org-agenda-hide-tags-regexp nil
"Regular expression used to filter away specific tags in agenda views.
This means that these tags will be present, but not be shown in the agenda
@ -2012,6 +2030,7 @@ The following commands are available:
(org-defkey org-agenda-mode-map "\C-c\C-w" 'org-agenda-refile)
(org-defkey org-agenda-mode-map "m" 'org-agenda-bulk-mark)
(org-defkey org-agenda-mode-map "*" 'org-agenda-bulk-mark-all)
(org-defkey org-agenda-mode-map "#" 'org-agenda-dim-blocked-tasks)
(org-defkey org-agenda-mode-map "%" 'org-agenda-bulk-mark-regexp)
(org-defkey org-agenda-mode-map "u" 'org-agenda-bulk-unmark)
(org-defkey org-agenda-mode-map "U" 'org-agenda-bulk-unmark-all)
@ -2664,7 +2683,7 @@ L Timeline for current buffer # List stuck projects (!=configure)
(add-text-properties (match-beginning 2) (match-end 2)
'(face bold) header))
header)))
(setq header-end (move-marker (make-marker) (point)))
(setq header-end (point-marker))
(while t
(setq custom1 custom)
(when (eq rmheader t)
@ -3194,7 +3213,7 @@ If AGENDA-BUFFER-NAME, use this as the buffer name for the agenda to write."
(kill-buffer (current-buffer))
(message "Plain text written to %s" file))))))))
(set-buffer (or agenda-bufname
(and (called-interactively-p 'any) (buffer-name))
(and (org-called-interactively-p 'any) (buffer-name))
org-agenda-buffer-name)))
(when open (org-open-file file)))
@ -3514,44 +3533,60 @@ generating a new one."
(save-excursion
(let ((inhibit-read-only t))
(goto-char (point-min))
(while (org-activate-bracket-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link)))
(while (org-activate-plain-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link)))
(org-agenda-align-tags)
(save-excursion
(while (org-activate-bracket-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link))))
(save-excursion
(while (org-activate-plain-links (point-max))
(add-text-properties (match-beginning 0) (match-end 0)
'(face org-link))))
(unless (eq org-agenda-remove-tags t)
(org-agenda-align-tags))
(unless org-agenda-with-colors
(remove-text-properties (point-min) (point-max) '(face nil))))
(if (and (boundp 'org-agenda-overriding-columns-format)
org-agenda-overriding-columns-format)
(org-set-local 'org-agenda-overriding-columns-format
org-agenda-overriding-columns-format))
(if (and (boundp 'org-agenda-view-columns-initially)
org-agenda-view-columns-initially)
(org-agenda-columns))
(when org-agenda-fontify-priorities
(org-agenda-fontify-priorities))
(when (and org-agenda-dim-blocked-tasks org-blocker-hook)
(org-agenda-dim-blocked-tasks))
;; We need to widen when `org-agenda-finalize' is called from
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
(save-restriction
(widen)
(org-agenda-mark-clocking-task))
(when org-agenda-entry-text-mode
(org-agenda-entry-text-hide)
(org-agenda-entry-text-show))
(if (functionp 'org-habit-insert-consistency-graphs)
(org-habit-insert-consistency-graphs))
(let ((inhibit-read-only t))
(run-hooks 'org-agenda-finalize-hook))
(setq org-agenda-type (org-get-at-bol 'org-agenda-type))
(when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter))
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
(when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter))
(org-agenda-filter-apply org-agenda-category-filter 'category))
(org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local))))
(remove-text-properties (point-min) (point-max) '(face nil)))
(if (and (boundp 'org-agenda-overriding-columns-format)
org-agenda-overriding-columns-format)
(org-set-local 'org-agenda-overriding-columns-format
org-agenda-overriding-columns-format))
(if (and (boundp 'org-agenda-view-columns-initially)
org-agenda-view-columns-initially)
(org-agenda-columns))
(when org-agenda-fontify-priorities
(org-agenda-fontify-priorities))
(when (and org-agenda-dim-blocked-tasks org-blocker-hook)
(org-agenda-dim-blocked-tasks))
;; We need to widen when `org-agenda-finalize' is called from
;; `org-agenda-change-all-lines' (e.g. in `org-agenda-clock-in')
(when org-clock-current-task
(save-restriction
(widen)
(org-agenda-mark-clocking-task)))
(when org-agenda-entry-text-mode
(org-agenda-entry-text-hide)
(org-agenda-entry-text-show))
(if (and (functionp 'org-habit-insert-consistency-graphs)
(save-excursion (next-single-property-change (point-min) 'org-habit-p)))
(org-habit-insert-consistency-graphs))
(setq org-agenda-type (org-get-at-bol 'org-agenda-type))
(when (delq nil (mapcar (lambda (tp) (org-agenda-check-type nil tp))
org-agenda-use-tag-inheritance))
(let (mrk)
(save-excursion
(goto-char (point-min))
(while (equal (forward-line) 0)
(when (setq mrk (or (get-text-property (point) 'org-hd-marker)
(get-text-property (point) 'org-hd-marker)))
(put-text-property (point-at-bol) (point-at-eol)
'tags (org-with-point-at mrk
(delete-dups
(mapcar 'downcase (org-get-tags-at))))))))))
(run-hooks 'org-agenda-finalize-hook)
(when (or org-agenda-tag-filter (get 'org-agenda-tag-filter :preset-filter))
(org-agenda-filter-apply org-agenda-tag-filter 'tag))
(when (or org-agenda-category-filter (get 'org-agenda-category-filter :preset-filter))
(org-agenda-filter-apply org-agenda-category-filter 'category))
(org-add-hook 'kill-buffer-hook 'org-agenda-reset-markers 'append 'local)))))
(defun org-agenda-mark-clocking-task ()
"Mark the current clock entry in the agenda if it is present."
@ -3607,15 +3642,18 @@ generating a new one."
((equal p h) 'bold)))
(overlay-put ov 'org-type 'org-priority)))))
(defun org-agenda-dim-blocked-tasks ()
(defun org-agenda-dim-blocked-tasks (&optional invisible)
(interactive "P")
"Dim currently blocked TODO's in the agenda display."
(message "Dim or hide blocked tasks...")
(mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo)
(delete-overlay o)))
(overlays-in (point-min) (point-max)))
(save-excursion
(let ((inhibit-read-only t)
(org-depend-tag-blocked nil)
(invis (eq org-agenda-dim-blocked-tasks 'invisible))
(invis (or (not (null invisible))
(eq org-agenda-dim-blocked-tasks 'invisible)))
org-blocked-by-checkboxes
invis1 b e p ov h l)
(goto-char (point-min))
@ -3636,7 +3674,8 @@ generating a new one."
(if invis1
(overlay-put ov 'invisible t)
(overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo)))))))
(overlay-put ov 'org-type 'org-blocked-todo))))))
(message "Dim or hide blocked tasks...done"))
(defvar org-agenda-skip-function nil
"Function to be called at each match during agenda construction.
@ -3656,7 +3695,7 @@ A good way to set it is through options in `org-agenda-custom-commands'.")
Also moves point to the end of the skipped region, so that search can
continue from there."
(let ((p (point-at-bol)) to)
(when (org-in-src-block-p) (throw :skip t))
(when (org-in-src-block-p t) (throw :skip t))
(and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
(get-text-property p :org-archived)
(org-end-of-subtree t)
@ -4405,7 +4444,7 @@ in `org-agenda-text-search-extra-files'."
(setq marker (org-agenda-new-marker (point))
category (org-get-category)
category-pos (get-text-property (point) 'org-category-position)
tags (org-get-tags-at (point))
tags (org-get-tags-at nil t)
txt (org-agenda-format-item
""
(buffer-substring-no-properties
@ -5229,7 +5268,7 @@ the documentation of `org-diary'."
category-pos (get-text-property (point) 'org-category-position)
txt (org-trim
(buffer-substring (match-beginning 2) (match-end 0)))
tags (org-get-tags-at (point))
tags (org-get-tags-at nil t)
txt (org-agenda-format-item "" txt category tags t)
priority (1+ (org-get-priority txt))
todo-state (org-get-todo-state))
@ -5389,7 +5428,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
clockp (and org-agenda-include-inactive-timestamps
(or (string-match org-clock-string tmp)
(string-match "]-+\\'" tmp)))
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
donep (member todo-state org-done-keywords))
(if (or scheduledp deadlinep closedp clockp
(and donep org-agenda-skip-timestamp-if-done))
@ -5408,7 +5447,7 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(assoc (point) deadline-position-alist))
(throw :skip nil))
(setq hdmarker (org-agenda-new-marker)
tags (org-get-tags-at))
tags (org-get-tags-at nil t))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq head (or (match-string 1) ""))
(setq txt (org-agenda-format-item
@ -5458,10 +5497,9 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(setq marker (org-agenda-new-marker beg)
category (org-get-category beg)
category-pos (get-text-property beg 'org-category-position)
tags (save-excursion (org-backward-heading-same-level 0)
(org-get-tags-at))
tags (save-excursion (org-back-to-heading t) (org-get-tags-at nil t))
todo-state (org-get-todo-state)
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
extra nil)
(dolist (r (if (stringp result)
@ -5510,7 +5548,6 @@ Do we have a reason to ignore this TODO entry because it has a time stamp?
(org-no-warnings
(let ((calendar-date-style 'european) (european-calendar-style t))
(diary-date day month year mark))))
(defalias 'org-float 'diary-float)
;; Define the` org-class' function
(defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
@ -5629,7 +5666,7 @@ please use `org-class' instead."
(setq txt org-agenda-no-heading-message)
(goto-char (match-beginning 0))
(setq hdmarker (org-agenda-new-marker)
tags (org-get-tags-at))
tags (org-get-tags-at nil t))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq txt (match-string 1))
(when extra
@ -5833,13 +5870,13 @@ See also the user option `org-agenda-clock-consistency-checks'."
(not (= diff 0))))
(setq txt nil)
(setq category (org-get-category)
warntime (org-entry-get (point) "APPT_WARNTIME")
warntime (get-text-property (point) 'org-appt-warntime)
category-pos (get-text-property (point) 'org-category-position))
(if (not (re-search-backward "^\\*+[ \t]+" nil t))
(setq txt org-agenda-no-heading-message)
(goto-char (match-end 0))
(setq pos1 (match-beginning 0))
(setq tags (org-get-tags-at pos1))
(setq tags (org-get-tags-at pos1 t))
(setq head (buffer-substring-no-properties
(point)
(progn (skip-chars-forward "^\r\n")
@ -5923,7 +5960,7 @@ FRACTION is what fraction of the head-warning time has passed."
(match-string 1) d1 'past show-all
(current-buffer) pos)
diff (- d2 d1)
warntime (org-entry-get (point) "APPT_WARNTIME"))
warntime (get-text-property (point) 'org-appt-warntime))
(setq pastschedp (and todayp (< diff 0)))
(setq did-habit-check-p nil)
;; When to show a scheduled item in the calendar:
@ -5969,7 +6006,7 @@ FRACTION is what fraction of the head-warning time has passed."
pastschedp))
(setq mm (assoc pos1 deadline-position-alist)))
(throw :skip nil)))
(setq tags (org-get-tags-at))
(setq tags (org-get-tags-at nil t))
(setq head (buffer-substring-no-properties
(point)
(progn (skip-chars-forward "^\r\n") (point))))
@ -6051,7 +6088,7 @@ FRACTION is what fraction of the head-warning time has passed."
(setq txt org-agenda-no-heading-message)
(goto-char (match-beginning 0))
(setq hdmarker (org-agenda-new-marker (point)))
(setq tags (org-get-tags-at))
(setq tags (org-get-tags-at nil t))
(looking-at "\\*+[ \t]+\\([^\r\n]+\\)")
(setq head (match-string 1))
(let ((remove-re
@ -6212,12 +6249,7 @@ Any match of REMOVE-RE will be removed from TXT."
(match-string 2 txt))
t t txt))))
(when (derived-mode-p 'org-mode)
(setq effort
(condition-case nil
(org-get-effort
(or (get-text-property 0 'org-hd-marker txt)
(get-text-property 0 'org-marker txt)))
(error nil)))
(setq effort (ignore-errors (get-text-property 0 'org-effort txt)))
(when effort
(setq neffort (org-duration-string-to-minutes effort)
effort (setq effort (concat "[" effort "]")))))
@ -6735,7 +6767,8 @@ in the file. Otherwise, restriction will be to the current subtree."
(defun org-agenda-check-type (error &rest types)
"Check if agenda buffer is of allowed type.
If ERROR is non-nil, throw an error, otherwise just return nil."
If ERROR is non-nil, throw an error, otherwise just return nil.
Allowed types are 'agenda 'timeline 'todo 'tags 'search."
(if (not org-agenda-type)
(error "No Org agenda currently displayed")
(if (memq org-agenda-type types)
@ -7669,7 +7702,7 @@ When called with a prefix argument, include all archive files as well."
"")))
(force-mode-line-update))
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-agenda-post-command-hook 'org-agenda-update-agenda-type "24.3")
(defun org-agenda-update-agenda-type ()
@ -7890,29 +7923,45 @@ If this information is not given, the function uses the tree at point."
(unless no-update (org-agenda-redo))))
(defun org-agenda-open-link (&optional arg)
"Follow the link in the current line, if any.
This looks for a link in the displayed line in the agenda. It also looks
at the text of the entry itself."
"Open the link(s) in the current entry, if any.
This looks for a link in the displayed line in the agenda.
It also looks at the text of the entry itself."
(interactive "P")
(let* ((marker (or (org-get-at-bol 'org-hd-marker)
(org-get-at-bol 'org-marker)))
(buffer (and marker (marker-buffer marker)))
(prefix (buffer-substring
(point-at-bol) (point-at-eol))))
(point-at-bol) (point-at-eol)))
(lkall (org-offer-links-in-entry buffer marker arg prefix))
(lk (car lkall))
(lkend (cdr lkall))
trg)
(cond
(buffer
((and buffer (stringp lk))
(with-current-buffer buffer
(save-excursion
(save-restriction
(widen)
(goto-char marker)
(org-offer-links-in-entry arg prefix)))))
(setq trg (and (string-match org-bracket-link-regexp lk)
(match-string 1 lk)))
(if (or (not trg) (string-match org-any-link-re trg))
(save-excursion
(save-restriction
(widen)
(goto-char marker)
(when (search-forward lk nil lkend)
(goto-char (match-beginning 0))
(org-open-at-point))))
;; This is an internal link, widen the buffer
(switch-to-buffer-other-window buffer)
(widen)
(goto-char marker)
(when (search-forward lk nil lkend)
(goto-char (match-beginning 0))
(org-open-at-point)))))
((or (org-in-regexp (concat "\\(" org-bracket-link-regexp "\\)"))
(save-excursion
(beginning-of-line 1)
(looking-at (concat ".*?\\(" org-bracket-link-regexp "\\)"))))
(org-open-link-from-string (match-string 1)))
(t (error "No link to open here")))))
(t (message "No link to open here")))))
(defun org-agenda-copy-local-variable (var)
"Get a variable from a referenced buffer and install it here."
@ -8313,35 +8362,37 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
(interactive)
(org-agenda-priority 'down))
(defun org-agenda-priority (&optional force-direction show)
(defun org-agenda-priority (&optional force-direction)
"Set the priority of line at point, also in Org-mode file.
This changes the line at point, all other lines in the agenda referring to
the same tree node, and the headline of the tree node in the Org-mode file."
the same tree node, and the headline of the tree node in the Org-mode file.
Called with a universal prefix arg, show the priority instead of setting it."
(interactive "P")
(if (equal force-direction '(4)) (setq show t))
(unless org-enable-priority-commands
(error "Priority commands are disabled"))
(org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
(hdmarker (org-get-at-bol 'org-hd-marker))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
newhead)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
(org-flag-heading nil))) ; show the next heading
(funcall 'org-priority force-direction show)
(end-of-line 1)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker)
(beginning-of-line 1))))
(if (equal force-direction '(4))
(org-show-priority)
(unless org-enable-priority-commands
(error "Priority commands are disabled"))
(org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
(hdmarker (org-get-at-bol 'org-hd-marker))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
newhead)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-show-context 'agenda)
(save-excursion
(and (outline-next-heading)
(org-flag-heading nil))) ; show the next heading
(funcall 'org-priority force-direction)
(end-of-line 1)
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead hdmarker)
(beginning-of-line 1)))))
;; FIXME: should fix the tags property of the agenda line.
(defun org-agenda-set-tags (&optional tag onoff)

View file

@ -131,7 +131,7 @@ utf8 Use all UTF-8 characters")
"Call `org-export-as-ascii` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-ascii'."
(interactive "P")
(org-export-as-ascii arg nil nil "*Org ASCII Export*")
(org-export-as-ascii arg nil "*Org ASCII Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org ASCII Export*")))
@ -183,23 +183,19 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
(setq rtn (org-export-as-ascii
nil nil ext-plist
buffer body-only))
(setq rtn (org-export-as-ascii nil ext-plist buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
rtn)))
;;;###autoload
(defun org-export-as-ascii (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-ascii (arg &optional ext-plist to-buffer body-only pub-dir)
"Export the outline as a pretty ASCII file.
If there is an active region, export only the region.
The prefix ARG specifies how many levels of the outline should become
underlined headlines, default is 3. Lower levels will become bulleted
lists. When HIDDEN is non-nil, don't display the ASCII buffer.
EXT-PLIST is a property list with external parameters overriding
lists. EXT-PLIST is a property list with external parameters overriding
org-mode's default settings, but still inferior to file-local
settings. When TO-BUFFER is non-nil, create a buffer with that
name and export to that buffer. If TO-BUFFER is the symbol

View file

@ -979,7 +979,7 @@ it. When it is a variable, retrieve the value. Return whatever we get."
(show-all)
(goto-char (org-capture-get :pos))
(org-set-local 'org-capture-target-marker
(move-marker (make-marker) (point)))
(point-marker))
(org-set-local 'outline-level 'org-outline-level)
(let* ((template (org-capture-get :template))
(type (org-capture-get :type)))

View file

@ -35,6 +35,7 @@
(declare-function calendar-absolute-from-iso "cal-iso" (&optional date))
(declare-function notifications-notify "notifications" (&rest params))
(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
(declare-function org-refresh-properties "org" (dprop tprop))
(defvar org-time-stamp-formats)
(defvar org-ts-what)
(defvar org-frame-title-format-backup frame-title-format)
@ -159,12 +160,15 @@ the clock can be resumed from that point."
The clock is resumed when Emacs restarts.
When this is t, both the running clock, and the entire clock
history are saved. When this is the symbol `clock', only the
running clock is saved.
running clock is saved. When this is the symbol `history', only
the clock history is saved.
When Emacs restarts with saved clock information, the file containing the
running clock as well as all files mentioned in the clock history will
be visited.
All this depends on running `org-clock-persistence-insinuate' in .emacs"
When Emacs restarts with saved clock information, the file containing
the running clock as well as all files mentioned in the clock history
will be visited.
All this depends on running `org-clock-persistence-insinuate' in your
Emacs initialization file."
:group 'org-clock
:type '(choice
(const :tag "Just the running clock" clock)
@ -201,7 +205,7 @@ file name play this sound file. If not possible, fall back to beep"
(const :tag "Standard beep" t)
(file :tag "Play sound file")))
(define-obsolete-variable-alias 'org-clock-modeline-total
(org-define-obsolete-variable-alias 'org-clock-modeline-total
'org-clock-mode-line-total "24.3")
(defcustom org-clock-mode-line-total 'auto
@ -1078,6 +1082,7 @@ time as the start time \(see `org-clock-continuously' to
make this the default behavior.)"
(interactive "P")
(setq org-clock-notification-was-shown nil)
(org-refresh-properties org-effort-property 'org-effort)
(catch 'abort
(let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness)
(org-clocking-p)))
@ -1199,7 +1204,7 @@ make this the default behavior.)"
(setq org-clock-start-time
(apply 'encode-time
(org-parse-time-string (match-string 1))))
(setq org-clock-effort (org-get-effort))
(setq org-clock-effort (get-text-property (point) 'org-effort))
(setq org-clock-total-time (org-clock-sum-current-item
(org-clock-get-sum-start))))
((eq org-clock-in-resume 'auto-restart)
@ -1219,7 +1224,7 @@ make this the default behavior.)"
(beginning-of-line 1)
(org-indent-line-to (- (org-get-indentation) 2)))
(insert org-clock-string " ")
(setq org-clock-effort (org-get-effort))
(setq org-clock-effort (get-text-property (point) 'org-effort))
(setq org-clock-total-time (org-clock-sum-current-item
(org-clock-get-sum-start)))
(setq org-clock-start-time

View file

@ -1243,7 +1243,7 @@ PARAMS is a property list of parameters:
:skip-empty-rows
When t, skip rows where all specifiers other than ITEM are empty.
:format When non-nil, specify the column view format to use."
(let ((pos (move-marker (make-marker) (point)))
(let ((pos (point-marker))
(hlines (plist-get params :hlines))
(vlines (plist-get params :vlines))
(maxlevel (plist-get params :maxlevel))

View file

@ -169,6 +169,24 @@ If DELETE is non-nil, delete all those overlays."
(set-buffer-modified-p modified-p))
(decompose-region beg end)))
(defmacro org-define-obsolete-function-alias (o-name c-name when &optional doc)
"Reconcile the two-argument form of
`define-obsolete-function-alias' in XEmacs/Emacs 22 with the 3-4
argument form in Emacs 23 and later."
(if (or (featurep 'xemacs)
(< emacs-major-version 23))
`(define-obsolete-function-alias ,o-name ,c-name)
`(define-obsolete-function-alias ,o-name ,c-name ,when ,doc)))
(defmacro org-define-obsolete-variable-alias (o-name c-name when &optional doc)
"Reconcile the two-argument form of
`define-obsolete-variable-alias' in XEmacs/Emacs 22 with the 3-4
argument form in Emacs 23 and later."
(if (or (featurep 'xemacs)
(< emacs-major-version 23))
`(define-obsolete-variable-alias ,o-name ,c-name)
`(define-obsolete-variable-alias ,o-name ,c-name ,when ,doc)))
;; Miscellaneous functions
(defun org-add-hook (hook function &optional append local)
@ -195,9 +213,8 @@ passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
ignored in this case."
(cond ((if (fboundp 'window-full-width-p)
(not (window-full-width-p window))
(> (frame-width) (window-width window)))
;; do nothing if another window would suffer
)
;; do nothing if another window would suffer
(> (frame-width) (window-width window))))
((and (fboundp 'fit-window-to-buffer) (not shrink-only))
(fit-window-to-buffer window max-height min-height))
((fboundp 'shrink-window-if-larger-than-buffer)
@ -257,7 +274,6 @@ Works on both Emacs and XEmacs."
(when (boundp 'zmacs-regions)
(setq zmacs-regions t)))))
;; Invisibility compatibility
(defun org-remove-from-invisibility-spec (arg)
@ -372,6 +388,20 @@ TIME defaults to the current time."
(time-to-seconds (or time (current-time)))
(float-time time)))
;; `user-error' is only available from 24.2.50 on
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
(defmacro org-no-popups (&rest body)
"Suppress popup windows.
Let-bind some variables to nil around BODY to achieve the desired
effect, which variables to use depends on the Emacs version."
(if (org-version-check "24.2.50" "" :predicate)
`(let (pop-up-frames display-buffer-alist)
,@body)
`(let (pop-up-frames special-display-buffer-names special-display-regexps special-display-function)
,@body)))
(if (fboundp 'string-match-p)
(defalias 'org-string-match-p 'string-match-p)
(defun org-string-match-p (regexp string &optional start)
@ -384,7 +414,7 @@ TIME defaults to the current time."
(save-match-data
(apply 'looking-at args))))
; XEmacs does not have `looking-back'.
;; XEmacs does not have `looking-back'.
(if (fboundp 'looking-back)
(defalias 'org-looking-back 'looking-back)
(defun org-looking-back (regexp &optional limit greedy)
@ -435,12 +465,34 @@ With two arguments, return floor and remainder of their quotient."
;; `condition-case-unless-debug' has been introduced in Emacs 24.1
;; `condition-case-no-debug' has been introduced in Emacs 23.1
(defalias 'org-condition-case-unless-debug
(defmacro org-condition-case-unless-debug (var bodyform &rest handlers)
(declare (debug condition-case) (indent 2))
(or (and (fboundp 'condition-case-unless-debug)
'condition-case-unless-debug)
`(condition-case-unless-debug ,var ,bodyform ,@handlers))
(and (fboundp 'condition-case-no-debug)
'condition-case-no-debug)
'condition-case))
`(condition-case-no-debug ,var ,bodyform ,@handlers))
`(condition-case ,var ,bodyform ,@handlers)))
;; RECURSIVE has been introduced with Emacs 23.2.
;; This is copying and adapted from `tramp-compat-delete-directory'
(defun org-delete-directory (directory &optional recursive)
"Compatibility function for `delete-directory'."
(if (null recursive)
(delete-directory directory)
(condition-case nil
(funcall 'delete-directory directory recursive)
;; This Emacs version does not support the RECURSIVE flag. We
;; use the implementation from Emacs 23.2.
(wrong-number-of-arguments
(setq directory (directory-file-name (expand-file-name directory)))
(if (not (file-symlink-p directory))
(mapc (lambda (file)
(if (eq t (car (file-attributes file)))
(org-delete-directory file recursive)
(delete-file file)))
(directory-files
directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
(delete-directory directory)))))
;;;###autoload
(defmacro org-check-version ()

View file

@ -1,6 +1,6 @@
;;; org-crypt.el --- Public key encryption for org-mode entries
;; Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
;; Emacs Lisp Archive Entry
;; Filename: org-crypt.el
@ -258,7 +258,7 @@ See `org-crypt-disable-auto-save'."
(save-excursion
(org-back-to-heading t)
(search-forward "-----BEGIN PGP MESSAGE-----"
(save-excursion (org-end-of-subtree t)) t))))
(save-excursion (outline-next-heading)) t))))
(defun org-crypt-use-before-save-magic ()
"Add a hook to automatically encrypt entries before a file is saved to disk."

View file

@ -274,14 +274,14 @@ For example:
$ emacs --batch
--load=$HOME/lib/emacs/org.el
--visit=MyOrgFile.org --funcall org-export-as-docbook-batch"
(org-export-as-docbook 'hidden))
(org-export-as-docbook))
;;;###autoload
(defun org-export-as-docbook-to-buffer ()
"Call `org-export-as-docbook' with output to a temporary buffer.
No file is created."
(interactive)
(org-export-as-docbook nil nil "*Org DocBook Export*")
(org-export-as-docbook nil "*Org DocBook Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org DocBook Export*")))
@ -334,17 +334,14 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; To activate the region
(goto-char beg)
(setq rtn (org-export-as-docbook
nil nil
buffer body-only))
(setq rtn (org-export-as-docbook nil buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
rtn)))
;;;###autoload
(defun org-export-as-docbook-pdf (&optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-docbook-pdf (&optional ext-plist to-buffer body-only pub-dir)
"Export as DocBook XML file, and generate PDF file."
(interactive "P")
(if (or (not org-export-docbook-xslt-proc-command)
@ -360,8 +357,7 @@ in a window. A non-interactive call will only return the buffer."
(org-combine-plists (org-default-export-plist)
ext-plist
(org-infile-export-plist))))
(docbook-buf (org-export-as-docbook hidden ext-plist
to-buffer body-only pub-dir))
(docbook-buf (org-export-as-docbook ext-plist to-buffer body-only pub-dir))
(filename (buffer-file-name docbook-buf))
(base (file-name-sans-extension filename))
(fofile (concat base ".fo"))
@ -398,8 +394,7 @@ in a window. A non-interactive call will only return the buffer."
(defvar org-heading-keyword-regexp-format) ; defined in org.el
;;;###autoload
(defun org-export-as-docbook (&optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-docbook (&optional ext-plist to-buffer body-only pub-dir)
"Export the current buffer as a DocBook file.
If there is an active region, export only the region. When
HIDDEN is obsolete and does nothing. EXT-PLIST is a

View file

@ -3808,7 +3808,8 @@ Elements are accumulated into ACC."
'section))
(plain-list 'item)
(table 'table-row))
(org-element-property :structure element)
(and (memq type '(item plain-list))
(org-element-property :structure element))
granularity visible-only element))
;; ELEMENT has contents. Parse objects inside, if
;; GRANULARITY allows it.
@ -4249,8 +4250,11 @@ first element of current section."
(plain-list
(setq special-flag 'item
struct (org-element-property :structure element)))
(table (setq special-flag 'table-row))
(otherwise (setq special-flag nil)))
(item (setq special-flag nil))
(property-drawer
(setq special-flag 'node-property struct nil))
(table (setq special-flag 'table-row struct nil))
(otherwise (setq special-flag nil struct nil)))
(setq end cend)
(goto-char cbeg)))))))))))

View file

@ -3047,12 +3047,11 @@ to the value of `temporary-file-directory'."
(eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode'
(list 'let org-local-vars
(list (intern (format "org-export-as-%s" fmt))
nil nil nil ''string t))))
nil nil ''string t dir))))
(delete-file tmp-file))))
;;;###autoload
(defun org-export-as-org (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-org (arg &optional ext-plist to-buffer body-only pub-dir)
"Make a copy with not-exporting stuff removed.
The purpose of this function is to provide a way to export the source
Org file of a webpage in Org format, but with sensitive and/or irrelevant

View file

@ -44,6 +44,9 @@
(set-face-doc-string new-face docstring)))))
(put 'org-copy-face 'lisp-indent-function 2)
(when (featurep 'xemacs)
(put 'mode-line 'face-alias 'modeline))
(defgroup org-faces nil
"Faces in Org-mode."
:tag "Org Faces"

View file

@ -328,7 +328,7 @@ You can also customize this for each buffer, using something like
* @licstart The following is the entire license notice for the
* JavaScript code in %PATH.
*
* Copyright (C) 2012 MathJax
* Copyright (C) 2012-2013 MathJax
*
* Licensed under the Apache License, Version 2.0 (the \"License\");
* you may not use this file except in compliance with the License.
@ -793,7 +793,7 @@ If there is an active region, export only the region.
The prefix ARG specifies how many levels of the outline should become
headlines. The default is 3. Lower levels will become bulleted lists."
(interactive "P")
(org-export-as-html arg 'hidden)
(org-export-as-html arg)
(org-open-file buffer-file-name)
(when org-export-kill-product-buffer-when-displayed
(kill-buffer (current-buffer))))
@ -806,14 +806,14 @@ emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-html-batch"
(org-export-as-html org-export-headline-levels 'hidden))
(org-export-as-html org-export-headline-levels))
;;;###autoload
(defun org-export-as-html-to-buffer (arg)
"Call `org-export-as-html` with output to a temporary buffer.
No file is created. The prefix ARG is passed through to `org-export-as-html'."
(interactive "P")
(org-export-as-html arg nil nil "*Org HTML Export*")
(org-export-as-html arg nil "*Org HTML Export*")
(when org-export-show-temporary-export-buffer
(switch-to-buffer-other-window "*Org HTML Export*")))
@ -865,9 +865,7 @@ in a window. A non-interactive call will only return the buffer."
(goto-char end)
(set-mark (point)) ;; to activate the region
(goto-char beg)
(setq rtn (org-export-as-html
nil nil ext-plist
buffer body-only))
(setq rtn (org-export-as-html nil ext-plist buffer body-only))
(if (fboundp 'deactivate-mark) (deactivate-mark))
(if (and (org-called-interactively-p 'any) (bufferp rtn))
(switch-to-buffer-other-window rtn)
@ -1171,14 +1169,12 @@ OPT-PLIST is the export options list."
(defvar org-heading-keyword-regexp-format) ; defined in org.el
;;;###autoload
(defun org-export-as-html (arg &optional hidden ext-plist
to-buffer body-only pub-dir)
(defun org-export-as-html (arg &optional ext-plist to-buffer body-only pub-dir)
"Export the outline as a pretty HTML file.
If there is an active region, export only the region. The prefix
ARG specifies how many levels of the outline should become
headlines. The default is 3. Lower levels will become bulleted
lists. HIDDEN is obsolete and does nothing.
EXT-PLIST is a property list with external parameters overriding
lists. EXT-PLIST is a property list with external parameters overriding
org-mode's default settings, but still inferior to file-local
settings. When TO-BUFFER is non-nil, create a buffer with that
name and export to that buffer. If TO-BUFFER is the symbol

View file

@ -327,6 +327,7 @@ When COMBINE is non nil, add the category to each line."
tmp pri categories location summary desc uid alarm alarm-time
(sexp-buffer (get-buffer-create "*ical-tmp*")))
(org-refresh-category-properties)
(org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime)
(save-excursion
(goto-char (point-min))
(while (re-search-forward re1 nil t)
@ -357,7 +358,7 @@ When COMBINE is non nil, add the category to each line."
(org-id-get-create)
(or (org-id-get) (org-id-new)))
categories (org-export-get-categories)
alarm-time (org-entry-get nil "APPT_WARNTIME")
alarm-time (get-text-property (point) 'org-appt-warntime)
alarm-time (if alarm-time (string-to-number alarm-time) 0)
alarm ""
deadlinep nil scheduledp nil)
@ -676,7 +677,7 @@ a time), or the day by one (if it does not contain a time)."
(setq fmt (if have-time
(replace-regexp-in-string "%Z"
org-icalendar-timezone
org-icalendar-date-time-format)
org-icalendar-date-time-format t)
";VALUE=DATE:%Y%m%d"))
(concat keyword (format-time-string fmt time
(and (org-icalendar-use-UTC-date-timep)

View file

@ -83,7 +83,7 @@
:tag "Org ID"
:group 'org)
(define-obsolete-variable-alias
(org-define-obsolete-variable-alias
'org-link-to-org-use-id 'org-id-link-to-org-use-id "24.3")
(defcustom org-id-link-to-org-use-id nil
"Non-nil means storing a link to an Org file will use entry IDs.

View file

@ -75,6 +75,9 @@
;; Also, if you want to use refiling and archiving for inline tasks,
;; The END line must be present to make things work properly.
;;
;; Note that you should not try to use inline tasks within plain list,
;; visibility cycling is known to be problematic when doing so.
;;
;; This package installs one new command:
;;
;; C-c C-x t Insert a new inline task with END line

View file

@ -1,8 +1,10 @@
;;; org-install.el --- autogenerated file, do not edit
;;; org-install.el --- backward compatibility file for obsolete configuration
;;
;;; Code:
(warn "The file org-install is obsolete.
Please change your configuration to (require 'org) instead.")
It is provided here so that (require 'org-install) does not
trigger an error for users with obsolete Emacs configuration.
You can safely remove (require 'org-install) from your config.")
(provide 'org-install)

View file

@ -112,7 +112,7 @@ means to use the maximum value consistent with other options."
* @licstart The following is the entire license notice for the
* JavaScript code in %SCRIPT_PATH.
*
* Copyright (C) 2012 Sebastian Rose
* Copyright (C) 2012-2013 Sebastian Rose
*
*
* The JavaScript code in this tag is free software: you can

View file

@ -872,7 +872,7 @@ no LaTeX header.
When BODY-ONLY is set, don't produce the file header and footer,
simply return the content of \\begin{document}...\\end{document},
without even the \\begin{document} and \\end{document} commands.
when PUB-DIR is set, use this as the publishing directory."
When PUB-DIR is set, use this as the publishing directory."
(interactive "P")
(when (and (not body-only) arg (listp arg)) (setq body-only t))
(run-hooks 'org-export-first-hook)

View file

@ -144,15 +144,15 @@ item. When the cursor is on an outline heading, plain lists are
treated as text. This is the most stable way of handling this,
which is why it is the default.
When this is the symbol `integrate', then during cycling, plain
list items will *temporarily* be interpreted as outline headlines
with a level given by 1000+i where i is the indentation of the
bullet. This setting can lead to strange effects when switching
visibility to `children', because the first \"child\" in a
subtree decides what children should be listed. If that first
\"child\" is a plain list item with an implied large level
number, all true children and grand children of the outline
heading will be exposed in a children' view."
When this is the symbol `integrate', then integrate plain list
items when cycling, as if they were children of outline headings.
This setting can lead to strange effects when switching visibility
to `children', because the first \"child\" in a subtree decides
what children should be listed. If that first \"child\" is a
plain list item with an implied large level number, all true
children and grand children of the outline heading will be
exposed in a children' view."
:group 'org-plain-lists
:type '(choice
(const :tag "Never" nil)

View file

@ -1718,7 +1718,7 @@ information."
(org-lparse-end-paragraph)
(org-lparse-end-list-item (or type "u")))
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-lparse-preprocess-after-blockquote-hook
'org-lparse-preprocess-after-blockquote
"24.3")
@ -1736,7 +1736,7 @@ information."
(format "ORG-%s-END %s" (upcase (match-string 2))
(match-string 3))) t t))))
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-lparse-strip-experimental-blocks-maybe-hook
'org-lparse-strip-experimental-blocks-maybe
"24.3")

View file

@ -126,6 +126,15 @@ Also, do not record undo information."
(org-move-to-column ,col)))))
(def-edebug-spec org-preserve-lc (body))
;; Copied from bookmark.el
(defmacro org-with-buffer-modified-unmodified (&rest body)
"Run BODY while preserving the buffer's `buffer-modified-p' state."
(org-with-gensyms (was-modified)
`(let ((,was-modified (buffer-modified-p)))
(unwind-protect
(progn ,@body)
(set-buffer-modified-p ,was-modified)))))
(defmacro org-without-partial-completion (&rest body)
`(if (and (boundp 'partial-completion-mode)
partial-completion-mode

View file

@ -304,12 +304,13 @@ Also exclude files matching `org-mobile-files-exclude-regexp'."
;;;###autoload
(defun org-mobile-push ()
"Push the current state of Org affairs to the WebDAV directory.
"Push the current state of Org affairs to the target directory.
This will create the index file, copy all agenda files there, and also
create all custom agenda views, for upload to the mobile phone."
(interactive)
(let ((a-buffer (get-buffer org-agenda-buffer-name)))
(let ((org-agenda-buffer-name "*SUMO*")
(let ((org-agenda-curbuf-name org-agenda-buffer-name)
(org-agenda-buffer-name "*SUMO*")
(org-agenda-tag-filter org-agenda-tag-filter)
(org-agenda-redo-command org-agenda-redo-command))
(save-excursion
@ -329,15 +330,17 @@ create all custom agenda views, for upload to the mobile phone."
(org-mobile-create-index-file)
(message "Writing checksums...")
(org-mobile-write-checksums)
(run-hooks 'org-mobile-post-push-hook))))
(run-hooks 'org-mobile-post-push-hook)))
(setq org-agenda-buffer-name org-agenda-curbuf-name
org-agenda-this-buffer-name org-agenda-curbuf-name))
(redraw-display)
(when (and a-buffer (buffer-live-p a-buffer))
(when (buffer-live-p a-buffer)
(if (not (get-buffer-window a-buffer))
(kill-buffer a-buffer)
(let ((cw (selected-window)))
(select-window (get-buffer-window a-buffer))
(org-agenda-redo)
(select-window cw)))))
(kill-buffer a-buffer)
(let ((cw (selected-window)))
(select-window (get-buffer-window a-buffer))
(org-agenda-redo)
(select-window cw)))))
(message "Files for mobile viewer staged"))
(defvar org-mobile-before-process-capture-hook nil
@ -417,7 +420,8 @@ agenda view showing the flagged items."
(target-file (expand-file-name org-mobile-index-file
org-mobile-directory))
file link-name todo-kwds done-kwds tags drawers entry kwds dwds twds)
(when (stringp (car def-todo))
(setq def-todo (list (cons 'sequence def-todo))))
(org-agenda-prepare-buffers (mapcar 'car files-alist))
(setq done-kwds (org-uniquify org-done-keywords-for-agenda))
(setq todo-kwds (org-delete-all
@ -536,7 +540,7 @@ The table of checksums is written to the file mobile-checksums."
(t (cons (car x) (cons "" (cdr x))))))
org-agenda-custom-commands)))
(default-list '(("a" "Agenda" agenda) ("t" "All TODO" alltodo)))
thelist new e key desc type match settings cmds gkey gdesc gsettings cnt)
thelist atitle new e key desc type match settings cmds gkey gdesc gsettings cnt)
(cond
((eq org-mobile-agendas 'custom)
(setq thelist custom-list))
@ -588,12 +592,13 @@ The table of checksums is written to the file mobile-checksums."
(setq cnt 0)
(while (setq e (pop cmds))
(setq type (car e) match (nth 1 e) settings (nth 2 e))
(setq atitle (if (string= "" gdesc) match gdesc))
(setq settings (append gsettings settings))
(setq settings
(cons (list 'org-agenda-title-append
(concat "<after>KEYS=" gkey "#" (number-to-string
(setq cnt (1+ cnt)))
" TITLE: " gdesc " " match "</after>"))
" TITLE: " atitle "</after>"))
settings))
(push (list type match settings) new)))))
(and new (list "X" "SUMO" (reverse new)
@ -983,7 +988,7 @@ is currently a noop.")
(goto-char (point-max))
(newline)
(goto-char (point-max))
(move-marker (make-marker) (point)))))
(point-marker))))
(let ((file (match-string 1 link))
(path (match-string 2 link)))
(setq file (org-link-unescape file))

View file

@ -439,14 +439,14 @@ values. See Info node `(emacs) File Variables'."
"meta.xml" "styles.xml")))
;; kill all xml buffers
(mapc (lambda (file)
(let ((buf (find-file-noselect
(expand-file-name file org-odt-zip-dir) t)))
(when (buffer-name buf)
(set-buffer-modified-p nil)
(kill-buffer buf))))
(with-current-buffer
(find-file-noselect
(expand-file-name file org-odt-zip-dir) t)
(set-buffer-modified-p nil)
(kill-buffer)))
xml-files))
;; delete temporary directory.
(delete-directory org-odt-zip-dir t)))))
(org-delete-directory org-odt-zip-dir t)))))
(org-condition-case-unless-debug err
(prog1 (progn ,@body)
(funcall --cleanup-xml-buffers))
@ -474,7 +474,7 @@ emacs --batch
--load=$HOME/lib/emacs/org.el
--eval \"(setq org-export-headline-levels 2)\"
--visit=MyFile --funcall org-export-as-odt-batch"
(org-lparse-batch "odt"))
(org-odt-cleanup-xml-buffers (org-lparse-batch "odt")))
;;; org-export-as-odt
;;;###autoload
@ -1727,6 +1727,7 @@ ATTR is a string of other attributes of the a element."
((and (string= type "")
(or (not thefile) (string= thefile ""))
(plist-get org-lparse-opt-plist :section-numbers)
(get-text-property 0 'org-no-description fragment)
(setq sec-frag fragment)
(or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag)
(and (setq sec-frag
@ -1756,7 +1757,11 @@ ATTR is a string of other attributes of the a element."
(when (not (member type '("" "file")))
(setq thefile (concat type ":" thefile)))
(let ((org-odt-suppress-xref nil))
(let ((org-odt-suppress-xref
;; Typeset link to headlines with description, as a
;; regular hyperlink.
(and (string= type "")
(not (get-text-property 0 'org-no-description fragment)))))
(org-odt-format-link
(org-xml-format-desc desc) thefile attr)))))))

View file

@ -128,15 +128,15 @@
(filename &optional up))
(declare-function server-edit "server" (&optional arg))
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-protocol-unhex-compound 'org-link-unescape-compound
"2011-02-17")
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-protocol-unhex-string 'org-link-unescape
"2011-02-17")
(define-obsolete-function-alias
(org-define-obsolete-function-alias
'org-protocol-unhex-single-byte-sequence
'org-link-unescape-single-byte-sequence
"2011-02-17")

View file

@ -577,7 +577,7 @@ PUB-DIR is the publishing directory."
(setq export-buf-or-file
(funcall (intern (concat "org-export-as-" format))
(plist-get plist :headline-levels)
nil plist nil
plist nil
(plist-get plist :body-only)
pub-dir))
(when (and (bufferp export-buf-or-file)

View file

@ -39,6 +39,8 @@
(declare-function org-do-remove-indentation "org" (&optional n))
(declare-function org-at-table.el-p "org" ())
(declare-function org-in-src-block-p "org" (&optional inside))
(declare-function org-in-block-p "org" (names))
(declare-function org-get-indentation "org" (&optional line))
(declare-function org-switch-to-buffer-other-window "org" (&rest args))
(declare-function org-pop-to-buffer-same-window
@ -201,41 +203,40 @@ There is a mode hook, and keybindings for `org-edit-src-exit' and
`org-edit-src-save'")
(defun org-edit-src-code (&optional context code edit-buffer-name)
"Edit the source CODE example at point.
The example is copied to a separate buffer, and that buffer is
switched to the correct language mode. When done, exit with
\\[org-edit-src-exit]. This will remove the original code in the
Org buffer, and replace it with the edited version. An optional
argument CONTEXT is used by \\[org-edit-src-save] when calling
this function. See `org-src-window-setup' to configure the
display of windows containing the Org buffer and the code
buffer."
"Edit the source CODE block at point.
The code is copied to a separate buffer and the appropriate mode
is turned on. When done, exit with \\[org-edit-src-exit]. This will
remove the original code in the Org buffer, and replace it with the
edited version. An optional argument CONTEXT is used by \\[org-edit-src-save]
when calling this function. See `org-src-window-setup' to configure
the display of windows containing the Org buffer and the code buffer."
(interactive)
(unless (eq context 'save)
(setq org-edit-src-saved-temp-window-config (current-window-configuration)))
(let* ((mark (and (org-region-active-p) (mark)))
(case-fold-search t)
(info
;; If the src region consists in no lines, we insert a blank
;; line.
(let* ((temp (org-edit-src-find-region-and-lang))
(beg (nth 0 temp))
(end (nth 1 temp)))
(if (>= end beg) temp
(goto-char beg)
(insert "\n")
(org-edit-src-find-region-and-lang))))
(full-info (org-babel-get-src-block-info 'light))
(org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive
(beg (make-marker))
;; Move marker with inserted text for case when src block is
;; just one empty line, i.e. beg == end.
(end (copy-marker nil t))
(allow-write-back-p (null code))
block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
begline markline markcol line col transmitted-variables)
(if (not info)
nil
(if (not (or (org-in-block-p '("src" "example" "latex" "html"))
(org-at-table.el-p)))
(user-error "Not in a source code or example block")
(unless (eq context 'save)
(setq org-edit-src-saved-temp-window-config (current-window-configuration)))
(let* ((mark (and (org-region-active-p) (mark)))
(case-fold-search t)
(info
;; If the src region consists in no lines, we insert a blank
;; line.
(let* ((temp (org-edit-src-find-region-and-lang))
(beg (nth 0 temp))
(end (nth 1 temp)))
(if (>= end beg) temp
(goto-char beg)
(insert "\n")
(org-edit-src-find-region-and-lang))))
(full-info (org-babel-get-src-block-info 'light))
(org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive
(beg (make-marker))
;; Move marker with inserted text for case when src block is
;; just one empty line, i.e. beg == end.
(end (copy-marker (make-marker) t))
(allow-write-back-p (null code))
block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
begline markline markcol line col transmitted-variables)
(setq beg (move-marker beg (nth 0 info))
end (move-marker end (nth 1 info))
msg (if allow-write-back-p
@ -244,7 +245,7 @@ buffer."
"Exit with C-c ' (C-c and single quote)")
code (or code (buffer-substring-no-properties beg end))
lang (or (cdr (assoc (nth 2 info) org-src-lang-modes))
(nth 2 info))
(nth 2 info))
lang (if (symbolp lang) (symbol-name lang) lang)
single (nth 3 info)
block-nindent (nth 5 info)
@ -527,6 +528,14 @@ the language, a switch telling if the content should be in a single line."
(pos (point))
re1 re2 single beg end lang lfmt match-re1 ind entry)
(catch 'exit
(when (org-at-table.el-p)
(re-search-backward "^[\t]*[^ \t|\\+]" nil t)
(setq beg (1+ (point-at-eol)))
(goto-char beg)
(or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
(progn (goto-char (point-max)) (newline)))
(setq end (1- (point-at-bol)))
(throw 'exit (list beg end 'table.el nil nil 0)))
(while (setq entry (pop re-list))
(setq re1 (car entry) re2 (nth 1 entry) lang (nth 2 entry)
single (nth 3 entry))
@ -557,16 +566,7 @@ the language, a switch telling if the content should be in a single line."
(throw 'exit
(list (match-end 0) end
(org-edit-src-get-lang lang)
single lfmt ind)))))))))
(when (org-at-table.el-p)
(re-search-backward "^[\t]*[^ \t|\\+]" nil t)
(setq beg (1+ (point-at-eol)))
(goto-char beg)
(or (re-search-forward "^[\t]*[^ \t|\\+]" nil t)
(progn (goto-char (point-max)) (newline)))
(setq end (point-at-bol))
(setq ind (org-edit-src-get-indentation beg))
(throw 'exit (list beg end 'table.el nil nil ind))))))
single lfmt ind))))))))))))
(defun org-edit-src-get-lang (lang)
"Extract the src language."
@ -633,7 +633,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(unless (org-bound-and-true-p org-edit-src-from-org-mode)
(error "This is not a sub-editing buffer, something is wrong"))
(widen)
(let* ((beg org-edit-src-beg-marker)
(let* ((fixed-width-p (string-match "Fixed Width" (buffer-name)))
(beg org-edit-src-beg-marker)
(end org-edit-src-end-marker)
(ovl org-edit-src-overlay)
(bufstr (buffer-string))
@ -670,7 +671,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
(goto-char (point-max)) (insert "\\n")))
(goto-char (point-min))
(if (looking-at "\\s-*") (replace-match " ")))
(when (org-bound-and-true-p org-edit-src-from-org-mode)
(when (and (org-bound-and-true-p org-edit-src-from-org-mode)
(not fixed-width-p))
(org-escape-code-in-region (point-min) (point-max))
(setq delta (+ delta
(save-excursion

View file

@ -509,10 +509,10 @@ nil When nil, the command tries to be smart and figure out the
re)
(goto-char beg)
(beginning-of-line 1)
(setq beg (move-marker (make-marker) (point)))
(setq beg (point-marker))
(goto-char end)
(if (bolp) (backward-char 1) (end-of-line 1))
(setq end (move-marker (make-marker) (point)))
(setq end (point-marker))
;; Get the right field separator
(unless separator
(goto-char beg)
@ -1895,7 +1895,7 @@ it can be edited in place."
(if (and (boundp 'font-lock-mode) font-lock-mode)
(font-lock-fontify-block))))
(t
(let ((pos (move-marker (make-marker) (point)))
(let ((pos (point-marker))
(coord
(if (eq org-table-use-standard-references t)
(concat (org-number-to-letters (org-table-current-column))
@ -3219,7 +3219,7 @@ Parameters get priority."
(let ((key (org-table-current-field-formula 'key 'noerror))
(eql (sort (org-table-get-stored-formulas 'noerror)
'org-table-formula-less-p))
(pos (move-marker (make-marker) (point)))
(pos (point-marker))
(startline 1)
(wc (current-window-configuration))
(sel-win (selected-window))
@ -3580,7 +3580,7 @@ With prefix ARG, apply the new formulas to the table."
(beginning-of-line 1)
(insert ind))
(goto-char (point-max))
(backward-delete-char 1)))
(org-delete-backward-char 1)))
(goto-char beg))
(t nil))))
@ -4235,7 +4235,7 @@ overwritten, and the table is not marked as requiring realignment."
(looking-at "[^|\n]* +|"))
(let (org-table-may-need-update)
(goto-char (1- (match-end 0)))
(backward-delete-char 1)
(org-delete-backward-char 1)
(goto-char (match-beginning 0))
(self-insert-command N))
(setq org-table-may-need-update t)

View file

@ -5,13 +5,13 @@
(defun org-release ()
"The release version of org-mode.
Inserted by installing org-mode or when a release is made."
(let ((org-release "7.9.2+"))
(let ((org-release "7.9.3+"))
org-release))
;;;###autoload
(defun org-git-version ()
"The Git version of org-mode.
Inserted by installing org-mode or when a release is made."
(let ((org-git-version "7.9.2+-GNU-Emacs-24-3 (commit 488eea)"))
(let ((org-git-version "7.9.3+-GNU-Emacs-24-3 (commit 4cac75153)"))
org-git-version))
;;;###autoload
(defvar org-odt-data-dir "/usr/share/emacs/etc/org"

File diff suppressed because it is too large Load diff

View file

@ -1280,7 +1280,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
;; whether or not omake's own error messages are recognized.
(cond
((not (memq 'omake compilation-error-regexp-alist)) nil)
((string-match "\\`\\([^^]\\|^\\( \\*\\|\\[\\)\\)" pat)
((string-match "\\`\\([^^]\\|\\^\\( \\*\\|\\[\\)\\)" pat)
nil) ;; Not anchored or anchored but already allows empty spaces.
(t (setq pat (concat "^ *" (substring pat 1)))))