Commit 64f72ae1 authored by Juanma Barranquero's avatar Juanma Barranquero
Browse files

(org-agenda-start-on-weekday, org-calendar-to-agenda-key,

org-agenda-sorting-strategy, org-agenda-use-time-grid, org-archive-location,
org-allow-space-in-links, org-usenet-links-prefer-google,
org-enable-table-editor, org-export-default-language,
org-export-html-show-new-buffer, org-fill-paragraph, org-cycle, org-goto-ret,
org-goto-left, org-goto-right, org-goto-quit, org-occur, org-eval-in-calendar,
org-agenda-cleanup-fancy-diary, org-agenda-no-heading-message,
org-agenda-diary-entry, org-remember-help, org-table-convert-region,
org-at-table-p, org-table-move-row-down, org-table-move-row-up,
org-table-copy-region, org-table-toggle-vline-visibility,
org-table-get-stored-formulas, org-table-get-specials, org-recalc-commands,
org-table-eval-formula, org-table-formula-substitute-names, orgtbl-make-binding,
org-format-org-table-html, org-format-table-table-html,
org-format-table-table-html-using-table-generate-source, org-customize): Fix
typos in docstrings.
(org-level-2, org-at-timestamp-p, org-agenda-day-view, org-agenda-toggle-diary,
org-agenda-toggle-time-grid, org-back-to-heading): Doc fixes.
(org-agenda-toggle-time-grid, org-cmp-category, org-cmp-time,
org-agenda-change-all-lines, org-get-header): Improve argument/docstring
consistency.
(orgtbl-error): Fix error message.
parent 173569aa
2005-07-01 Juanma Barranquero <lekktu@gmail.com>
* textmodes/org.el (org-agenda-start-on-weekday)
(org-calendar-to-agenda-key, org-agenda-sorting-strategy)
(org-agenda-use-time-grid, org-archive-location)
(org-allow-space-in-links, org-usenet-links-prefer-google)
(org-enable-table-editor, org-export-default-language)
(org-export-html-show-new-buffer, org-fill-paragraph)
(org-cycle, org-goto-ret, org-goto-left, org-goto-right)
(org-goto-quit, org-occur, org-eval-in-calendar)
(org-agenda-cleanup-fancy-diary, org-agenda-no-heading-message)
(org-agenda-diary-entry, org-remember-help)
(org-table-convert-region, org-at-table-p)
(org-table-move-row-down, org-table-move-row-up)
(org-table-copy-region, org-table-toggle-vline-visibility)
(org-table-get-stored-formulas, org-table-get-specials)
(org-recalc-commands, org-table-eval-formula)
(org-table-formula-substitute-names, orgtbl-make-binding)
(org-format-org-table-html, org-format-table-table-html)
(org-format-table-table-html-using-table-generate-source)
(org-customize): Fix typos in docstrings.
(org-level-2, org-at-timestamp-p, org-agenda-day-view)
(org-agenda-toggle-diary, org-agenda-toggle-time-grid)
(org-back-to-heading): Doc fixes.
(org-agenda-toggle-time-grid, org-cmp-category, org-cmp-time)
(org-agenda-change-all-lines, org-get-header):
Improve argument/docstring consistency.
(orgtbl-error): Fix error message.
* progmodes/flymake.el (flymake-find-possible-master-files)
(flymake-master-file-compare, flymake-get-line-err-count)
(flymake-highlight-line, flymake-gui-warnings-enabled):
Fix typos in docstrings.
(flymake-parse-line, flymake-get-project-include-dirs-function)
(flymake-get-prev-err-line-no, flymake-goto-prev-error):
Doc fixes.
(flymake-get-project-include-dirs-function)
(flymake-make-err-menu-data):
Improve argument/docstring consistency.
2005-07-01 Lute Kamstra <lute@gnu.org>
 
