Mercurial > emacs
comparison lisp/textmodes/org.el @ 85633:04432aad93c8
* textmodes/org.el: (org-agenda-get-restriction-and-command): Use
`mapc' instead of `mapcar'.
(org-agenda-list): Numeric prefix argument can specify the number
of days.
(remember-register, remember-buffer): Prevent byte compiler from
complaining.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Thu, 25 Oct 2007 09:28:34 +0000 |
parents | 91dea9fefe83 |
children | 58b8a019c78f |
comparison
equal
deleted
inserted
replaced
85632:30b2e2b12158 | 85633:04432aad93c8 |
---|---|
3 ;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
4 ;; | 4 ;; |
5 ;; Author: Carsten Dominik <carsten at orgmode dot org> | 5 ;; Author: Carsten Dominik <carsten at orgmode dot org> |
6 ;; Keywords: outlines, hypermedia, calendar, wp | 6 ;; Keywords: outlines, hypermedia, calendar, wp |
7 ;; Homepage: http://orgmode.org | 7 ;; Homepage: http://orgmode.org |
8 ;; Version: 5.13e | 8 ;; Version: 5.13f |
9 ;; | 9 ;; |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 ;; | 11 ;; |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
81 | 81 |
82 ;;;; Customization variables | 82 ;;;; Customization variables |
83 | 83 |
84 ;;; Version | 84 ;;; Version |
85 | 85 |
86 (defconst org-version "5.13e" | 86 (defconst org-version "5.13f" |
87 "The version number of the file org.el.") | 87 "The version number of the file org.el.") |
88 (defun org-version () | 88 (defun org-version () |
89 (interactive) | 89 (interactive) |
90 (message "Org-mode version %s" org-version)) | 90 (message "Org-mode version %s" org-version)) |
91 | 91 |
4305 (defvar Info-current-file) | 4305 (defvar Info-current-file) |
4306 (defvar Info-current-node) | 4306 (defvar Info-current-node) |
4307 (defvar texmathp-why) | 4307 (defvar texmathp-why) |
4308 (defvar remember-save-after-remembering) | 4308 (defvar remember-save-after-remembering) |
4309 (defvar remember-data-file) | 4309 (defvar remember-data-file) |
4310 (defvar remember-register) | |
4311 (defvar remember-buffer) | |
4310 (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode' | 4312 (defvar annotation) ; from remember.el, dynamically scoped in `remember-mode' |
4311 (defvar initial) ; from remember.el, dynamically scoped in `remember-mode' | 4313 (defvar initial) ; from remember.el, dynamically scoped in `remember-mode' |
4312 (defvar org-latex-regexps) | 4314 (defvar org-latex-regexps) |
4313 (defvar constants-unit-system) | 4315 (defvar constants-unit-system) |
4314 | 4316 |
13584 (save-window-excursion | 13586 (save-window-excursion |
13585 (if expert | 13587 (if expert |
13586 (set-buffer (get-buffer-create " *Org todo*")) | 13588 (set-buffer (get-buffer-create " *Org todo*")) |
13587 ; (delete-other-windows) | 13589 ; (delete-other-windows) |
13588 ; (split-window-vertically) | 13590 ; (split-window-vertically) |
13589 (org-switch-to-buffer-other-window (get-buffer-create " *Org tags*"))) | 13591 (org-switch-to-buffer-other-window (get-buffer-create " *Org todo*"))) |
13590 (erase-buffer) | 13592 (erase-buffer) |
13591 (org-set-local 'org-done-keywords done-keywords) | 13593 (org-set-local 'org-done-keywords done-keywords) |
13592 (setq tbl fulltable cnt 0) | 13594 (setq tbl fulltable cnt 0) |
13593 (while (setq e (pop tbl)) | 13595 (while (setq e (pop tbl)) |
13594 (cond | 13596 (cond |
15596 (interactive) | 15598 (interactive) |
15597 (let* ((key (get-char-property (point) 'org-columns-key)) | 15599 (let* ((key (get-char-property (point) 'org-columns-key)) |
15598 (key1 (concat key "_ALL")) | 15600 (key1 (concat key "_ALL")) |
15599 (allowed (org-entry-get (point) key1 t)) | 15601 (allowed (org-entry-get (point) key1 t)) |
15600 nval) | 15602 nval) |
15601 ;; FIXME: Cover editing TODO, TAGS etc inbuffer settings.???? | 15603 ;; FIXME: Cover editing TODO, TAGS etc inbiffer settings.???? |
15602 (setq nval (read-string "Allowed: " allowed)) | 15604 (setq nval (read-string "Allowed: " allowed)) |
15603 (org-entry-put | 15605 (org-entry-put |
15604 (cond ((marker-position org-entry-property-inherited-from) | 15606 (cond ((marker-position org-entry-property-inherited-from) |
15605 org-entry-property-inherited-from) | 15607 org-entry-property-inherited-from) |
15606 ((marker-position org-columns-top-level-marker) | 15608 ((marker-position org-columns-top-level-marker) |
18356 (org-add-props match nil 'face 'org-warning)) | 18358 (org-add-props match nil 'face 'org-warning)) |
18357 (match | 18359 (match |
18358 (format "set of %d commands" (length match))) | 18360 (format "set of %d commands" (length match))) |
18359 (t "")))))) | 18361 (t "")))))) |
18360 (when prefixes | 18362 (when prefixes |
18361 (mapcar (lambda (x) | 18363 (mapc (lambda (x) |
18362 (insert | 18364 (insert |
18363 (format "\n%s %s" | 18365 (format "\n%s %s" |
18364 (org-add-props (char-to-string x) | 18366 (org-add-props (char-to-string x) |
18365 nil 'face 'bold) | 18367 nil 'face 'bold) |
18366 (or (cdr (assoc (concat selstring (char-to-string x)) | 18368 (or (cdr (assoc (concat selstring (char-to-string x)) |
18367 prefix-descriptions)) | 18369 prefix-descriptions)) |
18368 "Prefix key")))) | 18370 "Prefix key")))) |
18369 prefixes)) | 18371 prefixes)) |
18370 (goto-char (point-min)) | 18372 (goto-char (point-min)) |
18371 (when (fboundp 'fit-window-to-buffer) | 18373 (when (fboundp 'fit-window-to-buffer) |
18372 (if second-time | 18374 (if second-time |
18373 (if (not (pos-visible-in-window-p (point-max))) | 18375 (if (not (pos-visible-in-window-p (point-max))) |
18374 (fit-window-to-buffer)) | 18376 (fit-window-to-buffer)) |
19182 (defvar org-include-all-loc nil) ; local variable | 19184 (defvar org-include-all-loc nil) ; local variable |
19183 (defvar org-agenda-remove-date nil) ; dynamically scoped | 19185 (defvar org-agenda-remove-date nil) ; dynamically scoped |
19184 | 19186 |
19185 ;;;###autoload | 19187 ;;;###autoload |
19186 (defun org-agenda-list (&optional include-all start-day ndays) | 19188 (defun org-agenda-list (&optional include-all start-day ndays) |
19187 "Produce a weekly view from all files in variable `org-agenda-files'. | 19189 "Produce a daily/weekly view from all files in variable `org-agenda-files'. |
19188 The view will be for the current week, but from the overview buffer you | 19190 The view will be for the current day or week, but from the overview buffer |
19189 will be able to go to other weeks. | 19191 you will be able to go to other days/weeks. |
19190 With one \\[universal-argument] prefix argument INCLUDE-ALL, all unfinished TODO items will | 19192 |
19191 also be shown, under the current date. | 19193 With one \\[universal-argument] prefix argument INCLUDE-ALL, |
19192 With two \\[universal-argument] prefix argument INCLUDE-ALL, all TODO entries marked DONE | 19194 all unfinished TODO items will also be shown, before the agenda. |
19193 on the days are also shown. See the variable `org-log-done' for how | 19195 This feature is considered obsolete, please use the TODO list or a block |
19194 to turn on logging. | 19196 agenda instead. |
19197 | |
19198 With a numeric prefix argument in an interactive call, the agenda will | |
19199 span INCLUDE-ALL days. Lisp programs should instead specify NDAYS to change | |
19200 the number of days. NDAYS defaults to `org-agenda-ndays'. | |
19201 | |
19195 START-DAY defaults to TODAY, or to the most recent match for the weekday | 19202 START-DAY defaults to TODAY, or to the most recent match for the weekday |
19196 given in `org-agenda-start-on-weekday'. | 19203 given in `org-agenda-start-on-weekday'." |
19197 NDAYS defaults to `org-agenda-ndays'." | |
19198 (interactive "P") | 19204 (interactive "P") |
19205 (if (and (integerp include-all) (> include-all 0)) | |
19206 (setq ndays include-all include-all nil)) | |
19199 (setq ndays (or ndays org-agenda-ndays) | 19207 (setq ndays (or ndays org-agenda-ndays) |
19200 start-day (or start-day org-agenda-start-day)) | 19208 start-day (or start-day org-agenda-start-day)) |
19201 (if org-agenda-overriding-arguments | 19209 (if org-agenda-overriding-arguments |
19202 (setq include-all (car org-agenda-overriding-arguments) | 19210 (setq include-all (car org-agenda-overriding-arguments) |
19203 start-day (nth 1 org-agenda-overriding-arguments) | 19211 start-day (nth 1 org-agenda-overriding-arguments) |