Commit Graph

1491 Commits

Author SHA1 Message Date
Nicolas Goaziou 6b7944805f org-mobile: Use lexical binding
* lisp/org-agenda.el (org-agenda-keep-restricted-file-list): New
  variable, dynamically scoped.
(org-agenda): Variable is now necessarily bound.

* lisp/org-mobile.el (org-mobile-create-index-file): Silence
  byte-compiler.
2016-06-22 00:01:10 +02:00
Don March 42620c1efa Rename org-deadline-is-close to have -p suffix
* lisp/org-agenda.el
  (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
* lisp/org.el (org-deadline-close): Rename to...
  (org-deadline-close-p): ...this.

* testing/lisp/test-org.el (test-org/deadline-close): Rename to...
  (test-org/deadline-close-p): ...this.
2016-06-04 20:39:15 +02:00
Nicolas Goaziou 0ac099a6f8 Remove final parts of XEmacs compatibility code
* lisp/org-compat.el: Declare `org-add-hook', `org-decompose-region',
  `org-detach-overlay', `org-file-equal-p', `org-float-time',
  `org-indent-line-to', `org-indent-to-column', `org-looking-at-p',
  `org-looking-back', `org-propertize', `org-re' and
  `org-select-frame-set-input-focus' as obsolete.
(org-overlay-display, org-overlay-before-string, org-find-overlays):
Move to "org.el"
(org-xemacs-key-equivalents, org-xemacs-p): Remove variables.
(org-region-active-p): Drop XEmacs support.
(org-xemacs-without-invisibility): Remove macro.
(org-get-x-clipboard-compat): Remove function.
* lisp/org-macs.el (org-match-string-no-properties): Remove function.

* lisp/ob-core.el:
* lisp/org-agenda.el:
* lisp/org-archive.el:
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-crypt.el:
* lisp/org-element.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-footnote.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-mouse.el:
* lisp/org-pcomplete.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-odt.el:
* lisp/ox.el:
* contrib/lisp/org-notify.el:
* contrib/lisp/ox-taskjuggler.el:
* contrib/lisp/org-wikinodes.el:
* testing/lisp/test-org-src.el:
* testing/lisp/test-org.el: Silence byte-compiler.
2016-05-26 13:56:25 +02:00
Nicolas Goaziou 4129ae6737 Remove some XEmacs compatibility layer
* lisp/ob-calc.el (calc-trail):
* lisp/ob-python.el (org-babel-python-mode):
* lisp/org-agenda.el (org-agenda-tags-column):
(org-agenda-show-new-time):
* lisp/org-clock.el (org-clock-update-mode-line):
(org-clock-put-overlay):
(org-clock-resolve):
* lisp/org-faces.el (org-faces):
* lisp/org-indent.el (org-indent-mode):
* lisp/org-macs.el (org-load-noerror-mustsuffix):
* lisp/org-table.el (orgtbl-setup):
* lisp/org.el (org-key):
(org-self-insert-cluster-for-undo):
(org-tags-column):
(org-emphasis-alist):
(org-mode):
(org-set-font-lock-defaults):
(org-cycle-internal-local):
(org-tree-to-indirect-buffer):
(org-set-frame-title):
(org-priority):
(org-set-tags):
(org-set-current-tags-overlay):
(org-toggle-time-stamp-overlays):
(org-display-custom-time):
(org-diary-to-ical-string):
(org--format-latex-make-overlay):
(org-dvipng-color):
(org-latex-color):
(org-mode-map):
(org-speed-commands-default):
(org-reload):
(org-display-warning):
(org-end-of-line):
* lisp/ox-man.el (org-man-inline-src-block):
* contrib/lisp/org-vm.el (org-vm-follow-link):
* contrib/lisp/ox-groff.el (org-groff-inline-src-block):
(org-groff-src-block): Remove some XEmacs compatibility layer.
2016-05-26 11:30:11 +02:00
Nicolas Goaziou 5ac93681b2 Merge branch 'maint' 2016-05-26 10:55:00 +02:00
Nicolas Goaziou 655fb33967 org-agenda: Effectively preserve persistent bulk marks
* lisp/org-agenda.el (org-agenda-change-all-lines): Preserve bulk mark
  overlay when replacing an entry.

Reported-by: Jesse Johnson <holocronweaver@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/107299>
2016-05-26 10:51:58 +02:00
Nicolas Goaziou 4c58ee0a4b org-agenda: Add missing docstring
* lisp/org-agenda.el (org-agenda-bulk-marked-p): Add missing docstring.
2016-05-26 10:51:27 +02:00
Nicolas Goaziou 920cfbd921 org-agenda: Fix agenda filter by empty tag string
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Handle
  empty tag strings.

Reported-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/107121>
2016-05-19 10:31:27 +02:00
Nicolas Goaziou 702bab9ee2 Merge branch 'maint' 2016-05-11 22:50:38 +02:00
Nicolas Goaziou 34dc298869 org-agenda: Fix `org-agenda-bulk-custom-functions' supported Customize type
* org-agenda.el (`org-agenda-bulk-custom-functions'): Change the defcustom
  template to recognize that the code expects this alist's elements to be
  two-element lists like (?a b), not conses like (?a . b).

The Customize UI previously incorrectly presented the latter.  When
saved, this led to the agenda bulk-commands menu correctly presenting
the accelerator key 'a' but then erroring when it tried to execute the
associated command 'b'.
2016-05-11 22:49:25 +02:00
Nicolas Goaziou 3308a5ecfe Merge branch 'maint' 2016-05-04 14:23:57 +02:00
Nicolas Goaziou 8638c14fbd org-agenda: Fix error on empty headlines
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled):
(org-agenda-get-blocks): Handle empty headlines.
2016-05-04 14:20:09 +02:00
Nicolas Goaziou c112f40d51 org-agenda: Remove unnecessary visibility modification
* lisp/org.el (org-show-context-detail): Change default visibility span
  for agenda context.

* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-todo):
(org-agenda-add-note):
(org-agenda-priority):
(org-agenda-set-tags):
(org-agenda-set-property):
(org-agenda-set-effort):
(org-agenda-toggle-archive-tag):
(org-agenda-clock-in): Special visibility is taken care of by
`org-show-context'.  Do not hard-code anything else.

* contrib/lisp/org-contacts.el (org-contacts-gnus-article-from-goto):
Special visibility is taken care of by `org-show-context'.  Do not
hard-code anything else.
2016-04-29 11:35:49 +02:00
Oleh Krehel e85f80e2f8 lisp/org-agenda.el (org-agenda-run-series): Prettify 2016-04-20 17:22:09 +02:00
Nicolas Goaziou dbda42010c org-agenda: Fix "Void variable org-clock-current-task"
* lisp/org-agenda.el (org-agenda-mark-clocking-task):
(org-agenda-clock-goto): `org-clock-current-task' may not be defined, so
check that first.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/106504>
2016-04-19 21:14:54 +02:00
Nicolas Goaziou 4743d43dd8 Properly handle `org-tag-persistent-alist'
* lisp/org.el (org-current-tag-alist): New variable.
(org-set-tags):
(org-global-tags-completion-table):
(org-agenda-prepare-buffers): Use new variable.
(org-set-regexps-and-options): Use new variable.  Handle STARTUP early
so that "#+STARTUP: noptag" is taken into consideration.

* lisp/org-agenda.el (org-agenda-bulk-action): Use new variable.

* lisp/org-mobile.el (org-mobile-create-index-file): `org-tag-alist' is
  no longer buffer-local.

* testing/lisp/test-org.el (test-org/set-regexps-and-options): Add
  tests.
2016-04-18 18:07:40 +02:00
Nicolas Goaziou 0e0a72443a org-agenda: Fix Invalid Function 4 error
* lisp/org-agenda.el (org-tags-view): Fix wrong conversion introduced in
  commit a02a83793b.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/106080>
2016-04-05 23:31:21 +02:00
Oleh Krehel 809a838844 org-agenda.el (org-agenda-to-appt): Don't echo already added
`appt-add' returns nil when the event was already added previously.
2016-03-18 15:23:52 +01:00
Nicolas Goaziou 99e12cbf92 Merge branch 'maint' 2016-03-16 22:08:35 +01:00
Nicolas Goaziou 9c2e8a7988 org-agenda: Fix bulk re-scheduling
* lisp/org-agenda.el (org-agenda-bulk-action): Fix rescheduling TODO items with `org-log-reschedule' set to `note'.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/105591>
2016-03-16 22:07:16 +01:00
Kyle Meyer dade0d5b28 Merge branch 'maint' 2016-03-11 22:51:07 -05:00
Kaushal Modi ebacca39b4 Display quotes in key-bindings as straight quotes
* lisp/org-agenda.el (org-agenda-show-the-flagging-note):
* lisp/org-footnote.el (org-footnote-goto-definition):
* lisp/org-table.el (org-table-edit-formulas): Fix straight quotes
  rendered as curvy quotes in echoes messages (in emacs 25.1).
* lisp/org-table.el (org-table-align): Fix straight quotes rendered as
  curvy quotes in help echo (in emacs 25.1).

* lisp/org-protocol.el (org-protocol-create-for-org):
* lisp/org-table.el (org-table-sum): Minor reformatting.

The below thread discusses why these changes were needed especially when
using emacs 25.1 or newer emacsen (that added support for rendering
back-quotes and straight quotes as left/right curvy quotes by default):
http://thread.gmane.org/gmane.emacs.orgmode/105594

Fix the quote style displayed when key-bindings are shown in
the echo via (message .. (substitute-command-keys ..)).

So below will render that single quote as curly.

(message "C-c '")

The fix (Reference:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2015-10/msg00234.html)
is to print that quote verbatim using the "%s" modifier:

(message "%s" "C-c '")

Also an help-echo text property value was fixed in `org-table-align'.
`substitute-command-keys' should not be used in that.  Instead \\[COMMAND]
should be used directly in the string.
2016-03-11 22:40:30 -05:00
Oleh Krehel 1003b1025b org-agenda.el (org-agenda-to-appt): Ignore DONE tasks 2016-02-26 16:58:44 +01:00
Nicolas Goaziou 3196b14342 Make `org-agenda-view-columns-initially' a defcustom
* lisp/org-agenda.el (org-agenda-view-columns-initially): New variable,
2016-02-17 22:49:19 +01:00
Nicolas Goaziou 8eff64cffe Silence byte-compiler
* lisp/org-agenda.el (org-agenda-current-date): New variable.
(org-agenda-get-day-entries):
* lisp/org.el (org-calendar-holiday): Use new variable.
2016-02-11 11:32:14 +01:00
Kyle Meyer c53936dcfb org-agenda: Fix org-agenda-filter-by-tag-refine
* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Remove command
  because this functionality is redundant with org-agenda-filter-by-tag
  as of 6c6ae99.

Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>
2016-02-03 23:49:48 -05:00
Kyle Meyer e44524b3b2 Merge branch 'maint' 2016-02-03 23:37:26 -05:00
Kyle Meyer b347277ba0 org-agenda: Fix org-agenda-filter-by-tag-refine
* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Refine rather
  than exlude tags, reverting change from 6c6ae99.  Mark as obsolete
  because this functionality is now redundant with
  org-agenda-filter-by-tag.

Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>
2016-02-03 23:34:26 -05:00
Nicolas Goaziou 58af2e01be Merge branch 'maint' 2016-01-21 10:42:58 +01:00
Nicolas Goaziou 3dcd1a345f Use `org-back-to-heading' instead of `outline-back-to-heading'
* lisp/org-agenda.el (org-search-view):
* lisp/org-clock.el (org-with-clock):
(org-clock-jump-to-current-clock):
* lisp/org.el (org-entry-beginning-position): Use `org-back-to-heading'
  instead of `outline-back-to-heading'.

Reported-by: Derek Feichtinger <dfeich@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104375>
2016-01-21 10:42:03 +01:00
Marco Wahl a1b1eaf3b4 Merge branch 'maint' 2016-01-11 22:59:22 +01:00
Marco Wahl 93fe1072f6 org-agenda: Fix filter for org-habits in agenda
* lisp/org-agenda.el (org-agenda-filter-apply): Get text at bol instead
  of eol.  Note that eol can be overwritten by org-habits.
2016-01-11 22:54:09 +01:00
Nicolas Goaziou a02a83793b Make `org-make-tags-matcher' lexical binding friendly
* lisp/org.el (org-make-tags-matcher): Return a function instead of
  a sexp.  Refactor code.
(org--matcher-tags-todo-only): New variable.  Replace `todo-only'
dynamic binding.
(org-scan-tags): Apply changes to `org-make-tags-matcher'.
(org-match-sparse-tree):
(org-map-entries): Use new variable.

* lisp/org-crypt.el (org-encrypt-entries):
(org-decrypt-entries): Use new variable.

* lisp/org-clock.el (org-clock-get-table-data): Apply changes to
  `org-make-tags-matcher'.

* lisp/org-agenda.el (org-tags-view): Use new variable.
2016-01-10 21:16:29 +01:00
Nicolas Goaziou fdbf441560 Obsolete `org-icompleting-read' and `org-completing-read-no-i'
* lisp/org.el (org-icompleting-read, org-completing-read-no-i): Obsolete
  aliases for `completing-read'
(org-iswitchb-completing-read): Remove function.
(org-sort-entries):
(org-refile-get-location):
(org-todo):
(org-deadline):
(org-occur-parameters):
(org-change-tag-in-region):
(org-fast-tag-selection):
(org-delete-property-globally):
(org-compute-property-at-point):
(org-buffer-list): Use genuine function.

* contrib/lisp/org-colview-xemacs.el (org-columns-edit-value):
(org-columns-new):
(org-insert-columns-dblock):
* contrib/lisp/org-index.el (org-index):
* contrib/lisp/ox-bibtex.el (org-bibtex-goto-citation):
* lisp/ob-core.el (org-babel-insert-header-arg):
(org-babel-goto-named-src-block):
(org-babel-goto-named-result):
(org-babel-demarcate-block):
* lisp/org-agenda.el (org-todo-list):
(org-agenda-filter-by-tag):
(org-agenda-bulk-action):
* lisp/org-attach.el (org-attach-delete-one):
(org-attach-open):
* lisp/org-bibtex.el (org-bibtex-fleshout):
(org-bibtex-create):
* lisp/org-capture.el (org-capture-fill-template):
* lisp/org-colview.el (org-columns-edit-value):
(org-columns-new):
(org-insert-columns-dblock):
* lisp/org-footnote.el (org-footnote-new):
* lisp/org-list.el (org-sort-list):
* lisp/ox-publish.el (org-publish):
* lisp/ox.el (org-export-dispatch): Use genuine function.
2016-01-10 21:16:29 +01:00
Kyle Meyer 6345de2d05 Merge branch 'maint' 2016-01-09 17:43:27 -05:00
Kyle Meyer 6bc48c5f41 Update copyright years 2016-01-09 17:12:03 -05:00
Kyle Meyer 18aa8d1abc Merge branch 'maint' 2015-12-24 01:51:55 -05:00
Kyle Meyer 6d0af59744 org-agenda: Don't kill or bury non-agenda buffer
* lisp/org-agenda.el (org-agenda--quit): Fix changes introduced by
  9b1c682 and 8594aed that incorrectly assume that the agenda buffer is
  always the current buffer at the time of killing or burying.

Reported-by: David Mann <manndmd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/103791>
2015-12-24 01:50:31 -05:00
Marco Wahl 5ca98b9213 Merge branch 'maint' 2015-12-12 19:57:22 +01:00
Marco Wahl 700b8e70f6 org-agenda: Refactoring
* lisp/org-agenda.el(org-agenda--quit): Removed an unnecessary variable.
2015-12-12 19:46:34 +01:00
Marco Wahl 9b1c682425 org-agenda: Fix quit sticky agenda
* lisp/org-agenda.el(org-agenda--quit): Removed the argument from the
  call to `bury-buffer' to let the agenda disappear.
2015-12-12 19:35:26 +01:00
Nicolas Goaziou e103ad8ae1 Merge branch 'maint' 2015-11-26 14:23:01 +01:00
Nicolas Goaziou b0a436cb8e org-agenda: Write only currently visible items
* lisp/org-agenda.el (org-agenda-write): Fix arguments passed to
  `org-agenda-remove-marked-text' to properly remove entries with
  `invisible' property set to `org-filtered'.
* lisp/ox-icalendar.el (org-icalendar-export-current-agenda): Always
  include TODO entries in the output.  The motivation is that a user not
  filtering out TODO or DONE items in the current agenda probably wants
  them in the output.

Reported-by: "sgeorgii ." <sgeorgii@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/102998>
2015-11-26 14:20:42 +01:00
Nicolas Goaziou 12c118b43d org-agenda: Fix f2d5083
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Fix code
  typo in last commit.  Fix docstring.
2015-11-26 11:18:56 +01:00
Gustav Wikstrom f2d508347e org-agenda: Filter empty tags
* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): Deal with
  the case when the user provided an empty string to filter or exclude
  rows from the agenda.

This is done in order to fix a problem reported in emacs-orgmode mailing
list 2015-11-25 02:50 with subject "[O] [RFC] [PATCH] Changes to Tag
groups - allow nesting and regexps".
2015-11-26 09:18:22 +01:00
Nicolas Goaziou 10173ad6d6 org-agenda: Fix `org-batch-agenda'
* lisp/org-agenda.el (org-batch-agenda): Fix function when CMD-KEY is
  a string of length 2.

Reported-by: Christoph Gaitzsch <privat@christophgaitzsch.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102724>
2015-11-08 20:12:51 +01:00
Aaron Ecay 07e16c2fc5 Use setq-local and defvar-local.
* lisp/org-macs.el (org-set-local): Remove.  All callers changed.
* lisp/org-clock.el:
* lisp/org-colview.el:
* lisp/org-macro.el:
* lisp/org-mouse.el:
* lisp/org-table.el:
* lisp/org.el: Use defvar-local.
* lisp/org-agenda.el:
* lisp/org-capture.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-plot.el:
* lisp/org.el:
* lisp/ox-odt.el:
* lisp/ox.el: Use setq-local instead of set + make-local-variable.

Changes in contrib:

* contrib/lisp/org-colview-xemacs.el (org-colview-xemacs-set-local): New
macro. Adjust old callers of `org-set-local'.
2015-11-05 16:47:38 +00:00
Nicolas Goaziou 7f20175807 org-agenda: Small refactoring
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled):
2015-10-31 22:28:04 +01:00
Nicolas Goaziou e6ac458988 org-agenda: Fix diary sexp timestamps
* lisp/org-agenda.el (org-agenda--timestamp-to-absolute): New function.
(org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): Use new function.

