• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/textmodes/

Lines Matching +defs:kill +defs:this +defs:buffer

117 the following lines anywhere in the buffer:
140 the following lines anywhere in the buffer:
148 When the function `org-mode' is called interactively in an empty file, this
151 line enforcing Org-mode will be inserted into the buffer, if this option
161 alternative bindings. Setting this variable to t will replace the following
162 keys both in Org-mode and in the Org-agenda buffer.
199 Changing this requires executing `M-x org-mode' in a buffer to become
215 A deadline is this string, followed by a time stamp. Should be a word,
224 A schedule is this string, followed by a time stamp. Should be a word,
242 "Entries starting with this keyword will never be exported.
250 "Entries starting with this keyword will be exported in fixed-width font.
275 been invisible before. When this is set, the hierarchy of headings
277 Turning this off for example for sparse trees makes them very compact.
278 Instead of t, this can also be an alist specifying this option for different
310 been invisible before. When this is set, the heading following the
312 Turning this off for example for sparse trees makes them very compact,
315 Instead of t, this can also be an alist specifying this option for different
338 been invisible before. When this is set, the sibling of the current entry
342 By default this is on for the isearch context, off for all other contexts.
343 Turning this off for example for sparse trees makes them very compact,
346 Instead of t, this can also be an alist specifying this option for different
372 "Cycle globally if cursor is at beginning of buffer and not at a headline.
374 C-u TAB. For this special case to work, the first line of the buffer
376 this way, `org-cycle-hook' is disables temporarily, to make sure the
377 cursor stays at the beginning of the buffer.
378 When this option is nil, don't do anything special at the beginning
379 of the buffer."
400 "Hook that is run after `org-cycle' has changed the buffer visibility.
401 The function(s) in this hook must accept a single argument which indicates
422 You may also set this on a per-file basis by adding one of the following
423 lines to the buffer:
433 When this is set and the *entire* text in an entry is indented, the
470 The highlights will automatically disappear the next time the buffer is
476 "Non-nil means, any change to the buffer will remove temporary highlights.
529 When this is set, checkbox statistics is updated each time you either insert
601 You may set this option on a per-file basis by adding to the buffer a
616 first line, so it is probably best to use this in combinations with
636 TAB or RET are pressed to move to another field. With optimization this
665 The default for this option is t if the optimized version is also used in
667 this variable requires a restart of Emacs to become effective."
714 The default value of this option is a regular expression which allows
739 In a column all non-white fields are considered. If at least this
769 over the line. When this option is nil, a new line will be created before
770 this line."
813 When this variable is nil, formula calculation is only available through
818 ;; FIXME this is also a variable that makes Org-mode files non-portable
855 "buffer-local version of `org-link-abbrev-alist', which see.
856 The value of this is taken from the #+LINK lines.")
857 (make-variable-buffer-local 'org-link-abbrev-alist-local)
878 per-buffer basis from the Org->Hyperlinks menu."
913 Changing this variable requires a restart of Emacs to become effective."
965 negates this setting for the duration of the command."
975 Org-mode file (offering completion for all stored links). When this
986 negates this setting for the duration of the command."
1016 Changing this requires a restart of Emacs to work correctly."
1026 this link in another window or frame. This variable can be used to
1027 set this up for the different types of links.
1058 (defcustom org-display-internal-link-with-indirect-buffer nil
1059 "Non-nil means, use indirect buffer to display infile links.
1063 another window. When this option is set, the other window actually displays
1064 an indirect buffer clone of the current buffer, to avoid any visibility
1065 changes to the current buffer."
1080 if one was given like in <mailto:arthur@galaxy.org::this subject>."
1096 Therefore I *definitely* advise against setting this variable to nil.
1113 Therefore I *definitely* advise against setting this variable to nil.
1165 you can use this variable to set the application for a given file
1166 extension. The entries in this list are cons cells where the car identifies
1178 `default' Use the default application for this file type.
1224 You can set this on a per-template basis with the variable
1234 You can set this on a per-template basis with the variable
1241 When nil, just let remember make the buffer.
1242 When not nil, this is a list of 4-element lists. In each entry, the first
1243 element is a character, a unique key to select this template.
1245 specify a destination file for remember items created with this template.
1251 The template specifies the structure of the remember buffer. It should have
1255 %^{prompt} prompt the user for a string and replace this sequence with it.
1323 \\<org-mode-map>By default, this is '(\"TODO\" \"DONE\"). The last entry in the list is
1328 additional state where no keyword is present. For details about this
1364 Valid members of this list are
1370 When `state' is set, this includes tracking `done'.
1379 the following lines anywhere in the buffer:
1457 It is not recommended to change this constant.")
1463 When this is not zero, you can still force an exact time-stamp by using
1471 To turn this on on a per-file basis, insert anywhere in the file:
1476 (make-variable-buffer-local 'org-display-custom-times)
1522 When this list is nil, Org-mode will base TAG input on what is already in the
1523 buffer.
1524 The value of this variable is an alist, the car may be (and should) be a
1541 `org-tag-alist' or through a #+TAGS line in the buffer.
1553 During fast tag selection, you can toggle this flag with `C-c'.
1554 This variable can also have the value `expert'. In this case, the window
1564 If this number is positive, it specifies the column. If it is negative,
1573 the tags around. With this options turned on, after each such operation
1581 If you turn off this option, you very likely want to turn on the
1591 Setting this variable to nil causes subtrees of a match to be skipped.
1593 inheritance off, you very likely want to turn this option on.
1596 value of this variable is ignored and sublevels are always checked, to
1623 (make-variable-buffer-local 'org-category)
1627 Entries may be added to this list with \\[org-agenda-file-to-front] and removed with
1639 (defcustom org-agenda-confirm-kill 1
1640 "When set, remote killing from the agenda buffer needs confirmation.
1651 The command `org-calendar-goto-agenda' will be bound to this key. The
1665 agenda dispatcher \\[org-agenda]. Each entry is a list like this:
1682 this: ((opt1 val1) (opt2 val2) ...)
1684 You can also define a set of commands, to create a composite agenda buffer.
1685 In this case, an entry looks like this:
1714 (const :tag "Tags sparse tree (current buffer)" tags-tree)
1715 (const :tag "TODO keyword tree (current buffer)" todo-tree)
1716 (const :tag "Occur tree (current buffer)" occur-tree)
1766 The entire tree below a headline matched by this is considered a project.
1774 After defining this variable, you may use \\[org-agenda-list-stuck-projects]
1798 The idea behind this is that by scheduling it, you have already taken care
1799 of this item."
1807 The idea behind this is that such items will appear in the agenda anyway."
1837 "Hook run just before displaying an agenda buffer."
1859 "How the agenda buffer should be displayed.
1860 Possible values for this option are:
1863 other-frame Use `switch-to-buffer-other-frame' to display agenda.
1864 other-window Use `switch-to-buffer-other-window' to display agenda.
1879 `q' or `x' and this option is set, the old state is restored. If
1880 `org-agenda-window-setup' is `other-frame', the value of this
1885 (defcustom org-indirect-buffer-display 'other-window
1888 \\[org-tree-to-indirect-buffer] and \\[org-agenda-tree-to-indirect-buffer].
2053 do have a time. When nil, the default time is before 0:00. You can use this
2096 format letter, this character will be appended to the field value if
2101 The default value of this option is \" %-12:c%?-12t% s\", meaning:
2134 placed into the prefix. If this option is non-nil, the original specification
2149 When this is the symbol `prefix', only remove tags when
2158 "Shift tags in agenda items to this column."
2176 find LaTeX fragments. Valid members of this list are:
2244 this setting.
2260 When an integer, include levels up to N in the toc, this may then be
2287 export, line breaks will always be preserved, regardless of this variable.
2296 nil Do not export, pretend this tree is not present
2318 If this is the symbol `not-in-toc', tags will be removed from table of
2335 single words, but you can say: I *really* *mean* *this*.
2336 Not all export backends support this.
2344 When this option is turned on, you can use TeX-like syntax for sub- and
2358 Not all export backends support this, but HTML does.
2370 Not all export backends support this.
2396 will be looking just like this in also HTML. See also the QUOTE keyword.
2397 Not all export backends support this.
2422 Not all export backends support this.
2430 In HTML export, this means use <th> instead of <td>.
2431 In tables created with table.el, this applies to the first table line.
2470 The first character is is used for the first lest level generated in this
2514 Since there are different ways of setting style information, this variable
2532 As the value of this option simply gets inserted into the HTML <head> header,
2562 link to the image. If this option is `maybe', then images in links with
2590 into the exported HTML text. Otherwise, the buffer will just be saved
2644 make this work.
2647 You may also set this on a per-file basis by adding one of the following
2648 lines to the buffer:
2658 When this is non-nil, the headline after the keyword is set to the
2665 Changing this variable requires a restart of Emacs to take effect."
2717 and \"trong wor\" is the body. The different components in this variable
2728 export. When this is set, all marker characters (as given in
2731 Use customize to modify this, or restart Emacs after changing it."
2753 Emacs buffers, and the HTML tags to be used for this.
2754 Use customize to modify this, or restart Emacs after changing it."
2798 The forground color of this face should be equal to the background
3022 ;;; Variables for pre-computed regular expressions, all buffer local
3026 (make-variable-buffer-local 'org-done-string)
3029 (make-variable-buffer-local 'org-todo-regexp)
3032 (make-variable-buffer-local 'org-not-done-regexp)
3035 (make-variable-buffer-local 'org-todo-line-regexp)
3039 (make-variable-buffer-local 'org-todo-line-tags-regexp)
3042 (make-variable-buffer-local 'org-nl-done-regexp)
3045 (make-variable-buffer-local 'org-looking-at-done-regexp)
3048 (make-variable-buffer-local 'org-todo-kwd-priority-p)
3051 (make-variable-buffer-local 'org-todo-kwd-max-priority)
3054 (make-variable-buffer-local 'org-ds-keyword-length)
3057 (make-variable-buffer-local 'org-deadline-regexp)
3060 (make-variable-buffer-local 'org-deadline-time-regexp)
3063 (make-variable-buffer-local 'org-deadline-line-regexp)
3066 (make-variable-buffer-local 'org-scheduled-regexp)
3069 (make-variable-buffer-local 'org-scheduled-time-regexp)
3072 (make-variable-buffer-local 'org-closed-time-regexp)
3076 (make-variable-buffer-local 'org-keyword-time-regexp)
3079 (make-variable-buffer-local 'org-keyword-time-not-clock-regexp)
3082 (make-variable-buffer-local 'org-maybe-keyword-time-regexp)
3106 "Make VAR local in current buffer and set it to VALUE."
3107 (set (make-variable-buffer-local var) value))
3110 "Check if the current buffer is in Org-mode."
3146 set this variable to if the option is found. An optional forth element PUSH
3147 means to push this value onto the list in the variable.")
3150 "Precompute regular expressions for current buffer."
3307 (defvar wl-summary-buffer-elmo-folder)
3308 (defvar wl-summary-buffer-folder-name)
3316 (defvar mh-show-folder-buffer)
3329 (defvar original-date) ; dynamically scoped in calendar.el does scope this
3340 ;; Defined somewhere in this file, but used before definition.
3356 (defun org-make-overlay (beg end &optional buffer)
3358 (make-extent beg end buffer)
3359 (make-overlay beg end buffer)))
3364 (defun org-move-overlay (ovl beg end &optional buffer)
3366 (set-extent-endpoints ovl beg end (or buffer (current-buffer)))
3367 (move-overlay ovl beg end buffer)))
3438 "Add elements to `buffer-invisibility-spec'.
3439 See documentation for `buffer-invisibility-spec' for the kind of elements
3444 ((or (null buffer-invisibility-spec) (eq buffer-invisibility-spec t))
3445 (setq buffer-invisibility-spec (list arg)))
3447 (setq buffer-invisibility-spec
3448 (cons arg buffer-invisibility-spec)))))
3451 "Remove elements from `buffer-invisibility-spec'."
3454 (if (consp buffer-invisibility-spec)
3455 (setq buffer-invisibility-spec
3456 (delete arg buffer-invisibility-spec)))))
3459 "Is ARG a member of `buffer-invisibility-spec'?"
3460 (if (consp buffer-invisibility-spec)
3461 (member arg buffer-invisibility-spec)
3503 ;; Need to do this here because define-derived-mode sets up
3504 ;; the keymap so late. Still, it is a waste to call this each time
3505 ;; we switch another buffer into org-mode.
3508 ;; Assume this is Greg's port, it used easymenu
3527 (fboundp 'set-display-table-slot) (boundp 'buffer-display-table))
3532 (setq buffer-display-table org-display-table))
3544 ;; Check for running clock before killing a buffer
3545 (org-add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
3551 ; (org-set-local 'comment-start "#") ;; FIXME: this breaks wrapping
3559 ;; Emacs 22 deals with this through a special variable
3571 (let ((bmp (buffer-modified-p)))
3573 (set-buffer-modified-p bmp)))
3578 (let ((this-command 'org-cycle) (last-command 'org-cycle))
3714 "Run through the buffer and add overlays to links."
3727 "Run through the buffer and add overlays to links."
3738 "Run through the buffer and add overlays to links."
3751 intangible property is needed to make sure point skips this text.
3752 In Emacs 22, this is not necessary. The intangible text property has
3761 "Run through the buffer and add overlays to bracketed links."
3776 ;; may have made some of this invisible.
3790 "Run through the buffer and add overlays to dates."
3811 "Run through the buffer and add overlays to target matches."
3825 "Find all radio targets in this file and update the regular expression."
3849 "Return a list of all targets in this file.
3962 (kill-local-variable 'font-lock-keywords) nil))
3981 (let* ((buffer-undo-list t)
3984 deactivate-mark buffer-file-name buffer-file-truename)
3990 ;;;; Visibility cycling, including org-goto and indirect buffer
3995 (make-variable-buffer-local 'org-cycle-global-status)
3997 (make-variable-buffer-local 'org-cycle-subtree-status)
4003 - When this function is called with a prefix argument, rotate the entire
4004 buffer through 3 states (global cycling)
4010 by this line through 3 different states (local cycling)
4013 From this state, you can move to one of the children
4025 - Special case: if point is the the beginning of the buffer and there is
4026 no headline in line 1, this function will act as if called with prefix arg."
4058 ((and (eq last-command this-command)
4068 ((and (eq last-command this-command)
4100 (while (and (not (eobp)) ;; this is like `next-line'
4106 (beginning-of-line 1) ; in case this is an item
4108 ;; Find out what to do next and set `this-command'
4111 ;; Nothing is hidden behind this heading
4121 ((and (eq last-command this-command)
4136 (buffer-read-only (org-back-to-heading))
4149 (string-match "^[ \t]*$" (buffer-substring
4175 Really, this shows all headlines with level equal or greater than the level
4176 of the first headline in the buffer. This is important, because if the
4189 "Show all headlines in the buffer, like a table of contents.
4211 (when (get-buffer-window (current-buffer))
4271 is often to fold the entire buffer and then dive into the tree. This
4275 This command works around this by showing a copy of the current buffer in
4278 original buffer in which the visibility is still unchanged. It then jumps
4283 (org-get-location (current-buffer) org-goto-help)))
4295 "Let the user select a location in the Org-mode buffer BUF.
4302 (switch-to-buffer (get-buffer-create "*org-goto*"))
4303 (with-output-to-temp-buffer "*Help*"
4305 (shrink-window-if-larger-than-buffer (get-buffer-window "*Help*"))
4306 (setq buffer-read-only nil)
4307 (erase-buffer)
4308 (insert-buffer-substring buf)
4313 (setq buffer-read-only t)
4333 (kill-buffer "*org-goto*")
4372 ;;; Indirect buffer display of subtrees
4376 (defvar org-last-indirect-buffer nil)
4378 (defun org-tree-to-indirect-buffer (&optional arg)
4379 "Create indirect buffer and narrow it to current subtree.
4380 With numerical prefix ARG, go up to this level and then take that tree.
4382 Normally this command removes the indirect buffer previously made
4383 with this command. However, when called with a C-u prefix, the last buffer
4385 If `org-indirect-buffer-display' is `dedicated-frame', the C-u prefix also
4386 requests that a new frame be made for the new buffer, so that the dedicated
4389 (let ((cbuf (current-buffer))
4404 (buffer-live-p org-last-indirect-buffer))
4405 (kill-buffer org-last-indirect-buffer))
4406 (setq ibuf (org-get-indirect-buffer cbuf)
4407 org-last-indirect-buffer ibuf)
4409 ((or (eq org-indirect-buffer-display 'new-frame)
4410 (and arg (eq org-indirect-buffer-display 'dedicated-frame)))
4413 (switch-to-buffer ibuf)
4415 ((eq org-indirect-buffer-display 'dedicated-frame)
4422 (switch-to-buffer ibuf)
4424 ((eq org-indirect-buffer-display 'current-window)
4425 (switch-to-buffer ibuf))
4426 ((eq org-indirect-buffer-display 'other-window)
4427 (pop-to-buffer ibuf))
4436 (defun org-get-indirect-buffer (&optional buffer)
4437 (setq buffer (or buffer (current-buffer)))
4438 (let ((n 1) (base (buffer-name buffer)) bname)
4439 (while (buffer-live-p
4440 (get-buffer (setq bname (concat base "-" (number-to-string n)))))
4443 (make-indirect-buffer buffer bname 'clone)
4444 (error (make-indirect-buffer buffer bname)))))
4464 (if (= (buffer-size) 0)
4663 is signaled in this case."
4669 (error "Not all levels are odd in this file. Conversion not possible."))
4714 (error "Cannot move past superior level or buffer limit")))
4724 (setq txt (buffer-substring beg end))
4733 This is actually only a copy of the kill, because we use the normal kill
4734 ring. We need it to check if the kill was created by `org-copy-subtree'.")
4763 (if cut (kill-region beg end) (copy-region-as-kill beg end))
4764 (setq org-subtree-clip (current-kill 0))
4785 If optional TREE is given, use this text instead of the kill ring."
4787 (unless (org-kill-is-subtree-p tree)
4790 "The kill is not a (set of) tree(s) - please use \\[yank] to yank anyway")))
4791 (let* ((txt (or tree (and kill-ring (current-kill 0))))
4801 ^re_ (buffer-substring (point-at-bol) (point)))
4858 (if (and kill-ring
4859 (eq org-subtree-clip (current-kill 0))
4864 (defun org-kill-is-subtree-p (&optional txt)
4865 "Check if the current kill is an outline subtree, or a set of trees.
4866 Returns nil if kill does not start with a headline, or if the first
4868 So this will actually accept several entries of equal levels as well,
4870 If optional TXT is given, check this string instead of the current kill."
4871 (let* ((kill (or txt (and kill-ring (current-kill 0)) ""))
4872 (start-level (and kill
4873 (string-match (concat "\\`" outline-regexp) kill)
4880 (while (setq start (string-match re kill (1+ start)))
4886 "Narrow buffer to the current subtree."
4939 ;; we will sort the top-level entries in this file
4951 txt (buffer-substring beg end))
4972 (kill-region beg end)
4974 ;; Insert the sorted entries, and remove duplicates if this is required
4986 The user will be prompted for the SORTING-TYPE if the call to this
5129 with the current numbers. With optional prefix argument ALL, do this for
5130 the whole buffer."
5133 (let* ((buffer-invisibility-spec nil) ; Emacs 21 compatibility
5268 Error if not at a plain list, or if this is the last item in the list."
5281 Error if not at a plain list, or if this is the last item in the list."
5303 so this really moves item trees."
5315 (setq txt (buffer-substring beg end))
5323 (error "Cannot move this item further down"))))
5328 so this really moves item trees."
5347 (error "Cannot move this item further up")))
5351 (setq txt (buffer-substring beg end))
5359 (error "Cannot move this item further up"))))
5392 (buffer-substring (point-at-bol) (match-beginning 3))))
5395 ;; find where this list begins
5469 If the cursor is not at a headline when this comand is called, try all level
5471 this heading. "
5484 (this-buffer (current-buffer))
5487 file heading buffer level newfile-p)
5497 (file-name-nondirectory buffer-file-name))
5502 buffer (find-file-noselect file))
5503 (setq buffer (current-buffer)))
5504 (unless buffer
5512 ;; we need to protect this-command, to avoid kill-region sets it,
5514 (let (this-command) (org-copy-subtree))
5515 (set-buffer buffer)
5516 ;; Enforce org-mode for the archive buffer
5524 (buffer-file-name this-buffer))))
5525 ;; Force the TODO keywords of the original buffer
5569 ;; Save the buffer, if it is not the same buffer.
5570 (if (not (eq this-buffer buffer)) (save-buffer))))
5571 ;; Here we are back in the original buffer. Everything seems to have
5573 (let (this-command) (org-cut-subtree))
5574 (if (and (not (eobp)) (looking-at "[ \t]*$")) (kill-line))
5576 (if (eq this-buffer buffer)
5640 (setq this-command 'org-cycle)
5655 If ONOFF is `on' or `off', don't toggle but set to this state."
5730 "Searching from within a table (any type) this finds the first line
5733 "Searching from within a table (any type) this finds the first line
5810 (if (string-match "^[ \t]*$" (buffer-substring-no-properties
5842 ;; Lets see if this is tab-separated material. If every nonempty line
5878 (table (buffer-substring beg end))
5884 (with-current-buffer (find-file-noselect file)
5885 (setq buf (current-buffer))
5886 (erase-buffer)
5905 (save-buffer))
5906 (kill-buffer buf)))
5922 (make-variable-buffer-local 'org-table-overlay-coordinates)
5971 (buffer-substring beg end) "\n"))
5993 (kill-region beg end)
6038 ;; Store the alignment of this table, for later editing of single fields
6094 (when (or (eq t buffer-invisibility-spec)
6095 (assq 'org-link buffer-invisibility-spec))
6142 (or (not (equal (marker-buffer org-table-aligned-begin-marker)
6143 (current-buffer)))
6249 the cursor is moved with it. Therefore, repeating this command causes the
6319 If REPLACE is a string, replace field with this value. The return value
6326 (val (buffer-substring (1+ pos) (match-end 0))))
6379 Only datalins count for this."
6608 (setq txt (buffer-substring (point) (1+ (point-at-eol))))
6625 (let* ((line (buffer-substring (point-at-bol) (point-at-eol)))
6645 (buffer-substring (point-at-bol) (point-at-eol))))
6660 In particular, this does handle wide and invisible characters."
6671 (defun org-table-kill-row ()
6678 (kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max)))
6702 If SORTING-TYPE is specified when this function is called from a Lisp
6751 (org-split-string (buffer-substring beg end) "\n")))
6832 Obviously, this only works within limits. When an Org-mode table is
6882 lines. Generally, this makes the table more compact. A prefix ARG may be
6959 (switch-to-buffer-other-window "*Org tmp*")
6960 (erase-buffer)
6978 the table and kill the editing buffer."
6981 (cb (current-buffer))
6987 (setq text (org-trim (buffer-string)))
6989 (kill-buffer cb)
6990 (select-window (get-buffer-window (marker-buffer pos)))
7027 (t (error "Cannot wrap this")))))
7069 "Apply FUNCTION to the start of all tables in the buffer."
7075 (message "Mapping tables: %d%%" (/ (* 100.0 (point)) (buffer-size)))
7087 as kill to be inserted with \\[yank].
7134 (kill-new sres)
7138 (format "Sum of %d items: %-20s (\\[yank] will insert result into buffer)"
7291 "Get the column names and local parameters for this table."
7347 (defun org-this-word ()
7352 (buffer-substring-no-properties beg end))))
7376 ("#" . "Automatically recalculate this line upon TAB, RET, and C-c C-c in the line")
7380 ("_" . "Names for values in row below this one.")
7381 ("^" . "Names for values in row above this one.")))
7456 (make-variable-buffer-local 'org-table-formula-debug)
7478 installed in order to use this function.
7480 In a table, this command replaces the value in the current field with the
7484 formula is installed as valid in only this specific field.
7501 additional arguments: EQUATION can be the formula to apply. If this
7505 formula, assuming that this has been done already outside the function.
7531 ;; Parse the format string. Since we have a lot of modes, this is
7566 (buffer-substring (point-at-bol) (point-at-eol)))
7621 (with-output-to-temp-buffer "*Substitution History*"
7633 (setq bw (get-buffer-window "*Substitution History*"))
7634 (shrink-window-if-larger-than-buffer bw)
7795 With prefix arg ALL, do this for all lines in the table."
7797 (or (memq this-command org-recalc-commands)
7798 (setq org-recalc-commands (cons this-command org-recalc-commands)))
7885 (lasttbl (buffer-substring (org-table-begin) (org-table-end)))
7891 (setq thistbl (buffer-substring (org-table-begin) (org-table-end)))
7945 "Edit the formulas of the current table in a separate buffer."
7953 (switch-to-buffer-other-window "*Edit Formulas*")
7954 (erase-buffer)
7978 (when (not (memq this-command '(lisp-complete-symbol)))
7987 "Parse the buffer for formula definitions and install them.
8004 (select-window (get-buffer-window (marker-buffer pos)))
8010 (kill-buffer "*Edit Formulas*")
8021 (select-window (get-buffer-window (marker-buffer pos)))
8036 ((not (fboundp 'pp-buffer))
8037 (error "Cannot pretty-print. Command `pp-buffer' is not available."))
8048 (if (eq last-command this-command)
8051 (setq this-command nil)
8054 (pp-buffer)
8102 (if (and (markerp pos) (marker-buffer pos))
8103 (if (get-buffer-window (marker-buffer pos))
8104 (select-window (get-buffer-window (marker-buffer pos)))
8105 (switch-to-buffer-other-window (get-buffer-window
8106 (marker-buffer pos)))))
8221 (select-window (get-buffer-window (marker-buffer org-pos)))
8233 (let ((other-window-scroll-buffer (marker-buffer org-pos)))
8285 (make-variable-buffer-local 'org-table-coordinate-overlays)
8351 ;; addresses this by checking explicitly for both bindings.
8357 ;; active, this binding is ignored inside tables and replaced with a
8363 (make-variable-buffer-local 'orgtbl-mode)
8389 ;; Exit without error, in case some hook functions calls this
8484 '([(meta shift up)] org-table-kill-row)
8684 "Send a tranformed version of this table to the receiver position.
8686 this table."
8698 (error "Don't know how to transform this table."))))
8705 (txt (buffer-substring-no-properties
8779 "Insert a radio table template appropriate for this major mode."
8795 If this is a header line, actually get the value for the symbol with an
8828 If this is present, :lstart, :lend, and :sep are ignored.
8840 :efmt Use this format to print numbers with exponentials.
8846 In addition to this, the parameters :skip and :skipcols are always handled
8917 this function is called."
8933 Currently this function recognizes the following parameters:
8939 this function is called. The function does *not* use `orgtbl-to-generic',
8979 this function is called."
9028 This link can later be inserted into an org-buffer with
9069 (vm-select-folder-buffer)
9071 (folder buffer-file-name)
9088 (message-id (elmo-message-field wl-summary-buffer-elmo-folder
9093 wl-summary-buffer-elmo-folder msgnum)
9095 msgnum (wl-summary-buffer-msgdb))))
9104 (setq link (org-make-link "wl:" wl-summary-buffer-folder-name
9123 (let ((folder buffer-file-name)
9183 (setq link (concat "file:" (abbreviate-file-name buffer-file-name)
9189 (abbreviate-file-name buffer-file-name))
9191 (org-store-link-props :type "image" :file buffer-file-name))
9201 ((and buffer-file-name (org-mode-p))
9204 (abbreviate-file-name buffer-file-name)))
9213 (buffer-substring (region-beginning) (region-end)))
9214 (t (buffer-substring (point-at-bol) (point-at-eol)))))
9223 (buffer-file-name
9224 ;; Just link to this file here.
9226 (abbreviate-file-name buffer-file-name)))
9230 (buffer-substring (region-beginning) (region-end))
9231 (buffer-substring (point-at-bol) (point-at-eol))))
9240 (error "Cannot link to a buffer which is not visiting a file"))
9294 ;; Check if the user wrote this message
9374 "Find a header field in the current buffer."
9417 be displayed in the buffer instead of the link.
9419 If there is already a link at point, this command will allow you to edit link
9434 (prog1 (buffer-substring (region-beginning) (region-end))
9436 tmphist ; byte-compile incorrectly complains about this
9494 (when (and buffer-file-name
9500 (if (equal (file-truename buffer-file-name) (file-truename path))
9501 ;; We are linking to this same file, with a search option
9544 (when (and org-link-search-failed (eq this-command last-command))
9546 (message "Link search wrapped back to beginning of buffer"))
9564 (when (and org-link-search-failed (eq this-command last-command))
9566 (message "Link search wrapped back to end of buffer"))
9601 If there is no link at point, this function will search forward up to
9629 path (buffer-substring
9679 (switch-to-buffer-other-window
9680 (org-get-buffer-for-internal-link (current-buffer)))
9786 handle this file type, for example by checking the major-mode or
9787 the file extension. If it decides not to handle this file, it
9797 A function in this hook may also use `setq' to set the variable
9799 be used for this link when it gets inserted into an Org-mode
9800 buffer with \\[org-insert-link].")
9805 Functions added to this hook must accept a single argument, the
9808 handle this search, for example by checking the major-mode or the
9809 file extension. If it decides not to handle this search, it
9819 In case this is needed, a function in this hook can also restore
9827 regular expression. In org-mode files, this will create an `org-occur'
9829 If the current buffer is in `dired-mode', grep will be used to search
9846 ;; There is an exact target for this
9912 (if (and (or (not (eq (marker-buffer m) (current-buffer)))
9922 (defun org-get-buffer-for-internal-link (buffer)
9923 "Return a buffer to be used for displaying the link target of internal links."
9925 ((not org-display-internal-link-with-indirect-buffer)
9926 buffer)
9927 ((string-match "(Clone)$" (buffer-name buffer))
9929 ;; we also do not modify visibility in this case
9930 buffer)
9931 (t ; make a new indirect buffer for displaying the link
9932 (let* ((bn (buffer-name buffer))
9934 (ib (or (get-buffer ibn) (make-indirect-buffer buffer ibn 'clone))))
9935 (with-current-buffer ib (org-overview))
9941 in the *Occur* buffer. This is useful if the regex is long and not useful
9946 (when (setq win (get-buffer-window "*Occur*"))
9953 (and beg end (let ((buffer-read-only)) (delete-region beg end)))
9970 (defun org-mark-ring-push (&optional pos buffer)
9977 (or buffer (current-buffer)))
9991 (if (eq last-command this-command)
9996 (switch-to-buffer (marker-buffer m))
10035 (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil))
10038 (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil))
10041 (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil))
10044 (if (< 0 (buffer-size (get-buffer "*BBDB*"))) (throw 'exit nil))
10047 (when (= 0 (buffer-size (get-buffer "*BBDB*")))
10048 (delete-window (get-buffer-window "*BBDB*"))
10095 (vm-select-folder-buffer)
10101 (error "Could not find the specified message in this folder"))
10154 ;; Refer to the show buffer
10155 mh-show-folder-buffer))
10161 ;; mh-index-data is always nil in a show buffer.
10166 (when (buffer-live-p (get-buffer folder))
10168 (pop-to-buffer folder)
10179 "Returns the name of the message folder in a index folder buffer."
10191 ;; Refer to the show buffer
10192 mh-show-folder-buffer)))
10200 ;; Refer to the show buffer
10201 (mh-show-buffer-message-number))))
10205 show buffer for the corresponding message. If you have a more clever
10209 (buffer (get-buffer-create (concat "show-" folder)))
10211 (with-current-buffer buffer
10216 (set-buffer buffer)
10243 (kill-this-buffer)
10248 (kill-this-buffer)
10259 ;; yes, we want to construct this search string.
10260 ;; Make a good description for this entry, using names, year and the title
10283 ;; Yes, we want to do the search in this file.
10291 (let ((b (current-buffer)) (p (point)))
10294 (save-excursion (set-buffer b) (goto-char p)
10310 First, this expands any special file name abbreviations. Then the
10312 entry for this file type, and if yes, the corresponding command is launched.
10321 buffer-file-name
10327 (old-buffer (current-buffer))
10370 (or (not (equal old-buffer (current-buffer)))
10372 (org-mark-ring-push old-pos old-buffer))))
10375 "Return the default applications for this operating system."
10423 "Initialize *remember* buffer with template, invoke `org-mode'.
10456 (erase-buffer)
10469 (let* ((lead (buffer-substring
10484 ;; Turn on org-mode in the remember buffer, set local variables
10486 (org-set-local 'org-finish-function 'remember-buffer)
10512 (org-set-local 'org-finish-function 'remember-buffer)))
10516 "Call `remember'. If this is already a remember buffer, re-apply template.
10518 of the remember buffer."
10520 (if (eq org-finish-function 'remember-buffer)
10524 (erase-buffer)
10530 (remember (buffer-substring (point) (mark)))
10546 RET buffer-start as level 2 heading at end of file
10571 (let* ((txt (buffer-substring (point-min) (point-max)))
10575 (visiting (org-find-base-buffer-visiting file))
10588 ;; We need to add a headline: Use time and first buffer line
10591 " (" (remember-buffer-desc) ")")
10599 (with-current-buffer (or visiting (get-file-buffer file))
10620 (org-get-location (current-buffer) org-remember-help)))
10622 ; not handle this note
10640 ;; Put it below this entry, at the beg/end of the subtree
10654 (save-buffer)
10655 (if (not visiting) (kill-buffer (current-buffer)))))))))
10656 t) ;; return t to indicate that we took care of this note.
10675 (if (string-match (car entry) buffer-file-name)
10682 "Find the first dynamic block with name NAME in the buffer.
10731 "Apply COMMAND to all dynamic blocks in the current buffer.
10749 blocks in the buffer."
10783 "Update all dynamic blocks in the buffer.
10793 At the beginning of a headline, this completes TODO keywords as given in
10800 At all other locations, this simply calls `ispell-complete-word'."
10815 (opt (equal (buffer-substring (max (point-at-bol) (- beg 2))
10819 (buffer-substring (point-at-bol) (point))))
10839 (buffer-substring (point-at-bol) beg))
10853 (or org-tag-alist (org-get-buffer-tags)))
10855 (pattern (buffer-substring-no-properties beg end))
10870 (if (get-buffer-window "*Completions*")
10871 (delete-window (get-buffer-window "*Completions*")))
10882 (with-output-to-temp-buffer "*Completions*"
10907 this is nil.")
10918 So for this example: when the item starts with TODO, it is changed to DONE.
10937 (let* ((this (match-string 1))
10938 (last-state (or this ""))
10940 (member (member this org-todo-keywords))
10949 (if this
10955 (if this
10973 (if (eq this-command last-command)
10986 ((and state (not this))
11012 "Return the REPEAT statement of this entry."
11027 ;; last-state is dynamically scoped into this function
11109 (let (col list elt ts buffer-invisibility-spec)
11163 The auto-repeater uses this.")
11181 "Pop up a window for taking a note, and add this note later at point."
11186 (switch-to-buffer (marker-buffer org-log-note-marker))
11188 (switch-to-buffer-other-window "*Org Note*")
11189 (erase-buffer)
11201 (let ((txt (buffer-string))
11204 (kill-buffer (current-buffer))
11225 (set-buffer (marker-buffer org-log-note-marker))
11231 (setq ind (concat (buffer-substring (point-at-bol) (point)) " "))
11236 (with-current-buffer (marker-buffer org-log-note-return-to)
11242 (make-variable-buffer-local 'org-occur-highlights)
11250 call to `org-occur' will be kept, to allow stacking of calls to this
11332 "Remove the occur highlights from the buffer.
11333 BEG and END are ignored. If NOREMOVE is nil, remove this function
11334 from the `before-change-functions' in the current buffer."
11434 (abbreviate-file-name buffer-file-name))))
11470 ;; list this headline
11506 ;; todo-only is scoped dynamically into this function, and the function
11604 With prefix ARG, realign all tags in headings in the current buffer."
11613 (let (buffer-invisibility-spec) ; Emacs 21 compatibility
11622 (setq table (or org-tag-alist (org-get-buffer-tags))
11725 (buf (current-buffer))
11727 (buffer-tags nil)
11747 (buffer-substring (1- (point)) (point))
11754 (set-buffer (get-buffer-create " *Org tags*"))
11757 (switch-to-buffer-other-window (get-buffer-create " *Org tags*")))
11758 (erase-buffer)
11805 (if (and (not expert) (fboundp 'fit-window-to-buffer))
11806 (fit-window-to-buffer))
11827 (switch-to-buffer-other-window " *Org tags*")
11828 (and (fboundp 'fit-window-to-buffer)
11829 (fit-window-to-buffer))))
11841 (or buffer-tags
11842 (with-current-buffer buf
11843 (org-get-buffer-tags)))))
11846 (add-to-list 'buffer-tags (list tg))
11897 (defun org-get-buffer-tags ()
11898 "Get a table of all tags used in the buffer, for completion."
11915 If the user specifies a time like HH:MM, or if this command is called
11927 (eq this-command 'org-time-stamp))
11929 (setq time (let ((this-command this-command))
11933 (setq time (let ((this-command this-command))
11941 (setq time (let ((this-command this-command))
11979 but this can be configured with the variables `parse-time-months' and
11992 enter a time, and this function will inform the calling routine about
11993 this change. The calling routine may then choose to change the format
11994 used to insert the time stamp into the buffer to include the time."
12120 (select-window (get-buffer-window "*Calendar*"))
12126 (org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
12131 This is used by `org-read-date' in a temporary keymap for the calendar buffer."
12160 (let ((p (point-min)) (bmp (buffer-modified-p)))
12167 (set-buffer-modified-p bmp)))
12179 (org-parse-time-string (buffer-substring beg end) t)))
12200 But do this only if the variable `org-display-custom-times' is set."
12244 This is used by `org-read-date' in a temporary keymap for the calendar buffer."
12274 (defun org-evaluate-time-range (&optional to-buffer)
12277 TO-BUFFER, the result is inserted just after the date stamp into the buffer.
12320 (if (not to-buffer)
12469 (set-buffer "*Calendar*")
12484 (get-buffer-window "*Calendar*" t)
12491 (cwin (get-buffer-window "*Calendar*" t))
12521 "Insert time stamp corresponding to cursor date in *Calendar* buffer.
12549 (move-marker org-clock-marker (point) (buffer-base-buffer))
12557 (if (not (marker-buffer org-clock-marker))
12561 (set-buffer (marker-buffer org-clock-marker))
12585 (if (not (marker-buffer org-clock-marker))
12588 (set-buffer (marker-buffer org-clock-marker))
12595 (make-variable-buffer-local 'org-clock-file-total-minutes)
12601 (let* ((bmp (buffer-modified-p))
12638 (set-buffer-modified-p bmp)))
12641 "Show subtree times in the entire buffer.
12664 (make-variable-buffer-local 'org-clock-overlays)
12679 tx (concat (buffer-substring (1- (point)) (point))
12693 "Remove the occur highlights from the buffer.
12694 BEG and END are ignored. If NOREMOVE is nil, remove this function
12695 from the `before-change-functions' in the current buffer."
12708 (equal (marker-buffer org-clock-marker) (current-buffer))
12712 ;; Clock out, but don't accept a logging message for this.
12723 "Check if the current buffer contains the running clock.
12724 If yes, offer to stop it and to save the buffer with the changes."
12725 (when (and (equal (marker-buffer org-clock-marker) (current-buffer))
12726 (y-or-n-p (format "Clock-out in buffer %s before killing it? "
12727 (buffer-name))))
12729 (when (y-or-n-p "Save changed buffer?")
12730 (save-buffer))))
12734 If the buffer contains lines
12739 is was there before. If these lines are not in the buffer, the table
12752 "If this is a CLOCK line, update it and return t.
12886 ;; FIXME: I don't think anybody uses this, ask David
12932 (defvar org-agenda-menu) ; defined later in this file.
12947 (kill-all-local-variables)
12960 (when (boundp 'buffer-substring-filters)
12961 (org-set-local 'buffer-substring-filters
12964 buffer-substring-filters)))
12990 (define-key org-agenda-mode-map "\C-k" 'org-agenda-kill)
12997 (define-key org-agenda-mode-map "\C-c\C-xb" 'org-agenda-tree-to-indirect-buffer)
12998 (define-key org-agenda-mode-map "b" 'org-agenda-tree-to-indirect-buffer)
13073 ["Go To (this window)" org-agenda-switch-to t]
13076 ["Tree to indirect frame" org-agenda-tree-to-indirect-buffer t]
13080 ["Delete subtree" org-agenda-kill t]
13123 ["Rebuild buffer" org-agenda-redo t]
13135 "Non-nil means, allow remote undo from the agenda buffer.")
13141 "In a series of undo commands, this is the list of remaning undo items.")
13153 (_cmd this-command)
13154 (_buf1 (current-buffer))
13156 (_undo1 buffer-undo-list)
13157 (_undo2 (with-current-buffer ,_buffer buffer-undo-list))
13162 _undo1 (with-current-buffer _buf1 buffer-undo-list))
13164 _undo2 (with-current-buffer _buf2 buffer-undo-list)))
13167 (and _c1 (with-current-buffer _buf1 (undo-boundary)))
13168 (and _c2 (with-current-buffer _buf2 (undo-boundary)))
13169 ;; remember which buffer to undo
13175 This undoes changes both in the agenda buffer and in the remote buffer
13180 (if (not (eq this-command last-command))
13192 (with-current-buffer buf
13193 (let ((last-undo-buffer buf)
13194 buffer-read-only)
13205 (message "`%s' undone (buffer %s)" cmd (buffer-name rembuf))))
13218 (defvar org-agenda-last-dispatch-buffer nil)
13222 "Dispatch agenda commands to collect entries to the agenda buffer.
13233 l Create a timeeline for the current buffer.
13237 searches can be pre-defined in this way.
13239 If the current buffer is in Org-mode and visiting a file, you can also
13244 (let* ((buf (current-buffer))
13245 (bfn (buffer-file-name (buffer-base-buffer)))
13254 ;; Remember where this call originated
13255 (setq org-agenda-last-dispatch-buffer (current-buffer))
13258 (switch-to-buffer-other-window " *Agenda Commands*")
13259 (erase-buffer)
13267 L Timeline for current buffer # List stuck projects (!=configure)
13295 (org-add-props "1 Restrict call to current buffer 0 Restrict call to region or subtree" nil 'face 'org-table)))
13297 (if (fboundp 'fit-window-to-buffer) (fit-window-to-buffer))
13305 (error "Cannot restrict agenda to current buffer"))
13306 (with-current-buffer " *Agenda Commands*"
13312 (with-current-buffer buf
13327 (require 'calendar) ; FIXME: can we avoid this for some commands?
13377 match ;; The byte compiler incorrectly complains about this. Keep it!
13417 (set-buffer "*Org Agenda*")
13418 (princ (buffer-string))))
13425 "Make sure current buffer is in org-mode. Error if not."
13427 (error "Cannot execute org-mode agenda command on buffer in %s."
13431 "Fit the window to the buffer size."
13433 (fboundp 'fit-window-to-buffer)
13434 (fit-window-to-buffer nil (/ (* (frame-height) 3) 4)
13451 Depending on setup, this either uses customize to edit the variable
13453 latter case, the buffer is set up in a way that saving it automatically kills
13454 the buffer and restores the previous window configuration."
13464 (kill-buffer (current-buffer))))
13469 "Edit list and finish with \\[save-buffer]")))
13476 (while (setq b (find-buffer-visiting f)) (kill-buffer b))
13486 (with-temp-buffer
13488 (org-split-string (buffer-string) "[ \t\r\n]*?[\r\n][ \t\r\n]*"))))
13494 If the current buffer visits an agenda file, find the next one in the list.
13495 If the current buffer does not, find the first agenda file."
13499 (tcf (if buffer-file-name (file-truename buffer-file-name)))
13509 (if (buffer-base-buffer) (switch-to-buffer (buffer-base-buffer)))))
13527 (ctf (file-truename buffer-file-name))
13531 (if (not x) (setq x (cons ctf (abbreviate-file-name buffer-file-name))))
13543 Optional argument FILE means, use this file instead of the current."
13545 (let* ((file (or file buffer-file-name))
13579 (defvar org-agenda-buffer-name "*Org Agenda*")
13584 (setq buffer-read-only nil)
13591 (let* ((abuf (get-buffer-create org-agenda-buffer-name))
13592 (awin (get-buffer-window abuf)))
13594 ((equal (current-buffer) abuf) nil)
13598 (switch-to-buffer abuf))
13600 (switch-to-buffer-other-window abuf))
13602 (switch-to-buffer-other-frame abuf))
13605 (switch-to-buffer-other-window abuf))))
13606 (setq buffer-read-only nil)
13607 (erase-buffer)
13609 (setq buffer-read-only nil))
13612 "Finishing touch for the agenda buffer, called just before displaying it."
13616 (let ((buffer-read-only))
13635 (set-buffer (org-get-agenda-file-buffer file))
13637 (setq bmp (buffer-modified-p))
13650 (set-buffer-modified-p bmp))))))
13654 If this function return nil, the current match should not be skipped.
13657 Never set this variable using `setq' or so, because then it will apply
13707 (defun org-get-agenda-file-buffer (file)
13708 "Get a buffer visiting FILE. If the buffer needs to be created, add
13710 (let ((buf (org-find-base-buffer-visiting file)))
13713 ;; Make a new buffer and remember it
13720 When a buffer is unmodified, it is just killed. When modified, it is saved
13724 (setq file (buffer-file-name buf))
13725 (when (and (buffer-modified-p buf)
13728 (with-current-buffer buf (save-buffer)))
13729 (kill-buffer buf))))
13733 "Get the table of categories and positions in current buffer."
13747 (if buffer-file-name
13749 (file-name-nondirectory buffer-file-name))
13766 If the buffer contains an active region, only check the region for
13775 (entry buffer-file-name)
13788 (list 'switch-to-buffer-other-window (current-buffer))
13823 ; FIXME: this gives a timezone problem
13838 (setq buffer-read-only t)))
13841 "Return a list of all relevant day numbers from BEG to END buffer positions.
13885 (defvar org-starting-day nil) ; local variable in the agenda buffer
13892 The view will be for the current week, but from the overview buffer you
13994 ; FIXME: this gives a timezone problem
14019 (setq buffer-read-only t)
14024 (defvar org-select-this-todo-keyword nil)
14042 (org-select-this-todo-keyword
14048 (setq org-select-this-todo-keyword
14051 (and (equal 0 arg) (setq org-select-this-todo-keyword nil))
14071 (insert (or org-select-this-todo-keyword "ALL") "\n")
14089 (setq buffer-read-only t)))
14104 buffer)
14116 (setq buffer (if (file-exists-p file)
14117 (org-get-agenda-file-buffer file)
14119 (if (not buffer)
14124 (with-current-buffer buffer
14155 (setq buffer-read-only t)))
14165 "When this is set during todo and tags searches, will replace header.")
14169 If yes, it returns the end position of this tree, causing agenda commands
14170 to skip this subtree. This is a function that can be put into
14206 (with-current-buffer org-agenda-buffer-name
14217 (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
14221 (diary-file-name-prefix-function nil) ; turn this feature off
14227 (list-diary-entries date 1))) ;; Keep this name for now, compatibility
14228 (if (not (get-buffer fancy-diary-buffer))
14230 (with-current-buffer fancy-diary-buffer
14231 (setq buffer-read-only nil)
14240 (setq entries (buffer-substring (point-min) (- (point-max) 1)))))
14241 (set-buffer-modified-p nil)
14242 (kill-buffer fancy-diary-buffer)))
14254 "Remove unwanted stuff in buffer created by `fancy-diary-display'.
14279 ;; Hook not avaiable, must use advice to make this work
14284 buffer-file-name)
14293 (abbreviate-file-name buffer-file-name))
14329 long list - so this is not turned on by default.
14333 The call in the diary file should look like this:
14349 by the caller, because this is how the calendar works. Don't use this
14359 ;; If this is called during org-agenda, don't return any entries to
14379 (buffer (if (file-exists-p file)
14380 (org-get-agenda-file-buffer file)
14383 (if (not buffer)
14386 (with-current-buffer buffer
14454 (abbreviate-file-name buffer-file-name))))
14456 (if org-select-this-todo-keyword
14457 (concat "\\<\\(" org-select-this-todo-keyword
14501 "No heading for this item in buffer or region.")
14511 (abbreviate-file-name buffer-file-name))))
14528 tmp (buffer-substring (max (point-min)
14532 timestr (buffer-substring (match-beginning 0) (point-at-eol))
14580 (abbreviate-file-name buffer-file-name))))
14599 timestr (buffer-substring (match-beginning 0) (point-at-eol))
14633 (abbreviate-file-name buffer-file-name))))
14658 (setq head (buffer-substring-no-properties
14690 (abbreviate-file-name buffer-file-name))))
14714 (setq head (buffer-substring-no-properties
14740 (abbreviate-file-name buffer-file-name))))
14820 "Format TXT to be inserted into the agenda buffer.
14826 time-of-day should be extracted from TXT for sorting of this entry, and for
14827 the `%t' specifier in the format. When DOTIME is a string, this string is
14829 only the correctly processes TXT should be returned - this is used by
14836 (if buffer-file-name
14838 (file-name-nondirectory buffer-file-name))
14855 ;; The user can turn this off with a variable.
15082 "Check if agenda buffer is of allowed type.
15091 "Exit agenda by removing the window or the buffer."
15093 (let ((buf (current-buffer)))
15095 (kill-buffer buf)
15104 "Exit agenda by removing the window or the buffer.
15105 Also kill all Org-mode buffers which have been loaded by `org-agenda'.
15121 When this is the global TODO list, a prefix argument will be interpreted."
15126 (message "Rebuilding agenda buffer...")
15130 (message "Rebuilding agenda buffer...done")
15212 ;; FIXME: this no longer works if user make date format that starts with a blank
15214 "Jump to the next line indicating a date in agenda buffer."
15222 (error "No next date after this line in this buffer")))
15226 "Jump to the previous line indicating a date in agenda buffer."
15231 (error "No previous date before this line in this buffer")))
15237 (defun org-highlight (begin end &optional buffer)
15240 org-hl begin end (or buffer (current-buffer))))
15246 (defun org-highlight-until-next-command (beg end &optional buffer)
15247 (org-highlight beg end buffer)
15255 "Toggle follow mode in an agenda buffer."
15263 "Toggle log mode in an agenda buffer."
15273 "Toggle diary inclusion in an agenda buffer."
15283 "Toggle time grid in an agenda buffer."
15326 (message "No tags associated with this line"))))
15333 (buffer (marker-buffer marker))
15335 (switch-to-buffer-other-window buffer)
15345 (defun org-agenda-kill ()
15351 (buffer (marker-buffer marker))
15354 (org-with-remote-undo buffer
15355 (with-current-buffer buffer
15365 (setq conf (or (eq t org-agenda-confirm-kill)
15366 (and (numberp org-agenda-confirm-kill)
15367 (> n org-agenda-confirm-kill))))
15370 (format "Delete entry with %d lines in buffer \"%s\"? "
15371 n (buffer-name buffer))))
15373 (org-remove-subtree-entries-from-agenda buffer dbeg dend)
15374 (with-current-buffer buffer (delete-region dbeg dend))
15383 (buffer (marker-buffer marker))
15385 (org-with-remote-undo buffer
15386 (with-current-buffer buffer
15397 The subtree is the one in buffer BUF, starting at BEG and ending at END.
15398 If this information is not given, the function uses the tree at point."
15399 (let ((buf (or buf (current-buffer))) m p)
15406 (set-buffer (get-buffer org-agenda-buffer-name))
15412 (equal buf (marker-buffer m))
15416 (let (buffer-read-only)
15436 (buffer (marker-buffer marker))
15438 (switch-to-buffer buffer)
15481 (error "Command not allowed in this line"))
15483 (defun org-agenda-tree-to-indirect-buffer ()
15484 "Show the subtree corresponding to the current entry in an indirect buffer.
15485 This calls the command `org-tree-to-indirect-buffer' from the original
15486 Org-mode buffer.
15487 With numerical prefix arg ARG, go up to this level and then take that tree.
15488 With a C-u prefix, make a separate frame for this tree (i.e. don't use the
15494 (buffer (marker-buffer marker))
15496 (with-current-buffer buffer
15499 (call-interactively 'org-tree-to-indirect-buffer)))))
15514 (buffer (marker-buffer marker))
15517 (buffer-read-only nil)
15519 (org-with-remote-undo buffer
15520 (with-current-buffer buffer
15539 "Change all lines in the agenda buffer which match HDMARKER.
15545 (let* ((buffer-read-only nil)
15584 ;; See the code in set-tags for the way to do this.
15587 (let ((buffer-read-only))
15617 (buffer (marker-buffer marker))
15620 (buffer-read-only nil)
15622 (org-with-remote-undo buffer
15623 (with-current-buffer buffer
15668 (buffer (marker-buffer hdmarker))
15670 (buffer-read-only nil)
15672 (org-with-remote-undo buffer
15673 (with-current-buffer buffer
15693 (buffer (marker-buffer hdmarker))
15695 (buffer-read-only nil)
15697 (org-with-remote-undo buffer
15698 (with-current-buffer buffer
15712 "Change the date of this item to one day later."
15718 (buffer (marker-buffer marker))
15720 (org-with-remote-undo buffer
15721 (with-current-buffer buffer
15731 "Change the date of this item to one day earlier."
15737 ;; We use text properties to make this undoable
15738 (let ((buffer-read-only nil))
15761 "Change the date of this item. Date is prompted for, with default today.
15769 (buffer (marker-buffer marker))
15771 (org-with-remote-undo buffer
15772 (with-current-buffer buffer
15787 (buffer (marker-buffer marker))
15791 (org-with-remote-undo buffer
15792 (with-current-buffer buffer
15805 (buffer (marker-buffer marker))
15809 (org-with-remote-undo buffer
15810 (with-current-buffer buffer
15814 (message "Deadline for this item set to %s" ts)))))
15829 (org-with-remote-undo (marker-buffer marker)
15830 (with-current-buffer (marker-buffer marker)
15838 (unless (marker-buffer org-clock-marker)
15840 (org-with-remote-undo (marker-buffer org-clock-marker)
15846 (unless (marker-buffer org-clock-marker)
15848 (org-with-remote-undo (marker-buffer org-clock-marker)
15869 ; (buf (get-file-buffer (substitute-in-file-name diary-file)))
15878 ;; We implement this by hacking the `calendar-cursor-to-date' function
15984 (with-output-to-temp-buffer "*Dates*"
15986 (if (fboundp 'fit-window-to-buffer)
15987 (fit-window-to-buffer (get-buffer-window "*Dates*")))))
16023 ((eq this-command 'cdlatex-math-symbol)
16041 Even though the matchers for math are configurable, this function assumes
16045 and the position of this delimiter.
16062 (setq str (concat (buffer-substring lim (point)) "\000 X$.")
16119 (make-variable-buffer-local 'org-latex-fragment-image-overlays)
16122 "Remove all overlays with LaTeX fragment images in current buffer."
16133 display all fragments in the buffer.
16145 msg "Creating images for buffer...%s"))
16162 buffer-file-name)))
16187 ;; Check if there are old images files with this prefix, and remove them
16441 (?i . org-export-icalendar-this-file)
16451 (with-output-to-temp-buffer "*Org Export/Publishing Help*"
16756 translations. There is currently no way for users to extend this.")
16761 "Cleanup a buffer substring so that links can be created safely."
16773 (set-buffer (get-buffer-create " org-mode-tmp"))
16774 (erase-buffer)
16887 (setq rtn (buffer-string)))
16888 (kill-buffer " org-mode-tmp")
16963 (buffer-substring
16980 (file-name-nondirectory buffer-file-name))
16982 (buffer (find-file-noselect filename))
16990 (file-name-nondirectory buffer-file-name))))
17006 (switch-to-buffer-other-window buffer)
17007 (erase-buffer)
17100 (save-buffer)
17180 "Create a copy of the visible part of the current buffer, and export it.
17181 The copy is created in a temporary buffer and removed after use.
17190 (message "Export visible: [a]SCII [h]tml [b]rowse HTML [x]OXO [ ]keep buffer")
17203 (file buffer-file-name)
17204 (buffer (get-buffer-create "*Org Export Visible*"))
17206 (with-current-buffer buffer (erase-buffer))
17211 (append-to-buffer buffer s (point))
17219 (append-to-buffer buffer (match-beginning 0) (1+ (match-end 0))))
17221 (append-to-buffer buffer (1+ (match-beginning 0))
17223 (set-buffer buffer)
17224 (let ((buffer-file-name file)
17230 (kill-buffer buffer)
17231 (switch-to-buffer-other-window buffer)
17265 (buffer-name) (user-full-name) user-mail-address org-export-default-language
17277 (file-name-nondirectory buffer-file-name)
17300 (or org-tag-alist (org-get-buffer-tags)) " ") "")
17306 "Insert into the buffer a template with information for exporting."
17317 inserted or removed. When present, it causes the text between this headline
17319 If there is an active region, this command adds or removes a colon as the
17320 first character of this line. If the first character of a line is a colon,
17321 this line is also exported in fixed-width font."
17365 (org-open-file buffer-file-name))
17380 When HIDDEN is non-nil, don't display the HTML buffer.
17399 (buffer-substring
17405 (org-current-export-file buffer-file-name)
17420 (file-name-nondirectory buffer-file-name))
17422 (current-dir (file-name-directory buffer-file-name))
17423 (buffer (find-file-noselect filename))
17430 (file-name-nondirectory buffer-file-name))))
17446 (coding-system (and (boundp 'buffer-file-coding-system)
17447 buffer-file-coding-system))
17449 (save-buffer-coding-system coding-system)
17454 table-buffer table-orig-buffer
17467 ;; Switch to the output buffer
17469 (set-buffer buffer)
17470 (switch-to-buffer-other-window buffer))
17471 (erase-buffer)
17681 ((member type '("http" "https")) ; FIXME: need to test this.
17714 ;; make sure this is can be used as target search
17776 (setq table-open t table-buffer nil table-orig-buffer nil))
17778 (setq table-buffer (cons line table-buffer)
17779 table-orig-buffer (cons origline table-orig-buffer))
17784 table-buffer (nreverse table-buffer)
17785 table-orig-buffer (nreverse table-orig-buffer))
17787 (insert (org-format-table-html table-buffer table-orig-buffer))))
17888 (save-buffer)
17946 ;; ignore this line
17995 nil ; ignore this line
18016 (let (line field-buffer
18025 (if field-buffer
18036 field-buffer "\n")
18039 (setq field-buffer nil)))
18040 ;; Ignore this line
18044 (if field-buffer
18045 (setq field-buffer (mapcar
18048 field-buffer))
18049 (setq field-buffer fields))))
18058 (with-current-buffer (get-buffer-create " org-tmp1 ")
18059 (erase-buffer)
18065 (with-current-buffer (get-buffer-create " org-tmp2 ") (erase-buffer))
18067 (set-buffer " org-tmp2 ")
18068 (buffer-substring (point-min) (point-max))))
18236 ;; If title is nil, this means this function is called to close
18276 (defun org-export-icalendar-this-file ()
18281 (org-export-icalendar nil buffer-file-name))
18306 file ical-file ical-buffer category started org-agenda-new-buffers)
18313 ical-buffer (org-get-agenda-file-buffer ical-file))
18314 (set-buffer ical-buffer) (erase-buffer))
18318 (set-buffer (org-get-agenda-file-buffer file))
18322 (file-name-nondirectory buffer-file-name))
18324 (setq ical-buffer (org-get-agenda-file-buffer ical-file))
18325 (with-current-buffer ical-buffer (erase-buffer)))
18328 (file-name-nondirectory buffer-file-name))))
18330 (let ((standard-output ical-buffer))
18338 (set-buffer ical-buffer)
18339 (save-buffer)
18345 The iCalendar buffer is still current when this hook is run.
18346 A good way to use this is to tell a desktop calenndar application to re-read
18372 tmp (buffer-substring (max (point-min)
18462 (defun org-export-as-xoxo-insert-into (buffer &rest output)
18463 (with-current-buffer buffer
18467 (defun org-export-as-xoxo (&optional buffer)
18468 "Export the org buffer as XOXO.
18469 The XOXO buffer is named *xoxo-<source buffer name>*"
18470 (interactive (list (current-buffer)))
18474 (with-current-buffer (get-buffer buffer)
18475 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
18481 (file-name-nondirectory buffer-file-name))
18486 ;; Check the output buffer is empty.
18487 (with-current-buffer out (erase-buffer))
18538 ;; Finish the buffer off and clean it up.
18539 (switch-to-buffer-other-window out)
18541 (save-buffer)
18625 (define-key org-mode-map "\C-c\C-xb" 'org-tree-to-indirect-buffer)
18707 ;; got extra space, this field does not determine column width
18709 ;; no extra space, this field may determine column width
18724 When deleting backwards, in tables this function will insert whitespace in
18727 because, in this case the deletion might narrow the column."
18731 (string-match "|" (buffer-substring (point-at-bol) (point)))
18740 ;; noalign: if there were two spaces at the end, this field
18747 When deleting characters, in tables this function will insert whitespace in
18750 because, in this case the deletion might narrow the column."
18764 ;; noalign: if there were two spaces at the end, this field
18783 ;; How to do this: Measure non-white length of current string
18845 "Move subtree up or kill table row.
18846 Calls `org-move-subtree-up' or `org-table-kill-row' or
18851 ((org-at-table-p) (call-interactively 'org-table-kill-row))
18986 with prefix arg, realign all tags in the current buffer.
18988 - If the cursor is in one of the special #+KEYWORD lines, this
18989 triggers scanning the buffer for these lines and updating the
19001 - If the current buffer is a remember buffer, close note and file it.
19006 links in this buffer.
19019 (message "Temporary highlights/overlays removed from current buffer"))
19020 ((and (local-variable-p 'org-finish-function (current-buffer))
19043 ;; Recalculate the table before this line
19051 (t (error "C-c C-c can do nothing useful at this location.")))))
19152 ["Subtree to indirect buffer" org-tree-to-indirect-buffer t])
19270 :style radio :selected (member '(org-link) buffer-invisibility-spec)]
19274 :style radio :selected (not (member '(org-link) buffer-invisibility-spec))])
19317 (let ((bl (buffer-list)))
19320 (set-buffer (pop bl))
19570 (defun org-find-base-buffer-visiting (file)
19571 "Like `find-buffer-visiting' but alway return the base buffer and
19572 not an indirect buffer"
19573 (let ((buf (find-buffer-visiting file)))
19574 (or (buffer-base-buffer buf) buf)))
19577 ;; We want this to be just right, so use the full arsenal.
19621 ;; For reference, this is the default value of adaptive-fill-regexp
19626 In particular, this makes sure hanging paragraphs for hand-formatted lists
19657 ;; new outline.el. I guess this should be patched into Emacs?
19758 ;; Under Emacs this is not needed, but the old outline.el needs this fix.
19776 "Show everything after this heading at deeper levels."
19784 "Show the body directly following this heading.
19814 ;; So we have to use a one-time post-command-hook to do this.