Commit Graph

406 Commits

Author SHA1 Message Date
Bastien Guerry 82899fa841 Merge `org-with-buffer-modified-unmodified' into `org-unmodified'
* org.el (org-entry-blocked-p): Use `org-unmodified' instead
of `org-with-buffer-modified-unmodified'.
(org-agenda-prepare-buffers): Fix indentation.

* org-macs.el (org-unmodified): Rename from
`org-with-buffer-modified-unmodified'.
(org-with-buffer-modified-unmodified): Delete.
2013-02-23 11:44:24 +01:00
Nicolas Goaziou 19eae5dc00 org-pcomplete: Fix completion for file options
* lisp/org.el (org-options-keywords): Add missing colons.
* lisp/org-macs.el (org-default-options): Removed function.
* lisp/org-pcomplete.el (org-command-at-point): Fix bug with some file
  options.
(pcomplete/org-mode/file-option/x): Removed macro.
(pcomplete/org-mode/file-option): Refactor code.
(pcomplete/org-mode/file-option/author,
pcomplete/org-mode/file-option/date,
pcomplete/org-mode/file-option/title,
pcomplete/org-mode/file-option/tags,
pcomplete/org-mode/file-option/select_tags,
pcomplete/org-mode/file-option/priorities,
pcomplete/org-mode/file-option/language,
pcomplete/org-mode/file-option/filetags,
pcomplete/org-mode/file-option/exclude_tags,
pcomplete/org-mode/file-option/email): New functions.
2013-02-14 08:48:18 +01:00
Bastien Guerry 2108d294db Silent byte-compiler 2013-02-13 16:30:36 +01:00
Bastien Guerry e292a1e2b8 Fix commit 03f1cf and 3f0b60. 2013-02-13 15:13:57 +01:00
Bastien Guerry 03f1cffcd5 Restore completion over the most important keywords
* org-pcomplete.el (pcomplete/org-mode/file-option/x):
Resurrect.  Use `org-default-options' to initialize completion
fonctions for the most important keywords.

* org-macs.el (org-default-options): Rename and adapt from
`org-get-current-options'.

This is a partial revert of e14cf780 feature-wise.  The idea is
that it may be useful to get completion, even when it ends up with
the default value, because the user may want to adapt the default
values instead of re-typing them.
2013-02-13 14:29:31 +01:00
Nicolas Goaziou 73ddb3c49c Remove references to `org-protected' `org-example' and `original-indentation'
* lisp/org-macs.el (org-if-unprotected, org-if-unprotected-1,
  org-if-unprotected-at): Removed macros.
(org-re-search-forward-unprotected): Removed function.
* lisp/org.el (org-format-latex): Remove reference to `org-protected'.
* lisp/org-list.el (org-list-struct): Remove reference to
  `org-example' and `org-protected'.
* lisp/org-footnote.el (org-footnote-at-reference-p): Remove reference
  to `org-protected'.
* lisp/org-capture.el (org-capture-fill-template): Remove reference to
  `org-protected'.
* contrib/lisp/org-wikinodes.el (org-wikinodes-process-links-for-export):
  Remove reference to `org-protected' value.

These text properties were used by the old export framework. They are
not needed anymore.
2013-02-06 23:06:31 +01:00
Bastien Guerry ff2d373dc3 Merge branch 'maint' 2013-01-30 17:53:30 +01:00
Francesco Pizzolante ebad7d9226 org-macs.el (org-unmodified): Inhibit modification hooks
* org-macs.el (org-unmodified): Inhibit modification hooks.

TINYCHANGE
2013-01-30 17:53:22 +01:00
Eric Schulte f94d81a17e `org-load-noerror-mustsuffix' requires an autoload
* lisp/org-macs.el: `org-load-noerror-mustsuffix' requires an autoload.
2013-01-10 16:43:26 -07:00
Achim Gratz 5484a33b8d Compatibility: Use org-load-noerror-mustsuffix
* lisp/org-macs.el: New macro to allow the 5-argument form of load to
  be used where possible without breaking compatibility with XEmacs.

* lisp/org.el (org-version, org-reload): Use
  `org-load-noerror-mustsuffix´ instead of adding a fifth argument to
  load directly.  Guard against undefined variable load-suffixes,
  which doesn't exist in XEmacs.

