(defcustom org-cycle-hook '(org-optimize-window-after-visibility-change)
"Hook that is run after `org-cycle' has changed the buffer visibility.
The function(s) in this hook must accept a single argument which indicates
-the new state that was set by the most recent `org-cycle' command. The
+the new state that was set by the most recent `org-cycle' command. The
argument is a symbol. After a global state change, it can have the values
`overview', `content', or `all'. After a local state change, it can have
the values `folded', `children', or `subtree'."
(defcustom org-show-following-heading t
"Non-nil means, show heading following match in `org-occur'.
When doing an `org-occur' it is useful to show the headline which
-follows the match, even if they do not match the regexp. This makes it
-easier to edit directly inside the sparse tree. However, if you use
+follows the match, even if they do not match the regexp. This makes it
+easier to edit directly inside the sparse tree. However, if you use
org-occur mainly as an overview, the following headlines are
unnecessary clutter."
:group 'org-structure
"Non-nil means, keep link in list for entire session.
The command `org-store-link' adds a link pointing to the current
-location to an internal list. These links accumulate during a session.
+location to an internal list. These links accumulate during a session.
The command `org-insert-link' can be used to insert links into any
Org-mode file (offering completion for all stored links). When this
option is nil, every link which has been inserted once using \\[org-insert-link]
:type 'boolean)
(defcustom org-export-with-tables t
- "If non-nil, lines starting with \"|\" define a table
+ "If non-nil, lines starting with \"|\" define a table.
For example:
| Name | Address | Birthday |
(save-excursion
(goto-char (point-min))
(insert " -*- mode: org -*-\n\n")))
- (run-hooks 'org-mode-hook)
+ (run-hooks 'org-mode-hook) ;FIXME: Should be run-mode-hooks.
(unless org-inhibit-startup
(if org-startup-with-deadline-check
(call-interactively 'org-check-deadlines)
(save-excursion
(org-back-to-heading t)
(- (match-end 0) (match-beginning 0))))
-
+
(defvar org-font-lock-keywords nil)
(defun org-set-font-lock-defaults ()
(defun org-do-promote ()
"Promote the current heading higher up the tree.
-If the region is active in t`ransient-mark-mode', promote all headings
+If the region is active in `transient-mark-mode', promote all headings
in the region."
(interactive)
(save-excursion
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 `<'.
+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).
"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 tod tods
+ entries
(org-disable-diary t))
(save-excursion
(save-window-excursion
(org-agenda-error)))
(buffer (marker-buffer marker))
(pos (marker-position marker)))
- (save-excursion
- (set-buffer buffer)
+ (with-current-buffer buffer
(widen)
(goto-char pos)
(if (not (org-at-timestamp-p))
((fboundp 'gnus-group-name)
(gnus-group-name))
(t "???"))))
- (if (org-xor arg org-usenet-links-prefer-google)
- (setq link (format "http://groups.google.com/groups?group=%s"
- group))
- (setq link (concat "gnus:" group)))))
+ (setq link (concat (if (org-xor arg org-usenet-links-prefer-google)
+ "http://groups.google.com/groups?group="
+ "gnus:")
+ group)))))
((memq major-mode '(gnus-summary-mode gnus-article-mode))
(and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary))
(defun org-xor (a b)
"Exclusive or."
+ ;; (if a (not b) b)
(or (and a (not b))
(and b (not a))))
s)
(defun org-insert-link (&optional complete-file)
- "Insert a link. At the prompt, enter the link.
+ "Insert a link. At the prompt, enter the link.
Completion can be used to select a link previously stored with
`org-store-link'. When the empty string is entered (i.e. if you just
(error "Not in table data field")))
(defvar org-table-clip nil
- "Clipboard for table regions")
+ "Clipboard for table regions.")
(defun org-table-blank-field ()
"Blank the current table field or active region."
(org-table-move-row 'up))
(defun org-table-move-row (&optional up)
- "Move the current table line down. With arg UP, move it up."
+ "Move the current table line down. With arg UP, move it up."
(interactive "P")
(let ((col (current-column))
(pos (point))
(buffer-substring (point-min) (point-max))))
(defun org-html-expand (string)
- "Prepare STRING for HTML export. Applies all active conversions."
+ "Prepare STRING for HTML export. Applies all active conversions."
;; First check if there is a link in the line - if yes, apply conversions
;; only before the start of the link.
(let* ((m (string-match org-link-regexp string))
as single character strings.
The regexp returned will match the entire expression including the
delimiters. It will also define a single group which contains the
-match except for the outermost delimiters. The maximum depth of
-stacked delimiters is N. Escaping delimiters is not possible."
+match except for the outermost delimiters. The maximum depth of
+stacked delimiters is N. Escaping delimiters is not possible."
(let* ((nothing (concat "[^" "\\" left "\\" right "]*?"))
(or "\\|")
(re nothing)
regexp)))
(defun org-flag-heading (flag &optional entry)
- "Flag the current heading. FLAG non-nil means make invisible.
+ "Flag the current heading. FLAG non-nil means make invisible.
When ENTRY is non-nil, show the entire entry."
(save-excursion
(org-back-to-heading t)