* lisp/org.el (org-diary-sexp-no-match): New error.
(org-time-string-to-absolute): Raise an error when a diary sexp cannot
match instead of returning a nonsensical value.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/102417>
2015-10-31 22:26:13 +01:00
Nicolas Goaziou 72c3f5e8e5 org-agenda: Fix `org-agenda-get-scheduled'
* lisp/org-agenda.el (org-agenda-get-scheduled): Rewrite function.
  Comment code.  Fix fontification and sorting issues introduced in
  9e18583.
2015-10-28 14:48:48 +01:00
Nicolas Goaziou 10a3d601ec org-agenda: Fix small bug
* lisp/org-agenda.el (org-agenda-get-day-entries): Rewrite function to
  avoid O(n^2) complexity.  Also fix empty deadline list passed as
  argument when :deadline (or :deadline*) is not the first symbol.
2015-10-28 14:48:48 +01:00
Nicolas Goaziou c29eee4836 org-agenda: Rename `org-agenda-todayp' as `org-agenda-today-p'
* lisp/org-agenda.el (org-agenda-today-p): New function.
(org-agenda-todayp): Deprecate function.
(org-agenda-get-day-face):
(org-agenda-get-deadlines):
(org-agenda-todo): Apply renaming.
2015-10-28 14:48:43 +01:00
Nicolas Goaziou f774552a00 org-agenda: Clarify docstring
* lisp/org-agenda.el (org-scheduled-past-days): Clarify docstring.
2015-10-28 12:19:56 +01:00
Nicolas Goaziou 9e18583242 Fix 3072cb2
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): When closest scheduled/deadline date is
today, also report all days since original timestamp.
2015-10-26 21:29:12 +01:00
Nicolas Goaziou 3072cb28e8 org-agenda: Improve display for repeaters
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): For past repeaters, compute the number of
scheduled or deadline days since original date, not closest repeater.