Since load-suffixes doesn't exist in XEmacs, (org-reload 'uncompiled)
will not work.  If it doesn't complicate the compatibility macro too
much this can be added later.
2013-01-06 18:33:34 +01:00
Bastien Guerry 98cd4687a2 Update copyright years.
Happy new year!
2013-01-01 16:04:24 +01:00
Bastien Guerry 14c3635a0d New macro `org-with-buffer-modified-unmodified'
* org-macs.el (org-with-buffer-modified-unmodified): New
macro.

* org.el (org-entry-blocked-p): Use the new macro.

Thanks to Nick Dokos for reporting this.

The macro is a copy of `with-buffer-modified-unmodified'
which (wrongly?) lives in bookmark.el.
2012-12-30 01:21:27 +01:00
Bastien Guerry 722e0e0c83 Remove `org-substring-no-properties' and some redundant code
* org-macs.el (org-no-properties): Allow a new parameter
`restricted' to restrict the properties removal to those in
`org-rm-props'.  The default is now to remove all properties.

* org-compat.el (org-substring-no-properties): Remove unused
defun.

* org-remember.el (org-remember-apply-template): Remove
redundant removal of text properties.
(org-remember-apply-template): Use `org-no-properties'.

* org-capture.el (org-capture-fill-template): Remove redundant
removal of text properties.
(org-capture-fill-template): Use `org-no-properties'.

* org-gnus.el (org-gnus-open, org-gnus-follow-link): Use
`org-no-properties'.
2012-08-15 09:35:21 +02:00
Bastien Guerry 70dd1196d2 Massive code clean-up.
Delete trailing whitespaces.
Indent all sexps correctly.
Sentences end with double spaces.
2012-08-11 19:10:44 +02:00
Bastien Guerry 8eb584331a Add punctuation at the end of the first line of docstrings. Code cleanup. 2012-07-30 10:08:15 +02:00
Nicolas Goaziou 2da2c923aa org-macs: Fix typo in `org-with-limited-levels'
* lisp/org-macs.el (org-with-limited-levels): Fix typo.
2012-07-29 00:08:18 +02:00
Eric Schulte 63b5f8f2e8 replace flet/labels with org-flet/org-labels
This patch ensure Org-mode will build on all supported versions of
Emacs, after the renaming of the cl macros behind the cl- prefix in the
recent Emacs trunk.

* lisp/org-compat.el (org-flet): Compatibility function now that flet
  has been removed from cl-macs.
  (org-labels): Compatibility function now that labels has been removed
  from cl-macs.
* lisp/ob-R.el (org-compat): Require org-compat.
* lisp/ob-comint.el: Require org-compat.
* lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility
  function.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to
  compatibility function.
* lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility
  function.
  (org-babel-lob-execute): Switch to compatibility function.
* lisp/ob-python.el (org-babel-python-evaluate-session): Switch to
  compatibility function.
* lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility
  function.
* lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility
  function.
* lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility
  function.
  (org-babel-tangle): Switch to compatibility function.
  (org-babel-spec-to-string): Switch to compatibility function.
* lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility
  function.
  (org-babel-execute-src-block): Switch to compatibility function.
  (org-babel-edit-distance): Switch to compatibility function.
  (org-babel-switch-to-session-with-code): Switch to compatibility
  function.
  (org-babel-sha1-hash): Switch to compatibility function.
  (org-babel-balanced-split): Switch to compatibility function.
  (org-babel-join-splits-near-ch): Switch to compatibility function.
  (org-babel-get-rownames): Switch to compatibility function.
  (org-babel-format-result): Switch to compatibility function.
  (org-babel-insert-result): Switch to compatibility function.
  (org-babel-examplize-region): Switch to compatibility function.
  (org-babel-merge-params): Switch to compatibility function.
  (org-babel-noweb-p): Switch to compatibility function.
  (org-babel-expand-noweb-references): Switch to compatibility function.
* lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility
  function.
  (org-bibtex-fleshout): Switch to compatibility function.
  (org-bibtex-read): Switch to compatibility function.
  (org-bibtex-write): Switch to compatibility function.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to
  compatibility function.
* lisp/org-exp.el (org-export-format-source-code-or-example): Switch to
  compatibility function.
* lisp/org-macs.el (org-called-interactively-p): Indentation fix.
* lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility
  function.
  (org-mouse-set-priority): Switch to compatibility function.
  (org-mouse-popup-global-menu): Switch to compatibility function.
  (org-mouse-context-menu): Switch to compatibility function.
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to
  compatibility function.
  (org-plot/gnuplot-script): Switch to compatibility function.
* lisp/org.el (org-entry-get): Switch to compatibility function.
  (org-fill-paragraph): Switch to compatibility function.
  (org-auto-fill-function): Switch to compatibility function.
2012-07-25 09:23:57 -06:00
Bastien Guerry 10aba6b126 New option `org-allow-promoting-top-level-subtree'.
* org.el (org-allow-promoting-top-level-subtree): New option
to allow promoting a top-level subtree.
(org-called-with-limited-levels): New variable, dynamically
bound within the `org-with-limited-levels' macro.
(org-promote): Use the new option to allow promoting a
top-level subtree.

* org-macs.el (org-with-limited-levels): Let-bind
`org-called-interactively-p' to t.

