Additionally, replace one
(or (org-mode-p) (derived-mode-p 'org-mode))
with
(derived-mode-p 'org-mode)
cause that is reflexive anyway (returns true, if the current mode is
org-mode).
Delete one check testing for org-mode or org derived mode
Also remove blank lines before the ";;; org*el ends here" declarations.
Having a "Version" header forced us to update every file when releasing a
new version of Org; it also forced us to update every file when merging Org
with Emacs trunk, thus cluttering the diffs between the previously merged
version and the new one with useless information.
Glenn Morris suggested this in emacs-devel:
http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00322.html
* org-macs.el (org-make-parameter-alist): New function. Turn flat list
of alternating symbol names and values into an alist with symbol name
in car and value in cdr.
* org-macs.el (org-with-gensyms): New macro. Wrap let-binding of
SYMBOLS to new uninterned symbols around BODY.
Use this macro to compose macros that need to bind their own symbols
in expansion. It expands into a let-binding of all symbols in SYMBOLS
to new uninterned symbols that cannot collide with symbols used in the
target macro's expansion.
* lisp/org-macs.el (org-with-limited-levels): some functions, like
`org-back-to-heading', being deeply based on outline-mode, still
refer to `outline-regexp' instead of `org-outline-regexp'.
This commit introduce `org-loop-over-siblings-within-active-region-p'
as a new defcustom that you can turn on (`non-nil') to allow commands
to loop over siblings in the active region.
The list of commands is this:
- org-archive-subtree
- org-archive-to-archive-sibling
- org-toggle-archive-tag
- org-deadline
- org-schedule
When `org-loop-over-siblings-within-active-region-p' is `non-nil' and
you run one of the command above on a region containing several headlines,
then Org will apply the command to each headline.
This can be particularily useful for archiving several headlines, or to
add a deadline or schedule several entries.
* org.el (org-loop-over-siblings-within-active-region-p): New
defcustom so that `org-loop-over-siblings-in-active-region'
can be turned on and off.
(org-deadline, org-schedule): Use the new macro.
* org-macs.el (org-loop-over-siblings-in-active-region): New
macro to let some commands act upon several siblings in the
active region.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag): Use
`org-loop-over-siblings-in-active-region'.
Use `org-outline-regexp' instead or `outline-regexp'. Also use the
new defconst `org-outline-regexp-bol' to match `org-outline-regexp'
at the beginning of line.
* org.el (org-outline-regexp-bol): New defconst.
(org-outline-level, org-set-font-lock-defaults, org-cycle)
(org-overview, org-content, org-flag-drawer)
(org-first-headline-recenter, org-insert-todo-heading)
(org-map-region, org-move-subtree-down, org-paste-subtree)
(org-kill-is-subtree-p, org-context-p, org-refile)
(org-refile-new-child, org-toggle-comment, org-todo)
(org-add-planning-info, org-add-log-setup, org-scan-tags)
(org-set-tags, org-insert-property-drawer)
(org-prepare-agenda-buffers, org-preview-latex-fragment)
(org-speed-command-default-hook, org-check-for-hidden)
(org-toggle-item, org-toggle-heading)
(org-indent-line-function, org-set-autofill-regexps)
(org-fill-paragraph, org-toggle-fixed-width-section)
(org-yank-generic, org-yank-folding-would-swallow-text)
(org-first-sibling-p, org-goto-sibling)
(org-goto-first-child, org-show-entry): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-remember.el (org-remember-handler): Use
`org-outline-regexp-bol'.
* org-mouse.el (org-mouse-match-todo-keyword, org-mode-hook)
(org-mouse-move-tree, org-mouse-transform-to-outline): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-macs.el (org-with-limited-levels)
(org-get-limited-outline-regexp): Use `org-outline-regexp'.
* org-indent.el (org-indent-outline-re)
(org-indent-refresh-section, org-indent-refresh-to): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-html.el (org-export-as-html): Use
`org-outline-regexp-bol'.
* org-footnote.el (org-footnote-at-definition-p)
(org-footnote-normalize): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-exp.el (org-export-preprocess-string): Don't redefine
`outline-regexp'.
* org-docbook.el (org-export-as-docbook): Use
`org-outline-regexp-bol'.
* org-colview.el (org-columns, org-columns-compute): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
* org-colview-xemacs.el (org-columns, org-columns-compute):
Use `org-outline-regexp-bol'.
* org-clock.el (org-clock-insert-selection-line)
(org-clock-in, org-clock-out, org-dblock-write:clocktable):
Use `org-outline-regexp' and `org-outline-regexp-bol'.
* org-ascii.el (org-export-as-ascii)
(org-export-ascii-push-links): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-archive.el (org-archive-to-archive-sibling)
(org-archive-all-done): Use `org-outline-regexp' and
`org-outline-regexp-bol'.
* org-agenda.el (org-agenda, org-search-view)
(org-agenda-list-stuck-projects, org-agenda-get-timestamps)
(org-agenda-get-progress, org-agenda-get-blocks): Use
`org-outline-regexp' and `org-outline-regexp-bol'.
This reverts commit 5a2eec3207.
The replacement of `buffer-substring-filters' by
`filter-buffer-substring-functions' requires some rewriting
of functions like `org-indent-remove-properties-from-string'.
* install/git/org-mode/lisp/org-table.el
(org-table-time-seconds-to-string): use `org-format-seconds'
instead of `format-seconds'.
* install/git/org-mode/lisp/org-macs.el (org-format-seconds):
handle case where `format-seconds' does not exist.
This uses the macro David Maus suggests. In particular, it doesn't
use the (let (pc-mode ...)) binding, which, as David states, could
cause leakage if the pc-mode variable is used within ,@body.
* lisp/org-agenda.el (org-agenda-redo): Replacing call to now-defunct
function `interactive-p'.
(org-agenda-show-1): Replacing call to now-defunct function
`interactive-p'.
(org-agenda-set-tags): Replacing call to now-defunct function `interactive-p'.
* lisp/org-ascii.el: Replacing call to now-defunct function
`interactive-p'.
(org-export-as-latin1): Replacing call to now-defunct function
`interactive-p'.
(org-export-as-latin1-to-buffer): Replacing call to now-defunct
function `interactive-p'.
(org-export-as-utf8): Replacing call to now-defunct function
`interactive-p'.
(org-export-as-utf8-to-buffer): Replacing call to now-defunct function
`interactive-p'.
(org-export-region-as-ascii): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-docbook.el: Replacing call to now-defunct function
`interactive-p'.
(org-export-region-as-docbook): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-html.el: Replacing call to now-defunct function
`interactive-p'.
(org-export-region-as-html): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-latex.el: Replacing call to now-defunct function
`interactive-p'.
(org-export-region-as-latex): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-macs.el: Replacing call to now-defunct function
`interactive-p'.
(org-called-interactively-p): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function `interactive-p'.
* lisp/org-table.el: Replacing call to now-defunct function
`interactive-p'.
(org-table-blank-field): Replacing call to now-defunct function
`interactive-p'.
(org-table-current-column): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function
`interactive-p'.
(org-table-current-dline): Replacing call to now-defunct function
`interactive-p'.Replacing call to now-defunct function
`interactive-p'.
(org-table-sort-lines): Replacing call to now-defunct function
`interactive-p'.
(org-table-sum): Replacing call to now-defunct function
`interactive-p'.
(org-table-rotate-recalc-marks): Replacing call to now-defunct
function `interactive-p'.
(org-table-eval-formula): Replacing call to now-defunct function
`interactive-p'.
(orgtbl-send-table): Replacing call to now-defunct function `interactive-p'.
* lisp/org.el: Replacing call to now-defunct function `interactive-p'.
(org-mode): Replacing call to now-defunct function `interactive-p'.
(org-copy-subtree): Replacing call to now-defunct function
`interactive-p'.
(org-paste-subtree): Replacing call to now-defunct function
`interactive-p'.
(org-store-link): Replacing call to now-defunct function
`interactive-p'.
(org-todo): Replacing call to now-defunct function `interactive-p'.
(org-occur): Replacing call to now-defunct function `interactive-p'.
* org.el (org-todo): Bugfix: use `org-with-wide-buffer' to
check against headings outside of a narrowed buffer.
* org-macs.el (org-with-wide-buffer): New macro.
* lisp/org-macs.el (org-with-point-at): Store evaluated version of pom. This
fixes a potential bug when using (org-with-point-at (func) …), where (func)
would be evaluated multiple times, therefore might return different results
if a marker was returned and different each time.
Signed-off-by: Julien Danjou <julien@danjou.info>
* org-macs.el (org-char-to-string): Inline function to properly decode
utf8 characters in Emacs 22. Moved and renamed from org-protocol.el.
* org-protocol.el (org-protocol-unhex-compound): Use renamed inline
function.
* lisp/org-macs.el (org-called-interactively-p): New macro.
* lisp/org-freemind.el: No longer require 'rx.
(org-freemind): New customization group, use it for all the variables.
(org-export-as-freemind): Add docstring.
(org-freemind-show): Improve filen naming.
(org-freemind-convert-links-helper): New function.
(org-freemind-bol-helper-base-indent): New variable.
(org-freemind-bol-helper): New function.
(org-freemind-node-css-style): New option.
(org-freemind-node-pattern): New variable.
(org-freemind-from-org-mode): Better docstring.
Thanks to Nick Dokos for pointing out this as a fix to a Babel issue
* lisp/org-macs.el (org-save-outline-visibility): moved from org.el
* lisp/org.el: moved `org-save-outline-visibility' to org-macs.el
* lisp/org-macs.el (org-string-nw-p): New function.
* lisp/org-capture.el (org-capture-import-remember-templates): Interpret
an empty string as request to use `org-default-notes-file'.
(org-capture-target-buffer): If the FILE is not a (non-empty) string,
use `org-default-notes-file'.