Suggested-by: cesar mena <cmena@pobox.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/101884>
2015-10-25 18:21:03 +01:00
Nicolas Goaziou b369da2339 org-agenda: Fix last commit
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Fix last commit.
2015-10-17 21:57:53 +02:00
Nicolas Goaziou 005aa06ed5 org-agenda: Skip SCHEDULED and DEADLINE false positives
* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Check point is really on a planning line
before proceeding.
2015-10-17 15:49:45 +02:00
Kyle Meyer 984b1ff0ab Merge branch 'maint' 2015-10-04 02:46:23 -04:00
Kyle Meyer ef3ea9d02d Use prefix for outline functions
* lisp/ob-lilypond.el (org-babel-lilypond-mark-error-line):
* lisp/org-agenda.el (org-agenda-goto):
(org-agenda-show-and-scroll-up):
(org-agenda-show-1):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
(org-toggle-archive-tag):
* lisp/org-capture.el:
(org-capture-place-template):
* lisp/org-colview.el:
(org-columns-eval):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org-mouse.el (org-mouse-popup-global-menu):
* lisp/org.el (org-cycle):
(org-cycle-internal-global):
(org-cycle-internal-local):
(org-global-cycle):
(org-set-startup-visibility):
(org-set-visibility-according-to-property):
(org-overview):
(org-content):
(org-clean-visibility-after-subtree-move):
(org-set-outline-overlay-data):
(org-tree-to-indirect-buffer):
(org-move-subtree-down):
(org-paste-subtree):
(org-sort-entries):
(orgstruct-setup):
(org-show-set-visibility):
(org-mode-map):
(org-check-before-invisible-edit):
(org-kill-note-or-show-branches):
(org-org-menu):
(org-yank-generic):
* lisp/ox-org.el (org-org-publish-to-org): Use prefix for outline
  functions.