Promoting a top-level subtree can be useful but should not be allowed by
default, as this restructuring is only reversible with M-x undo RET.
2012-05-08 15:19:52 +02:00
Bastien Guerry 99c97fbffc Fix bug in `org-indent-line-function'.
* org.el (org-indent-line-function): Use `org-let' instead of
`orgstruct++-ignore-org-filling'.
(org-fill-paragraph, org-auto-fill-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): Delete.
2012-05-06 09:37:14 +02:00
Bastien Guerry ecd4079f0e org-macs.el (orgstruct++-ignore-org-filling): Set `def-edebug-spec' correctly.
* org-macs.el (orgstruct++-ignore-org-filling): Set
`def-edebug-spec' correctly.
2012-05-03 16:44:17 +02:00
Bastien Guerry a8c3125a14 Rework `orgstruct++-mode' so that you can turn if off safely.
* org.el (org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function)
(org-auto-fill-fallback-function)
(org-indent-line-fallback-function)
(org-fill-paragraph-fallback-function): Remove.
(org-fb-vars): New buffer-local variable.
(orgstruct++-mode): Use the fallback variable `org-fb-vars' to
store, use and restore variables if needed.
(org-fill-paragraph): Ignore `orgstruct++-mode' filling
variables when needed.
(org-auto-fill-function, org-indent-line-function): Ditto.

* org-macs.el (orgstruct++-ignore-org-filling): New macro.
2012-05-01 15:55:41 +02:00
Bastien Guerry d5c0af72cf Use (derived-mode-p 'org-mode) instead of (eq major-mode 'org-mode).
* org.el (org-show-hierarchy-above, org-cycle)
(org-global-cycle, org-files-list, org-store-link)
(org-link-search, org-open-file, org-display-outline-path)
(org-refile-get-location, org-update-all-dblocks)
(org-change-tag-in-region, org-entry-properties)
(org-save-all-org-buffers, org-revert-all-org-buffers)
(org-buffer-list, org-cdlatex-mode)
(org-install-agenda-files-menu, org-end-of-subtree)
(org-speedbar-set-agenda-restriction): Use (derived-mode-p
'org-mode) instead of (eq major-mode 'org-mode).

* org-timer.el (org-timer-set-timer): Ditto.

* org-table.el (orgtbl-mode, org-table-align, orgtbl-mode): Ditto.

* org-src.el (org-edit-src-exit, org-edit-src-code)
(org-edit-fixed-width-region, org-edit-src-exit): Ditto.

* org-remember.el (org-remember-handler): Ditto.

* org-mouse.el (dnd-open-file, org-mouse-insert-item): Ditto.

* org-macs.el (org-get-limited-outline-regexp): Ditto.

* org-lparse.el (org-replace-region-by): Ditto.

* org-latex.el (org-latex-to-pdf-process)
(org-replace-region-by-latex): Ditto.

* org-indent.el (org-indent-indent-buffer): Ditto.

* org-id.el (org-id-store-link, org-id-update-id-locations)
(org-id-store-link): Ditto.

* org-html.el (org-export-html-preprocess)
(org-replace-region-by-html): Ditto.

* org-footnote.el (org-footnote-normalize)
(org-footnote-goto-definition)
(org-footnote-create-definition, org-footnote-normalize): Ditto.

* org-docbook.el (org-replace-region-by-docbook): Ditto.

* org-ctags.el (find-tag): Ditto.

* org-colview.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-colview-xemacs.el (org-columns-redo)
(org-columns-display-here, org-columns-edit-value)
(org-columns-redo): Ditto.

* org-capture.el (org-capture-insert-template-here)
(org-capture, org-capture-finalize)
(org-capture-set-target-location)
(org-capture-insert-template-here): Ditto.

* org-ascii.el (org-replace-region-by-ascii):  Ditto.

* org-archive.el (org-archive-subtree): Ditto.