* battery.el (battery-linux-proc-apm): Fix typo in docstring.
......
;; org.el --- Outline-based notes management and organizer
;; org.el --- Outline-based notes management and organizer
;; Carstens outline-mode for keeping track of everything.
;; Copyright (c) 2004, 2005 Free Software Foundation
;;
......@@ -455,7 +455,7 @@ is used instead.")
(goto-char (point-min))
(while (re-search-forward re nil t)
(setq key (match-string 1) value (match-string 2))
(cond
(cond
((equal key "CATEGORY")
(if (string-match "[ \t]+$" value)
(setq value (replace-match "" t t value)))
......@@ -495,7 +495,7 @@ is used instead.")
org-todo-kwd-max-priority (1- (length org-todo-keywords))
org-ds-keyword-length (+ 2 (max (length org-deadline-string)
(length org-scheduled-string)))
org-done-string
org-done-string
(nth (1- (length org-todo-keywords)) org-todo-keywords)
org-todo-regexp
(concat "\\<\\(" (mapconcat 'regexp-quote org-todo-keywords
......@@ -575,7 +575,7 @@ When nil, cursor will remain in the current window."
(defcustom org-select-agenda-window t
"Non-nil means, after creating an agenda, move cursor into Agenda window.
When nil, cursor will remain in the current window."
When nil, cursor will remain in the current window."
:group 'org-agenda
:type 'boolean)
......@@ -594,7 +594,7 @@ When nil, only the days which actually have entries are shown."
;; require a variable ndays treatment.
(defcustom org-agenda-start-on-weekday 1
"Non-nil means, start the overview always on the specified weekday.
0 Denotes Sunday, 1 denotes Monday etc.
0 denotes Sunday, 1 denotes Monday etc.
When nil, always start on the current day."
:group 'org-agenda
:type '(choice (const :tag "Today" nil)
......@@ -611,7 +611,7 @@ When nil, always start on the current day."
When nil, date-less entries will only be shown if `org-agenda' is called
with a prefix argument.
When non-nil, the TODO entries will be listed at the top of the agenda, before
the entries for specific days."
the entries for specific days."
:group 'org-agenda
:type 'boolean)
......@@ -623,8 +623,8 @@ the entries for specific days."
(defcustom org-calendar-to-agenda-key [?c]
"The key to be installed in `calendar-mode-map' for switching to the agenda.
The command `org-calendar-goto-agenda' will be bound to this key. The
default is the character `c' because then`c' can be used to switch back and
force between agenda and calendar."
default is the character `c' because then `c' can be used to switch back and
forth between agenda and calendar."
:group 'org-agenda
:type 'sexp)
......@@ -632,7 +632,7 @@ force between agenda and calendar."
"Sorting structure for the agenda items of a single day.
This is a list of symbols which will be used in sequence to determine
if an entry should be listed before another entry. The following
symbols are recognized.
symbols are recognized:
time-up Put entries with time-of-day indications first, early first
time-down Put entries with time-of-day indications first, late first
......@@ -656,7 +656,7 @@ priority.
Leaving out `category-keep' would mean that items will be sorted across
categories by priority."
:group 'org-agenda
:type '(repeat
:type '(repeat
(choice
(const time-up)
(const time-down)
......@@ -725,14 +725,14 @@ of `org-agenda-prefix-format' or `org-timeline-prefix-format'.")
(defcustom org-agenda-use-time-grid t
"Non-nil means, show a time grid in the agenda schedule.
A time grid is a set of lines for specific times (like every two hours between
8:00 and 20:00. The items scheduled for a day at specific times are
8:00 and 20:00). The items scheduled for a day at specific times are
sorted in between these lines.
For deails about when the grid will be shown, and what it will look like, see
For details about when the grid will be shown, and what it will look like, see
the variable `org-agenda-time-grid'."
:group 'org-agenda
:type 'boolean)
(defcustom org-agenda-time-grid
(defcustom org-agenda-time-grid
'((daily today require-timed)
"----------------"
(800 1000 1200 1400 1600 1800 2000))
......@@ -751,7 +751,7 @@ The second item is a string which will be places behing the grid time.
The third item is a list of integers, indicating the times that should have
a grid line."
:group 'org-agenda
:type
:type
'(list
(set :greedy t :tag "Grid Display Options"
(const :tag "Show grid in single day agenda display" daily)
......@@ -845,10 +845,10 @@ unnecessary clutter."
(defcustom org-archive-location "%s_archive::"
"The location where subtrees should be archived.
This string consists of two parts, separated by a double-colon.
This string consists of two parts, separated by a double-colon.
The first part is a file name - when omitted, archiving happens in the same
file. %s will be replaced by the current file name (without directory part).
file. `%s' will be replaced by the current file name (without directory part).
Archiving to a different file is useful to keep archived entries from
contributing to the Org-mode Agenda.
......@@ -874,7 +874,7 @@ Here are a few examples:
You may set this option on a per-file basis by adding to the buffer a
line like
#+ARCHIVE: basement::** Finished Tasks"
:group 'org-structure
:type 'string)
......@@ -915,7 +915,7 @@ recommend an additional URL: prefix, so the format would be \"<URL:%s>\"."
When nil, it becomes possible to put several links into a line.
Note that in tables, a link never extends accross fields, so in a table
it is always possible to put several links into a line.
Changing this varable requires a re-launch of Emacs of become effective."
Changing this variable requires a re-launch of Emacs to become effective."
:group 'org-link
:type 'boolean)
......@@ -980,7 +980,7 @@ another window."
(const find-file-other-frame)))))
(defcustom org-usenet-links-prefer-google nil
"Non-nil means, `org-store-link' will create web links to google groups.
"Non-nil means, `org-store-link' will create web links to Google groups.
When nil, Gnus will be used for such links.
Using a prefix arg to the command \\[org-store-link] (`org-store-link')
negates this setting for the duration of the command."
......@@ -1119,13 +1119,13 @@ When nil, new notes will be filed to the end of a file or entry."
When nil, such lines will be treated like ordinary lines.
When equal to the symbol `optimized', the table editor will be optimized to
do the following
do the following:
- Use automatic overwrite mode in front of whitespace in table fields.
This make the structure of the table stay in tact as long as the edited
This makes the structure of the table stay intact as long as the edited
field does not exceed the column width.
- Minimize the number of realigns. Normally, the table is aligned each time
TAB or RET are pressed to move to another field. With optimization this
happens only if changes to a field might have changed the column width.
happens only if changes to a field might have changed the column width.
Optimization requires replacing the functions `self-insert-command',
`delete-char', and `backward-delete-char' in Org-mode buffers, with a
slight (in fact: unnoticeable) speed impact for normal typing. Org-mode is
......@@ -1330,7 +1330,7 @@ or use the +OPTION lines for a per-file setting."
(defcustom org-export-default-language "en"
"The default language of HTML export, as a string.
This should have an association in `org-export-language-setup'"
This should have an association in `org-export-language-setup'."
:group 'org-export
:type 'string)
......@@ -1498,7 +1498,7 @@ Otherwise the buffer will just be saved to a file and stay hidden."
:type 'boolean)
(defcustom org-export-html-show-new-buffer nil
"Non-nil means, popup buffer containing the exported html text.
"Non-nil means, popup buffer containing the exported HTML text.
Otherwise, the buffer will just be saved to a file and stay hidden."
:group 'org-export
:type 'boolean)
......@@ -1635,7 +1635,7 @@ When this is non-nil, the headline after the keyword is set to the
"Face for items scheduled previously, and not yet done."
:group 'org-faces)
(defface org-link
(defface org-link
'((((type tty) (class color)) (:foreground "cyan" :weight bold))
(((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
......@@ -1664,7 +1664,7 @@ When this is non-nil, the headline after the keyword is set to the
(((class color) (background light)) (:foreground "DarkGoldenrod"))
(((class color) (background dark)) (:foreground "LightGoldenrod"))
(t (:bold t :italic t)))
"Face used for level 2 headlines."
"Face used for time grids."
:group 'org-faces)
(defvar org-level-faces
......@@ -1742,7 +1742,7 @@ sets it back to nil.")
;;;###autoload
(define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias
"Outline-based notes management and organizer, alias
\"Carstens outline-mode for keeping track of everything.\"
Org-mode develops organizational tasks around a NOTES file which
......@@ -1814,7 +1814,7 @@ The following commands are available:
(org-cycle '(4)) (org-cycle '(4))))))))
(defun org-fill-paragraph (&optional justify)
"Re-align a table, pass through to fill-paragraph if no table."
"Re-align a table, pass through to `fill-paragraph' if no table."
(save-excursion
(beginning-of-line 1)
(looking-at "\\s-*\\(|\\|\\+-+\\)")))
......@@ -1825,7 +1825,7 @@ The following commands are available:
;;; Font-Lock stuff
(defvar org-mouse-map (make-sparse-keymap))
(define-key org-mouse-map
(define-key org-mouse-map
(if org-xemacs-p [button2] [mouse-2]) 'org-open-at-mouse)
(define-key org-mouse-map
(if org-xemacs-p [button3] [mouse-3]) 'org-find-file-at-mouse)
......@@ -1901,9 +1901,9 @@ The following commands are available:
(list (concat "\\<" org-scheduled-string) '(0 'org-warning t))
;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)"
;; (3 'bold))
;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)"
;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)"
;; (3 'italic))
;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)"
;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)"
;; (3 'underline))
(list (concat "^\\*+[ \t]*\\<\\(" org-comment-string "\\)\\>")
'(1 'org-warning t))
......@@ -1924,7 +1924,7 @@ The following commands are available:
(if org-noutline-p ; FIXME: I am not sure if eval will work
; on XEmacs if noutline is ever ported
'((eval . (list "^\\(\\*+\\).*"
0 '(nth
0 '(nth
(% (- (match-end 1) (match-beginning 1) 1)
org-n-levels)
org-level-faces)
......@@ -1938,7 +1938,7 @@ The following commands are available:
(set (make-local-variable 'font-lock-defaults)
'(org-font-lock-keywords t nil nil backward-paragraph))
(kill-local-variable 'font-lock-keywords) nil))
(defun org-unfontify-region (beg end &optional maybe_loudly)
"Remove fontification and activation overlays from links."
(font-lock-default-unfontify-region beg end)
......@@ -1956,13 +1956,13 @@ The following commands are available:
"Visibility cycling for Org-mode.
- When this function is called with a prefix argument, rotate the entire
buffer through 3 states (global cycling)
buffer through 3 states (global cycling):
1. OVERVIEW: Show only top-level headlines.
2. CONTENTS: Show all headlines of all levels, but no body text.
3. SHOW ALL: Show everything.
- When point is at the beginning of a headline, rotate the subtree started
by this line through 3 different states (local cycling)
by this line through 3 different states (local cycling):
1. FOLDED: Only the main headline is shown.
2. CHILDREN: The main headline and the direct children are shown. From
this state, you can move to one of the children and
......@@ -2218,14 +2218,14 @@ or nil."
;; FIXME: It may not be a good idea to temper with the prefix argument...
(defun org-goto-ret (&optional arg)
"Finish org-goto by going to the new location."
"Finish `org-goto' by going to the new location."
(interactive "P")
(setq org-selected-point (point)
current-prefix-arg arg)
(throw 'exit nil))
(defun org-goto-left ()
"Finish org-goto by going to the new location."
"Finish `org-goto' by going to the new location."
(interactive)
(if (org-on-heading-p)
(progn
......@@ -2236,7 +2236,7 @@ or nil."
(error "Not on a heading")))
(defun org-goto-right ()
"Finish org-goto by going to the new location."
"Finish `org-goto' by going to the new location."
(interactive)
(if (org-on-heading-p)
(progn
......@@ -2248,7 +2248,7 @@ or nil."
(error "Not on a heading")))
(defun org-goto-quit ()
"Finish org-goto without cursor motion."
"Finish `org-goto' without cursor motion."
(interactive)
(setq org-selected-point nil)
(throw 'exit nil))
......@@ -2657,7 +2657,7 @@ heading be marked DONE, and the current time will be added."
(end-of-line 0))
;; Make the heading visible, and the following as well
(let ((org-show-following-heading t)) (org-show-hierarchy-above))
(if (re-search-forward
(if (re-search-forward
(concat "^" (regexp-quote (make-string level ?*)) "[ \t]")
nil t)
(progn (goto-char (match-beginning 0)) (insert "\n")
......@@ -2717,14 +2717,14 @@ At all other locations, this simply calls `ispell-complete-word'."
(table (cond
(opt
(setq type :opt)
(mapcar (lambda (x)
(mapcar (lambda (x)
(string-match "^#\\+\\(\\([A-Z_]+:?\\).*\\)" x)
(cons (match-string 2 x) (match-string 1 x)))
(org-split-string (org-get-current-options) "\n")))
(texp
(texp
(setq type :tex)
org-html-entities)
(form
(form
(setq type :form)
'(("sum") ("sumv") ("sumh")))
((string-match "\\`\\*+[ \t]*\\'"
......@@ -2734,7 +2734,7 @@ At all other locations, this simply calls `ispell-complete-word'."
(t (progn (ispell-complete-word arg) (throw 'exit nil)))))
(completion (try-completion pattern table)))
(cond ((eq completion t)
(if (equal type :opt)
(if (equal type :opt)
(insert (substring (cdr (assoc (upcase pattern) table))
(length pattern)))))
((null completion)
......@@ -2742,7 +2742,7 @@ At all other locations, this simply calls `ispell-complete-word'."
(ding))
((not (string= pattern completion))
(delete-region beg end)
(if (string-match " +$" completion)
(if (string-match " +$" completion)
(setq completion (replace-match "" t t completion)))
(insert completion)
(if (get-buffer-window "*Completions*")
......@@ -2879,7 +2879,7 @@ to modify it to the correct date."
The tree will show the lines where the regexp matches, and all higher
headlines above the match. It will also show the heading after the match,
to make sure editing the matching entry is easy.
if CALLBACK is non-nil, it is a function which is called to confirm
If CALLBACK is non-nil, it is a function which is called to confirm
that the match should indeed be shown."
(interactive "sRegexp: ")
(setq regexp (org-check-occur-regexp regexp))
......@@ -2979,9 +2979,9 @@ ACTION can be set, up, or down."
(save-match-data
(if (not (string-match org-priority-regexp s))
(* 1000 (- org-lowest-priority org-default-priority))
(* 1000 (- org-lowest-priority
(* 1000 (- org-lowest-priority
(string-to-char (match-string 2 s)))))))
;;; Timestamps
(defvar org-last-changed-timestamp nil)
......@@ -3013,7 +3013,7 @@ at the cursor, it will be modified."
(setq time (let ((this-command this-command))
(org-read-date arg 'totime)))
(and (org-at-timestamp-p) (replace-match
(setq org-last-changed-timestamp
(setq org-last-changed-timestamp
(format-time-string fmt time))
t t))
(message "Timestamp updated"))
......@@ -3043,8 +3043,8 @@ but this can be configured with the variables `parse-time-months' and
While prompting, a calendar is popped up - you can also select the
date with the mouse (button 1). The calendar shows a period of three
month. To scroll it to other months, use the keys `>' and `<'.
If you don't like the calendar, turn it off with
month. To scroll it to other months, use the keys `>' and `<'.
If you don't like the calendar, turn it off with
\(setq org-popup-calendar-for-date-prompt nil).
With optional argument TO-TIME, the date will immediately be converted
......@@ -3058,7 +3058,7 @@ used to insert the time stamp into the buffer to include the time."
;; Default time is either today, or, when entering a range,
;; the range start.
(if (save-excursion
(re-search-backward
(re-search-backward
(concat org-ts-regexp "--\\=")
(- (point) 20) t))
(apply
......@@ -3150,7 +3150,7 @@ used to insert the time stamp into the buffer to include the time."
(defun org-eval-in-calendar (form)
"Eval FORM in the calendar window and return to current window.
Also, store the cursor date in variable ans2."
Also, store the cursor date in variable `ans2'."
(let ((sw (selected-window)))
(select-window (get-buffer-window "*Calendar*"))
(eval form)
......@@ -3169,7 +3169,7 @@ This is used by `org-read-date' in a temporary keymap for the calendar buffer."
(time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
(setq ans1 (format-time-string "%Y-%m-%d" time)))
(if (active-minibuffer-window) (exit-minibuffer))))
(defun org-check-deadlines (ndays)
"Check if there are any deadlines due or past due.
A deadline is considered due if it happens within `org-deadline-warning-days'
......@@ -3324,7 +3324,7 @@ With prefix ARG, change that many days."
(>= (match-end n) pos)))
(defun org-at-timestamp-p ()
"Determine if the cursor is or at a timestamp."
"Determine if the cursor is at a timestamp."
(interactive)
(let* ((tsr org-ts-regexp2)
(pos (point))
......@@ -3461,10 +3461,10 @@ The following commands are available:
(add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local)
(add-hook 'pre-command-hook 'org-unhighlight nil 'local)
(setq org-agenda-follow-mode nil)
(easy-menu-change
(easy-menu-change
'("Agenda") "Agenda Files"
(append
(list
(list
["Edit File List" (customize-variable 'org-agenda-files) t]
"--")
(mapcar 'org-file-menu-entry org-agenda-files)))
......@@ -3526,7 +3526,7 @@ The following commands are available:
(defvar org-agenda-keymap (copy-keymap org-agenda-mode-map)
"Local keymap for agenda entries from Org-mode.")
(define-key org-agenda-keymap
(define-key org-agenda-keymap
(if org-xemacs-p [(button2)] [(mouse-2)]) 'org-agenda-goto-mouse)
(define-key org-agenda-keymap
(if org-xemacs-p [(button3)] [(mouse-3)]) 'org-agenda-show-mouse)
......@@ -3538,7 +3538,7 @@ The following commands are available:
["Show" org-agenda-show t]
["Go To (other window)" org-agenda-goto t]
["Go To (one window)" org-agenda-switch-to t]
["Follow Mode" org-agenda-follow-mode
["Follow Mode" org-agenda-follow-mode
:style toggle :selected org-agenda-follow-mode :active t]
"--"
["Cycle TODO" org-agenda-todo t]
......@@ -3659,7 +3659,7 @@ dates."
(org-respect-restriction t)
(past t)
s e rtn d)
(setq org-agenda-redo-command
(setq org-agenda-redo-command
(list 'progn
(list 'switch-to-buffer-other-window (current-buffer))
(list 'org-timeline include-all)))
......@@ -3668,7 +3668,7 @@ dates."
(setq day-numbers (delq nil (mapcar (lambda(x)
(if (>= x today) x nil))
day-numbers))))
(switch-to-buffer-other-window
(switch-to-buffer-other-window
(get-buffer-create org-agenda-buffer-name))
(setq buffer-read-only nil)
(erase-buffer)
......@@ -3683,7 +3683,7 @@ dates."
(setq date (calendar-gregorian-from-absolute d))
(setq s (point))
(if dotodo
(setq rtn (org-agenda-get-day-entries
(setq rtn (org-agenda-get-day-entries
entry date :todo :timestamp))
(setq rtn (org-agenda-get-day-entries entry date :timestamp)))
(if (or rtn (equal d today))
......@@ -3739,7 +3739,7 @@ NDAYS defaults to `org-agenda-ndays'."
(day-numbers (list start))
(inhibit-redisplay t)
s e rtn rtnall file date d start-pos end-pos todayp nd)
(setq org-agenda-redo-command
(setq org-agenda-redo-command
(list 'org-agenda include-all start-day ndays))
;; Make the list of days
(setq ndays (or ndays org-agenda-ndays)
......@@ -3751,7 +3751,7 @@ NDAYS defaults to `org-agenda-ndays'."
(if (not (equal (current-buffer) (get-buffer org-agenda-buffer-name)))
(progn
(delete-other-windows)
(switch-to-buffer-other-window
(switch-to-buffer-other-window
(get-buffer-create org-agenda-buffer-name))))
(setq buffer-read-only nil)
(erase-buffer)
......@@ -3769,7 +3769,7 @@ NDAYS defaults to `org-agenda-ndays'."
rtn (org-agenda-get-day-entries
file date :todo))
(setq rtnall (append rtnall rtn))))
(when rtnall
(when rtnall
(insert "ALL CURRENTLY OPEN TODO ITEMS:\n")
(add-text-properties (point-min) (1- (point))
(list 'face 'org-link))
......@@ -3803,12 +3803,12 @@ NDAYS defaults to `org-agenda-ndays'."
(extract-calendar-year date)))
(put-text-property s (1- (point)) 'face
'org-link)
(if rtnall (insert
(if rtnall (insert
(org-finalize-agenda-entries ;; FIXME: condition needed
(org-agenda-add-time-grid-maybe
rtnall nd todayp))
"\n"))
(put-text-property s (1- (point)) 'day d))))
(put-text-property s (1- (point)) 'day d))))
(goto-char (point-min))
(setq buffer-read-only t)
(if org-fit-agenda-window
......@@ -3897,19 +3897,19 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
(unless (boundp 'starting-day)
(error "Not allowed"))
(setq org-agenda-ndays 7)
(org-agenda include-all-loc
(org-agenda include-all-loc
(or (get-text-property (point) 'day)
starting-day))
(org-agenda-set-mode-name)
(message "Switched to week view"))
(defun org-agenda-day-view ()
"Switch to weekly view for agenda."
"Switch to daily view for agenda."
(interactive)
(unless (boundp 'starting-day)
(error "Not allowed"))
(setq org-agenda-ndays 1)
(org-agenda include-all-loc
(org-agenda include-all-loc
(or (get-text-property (point) 'day)
starting-day))
(org-agenda-set-mode-name)
......@@ -3957,7 +3957,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
(if org-agenda-follow-mode "on" "off")))
(defun org-agenda-toggle-diary ()
"Toggle follow mode in an agenda buffer."
"Toggle diary inclusion in an agenda buffer."
(interactive)
(setq org-agenda-include-diary (not org-agenda-include-diary))
(org-agenda-redo)
......@@ -3966,7 +3966,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
(if org-agenda-include-diary "on" "off")))
(defun org-agenda-toggle-time-grid ()
"Toggle follow mode in an agenda buffer."
"Toggle time-grid in an agenda buffer."
(interactive)
(setq org-agenda-use-time-grid (not org-agenda-use-time-grid))
(org-agenda-redo)
......@@ -3997,7 +3997,7 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
"Get the (Emacs Calendar) diary entries for DATE."
(let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
(diary-display-hook '(fancy-diary-display))
(list-diary-entries-hook
(list-diary-entries-hook
(cons 'org-diary-default-entry list-diary-entries-hook))
entries
(org-disable-diary t))
......@@ -4021,12 +4021,12 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
(kill-buffer fancy-diary-buffer)))
(when entries
(setq entries (org-split-string entries "\n"))
(setq entries
(mapcar
(setq entries
(mapcar
(lambda (x)
(setq x (org-format-agenda-item "" x "Diary" 'time))
;; Extend the text properties to the beginning of the line
(add-text-properties
(add-text-properties
0 (length x)
(text-properties-at (1- (length x)) x)
x)
......@@ -4034,10 +4034,10 @@ With prefix ARG, go back that many times `org-agenda-ndays'."
entries)))))
(defun org-agenda-cleanup-fancy-diary ()
"Remove unwanted stuff in buffer created by fancy-diary-display.
"Remove unwanted stuff in buffer created by `fancy-diary-display'.
This gets rid of the date, the underline under the date, and
the dummy entry installed by `org-mode' to ensure non-empty diary for each
date. Itt also removes lines that contain only whitespace."
date. It also removes lines that contain only whitespace."
(goto-char (point-min))
(if (looking-at ".*?:[ \t]*")
(progn
......@@ -4067,7 +4067,7 @@ date. Itt also removes lines that contain only whitespace."
0 (length string)
(list 'mouse-face 'highlight
'keymap org-agenda-keymap
'help-echo
'help-echo
(format
"mouse-2 or RET jump to diary file %s"
(abbreviate-file-name (buffer-file-name)))
......@@ -4089,7 +4089,7 @@ Needed to avoid empty dates which mess up holiday display."
These are the files which are being checked for agenda entries.
Optional argument FILE means, use this file instead of the current.
It is possible (but not recommended) to add this function to the
`org-mode-hook'."
`org-mode-hook'."
(interactive)
(catch 'exit
(let* ((file (or file (buffer-file-name)
......@@ -4104,7 +4104,7 @@ It is possible (but not recommended) to add this function to the
org-agenda-files))))
(if (not present)
(progn
(setq org-agenda-files
(setq org-agenda-files
(cons afile org-agenda-files))
;; Make sure custom.el does not end up with Org-mode
(let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
......@@ -4121,7 +4121,7 @@ Optional argument FILE means, use this file instead of the current."
(let* ((file (or file (buffer-file-name)))
(true-file (file-truename file))
(afile (abbreviate-file-name file))
(files (delq nil (mapcar
(files (delq nil (mapcar
(lambda (x)
(if (equal true-file
(file-truename x))
......@@ -4168,7 +4168,6 @@ sure that TODAY is included in the list."
"Return diary information from org-files.
This function can be used in a \"sexp\" diary entry in the Emacs calendar.
It accesses org files and extracts information from those files to be
listed in the diary. The function accepts arguments specifying what
items should be listed. The following arguments are allowed:
......@@ -4207,7 +4206,7 @@ also be written as
The function expects the lisp variables `entry' and `date' to be provided
by the caller, because this is how the calendar works. Don't use this
function from a program - use `org-agenda-get-day-entries' instead."
function from a program - use `org-agenda-get-day-entries' instead."
(org-agenda-maybe-reset-markers)
(org-compile-prefix-format org-agenda-prefix-format)
(setq args (or args '(:deadline :scheduled :timestamp)))
......@@ -4249,7 +4248,7 @@ the documentation of `org-diary'."
(if (org-region-active-p)
;; Respect a region to restrict search