* lisp/org-compat.el: Add compatibility functions for outline functions
  that are under the "outline-" prefix as of Emacs 25.
2015-10-04 02:31:16 -04:00
Kyle Meyer 5362f63fad Merge branch 'maint' 2015-09-21 18:46:41 -04:00
Paul Eggert c86a10b0bc Backport commit 284c470 from Emacs master branch
Backslash cleanup in Elisp source files
284c470ef752967fcd8bae6a450dc138462b1e49
Paul Eggert
Thu Sep 17 16:09:39 2015 -0700
2015-09-21 18:38:39 -04:00
Kyle Meyer 0839dc4322 Protect remaining apostrophes in docstrings
Protect apostrophes not covered by the last backport.  Convert
expressions like '(...)  to \\='(...)  and symbols written as 'name to
`name'.  (In addition to ensuring the correct display, the latter also
improves consistency with many Org docstrings.)

If these aren't protected, Emacs 25 may display them as curved quotes in
the help buffer, depending on the value of text-quoting-style.
2015-09-21 18:38:39 -04:00
Kyle Meyer 077810e521 Modify quote-related backport
These changes are in line with the changes proposed on the mailing list,
but many of those changes weren't necessary because they had already
been reverted in the Emacs repo.

<http://permalink.gmane.org/gmane.emacs.orgmode/100896/>
2015-09-21 18:38:39 -04:00
Kyle Meyer d77a52a502 Backport quote-related commits from Emacs
These changes are the combination of the commits below (in order
applied).  Unlike other backports, these are applied in one commit
because they are closely related and because some of the later commits
reverse changes in earlier commits.  Changes to message and help quote
display for Emacs 25 seem to be here to stay.  The quote protections are
required to ensure grave accents and apostrophes are displayed as
intended in Emacs 25, and they should not affect earlier versions.

  Quoting fixes in lisp/org
  6cd2629bd1b3ce77d29ac28e29237c94a4197116
  Paul Eggert
  Mon Aug 31 00:29:40 2015 -0700

  More-conservative ‘format’ quote restyling
  fbb5531fa11d13854b274d28ccd329c9b6652cfc
  Paul Eggert
  Sun Aug 23 22:39:06 2015 -0700

  Prefer directed to neutral quotes
  875a5d0ead827d3da32ecbd30e739a29f07bbc87
  Paul Eggert
  Mon Aug 24 23:57:25 2015 -0700

  Escape ` and ' in doc
  19532d147b431a4fe34f088d6de07891c48e2c5c
  Paul Eggert
  Tue Sep 1 18:23:21 2015 -0700

  Fix some more docstring etc. quoting problems
  26bd978d87dfbf9baa115cd961a67d42b416c4bf
  Paul Eggert
  Thu Sep 3 15:32:54 2015 -0700

  Go back to grave quoting in source-code docstrings etc.
  6afef3f6ca2f3009c722b84e249903b7f807b044
  Paul Eggert
  Mon Sep 7 16:09:27 2015 -0700