* org-agenda.el (org-agenda)
(org-agenda-get-restriction-and-command)
(org-agenda-get-some-entry-text, org-search-view)
(org-tags-view, org-agenda-get-day-entries)
(org-agenda-format-item, org-agenda-goto, org-agenda-kill)
(org-agenda-archive-with, org-agenda-switch-to): Ditto.
2012-04-21 00:43:16 +02:00
Bastien Guerry e44d2975ff Fix copyright (to 2012) year and Org version (to 7.8.03). 2012-01-03 18:47:01 +01:00
Tassilo Horn 4bbdfd229d Replace org-mode-p with usual (eq major-mode 'org-mode) check
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
2011-10-22 11:29:24 +02:00
Bastien Guerry 58f1dbccf8 Remove the "Version" header in Org libraries (leave it in org.el).
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
2011-08-17 14:42:34 +02:00
Bastien Guerry 7a18799e25 Remove arch-tag at the bottom of files. 2011-08-15 20:04:38 +02:00
Bastien Guerry 904ed18bc2 Fix copyright years for elisp files in core and contrib.
Also add "This file is not part of GNU Emacs." when this is the case.
2011-08-15 15:23:11 +02:00
David Maus 545bfddeea Provide edebug specifications for macros
* org-macs.el (org-with-gensyms, org-called-interactively-p)
(with-silent-modifications, org-bound-and-true-p)
(org-unmodified, org-re, org-preserve-lc)
(org-without-partial-completion, org-with-point-at)
(org-no-warnings, org-if-unprotected, org-if-unprotected-1)
(org-if-unprotected-at, org-with-remote-undo)
(org-no-read-only, org-save-outline-visibility)
(org-with-wide-buffer, org-with-limited-levels)
(org-eval-in-environment): Provide edebug specifications.
* org-src.el (org-src-do-at-code-block): Dto.
* org-publish.el (org-publish-with-aux-preprocess-maybe): Dto.
* org-compat.el (org-xemacs-without-invisibility): Dto.
* org-clock.el (org-with-clock-position, org-with-clock): Dto.
* org-agenda.el (org-agenda-with-point-at-orig-entry)
(org-batch-agenda, org-batch-agenda-csv)
(org-batch-store-agenda-views): Dto.
* ob.el (org-babel-do-in-edit-buffer)
(org-babel-map-src-blocks, org-babel-map-inline-src-blocks): Dto.
* ob-tangle.el (org-babel-with-temp-filebuffer): Dto.
* ob-table.el (sbe): Dto.
* ob-exp.el (org-babel-exp-in-export-file): Dto.
* ob-comint.el (org-babel-comint-in-buffer)
(org-babel-comint-with-output): Dto.
2011-08-12 08:38:59 +02:00
David Maus 7d5fb7ff38 New function: Return alist based on flat list
* 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.
2011-08-10 09:43:57 +02:00
David Maus 19c6b14644 Factor out function for substituting posix class in regular expression
* org-macs.el (org-substitute-posix-classes): New function. Substitute
posix classes in regular expression.
(org-re): Use new function.
2011-08-10 08:52:15 +02:00
David Maus 5423b329c1 New macro: Evaluate FORM in ENVIRONMENT
* org-macs.el (org-eval-in-environment): New macro. Evaluate FORM in
ENVIRONMENT.
2011-08-10 08:52:15 +02:00
David Maus 79605a9007 Use new macro `org-with-gensyms'
* org-macs.el (org-preserve-lc, org-with-point-at)
(org-with-remote-undo, org-save-outline-visibility): Use new macro
`org-with-gensyms'.
2011-08-10 07:33:43 +02:00
David Maus 4fe8369dae New macro: Wrap let-binding of uninterned SYMBOLS around BODY
* 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.
2011-08-10 07:32:27 +02:00
emacs 7340cee33a Update website to show 7.7 as current release 2011-07-28 10:33:35 +00:00
Bastien Guerry 0c0bce4a67 Manually revert 366254217a.
As David Maus pointed out, the implementation is not good.

* org.el (org-deadline, org-schedule): Don't loop.
(org-loop-over-siblings-within-active-region-p): Remove.
* org-archive.el (org-archive-subtree)
(org-archive-to-archive-sibling, org-toggle-archive-tag):
Don't loop.

* org-macs.el (org-loop-over-siblings-in-active-region):
Remove.
2011-07-28 10:50:35 +02:00
Nicolas Goaziou ad3563e1c4 org-macs: macro `org-with-limited-levels' also sets `outline-regexp'
* 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'.
2011-07-23 10:13:07 +02:00
Nicolas Goaziou 71f654a182 org-macs: org-with-limited-levels also change org-outline-regexp-at-bol
* lisp/org-macs.el (org-with-limited-levels): also modify, when
  appropriate, `org-outline-regexp-at-bol'
2011-07-21 13:45:56 +02:00
Bastien Guerry 5c53026d32 Fix (a lot of) compiler warnings.
Also introduce `org-pop-to-buffer-same-window' as a compatibility
function for Emacs =>24.1.
2011-07-18 19:25:10 +02:00
Bastien Guerry 366254217a New feature: allow some commands to loop over siblings.
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'.
2011-07-18 10:09:53 +02:00
Bastien Guerry c3748fcd80 Don't use `outline-regexp' anymore.
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'.
2011-07-18 09:42:11 +02:00
Bastien Guerry 9c05a7c781 Bump to version 7.6 2011-07-06 21:06:03 +02:00
Bastien Guerry ff038caae5 Revert "Silence byte-compiler with a new alias: filter-buffer-substring-functions."
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'.
2011-07-06 20:56:39 +02:00
Bastien Guerry 5a2eec3207 Silence byte-compiler with a new alias: filter-buffer-substring-functions.
When `filter-buffer-substring-functions' is not a known variable to
Emacs (for versions < 24.1), we alias it to `buffer-substring-filters'.
2011-07-05 12:00:15 +02:00
Bastien Guerry 16faa2b6c1 org-macs.el: new function `org-format-seconds'.
* 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.
2011-07-03 13:23:09 +02:00
David Maus eaa724404b Toggle partial-completion-mode only if it is turned on
* org-macs.el (org-without-partial-completion): Toggle
partial-completion-mode only if it is turned on.
2011-07-02 16:51:55 +02:00
Bastien Guerry da086f9606 Bugfix `org-without-partial-completion' (again).
Er... We need to call ,@body when partial-completion-mode is nil.
2011-07-02 12:15:20 +02:00
Bastien Guerry 65815f64a4 Fix `org-without-partial-completion' again.
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.
2011-07-02 11:25:56 +02:00
Bastien Guerry db052b7de9 Revert "Fix binding problem in org-without-partial-completion."
This reverts commit ed8627de92.
2011-06-30 10:42:26 +02:00
Michael Markert c5a6d3a974 org-macs: Determine on macro expand which interactive predicate we need.
Signed-off-by: Michael Markert <markert.michael@googlemail.com>
2011-06-29 16:22:43 -07:00
Bastien Guerry ed8627de92 Fix binding problem in org-without-partial-completion.
Thanks to Paul Sexton for spotting this.
2011-06-28 18:47:56 +02:00
Eric Schulte db1c3f6a3e Revert "replacing calls to now-defunct function `interactive-p'"
This reverts commit 4f084e1467.
2011-06-16 21:32:54 -07:00
Eric Schulte c83cfcc243 trick the compiler
* lisp/org-macs.el (org-without-partial-completion): Avoid calling by
  name a function unknown to the compiler but explicitly checked by
  program logic.
2011-06-14 13:06:03 -07:00
Eric Schulte 4f084e1467 replacing calls to now-defunct function `interactive-p'
* 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'.
2011-06-14 11:37:59 -07:00
Carsten Dominik d8625e809f Make `org-save-outline-visibility' macro return a useful value
Modified from a patch by Paul Sexton
2011-05-02 09:42:11 +02:00
Julien Danjou fb35e7017c Set lisp-indent-function for org-with-remote-undo
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-23 20:15:25 +01:00
Bastien Guerry f54814d108 org-macs.el (org-with-wide-buffer): Bugfix.
* org-macs.el (org-with-wide-buffer): Bugfix: use
`save-excursion' and `save-restriction'.
2011-03-09 10:56:47 +01:00
emacs 11a10bdfe7 Update website to show 7.5 as current release 2011-03-07 14:27:39 +00:00
Bastien Guerry 4369d4f9a3 Bugfix: allow org-blocker-hook to check against headings outside of a narrowed buffer.
* 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.
2011-03-05 11:01:28 +01:00
Julien Danjou eced270fbf org-macs: store evaluated version of pom
* 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>
2011-02-27 13:44:57 +01:00
David Maus 465940d6c2 Inline function to properly decode utf8 characters in Emacs 22
* 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.
2011-02-17 19:26:48 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Carsten Dominik 5d74e1b754 Fix macro definition of with-silent-modification
* lisp/org-macs.el: Better backup definition for `with-silent-modifications'.
2010-12-03 20:53:34 +01:00
David Maus 6e3f1e1175 Fix condition for with-silent-modification
* org-macs.el (with-silent-modifications): Fix condition for
with-silent-modification.
2010-11-23 21:31:54 +01:00
Achim Gratz 95bb16661b Fix byte compiler warnings
* org-macs.el (org-called-interactively-p): Wrap function call in
	with-no-warnings.
	(with-silent-modifications) Declare macro for Emacs < 23.2.

TINYCHANGE
2010-11-22 21:22:27 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Carsten Dominik cee354c5b4 Update freemind converter
* 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.
2010-10-25 13:27:32 +02:00
Eric Schulte 2554f27683 moved `org-save-outline-visibility' into org-macs.el
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
2010-08-27 08:18:32 -06:00
Carsten Dominik cee04fa632 Make org-capture use `org-default-notes-file' if the file is not specified
* 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'.
2010-07-20 09:05:31 +02:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Philip Rooke ebf808f9aa Correct some docstrings [part 4]
Same rationale as previous patches in this series.

Phil
2010-07-16 21:00:36 +02:00
Carsten Dominik bcb7f7f1ef Introduce a way to set a property to undefined.
* lisp/org-macs.el (org-not-nil): Return the value if not interpreted
as nil.
* lisp/org.el (org-entry-get):
(org-entry-get-with-inheritance): Interpret the value "nil"
as nil for properties.

Bernt Hansen writes:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> > On Jun 25, 2010, at 3:23 PM, Robert Goldman wrote:
> >
> > > Question:  what is the proper way to get a NIL into a property?  Are
> > > we
> > > to use () instead of "nil"?  Or are property values always interpreted
> > > as strings?
> > >
> > > Apologies in advance if this is a stupid question!
> >
> > Not a stupid question at all.
> >
> > There is no way, currently.   Property values are string - the only
> > way to make
> > org-entry-get return nil is to not have the property defined at all.
>
> I've wanted a similar thing in the past for the LOGGING property where
> the parent task has special logging set via the LOGGING property but I
> want to undo that for some of the child tasks so they use the default
> logging setup.
>
> Having a way to undefine a property would be good in general I think.

-Bernt
2010-06-26 07:54:07 +02:00
Carsten Dominik a547c1048b Fix issue with turning off ORDERED property
* lisp/org-macs.el (org-not-nil): New function.
* lisp/org.el (org-block-todo-from-children-or-siblings-or-parent):
Use `org-not-nil' to interpret a property value of nil.

Robert Goldman writes:

> I have found what I believe to be a bug in handling ordered subtasks.
> Here is the behavior:
>
> I have a top level set of tasks that is ordered.
>
> One of the outline items below the top level set is a grab bag of tasks
> that will be performed in parallel.  So this task is NOT ordered
> (ORDERED: nil).
>
> The problem is that the blocking behavior from ordered tasks seems to be
> inherited from the top level task list into the second level of the
> outline, even though the ORDERED property at the second level is
> explicitly overridden.
>
> I am attaching an org file that displays this issue.  To see the
> problem, put your cursor on the "Bar" task and attempt to change its
> status to DONE.

The problem was here that the value of the property is the string
"nil", which is of course not nil.

This patches introduces a special case to interpret "nil" as nil.
2010-06-25 09:01:40 +02:00
Carsten Dominik 6bad6fc737 Fix some issues in the entity and subscript code
* lisp/org-macs.el (org-rm-props): Add org-emphasis to the properties
that must be removed.
* lisp/org.el (org-do-emphasis-faces): Add org-emphasis property to
items that have emphasis done wit font-lock.
(org-fontify-entities): Do not do anything in commented lines.
(org-unfontify-region): Decompose the region as well, because we do
composition during font-lock.
(org-raise-scripts): Do nothing inside an emphasis string.

Reported by Eric Fraga in http://article.gmane.org/gmane.emacs.orgmode/25940
2010-06-04 08:25:50 +02:00
Carsten Dominik c86a3fc4aa Push version number to 6.36trans 2010-05-09 06:24:20 +02:00
Carsten Dominik 88100d1580 Release 6.36a 2010-05-09 06:13:54 +02:00
Carsten Dominik b65f1f9489 Redefine the functions where XEmacs invisibility has to be turned off 2010-04-18 19:58:24 +02:00
Carsten Dominik 43bf1bbbd7 Push version number to 6.35trans 2010-04-15 12:24:55 +02:00
Carsten Dominik 6f3026edf1 Release 6.35g 2010-04-08 20:15:15 +02:00
Carsten Dominik a589c7a22e Release 6.35f 2010-04-08 10:36:32 +02:00
Carsten Dominik 50e5924d8a Release 6.35e 2010-04-07 16:33:52 +02:00
Carsten Dominik f722763f8a Release 6.35d 2010-04-07 16:26:42 +02:00
Carsten Dominik d65ed03be6 Update copyright notices and fix wrong version tags 2010-04-07 16:26:10 +02:00
Carsten Dominik cafbe1d038 Release 6.35c 2010-04-07 08:58:25 +02:00
Carsten Dominik b213c0f31e Release 6.35b 2010-04-07 07:54:14 +02:00
Carsten Dominik 08d0d2fa20 Release 6.35 2010-04-06 09:16:36 +02:00
Carsten Dominik 06e74afce3 Version number to 6.34trans 2010-01-20 10:13:21 +01:00
Carsten Dominik a1709ba641 Release 6.34c 2010-01-18 00:10:11 +01:00
Carsten Dominik 2f2f9441d4 Release 6.34b 2010-01-14 23:06:55 +01:00
Carsten Dominik c077142241 Release 6.34a 2010-01-12 08:53:44 +01:00
Carsten Dominik 288c724335 Release 6.34 2010-01-10 10:57:53 +01:00
Carsten Dominik 275b6627a6 Release 3.34 2010-01-10 10:54:52 +01:00
Carsten Dominik facedba057 Use John Gruber's regular expression for URL's
http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
2009-12-09 15:13:50 +01:00
Carsten Dominik f759cc17a7 Allow Org-mode source code examples in LaTeX export
This did not work because the parser would still match headlines that
are really part of the examples.
2009-11-25 11:32:39 +01:00
Carsten Dominik 62a7301a5e Push release number to 6.33trans 2009-11-20 20:20:31 +01:00
Carsten Dominik 24061fddd1 Release 6.33f 2009-11-20 15:15:05 +01:00
Carsten Dominik 37e9b1c51f Release 6.33e 2009-11-20 13:58:31 +01:00
Carsten Dominik 24a49967f1 Release 6.33d 2009-11-20 12:34:50 +01:00
Carsten Dominik c7371cc7fe Push version number to 6.33trans 2009-11-15 09:46:43 +01:00
Carsten Dominik 6bc6379dfe Release 6.33c 2009-11-15 08:00:52 +01:00
Carsten Dominik 6c977c41c3 Release 6.33b 2009-11-14 16:25:31 +01:00
Carsten Dominik b8a6721a68 Release 6.33a 2009-11-13 23:22:18 +01:00
Carsten Dominik 5ca6635993 Push version number to 6.33a 2009-11-13 22:54:22 +01:00
Carsten Dominik 82ee0cc583 Release 6.33 2009-11-13 07:10:51 +01:00
Bernt Hansen 0042080e4c Fix spelling and grammar 2009-11-12 07:39:29 -05:00
Carsten Dominik 58562167b4 Version number to 6.32trans 2009-10-27 18:23:19 +01:00
Carsten Dominik e0949896f7 Release 6.32b 2009-10-27 18:22:28 +01:00
Carsten Dominik 037b685d50 Push version number to 6.32trans 2009-10-27 09:25:30 +01:00
Carsten Dominik fcd2ef541f Release 6.32 2009-10-26 08:57:21 +01:00
Carsten Dominik 523ab0baee LaTeX export: Don't format tables in protected regions 2009-10-07 08:10:05 +02:00
Carsten Dominik 6b0a251eea Push version number to 6.31trans 2009-10-01 11:57:17 +02:00
Carsten Dominik 1b37d5e07c Release 6.31a 2009-10-01 09:13:58 +02:00
Carsten Dominik c11e0b44ae Release 6.31 2009-09-30 16:03:17 +02:00
Carsten Dominik 6c147f0b1e Minor docstring fix 2009-09-28 20:35:49 +01:00
Carsten Dominik 0054bf1105 Store link to referenced entries in agenda
Peter Westlake writes:

> Could I request this as a small feature enhancement, please?
> Commands like org-refile have an agenda equivalent so that
> the same keys work in the agenda, and it would be very nice
> to be able to store a link to an item that way as well.
2009-09-12 07:05:21 +02:00
Carsten Dominik 291a6db848 Release number back to 6.30trans 2009-09-04 10:39:01 +02:00
Carsten Dominik 12ab55ca43 Release 6.30d 2009-09-03 13:53:46 +02:00
Carsten Dominik adfa87282d Push version number to 6.30trans 2009-09-03 08:10:36 +02:00
Carsten Dominik 63e1714288 Release 6.30c 2009-09-02 14:40:56 +02:00
Carsten Dominik fc332703bf Release 6.30b 2009-09-02 11:33:10 +02:00
Carsten Dominik 1d04b205e6 Release 6.30a 2009-09-02 09:00:23 +02:00
Carsten Dominik db70cdb13b Release 6.30 2009-09-01 06:09:23 +02:00
Carsten Dominik 350691164b Avoid calling `goto-line' from lisp programs 2009-08-27 10:24:09 +02:00
Carsten Dominik 09acabcfb3 Fix some typos, add a new variable 2009-08-15 08:16:45 +02:00
Carsten Dominik bfdd3d3fd3 Push version number to 6.29trans 2009-08-06 12:07:20 +02:00
Carsten Dominik 0864163024 Release 6.29c 2009-08-06 06:26:23 +02:00
Carsten Dominik d6b37ddbea Release 6.29b 2009-08-05 12:34:30 +02:00
Carsten Dominik 1c25048e48 Release 6.29a 2009-08-04 23:54:22 +02:00
Carsten Dominik d67a9be8a2 Release 6.29 2009-08-04 23:06:39 +02:00
Carsten Dominik 2eecb4c43c Fix white-space errors 2009-08-03 17:30:30 +02:00
Carsten Dominik 6a722e5d2e Do not record undo information when adding/remove text properties
When this is done inside org-unmodified, undo information is not recorded.
2009-08-03 11:03:37 +02:00
Carsten Dominik 4183124c4b Keep compiler happy 2009-07-20 09:16:28 +02:00
Carsten Dominik 8530298b45 Inline tasks: Play along with archiving, refiling, and footnotes, store link. 2009-07-19 09:47:13 +02:00
Carsten Dominik 6596d005ef Minor improvements 2009-07-18 09:30:20 +02:00
Carsten Dominik c1d00fa463 Export: General mechanism for local settings
Many different people want to set many different variables in a
buffer-local way for export.  This cannot be done with file variables,
because the Org buffer is not current while the exporter is running.

Lots of variables can be set with the #+OPTIONS lines, but finding
abbreviations goes only so far.

Therefore we have now a general mechanism that can be used to bind
variables during export operations.

a line like:   #+BIND: variable value

will bind the variable to value.  For example,
the line

>>      #+OPTIONS: toc:nil

can now equivalently be written as

>>      #+BIND: org-export-with-toc nil
2009-07-06 17:00:03 +02:00
Carsten Dominik f648323253 Push version number to 6.28trans 2009-06-26 17:26:50 +02:00
Carsten Dominik cd4e52a5ef Release 6.28d 2009-06-26 17:23:27 +02:00
Carsten Dominik 00ddc4dba7 Release 6.28c 2009-06-26 09:27:50 +02:00
Carsten Dominik e7ffcc1d4d Release 6.28b 2009-06-25 09:01:20 +02:00
Carsten Dominik 7906427aa6 Release 6.28 2009-06-25 08:59:59 +02:00
Carsten Dominik cccd7b275c Fix order problem in org-macs.el 2009-06-07 22:14:33 +02:00
Carsten Dominik 503e571e43 Keep byte compiler happy 2009-06-07 17:07:07 +02:00
Carsten Dominik 8a9e604a7a New indentation treatment for blocks during export
Now we also deal with center, quote, and verse blocks.
2009-06-07 16:11:14 +02:00
Carsten Dominik ae7b8f6b12 Push version number to 6.27trans 2009-05-26 15:41:44 +02:00
Carsten Dominik 0421dead4b Release 6.27a 2009-05-25 16:04:45 +02:00
Carsten Dominik b681c7b26e Release 6.27 2009-05-23 08:22:04 +02:00
Carsten Dominik d3689276ec LaTeX fragments: Better error message when latex/dvipng unavailable
Thomas Morgan writes:

>  I just tried exporting an Org file with LaTeX fragments to HTML
>  on a computer that doesn't have dvipng.  There were error messages
>  in *Messages* ("Failed to create png file..."), but this wasn't
>  obvious to me at first glance because those messages were replaced
>  in the echo area by "Exporting... done" before I could see them.
>
>  So I was wondering, is there a good way to make the user aware of
>  those errors?  Maybe by printing "Exporting... done (with errors)"?

There is now a better error message when either the latex or the
dvipng program does not exist.
2009-04-30 22:52:42 +02:00
Carsten Dominik 69e6d249aa Push version number to 6.26trans 2009-04-22 09:08:13 +02:00
Carsten Dominik 73854f435d Release 6.26d 2009-04-22 06:42:17 +02:00