2015-09-21 18:38:18 -04:00
Kyle Meyer 0cf9f17c55 Use substitute-command-keys more
* lisp/ob-core.el (org-confirm-babel-evaluate):
(org-babel-no-eval-on-ctrl-c-ctrl-c):
(org-babel-hash-at-point):
* lisp/org-agenda.el (org-agenda-log-mode-items):
(org-agenda-auto-exclude-function):
(org-search-view):
(org-todo-list):
(org-tags-view):
(org-agenda-log-mode):
(org-agenda-show-the-flagging-note):
* lisp/org-clock.el (org-clock-out-when-done):
* lisp/org-id.el (org-id-link-to-org-use-id):
* lisp/org-table.el (org-table-allow-automatic-line-recalculation):
(org-table-edit-formulas):
* lisp/org.el (org-support-shift-select):
(org-remove-highlights-with-change):
(org-refile-use-cache):
(org-use-fast-todo-selection):
(org-time-stamp-rounding-minutes):
(org-agenda-text-search-extra-files):
(org-cycle):
(org-ctrl-c-ctrl-c): Use substitute-command-keys.
2015-09-21 18:33:45 -04:00
Kyle Meyer f16ae0dcb7 org-agenda: Remove old binding from docstring
* lisp/org-agenda.el (org-agenda-kill-all-agenda-buffers): Remove
  reference to stale key binding.

This binding was removed in 39c7630 (Clean up local variable stuff and
document sticky agenda buffers, 2012-03-10).
2015-09-21 18:33:36 -04:00
Nicolas Goaziou cc72db1fe6 Merge branch 'maint' 2015-09-19 13:32:40 +02:00
Eric Abrahamsen 1ae9741eab org-agenda.el: Fix org-agenda-with-point-at-orig-entry
* lisp/org-agenda.el (org-agenda-with-point-at-orig-entry): Add missing
  comma in the backquote template.
2015-09-19 13:31:06 +02:00
Nicolas Goaziou f91968bc38 Merge branch 'maint' 2015-09-10 14:29:19 +02:00
Marco Wahl 0b71022c8c org-agenda: simplify one expression (refactoring)
* lisp/org-agenda.el (org-agenda-filter-by-category): replace '(and
  cat)' with the equivalent 'cat'.
2015-09-10 13:54:28 +02:00
Marco Wahl a4375e81c0 org-agenda,org.texi: Fix doc about category filter
* lisp/org-agenda.el (org-agenda-filter-by-category): Documentation of
  the effect of the prefix argument.

* doc/org.texi (Filtering/limiting agenda items): Documentation about
  the effect of the prefix argument when filtering by category.
2015-09-10 13:41:21 +02:00
Nicolas Goaziou ac2de241c8 Merge branch 'maint' 2015-08-24 22:50:48 +02:00
Matt Lundin 06966b9403 Fix agenda follow mode to work with included diary
* lisp/org-agenda.el (org-agenda-goto): Fix function to work with
  non-Org buffers.  Otherwise `org-agenda-follow-mode' does not work
  correctly with included diary entries (e.g., it errors out while the
  cursor is still in the diary buffer).

Follow mode does not work with diary entries in the agenda.  It calls
`org-agenda-goto', which expects to be in an Org mode buffer but does not
test to make sure that it is in an Org buffer.  As a result, it errors
out midway through and leaves the cursor stranded in the diary buffer.
2015-08-24 22:49:11 +02:00
Nikolai Weibull 1fd103293c Allow inserting diary entries last in date tree
* org-agenda.el (org-agenda-insert-diary-strategy): Add new value
  'date-tree-last.
  (org-agenda-insert-diary-make-new-entry): Handle
  `org-agenda-insert-diary-strategy' set to 'date-tree-last.

To allow for diary entries to be entered in time order in the date tree,
add a new value to `org-agenda-insert-diary-strategy' that allows for
this.  The code for handling this value, 'date-tree-last, is a bit
tricky, as we need to keep track of whether the date-tree already had
one or more entries for the given date.
2015-08-24 22:38:15 +02:00
Nicolas Goaziou 9a792523d6 Merge branch 'maint' 2015-08-23 09:44:45 +02:00
Nikolai Weibull 983170c0bc Redo Agenda in more cases even in sticky mode
* org-agenda.el (org-agenda-maybe-redo): Test for
org-agenda-this-buffer-name as well.

The Agenda buffer will have a different name if it’s in sticky mode,
but some commands that alter the agenda should still redo it, for
example, org-agenda-remove-restriction-lock, just like
org-agenda-filter-by-category does.
2015-08-23 09:44:13 +02:00
Nicolas Goaziou 05994dc775 Merge branch 'maint' 2015-08-11 14:46:14 +02:00
Nicolas Goaziou e8253c57f1 org-agenda: Fix slowdown introduced in 570b193
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check
multiple times the same entry.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/99842>
2015-08-11 14:42:34 +02:00
Nicolas Goaziou 898cfbcac0 Implement faster `show-children' function
* lisp/org.el (org-show-children): New function.
(org-cycle-internal-local):
(org-set-visibility-according-to-property):
(org-content):
(org-move-subtree-down):
(orgstruct-setup):
(org-show-set-visibility):
* contrib/lisp/org-toc.el (org-toc-cycle-subtree):
(org-toc-restore-config):
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-feed.el (org-feed-update): Use new function.

* etc/ORG-NEWS: Document new function.

Suggested-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99616>
2015-08-10 13:37:29 +02:00
Nicolas Goaziou 134d5983ec Fix visibility when switching from agenda to item
* lisp/org-agenda.el (org-agenda-switch-to): Do not hardcode visibility
  set-up when switching to item relative to current agenda line.
  Instead let `org-show-context' handle it.  Improve docstring.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99616>
2015-08-07 02:13:06 +02:00
Nicolas Goaziou 570b1935e7 org-agenda: Do not block non-TODO entries
* lisp/org-agenda.el (org-agenda-dim-blocked-tasks): Do not check if an
  entry can be blocked when it doesn't have any TODO keyword.

* lisp/org.el (org-entry-blocked-p): Make sure entry is really an open
  task before even considering it as a blocked task.  Small refactoring.

* testing/lisp/test-org.el (test-org/entry-properties): Update tests.
(test-org/entry-blocked-p): New test.

Reported-by: Bingo UV <right.ho@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99544>
2015-08-06 17:56:40 +02:00
Kyle Meyer 6f9184a294 Merge branch 'maint' into backport-master 2015-07-26 23:56:50 -04:00
Paul Eggert 6df6806311 Backport commit dfc2ef1 from Emacs master branch
Fix minor quoting problems in doc strings
dfc2ef11a84d33eab916ff87b8537f8e28c05c92
Paul Eggert
Thu May 28 00:22:03 2015 -0700
2015-07-26 23:29:31 -04:00
Paul Eggert 6b04312e85 Backport commit 96794d2 from Emacs master branch
Don't quote nil and t in doc strings
96794d2f97cd064e4c2bf4f71459b42558cc8c79
Paul Eggert
Thu May 21 10:06:44 2015 -0700
2015-07-26 23:29:31 -04:00
Marco Wahl 5a3ab2a7fd Fix message text in `org-toggle-sticky-agenda'
* org-agenda.el (org-toggle-sticky-agenda): Dropped the irritating 'was'
  from the message.
2015-07-04 09:37:16 +02:00
Grégoire Jadi 70bfa4027b lisp/org-agenda.el: Fix non-persistent category filters in sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Use the correct key for
  category filter.

`org-agenda-prepare-window' uses 'cat whereas `org-agenda-prepare' used 'car.
2015-06-24 09:51:39 +02:00
Grégoire Jadi e1e3b83b2b lisp/org-agenda.el: Fix non-persistent filters when refreshing sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Fix non-persistent filters when refreshing sticky agenda

When a sticky agenda is buried, then reviving and refreshing, existing
filters are ignored even when org-agenda-persistent-filter is `t'.

Reported and fixed by Daniel Borchmann
2015-06-24 09:51:34 +02:00
Nicolas Goaziou ff1b975679 Merge branch 'maint' 2015-04-29 23:32:05 +02:00
Nicolas Goaziou c763faf529 org-agenda: Fix invalid face error for priority #B
* lisp/org-agenda.el (org-agenda-fontify-priorities): Ensure face
  doesn't inherit from nil.

Reported-by: Renato <renatofdds@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/97253>
2015-04-29 23:29:36 +02:00
Rasmus 586e29618b Remove intanglibe overlay
* org-colview.el (org-columns-display-here):
* org-agenda.el (org-agenda-dim-blocked-tasks): Remove
  intanglible overlay.

Suggested-by: Stefan Monnier <monnier@IRO.UMontreal.CA>
<http://permalink.gmane.org/gmane.emacs.orgmode/96914>
(Incl. original patch by Stefan).
2015-04-16 11:56:15 +02:00
Gustav Wikström 6c6ae990c1 org-agenda: Filtering in the agenda on grouptags
Filtering in the agenda on grouptags filter also subcategories.
Exception if filter is applied with a (double) prefix-argument.

Filtering in the agenda on subcategories does not filter the "above"
levels anymore.

If a grouptag contains a regular expression the regular expression
is also used as a filter.

* lisp/org-agenda.el (org-agenda-filter-by-tag): improved UI and
  refactoring.

  Now uses the argument arg and optional argument exclude instead of
  strip and narrow.  ARG because the argument has multiple purposes
  and makes more sense than strip now.  The term narrowing is changed
  to exclude.

* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): name change in
  argument to match org-agenda-filter-by-tag.

* lisp/org-agenda.el (org-agenda-filter-make-matcher): new optional
  argument EXPAND and refactoring.

* lisp/org-agenda.el (org-agenda-filter-make-matcher-tag-exp): new
  function, previously baked into org-agenda-filter-make-matcher.

* lisp/org-agenda.el (org-agenda-filter-apply): New optional parameter
  EXPAND, used in call to org-agenda-filter-make-matcher.

* lisp/org-agenda.el (org-agenda-reapply-filters): Uses another
  parameter (the new optional one) in call to org-agenda-filter-apply.

* lisp/org-agenda.el (org-agenda-finalize): use of new parameter in
  call to org-agenda-filter-apply.

* lisp/org-agenda.el (org-agenda-redo): Use of new parameter in call
  to org-agenda-filter-apply.
2015-03-16 22:27:34 +01:00
Nicolas Goaziou 1219b07039 Revert "org-agenda: Fix small bug"
This reverts commit d92ef95170.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95817>
2015-03-08 01:19:45 +01:00
Nicolas Richard f8731eaeec org-agenda: Nicer error message when accessing killed buffer
* lisp/org-agenda.el (org-agenda-switch-to): Throw an error if marker
  points to no buffer.
2015-02-28 00:51:35 +01:00
Nicolas Goaziou 4eb4f47141 Simplify `org-show-context' configuration
* lisp/org.el (org-show-context-detail): New variable.
(org-context-choice, org-show-following-heading, org-show-siblings,
org-show-entry-below, org-show-hierarchy-above): Remove variables.
(org-show-set-visibility): New function.
(org-convert-to-oddeven-levels, org-get-location, org-show-context,
org-reveal): Use new function.
(org-link-search): Update docstring.

* lisp/org-agenda.el (org-agenda-cycle-show): Use new function.
(org-agenda-show): Replace missing variable.

* testing/lisp/test-org.el (test-org/show-set-visibility): New test.

* doc/org.texi (Sparse trees):
* doc/orgguide.texi (Sparse trees): Document changes.

* etc/ORG-NEWS: Signal changes.

Configuration of `org-show-context' is done with a single variable
offering six different views, instead of four variables for a total
of 16 configurations.
2015-02-22 14:57:09 +01:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Nicolas Goaziou 23d4d869f5 org-agenda: Ignore sticky feature when picking date from calendar
* lisp/org-agenda.el (org-calendar-goto-agenda): Ignore sticky
  feature.

Reported-by: Tory S. Anderson <torys.anderson@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94865>
2015-02-11 23:44:26 +01:00
Nicolas Goaziou d92ef95170 org-agenda: Fix small bug
* lisp/org-agenda.el (org-todo-list): `org-last-args' property
  contains a list, not an atom.
2015-02-10 23:13:56 +01:00
Yuri D. Lensky ba544e4caa Fix timestamp-based sorting of tags-based entries in agenda
* lisp/org.el (org-scan-tags): Fix agenda org tags scans to properly
  add timestamp property, completely analogously to
  org-agenda-get-todos.
* lisp/org-agenda.el (org-agenda-entry-get-agenda-timestamp,
  org-agenda-get-todos): Factored timestamp retrieval code out to
  separate function org-agenda-entry-get-agenda-timestamp from
  org-agenda-get-todos.

Before this fix, timestamps were ignored when sorting agenda views of
the 'tags' and 'tags-todo' types.

TINYCHANGE
2015-02-09 01:08:42 +01:00
Nicolas Goaziou 0be8495d01 Call `org-insert-heading' instead of (insert "* ")
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level):
* lisp/org.el (org-link-search):  Call `org-insert-heading' instead
  of (insert "* ").

This allows, in particular, to run `org-insert-heading-hook' and
possibly fix up blank lines around.
2015-02-08 01:45:38 +01:00
Nicolas Goaziou 7e4228a137 org-agenda: Fix logging with bulk agenda commands
* lisp/org-agenda.el (org-agenda-new-marker): Make sure data inserted
  inserted in the heading above marker updates it.
(org-agenda-bulk-action): Enforce calling `org-add-log-note' after
each action.

Reported-by: Maxim Baz <z0rch.coding@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94654>
2015-02-06 09:52:25 +01:00