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

Lines Matching +defs:end +defs:of +defs:subtree

2 ;; Carstens outline-mode for keeping track of everything.
10 ;; This file is part of GNU Emacs.
13 ;; it under the terms of the GNU General Public License as published by
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; You should have received a copy of the GNU General Public License
35 ;; top of outline-mode, which makes it possible to keep the content of
40 ;; utilizes and smoothly integrates much of the Emacs calendar and diary.
43 ;; printing and sharing of notes, an Org-mode file can be exported as a
45 ;; iCalendar file. It can also serve as a publishing tool for a set of
56 ;; The documentation of Org-mode can be found in the TeXInfo file. The
57 ;; distribution also contains a PDF version of it. At the homepage of
60 ;; in the etc/ directory of Emacs 22.
62 ;; A list of recent changes can be found at
87 "The version number of the file org.el.")
110 "Options concerning startup of Org-mode."
116 This can also be configured on a per-file basis by adding one of
139 This can also be configured on a per-file basis by adding one of
173 This option is only relevant at load-time of Org-mode, and must be set
174 *before* org.el is loaded. Changing it requires a restart of Emacs to
263 "Options concerning the general structure of Org-mode files."
268 "Options about how to make context of a location visible."
275 been invisible before. When this is set, the hierarchy of headings
278 Instead of t, this can also be an alist specifying this option for different
285 mark-goto when exposing the jump goal of a mark
313 but makes it harder to edit the location of the match. In such a case,
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
340 the same happens on each level of the hierarchy above the current entry.
344 but makes it harder to edit the location of the match. In such a case,
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
377 cursor stays at the beginning of the buffer.
379 of the buffer."
387 whitestart Only at the beginning of lines, before the first non-white char.
389 If TAB is used in a place where it does not emulate TAB, the current subtree
405 the values `folded', `children', or `subtree'."
420 Changing it requires restart of `font-lock-mode' to become effective
422 You may also set this on a per-file basis by adding one of the following
478 When nil, `C-c C-c needs to be used to get rid of the highlights.
488 This can be used to recenter the window to show as much of the structure
502 indentation of the bullet. In all other operations, plain list items are
541 "The tag that marks a subtree as archived.
542 An archived subtree does not open during visibility cycling, and does
574 This string consists of two parts, separated by a double-colon.
583 at the end of the file, as top-level entries.
632 - Automatic overwrite mode in front of whitespace in table fields.
633 This makes the structure of the table stay in tact as long as the edited
635 - Minimize the number of realigns. Normally, the table is aligned each time
662 for empty fields). Outside tables, the correct binding of the keys is
667 this variable requires a restart of Emacs to become effective."
677 \\end{comment}\n")
683 @end ignore\n")
691 All occurrences of %n in a template will be replaced with the name of the
714 The default value of this option is a regular expression which allows
716 context. For example, all of the following will be considered a
738 "Fraction of numbers in a column required to make the column align right.
740 fraction of fields is matched by `org-table-number-fraction',
746 "Bahavior of tables during editing in Org-mode."
766 "Non-nil means, tab in the last column of a table with jump over a hline.
802 Don't remove any of the default settings, just change the values. Org-mode
811 string of the command `org-table-eval-formula'. This feature requires the
831 The car of each element is a name of a constant, without the `$' before it.
833 speed of light in a formula, you would configure
855 "buffer-local version of `org-link-abbrev-alist', which see.
856 The value of this is taken from the #+LINK lines.")
860 "Alist of link abbreviations.
861 The car of each element is a string, to be replaced at the start of a link.
875 "Non-nil means, hide link part and only show description of bracket links.
886 relative relative to the current directory, i.e. the directory of the file
889 noabbrev absolute path, no abbreviation of home directory.
891 directories of it. For other files, use an absolute path."
900 "Types of links that should be activated in Org-mode files.
901 This is a list of symbols, each leading to the activation of a certain link
913 Changing this variable requires a restart of Emacs to become effective."
928 "Format of the description part of a link to an email or usenet message.
941 This is for example useful to limit the length of the subject.
954 "Regexp mached against the \"From:\" header of an email or usenet message.
965 negates this setting for the duration of the command."
986 negates this setting for the duration of the command."
1015 "Number of different positions to be recorded in the ring
1016 Changing this requires a restart of Emacs to work correctly."
1027 set this up for the different types of links.
1028 For VM, use any of
1031 For Gnus, use any of
1034 For FILE, use any of
1064 an indirect buffer clone of the current buffer, to avoid any visibility
1097 Just change it to `y-or-n-p' of you want to confirm with a single key press
1114 Just change it to `y-or-n-p' of you want to confirm with a single key press
1203 Searching all folders is very efficient with one of the search engines
1223 the value of `remember-data-file'.
1240 "Templates for the creation of remember buffers.
1242 When not nil, this is a list of 4-element lists. In each entry, the first
1251 The template specifies the structure of the remember buffer. It should have
1271 will record the author and the subject of the message, which you can access
1272 with %:author and %:subject, respectively. Here is a complete list of what
1302 "Non-nil means, store new notes at the beginning of a file or entry.
1303 When nil, new notes will be filed to the end of a file or entry."
1322 "List of TODO entry keywords.
1351 "Hook which is run after the state of a TODO item was changed.
1359 When the state of an entry is changed from nothing to TODO, remove a previous
1362 This can also be a list of symbols indicating under which conditions
1364 Valid members of this list are
1368 of an item. This is only relevant if TODO keywords are
1371 clock-out Offer to record a note when clocking out of an item.
1378 Logging can also be configured on a per-file basis by adding one of
1420 to repeat themselves shifted by a certain amount of time, each time an
1432 "The default priority of TODO items.
1438 "The lowest priority of TODO items. A character like ?A, ?B etc."
1449 When nil, these labeled time stamps are forces into the second line of an
1460 "Number of minutes to round time stamps to upon insertion.
1462 should be factors of 60, so for example 5, 10, 15.
1495 "No. of days before expiration during which a deadline becomes active.
1521 "List of tags allowed in Org-mode files.
1524 The value of this variable is an alist, the car may be (and should) be a
1571 "Non-nil means, realign tags after pro/demotion of TODO state change.
1572 These operations change the length of a headline and therefore shift
1587 "Non-nil means list also sublevels of headlines matching tag search.
1588 Because of tag inheritance (see variable `org-use-tag-inheritance'),
1589 the sublevels of a headline matching a tag search often also match
1590 the same search. Listing all of them can create very long lists.
1591 Setting this variable to nil causes subtrees of a match to be skipped.
1596 value of this variable is ignored and sublevels are always checked, to
1602 "History of minibuffer reads for tags.")
1630 If the value of the variable is not a list but a single file name, then
1631 the list of agenda files is actually stored and maintained in that file, one
1635 (repeat :tag "List of files" file)
1670 type The command type, any of the following symbols:
1674 todo-tree Sparse tree of specific TODO keyword in *current* file.
1681 options A list of option setttings, similar to that in a let form, so like
1684 You can also define a set of commands, to create a composite agenda buffer.
1702 Each command can carry a list of options, and another set of options can be
1703 given for the whole set of commands. Individual command options take
1712 (const :tag "Tags search of TODO entries (all agenda files)" tags-todo)
1764 This is a list of three items:
1767 2. A list of TODO keywords itentifying non-stuck projects.
1768 If the project subtree contains any headline with one of these todo
1770 3. A list of tags identifying non-stuck projects.
1771 If the project subtree contains any headline with one of these tags,
1779 (repeat :tag "Projects are *not* stuck if they have an entry with TODO keyword any of" (string))
1780 (repeat :tag "Projects are *not* stuck if they have an entry with TAG being any of" (string))))
1784 "Options concerning skipping parts of agenda files."
1789 "Non-nil means, check also the sublevels of a TODO entry for TODO entries.
1790 When nil, the sublevels of a TODO entry are not checked, resulting in
1799 of this item."
1822 When an integer, show also empty dates, but if there is a gap of more than
1823 N days, just insert a special line indicating the size of the gap."
1849 "The initial value of follwo-mode in a newly created agenda window."
1880 `org-agenda-window-setup' is `other-frame', the value of this
1908 "Number of days to include in overview display.
1931 FIXME: Not used currently, because of timezone problem."
1942 The TODO entries will be listed at the top of the agenda, before
1954 A time grid is a set of lines for specific times (like every two hours between
1968 This is a list of three items. The first item is again a list. It contains
1973 today show grid on current date, independent of daily/weekly display
1978 The third item is a list of integers, indicating the times that should have
2010 "Sorting structure for the agenda items of a single day.
2011 This is a list of symbols which will be used in sequence to determine
2015 time-up Put entries with time-of-day indications first, early first
2016 time-down Put entries with time-of-day indications first, late first
2017 category-keep Keep the default order of categories, corresponding to the
2029 means: Pull out all entries having a specified time of day and sort them,
2069 "Format specifications for the prefix of items in the agenda views.
2075 %c the category of the item, \"Diary\" for entries from the diary, or
2077 %T the *last* tag of the item. Last because inherited tags come
2079 %t the time-of-day specification if one applies to the entry, in the
2083 All specifiers work basically like the standard `%s' of printf, but may
2091 \"%?-12t\" will result in a 12 character time field if a time of the
2101 The default value of this option is \" %-12:c%?-12t% s\", meaning:
2104 the right (because of `-'). Append a colon if there is a category
2105 (because of `:').
2106 - If there is a time-of-day, put it into a 12 chars wide field. If no
2107 time, don't put in an empty field, just skip it (because of '?').
2110 As another example, if you don't want the time-of-day of entries in
2127 "The compiled version of the most recently used prefix format.
2133 time-of-day specification in a headline or diary entry is extracted and
2139 that the time should only be removed what it is located at the beginning of
2145 (const :tag "When at beginning of entry" beg)))
2174 :scale a scaling factor for the size of the images
2176 find LaTeX fragments. Valid members of this list are:
2213 '(("en" "Author" "Date" "Table of Contents")
2232 (string :tag "Table of Contents"))))
2235 "The default language of HTML export, as a string.
2258 "Non-nil means, create a table of contents in exported files.
2262 to be larger than the number of headline levels.
2263 When nil, no table of contents is made.
2275 (const :tag "No Table of Contents" nil)
2276 (const :tag "Full Table of Contents" t)
2287 export, line breaks will always be preserved, regardless of this variable.
2312 "If nil, remove timestamps from the table of contents entries."
2318 If this is the symbol `not-in-toc', tags will be removed from table of
2319 contents entries, but still be shown in the headlines of the document."
2368 for math can be used as macro names as well. For a list of supported
2391 This can be used to have pre-formatted text, fragments of code etc. For
2404 "Number of stacked braces for sub/superscript matching.
2430 In HTML export, this means use <th> instead of <td>.
2442 the values of constants may be useful to have."
2458 "Options specific for ASCII export of Org-mode files."
2479 "Options specific for XML export of Org-mode files."
2484 "Options specific for HTML export of Org-mode files."
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,
2596 "<br/><br/><hr><p><!-- hhmts start --> <!-- hhmts end --></p>\n"
2602 "Options specific for iCalendar export of Org-mode files."
2634 Changing it requires restart of `font-lock-mode' to become effective
2645 Changing it requires restart of `font-lock-mode' to become effective
2647 You may also set this on a per-file basis by adding one of the following
2656 "Non-nil means, change the face of a headline if it is marked DONE.
2657 Normally, only the TODO/DONE keyword indicates the state of a headline.
2665 Changing this variable requires a restart of Emacs to take effect."
2720 pre Chars allowed as prematch. Beginning of line will be allowed too.
2721 post Chars allowed as postmatch. End of line will be allowed too.
2726 newline The maximum number of newlines allowed in an emphasis exp.
2739 (integer :tag "number of newlines allowed")
2764 (string :tag "HTML end tag"))))
2777 to the top of the list. The `min-colors' attribute will be removed from
2798 The forground color of this face should be equal to the background
2799 color of the frame."
3028 "Matches any of the TODO state keywords.")
3031 "Matches any of the TODO state keywords except the last one.")
3050 "Maximum priority of TODO items.")
3053 "Maximum length of the Deadline and SCHEDULED keywords.")
3062 "Matches the DEADLINE keyword and the rest of the line.")
3075 "Matches any of the 4 keywords, together with the time stamp.")
3078 "Matches any of the 3 keywords, together with the time stamp.")
3114 "Return the last element of LIST."
3144 Each element is a list of three items: The startup options as written
3288 This is for getting out of special buffers like remember.")
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)))
3378 (set-extent-property ovl 'end-glyph gl))
3397 (defun org-overlays-in (&optional start end)
3399 (extent-list nil start end)
3400 (overlays-in start end)))
3403 (defun org-overlay-end (o)
3404 (if (featurep 'xemacs) (extent-end-position o) (overlay-end o)))
3439 See documentation for `buffer-invisibility-spec' for the kind of elements
3459 "Is ARG a member of `buffer-invisibility-spec'?"
3467 (error "Conflict with outdated version of allout.el. Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22."))
3485 \"Carsten's outline-mode for keeping track of everything.\"
3489 implemented on top of outline-mode, which is ideal to keep the content
3490 of large files well structured. It supports ToDo items, deadlines and
3491 time stamps, which magically appear in the diary listing of the Emacs
3495 For printing and sharing of notes, an Org-mode file (or a part of it)
3502 ;; Get rid of Outline menus, they are not needed
3557 ;; Emacs 21 and XEmacs make use of the hook
3558 (org-add-hook 'isearch-mode-end-hook 'org-isearch-end 'append 'local)
3601 "Add text properties to entire string, from beginning to end.
3602 PLIST may be a list of properties, PROPS are individual properties and values
3687 "This holds the lengths of the two different time formats.")
3717 (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
3721 (add-text-properties (match-beginning 2) (match-end 2)
3730 (add-text-properties (match-beginning 0) (match-end 0)
3741 (add-text-properties (match-beginning 0) (match-end 0)
3767 ;; a lot of overhead for font-lock.
3776 ;; may have made some of this invisible.
3777 (remove-text-properties (match-beginning 0) (match-end 0)
3779 (if (match-end 3)
3782 (add-text-properties (match-beginning 3) (match-end 3) vp)
3783 (add-text-properties (match-end 3) (match-end 0) ip))
3785 (add-text-properties (match-beginning 1) (match-end 1) vp)
3786 (add-text-properties (match-end 1) (match-end 0) ip))
3793 (add-text-properties (match-beginning 0) (match-end 0)
3798 (if (match-end 3)
3799 (org-display-custom-time (match-beginning 3) (match-end 3)))
3800 (org-display-custom-time (match-beginning 1) (match-end 1)))
3816 (add-text-properties (match-beginning 0) (match-end 0)
3849 "Return a list of all targets in this file.
3878 (add-text-properties (match-beginning 1) (match-end 1)
3887 (- (match-end 0) (match-beginning 0))))
3894 (- (match-end 0) (match-beginning 0)))))
3968 "Get the right face for match N in font-lock matching of healdines."
3969 (setq org-l (- (match-end 2) (match-beginning 1)))
3978 (defun org-unfontify-region (beg end &optional maybe_loudly)
3980 (font-lock-default-unfontify-region beg end)
3985 (remove-text-properties beg end
3996 (defvar org-cycle-subtree-status nil)
3997 (make-variable-buffer-local 'org-cycle-subtree-status)
4006 2. CONTENTS: Show all headlines of all levels, but no body text.
4009 - When point is at the beginning of a headline, rotate the subtree started
4013 From this state, you can move to one of the children
4015 3. SUBTREE: Show the entire subtree, including body text.
4018 a `show-subtree' and return to the previous cursor position. If ARG
4021 - When point is not at the beginning of a headline, execute
4025 - Special case: if point is the the beginning of the buffer and there is
4060 ;; We just created the overview - now do table of contents
4070 ;; We just showed the table of contents - now show everything
4084 ;; Show-subtree, ARG levels up from here.
4089 (org-show-subtree)))
4091 ((save-excursion (beginning-of-line 1) (looking-at outline-regexp))
4099 (beginning-of-line 2)
4102 (beginning-of-line 2)) (setq eol (point)))
4103 (outline-end-of-heading) (setq eoh (point))
4104 (org-end-of-subtree t)
4106 (beginning-of-line 1) ; in case this is an item
4113 (setq org-cycle-subtree-status nil))
4115 ;; Entire subtree is hidden in one line: open it
4119 (setq org-cycle-subtree-status 'children)
4122 (eq org-cycle-subtree-status 'children))
4124 (org-show-subtree)
4126 (setq org-cycle-subtree-status 'subtree)
4127 (run-hook-with-args 'org-cycle-hook 'subtree))
4129 ;; Default action: hide the subtree.
4130 (hide-subtree)
4132 (setq org-cycle-subtree-status 'folded)
4141 (save-excursion (beginning-of-line 1) (looking-at "[ \t]*"))
4143 (= (match-end 0) (point-at-eol)))
4145 (>= (match-end 0) pos))))
4152 (beginning-of-line 1)
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.
4210 This function is the default value of the hook `org-cycle-hook'."
4217 ((eq state 'children) (or (org-subtree-end-visible-p) (recenter 1)))
4218 ((eq state 'subtree) (or (org-subtree-end-visible-p) (recenter 1))))))
4220 (defun org-subtree-end-visible-p ()
4221 "Is the end of the current subtree visible?"
4223 (save-excursion (org-end-of-subtree t) (point))))
4227 Optional argument N means, put the headline into the Nth line of the window."
4230 (beginning-of-line)
4268 "Go to a different location of the document, keeping current visibility.
4275 This command works around this by showing a copy of the current buffer in
4322 (org-beginning-of-line)
4348 (beginning-of-line 1)
4350 current-prefix-arg (- (match-end 0) (match-beginning 0)))
4359 (outline-end-of-subtree)
4362 current-prefix-arg (- (match-end 0) (match-beginning 0)))
4372 ;;; Indirect buffer display of subtrees
4379 "Create indirect buffer and narrow it to current subtree.
4392 beg end level heading ibuf)
4402 (org-end-of-subtree t) (setq end (point)))
4431 (narrow-to-region beg end)
4447 "Set the title of the current frame to the string TITLE."
4459 If point is at the beginning of a headline, insert a sibling before the
4460 current headline. If point is in the middle of a headline, split the headline
4461 at that position and make the rest of the headline part of the sibling below
4485 (end-of-line 1)
4509 (defun org-promote-subtree ()
4510 "Promote the entire subtree.
4517 (defun org-demote-subtree ()
4518 "Demote the entire subtree. See `org-demote'.
4533 (org-map-region 'org-promote (region-beginning) (region-end))
4544 (org-map-region 'org-demote (region-beginning) (region-end))
4552 (beginning-of-line 1)
4554 (or (equal pos (match-end 1)) (equal pos (match-end 2))))
4560 "Rectify a level change under the influence of `org-odd-levels-only'
4609 (defun org-map-region (fun beg end)
4613 (setq end (copy-marker end))
4616 (< (point) end))
4620 (< (point) end))
4627 would end up with no indentation after the change, nothing at all is done."
4629 (let ((end (save-excursion (outline-next-heading)
4635 (unless (save-excursion (re-search-forward prohibit end t))
4636 (while (re-search-forward "^[ \t]+" end t)
4637 (goto-char (match-end 0))
4641 (move-marker end nil))))
4656 (end-of-line 1))))))
4662 section with an even level, conversion would destroy the structure of the file. An error
4678 (end-of-line 1))))))
4684 ;;; Vertical tree motion, cutting and pasting of subtrees
4686 (defun org-move-subtree-up (&optional arg)
4687 "Move the current subtree up past ARG headlines of the same level."
4689 (org-move-subtree-down (- (prefix-numeric-value arg))))
4691 (defun org-move-subtree-down (&optional arg)
4692 "Move the current subtree down past ARG headlines of the same level."
4699 beg end txt folded)
4704 (save-excursion (outline-end-of-heading)
4706 (outline-end-of-subtree))
4708 (setq end (point))
4717 ;; Moving forward - still need to move over subtree
4718 (progn (outline-end-of-subtree)
4724 (setq txt (buffer-substring beg end))
4725 (delete-region beg end)
4728 (if folded (hide-subtree))
4731 (defvar org-subtree-clip ""
4732 "Clipboard for cut and paste of subtrees.
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'.")
4736 (defvar org-subtree-clip-folded nil
4737 "Was the last copied subtree folded?
4740 (defun org-cut-subtree ()
4741 "Cut the current subtree into the clipboard.
4742 This is a short-hand for marking the subtree and then cutting it."
4744 (org-copy-subtree 'cut))
4746 (defun org-copy-subtree (&optional cut)
4747 "Cut the current subtree into the clipboard.
4748 This is a short-hand for marking the subtree and then copying it.
4749 If CUT is non-nil, actually cut the subtree."
4751 (let (beg end folded)
4755 (save-excursion (outline-end-of-heading)
4757 (outline-end-of-subtree))
4759 (setq end (point))
4761 (when (> end beg)
4762 (setq org-subtree-clip-folded folded)
4763 (if cut (kill-region beg end) (copy-region-as-kill beg end))
4764 (setq org-subtree-clip (current-kill 0))
4767 (length org-subtree-clip)))))
4769 (defun org-paste-subtree (&optional level tree)
4770 "Paste the clipboard as a subtree, with modification of headline level.
4771 The entire subtree is promoted or demoted in order to match a new headline
4774 level of the two. So if the previous visible heading is level 3 and the
4776 This makes sure that the subtree remains an independent subtree and does
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")))
4797 (- (match-end 0) (match-beginning 0))
4802 (- (match-end 0) (match-beginning 0)))
4809 (- (match-end 0) (match-beginning 0))
4817 (- (match-end 0) (match-beginning 0))
4830 beg end)
4834 ;; Make sure we start at the beginning of an empty line
4843 (setq end (point))
4851 (narrow-to-region beg end)
4859 (eq org-subtree-clip (current-kill 0))
4860 org-subtree-clip-folded)
4862 (hide-subtree))))
4864 (defun org-kill-is-subtree-p (&optional txt)
4865 "Check if the current kill is an outline subtree, or a set of trees.
4868 So this will actually accept several entries of equal levels as well,
4869 which is OK for `org-paste-subtree'.
4870 If optional TXT is given, check this string instead of the current kill."
4874 (- (match-end 0) (match-beginning 0))))
4881 (if (< (- (match-end 0) (match-beginning 0)) start-level)
4885 (defun org-narrow-to-subtree ()
4886 "Narrow buffer to the current subtree."
4891 (progn (org-end-of-subtree t) (point)))))
4904 "Sort entries on a certain level of an outline tree.
4907 Else, the children of the entry at point are sorted.
4912 argument, which needs to a character, any of (?n ?N ?a ?A ?t ?T).
4919 start beg end entries stars re re2 p nentries (nremoved 0)
4921 ;; Find beginning and end of region to sort
4925 (setq end (region-end)
4932 ;; we will sort the children of the current headline
4934 (setq start (point) end (org-end-of-subtree) what "children")
4936 (show-subtree)
4942 (setq start (point) end (point-max) what "top-level")
4946 (if (>= (point) end) (error "Nothing to sort"))
4951 txt (buffer-substring beg end))
4956 ;; The car is the string for comparison, the cdr is the subtree
4972 (kill-region beg end)
4985 "Sort TABLE of WHAT according to SORTING-TYPE.
4989 the car of the elements of the table.
5037 (t (error "Invalid value of `org-plain-list-ordered-item-terminator'")))))))
5046 (org-beginning-of-item)
5057 (org-beginning-of-item)
5063 (eow (save-excursion (beginning-of-line 1) (looking-at "[ \t]*")
5064 (match-end 0)))
5070 (beginning-of-line 1)
5073 (beginning-of-line 1))
5078 (end-of-line 1)
5090 (goto-char (match-end 0))
5098 (let (beg end status (firstnew 'unknown))
5101 (setq beg (region-beginning) end (region-end)))
5103 (setq beg (point) end (save-excursion (outline-next-heading) (point))))
5111 (while (< (point) end)
5118 (beginning-of-line 2)))))
5135 (end (move-marker (make-marker)
5143 (setq beg (point) end (point-max)))
5145 (while (re-search-forward re end t)
5148 e1 (match-end 0)
5152 ((org-at-item-p) (org-end-of-item) (point))
5174 (if (match-end 1)
5176 (if (and (> (match-end 2) (match-beginning 2))
5182 "Get the indentation of the current line, interpreting tabs.
5186 (match-end 0))
5188 (beginning-of-line 1)
5217 (defun org-beginning-of-item ()
5218 "Go to the beginning of the current hand-formatted item.
5223 (beginning-of-line 2) (point)))
5226 (beginning-of-line 1)
5227 (beginning-of-line 1)
5232 (beginning-of-line 0)
5243 (defun org-end-of-item ()
5244 "Go to the end of the current hand-formatted item.
5250 (org-beginning-of-item)
5256 (beginning-of-line 2)
5262 (beginning-of-line 1)
5267 "Move to the beginning of the next item in the current plain list.
5271 (org-beginning-of-item)
5273 (org-end-of-item)
5280 "Move to the beginning of the previous item in the current plain list.
5284 (org-beginning-of-item)
5290 (beginning-of-line 0)
5296 (org-beginning-of-item)
5302 Subitems (items with larger indentation) are considered part of the item,
5305 (let (beg end ind ind1 (pos (point)) txt)
5306 (org-beginning-of-item)
5309 (org-end-of-item)
5310 (setq end (point))
5314 (org-end-of-item)
5315 (setq txt (buffer-substring beg end))
5317 (delete-region beg end))
5327 Subitems (items with larger indentation) are considered part of the item,
5330 (let (beg end ind ind1 (pos (point)) txt)
5331 (org-beginning-of-item)
5334 (org-end-of-item)
5335 (setq end (point))
5339 (beginning-of-line 0)
5345 (org-beginning-of-item)
5351 (setq txt (buffer-substring beg end))
5353 (delete-region beg end))
5371 "What indentation has S due to SPACE and TAB at the beginning of the string?"
5383 Cursor needs to be in the first line of an item, the line that starts
5399 (beginning-of-line 0)
5410 (beginning-of-line 2)
5419 (delete-region (match-beginning 3) (1- (match-end 3)))
5426 (defvar org-last-indent-end-marker (make-marker))
5439 (let (beg end ind ind1)
5442 end org-last-indent-end-marker)
5443 (org-beginning-of-item)
5445 (org-end-of-item)
5446 (setq end (move-marker org-last-indent-end-marker (point))))
5450 (while (< (point) end)
5451 (beginning-of-line 1)
5455 (beginning-of-line 2)))))
5459 (defalias 'org-advertized-archive-subtree 'org-archive-subtree)
5461 (defun org-archive-subtree (&optional find-done)
5462 "Move the current subtree to the archive.
5464 a different file. The tree will be moved to that location, the subtree
5470 1 trees. If the cursor is on a headline, only try the direct children of
5508 (setq level (match-end 0))
5513 ;; which would lead to duplication of subtrees
5514 (let (this-command) (org-copy-subtree))
5525 ;; Force the TODO keywords of the original buffer
5543 (goto-char (match-end 0))
5544 ;; Heading not found, just insert it at the end
5548 (end-of-line 0))
5549 ;; Make the subtree visible
5550 (show-subtree)
5551 (org-end-of-subtree t)
5555 ;; No specific heading, just go to end of file.
5558 (org-paste-subtree (org-get-legal-level level 1))
5565 (beginning-of-line 1)
5567 (goto-char (or (match-end 2) (match-beginning 3)))
5573 (let (this-command) (org-cut-subtree))
5581 "Archive sublevels of the current tree without open TODO items.
5590 "Move subtree to archive (no open TODO items)? "))
5591 beg end (cntarch 0))
5596 (1+ (- (match-end 0) (match-beginning 0)))
5600 (move-marker endm (org-end-of-subtree t)))
5608 end (save-excursion (org-end-of-subtree t) (point)))
5610 (if (re-search-forward re end t)
5611 (goto-char end)
5618 (org-archive-subtree))
5620 (goto-char end)))))
5630 (end (if globalp (point-max) (org-end-of-subtree t))))
5631 (org-hide-archived-subtrees beg end)
5638 "Cycle subtree even if it is archived."
5644 (defun org-hide-archived-subtrees (beg end)
5649 (while (re-search-forward re end t)
5650 (and (org-on-heading-p) (hide-subtree))
5651 (org-end-of-subtree t)))))
5659 (beginning-of-line)
5677 (end-of-line 1)
5685 With prefix ARG, check all children of current headline and offer tagging
5694 (when set (hide-subtree)))
5695 (and set (beginning-of-line 1))
5703 ;; Watch out: Here we are talking about two different kind of tables.
5704 ;; Most of the code is for the tables created with the Org-mode table editor.
5709 (defun org-before-change-function (beg end)
5746 "Alist with locations of named fields.")
5749 "Table row types, non-nil only for the duration of a comand.")
5751 "Table begin line, non-nil only for the duration of a comand.")
5753 "Vector of data line line numbers in the current table.")
5755 "Vector of hline line numbers in the current table.")
5790 (org-table-convert-region (region-beginning) (region-end) arg)
5812 (beginning-of-line 1)
5820 (end-of-line 1)
5828 slightly, to make sure a beginning of line in the first line is included.
5829 When NSPACE is non-nil, it indicates the minimum number of spaces that
5833 (end (max beg0 end0))
5837 (beginning-of-line 1)
5839 (goto-char end)
5840 (if (bolp) (backward-char 1) (end-of-line 1))
5841 (setq end (move-marker (make-marker) (point)))
5847 (and (re-search-forward "^[^\n\t]+$" end t) (setq tabsep nil)))
5854 (while (re-search-forward re end t)
5877 (end (org-table-end))
5878 (table (buffer-substring beg end))
5892 (end-of-line 1))
5909 "Marker at the beginning of the table last aligned.
5911 (defvar org-table-aligned-end-marker (make-marker)
5912 "Marker at the end of the table last aligned.
5915 "List of flags for flushright alignment, from the last re-alignment.
5918 "List of max width of fields in each column.
5921 "Overlay coordinates after each align of a table.")
5932 ;; Limits of table
5934 (end (org-table-end))
5952 (untabify beg end)
5953 (remove-text-properties beg end '(org-cwidth t org-dwidth t display t))
5956 (setq links (re-search-forward org-bracket-link-regexp end t))
5959 (re-search-forward org-ts-regexp-both end t)))
5961 (when links (goto-char beg) (while (org-activate-bracket-links end)))
5963 (when dates (goto-char beg) (while (org-activate-dates end)))
5968 (re-search-forward "<[0-9]+>" end t)))
5971 (buffer-substring beg end) "\n"))
5972 ;; Store the indentation of the first line
5974 (setq indent (make-string (- (match-end 0) (match-beginning 0)) ?\ )))
5993 (kill-region beg end)
5996 ;; A list of empty strings to fill any short rows on output
6027 ;; Get the fraction of numbers, to decide about alignment of the column
6038 ;; Store the alignment of this table, for later editing of single fields
6054 ;; Compute the formats needed for output of the table
6070 (delete-region beg end)
6071 (move-marker end nil)
6074 (move-marker org-table-aligned-end-marker (point))
6077 (while (org-hide-wide-columns org-table-aligned-end-marker)))
6089 "Compute width of string, ignoring invisible characters.
6111 "Find the beginning of the table and return its position.
6112 With argument TABLE-TYPE, go to the beginning of a table.el-type table."
6120 (beginning-of-line 2)
6123 (defun org-table-end (&optional table-type)
6124 "Find the end of the table and return its position.
6125 With argument TABLE-TYPE, go to the end of a table.el-type table."
6145 (>= (point) org-table-aligned-end-marker)))
6159 l (max 1 (- (match-end 0) (match-beginning 0) 3))
6160 e (not (= (match-beginning 2) (match-end 2))))
6183 (let ((end (org-table-end)))
6185 (end-of-line 1))
6188 (re-search-forward "|" end)
6190 (re-search-forward "|" end))
6193 (re-search-forward "^[ \t]*|\\([^-]\\)" end t))
6197 (beginning-of-line 0)
6213 (end-of-line 1))
6219 (goto-char (match-end 0))))
6234 (beginning-of-line 2)
6238 (beginning-of-line 0)
6246 If the field at the cursor is empty, copy into it the content of the nearest
6268 (while (progn (beginning-of-line 1)
6305 (org-table-cut-region (region-beginning) (region-end)))
6317 "Return the value of the field in column N of current row.
6326 (val (buffer-substring (1+ pos) (match-end 0))))
6371 (beginning-of-line 1)
6387 (beginning-of-line 2))
6394 of the field.
6399 (beginning-of-line 1)
6404 (progn (end-of-line 1)
6409 (save-excursion (end-of-line 1) (insert " | ")))
6419 (beginning-of-line 1)
6436 (beginning-of-line 1)
6441 (beginning-of-line 2)
6443 (beginning-of-line -1)))))
6444 (if (re-search-forward "|" (org-table-end t) t)
6461 (beginning-of-line 1)
6473 (end (org-table-end))
6478 (while (< (point) end)
6483 (beginning-of-line 2))
6484 (move-marker end nil)
6496 (end (org-table-end)))
6498 (while (and (< (point) end)
6501 (beginning-of-line 2)
6518 (end (org-table-end))
6523 (while (< (point) end)
6529 (beginning-of-line 2))
6530 (move-marker end nil)
6556 (end (org-table-end))
6565 (while (< (point) end)
6571 (beginning-of-line 2))
6572 (move-marker end nil)
6594 (hline1p (save-excursion (beginning-of-line 1)
6600 (beginning-of-line tonew)
6606 (beginning-of-line 1)
6610 (beginning-of-line tonew)
6612 (beginning-of-line 0)
6630 (beginning-of-line (if arg 2 1))
6632 (beginning-of-line 0)
6649 (concat "+" (make-string (- (match-end 1) (match-beginning 1))
6652 (beginning-of-line (if arg 1 2))
6654 (beginning-of-line (if arg 1 -1))
6679 (if (not (org-at-table-p)) (beginning-of-line 0))
6688 The position of point indicates the column to be used for
6689 sorting, and the range of lines is the range between the nearest
6690 horizontal separator lines, or the entire table of no such lines
6704 any of (?a ?A ?n ?N ?t ?T) where the capital letter indicate that sorting
6709 beg end bcol ecol tend tbeg column lns pos)
6720 (setq beg (region-beginning) end (region-end))
6724 (goto-char end)
6725 (setq end (point-at-bol 2)))
6729 tend (org-table-end))
6738 (setq end (point-at-bol))))
6740 end (move-marker (make-marker) end))
6741 (untabify beg end)
6751 (org-split-string (buffer-substring beg end) "\n")))
6753 (delete-region beg end)
6755 (move-marker end nil)
6761 (defun org-table-cut-region (beg end)
6764 (org-table-copy-region beg end 'cut))
6766 (defun org-table-copy-region (beg end &optional cut)
6778 (goto-char end)
6817 (while (org-at-table-hline-p) (beginning-of-line 2))
6819 (progn (end-of-line 0) (org-table-next-field)))
6825 (beginning-of-line 2))
6834 table.el uses these as cell boundaries and has no notion of horizontal lines.
6844 (end (move-marker (make-marker) (org-table-end t))))
6845 (table-unrecognize-region beg end)
6847 (while (re-search-forward "^\\([ \t]*\\)\\+-.*\n" end t)
6853 (end (move-marker (make-marker) (org-table-end))))
6854 ;; first, get rid of all horizontal lines
6856 (while (re-search-forward "^\\([ \t]*\\)|-.*\n" end t)
6861 (beginning-of-line -1)
6863 (while (progn (beginning-of-line 3) (< (point) end))
6866 (setq end (move-marker end (org-table-end)))
6867 ;; replace "+" at beginning and ending of hlines
6868 (while (re-search-forward "^\\([ \t]*\\)|-" end t)
6871 (while (re-search-forward "-|[ \t]*$" end t)
6877 This is useful if you'd like to spread the contents of a field over several
6881 the text in the column is wrapped to minimum width for the given number of
6883 used to change the number of desired lines. For example, `C-2 \\[org-table-wrap]'
6886 the current number of lines by that amount. The wrapped text is pasted back
6892 the text fragment to the right of the cursor is prepended to the field one
6905 (org-table-cut-region (region-beginning) (region-end))
6924 (beginning-of-line 0)
6925 (while (org-at-table-hline-p) (beginning-of-line 0))
6999 "Remove whitespace at beginning and end of string."
7005 "Wrap string to either a number of lines, or a width in characters.
7008 wrapped to the length of that word.
7011 The return value is a list of lines, without newlines at the end."
7031 "Create lines of maximum width WIDTH (in characters) from word list WORDS."
7043 and end of string."
7056 (and (eq (match-beginning 0) (match-end 0))
7061 (setq start (match-end 0)))
7069 "Apply FUNCTION to the start of all tables in the buffer."
7076 (beginning-of-line 1)
7084 (defun org-table-sum (&optional beg end nlast)
7085 "Sum numbers in region of current table column.
7103 ((and beg end)) ; beg and end given explicitly
7105 (setq beg (region-beginning) end (region-end)))
7113 (goto-char (org-table-end))
7117 (setq end (point))))
7118 (let* ((items (apply 'append (org-table-copy-region beg end)))
7138 (format "Sum of %d items: %-20s (\\[yank] will insert result into buffer)"
7227 "Store the list of formulas below the current table."
7230 (goto-char (org-table-end))
7235 (delete-region (match-beginning 2) (match-end 0)))
7250 (goto-char (org-table-end))
7255 (setq scol (if (match-end 2)
7267 KEY is \"@\" or \"$\". REPLACE is an alist of numbers to replace.
7270 (goto-char (org-table-end))
7293 (let ((beg (org-table-begin)) (end (org-table-end))
7302 (when (re-search-forward "^[ \t]*| *! *\\(|.*\\)" end t)
7313 (while (re-search-forward "^[ \t]*| *\\$ *\\(|.*\\)" end t)
7320 (while (re-search-forward "^[ \t]*| *\\([_^]\\) *\\(|.*\\)" end t)
7324 (beginning-of-line (if (equal c "_") 2 0))
7339 (push (if (match-end 1) 'hline 'dline) types)
7340 (if (match-end 1) (push l hlines) (push l dlines))
7341 (beginning-of-line 2)
7351 (end (progn (skip-chars-forward "^ \t\n") (point))))
7352 (buffer-substring-no-properties beg end))))
7371 "List of commands triggering the recalculation of a line.
7390 of the new mark."
7395 (end (org-table-end))
7398 (l2 (if (org-region-active-p) (org-current-line (region-end))))
7402 (not (re-search-forward "^[ \t]*|[^-|][^|]*[^#!$*_^| \t][^|]*|" end t))))
7415 (beginning-of-line 1)
7424 (beginning-of-line 1)
7435 (while (progn (beginning-of-line 2) (not (= (org-current-line) l2)))
7449 (save-excursion (beginning-of-line 1)
7474 "Replace the table field value at the cursor by the result of a calculation.
7476 This function makes use of Dave Gillespie's Calc package, in my view the
7481 result of a formula. It also installs the formula as the \"current\" column
7504 SUPPRESS-CONST suppresses the interpretation of constants in the
7531 ;; Parse the format string. Since we have a lot of modes, this is
7532 ;; a lot of work. However, I think calc still uses most of the time.
7622 (princ (format "Substitution history of formula
7654 Optional arguments TBEG and COL can give the beginning of the table and
7663 beg end c1 c2 r1 r2 rangep tmp)
7666 (setq rangep (match-end 3)
7667 r1 (and (match-end 1) (match-string 1 desc))
7668 r2 (and (match-end 4) (match-string 4 desc))
7669 c1 (and (match-end 2) (substring (match-string 2 desc) 1))
7670 c2 (and (match-end 5) (substring (match-string 5 desc) 1)))
7690 (beginning-of-line 2))
7699 (beginning-of-line 2))
7704 (beginning-of-line 0))
7706 (setq end (point))
7710 ;; return string representation of calc vector
7711 (apply 'append (org-table-copy-region beg end))))))
7725 (and (not (match-end 3)) (not (match-end 6)))
7726 (and (match-end 3) (match-end 6) (not (match-end 5))))
7728 (let* ((hdir (and (match-end 2) (match-string 2 desc)))
7729 (hn (if (match-end 3) (- (match-end 3) (match-beginning 3)) nil))
7730 (odir (and (match-end 5) (match-string 5 desc)))
7731 (on (if (match-end 6) (string-to-number (match-string 6 desc))))
7733 (rel (and (match-end 6)
7734 (or (and (match-end 1) (not (match-end 3)))
7735 (match-end 5)))))
7809 beg end entry eqlnum eqlname eql (cnt 0) eq a name)
7824 (setq end (move-marker (make-marker) (1+ (org-table-end))))
7826 (if (re-search-forward org-table-calculate-mark-regexp end t)
7830 (if (and (re-search-forward org-table-dataline-regexp end t)
7831 (re-search-forward org-table-hline-regexp end t)
7832 (re-search-forward org-table-dataline-regexp end t))
7836 end (move-marker (make-marker) (1+ (point-at-eol)))))
7839 (while (re-search-forward line-re end t)
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."
7997 (setq var (if (match-end 2) (match-string 2) (match-string 1))
8029 (let ((pos (point)) beg end ind)
8030 (beginning-of-line 1)
8039 (goto-char (- (match-end 0) 2))
8045 (setq end (point))
8047 (narrow-to-region beg end)
8058 (beginning-of-line 1)
8068 "Show the location/value of the $ expression at point."
8087 (org-table-add-rectangle-overlay (match-beginning 0) (match-end 0)
8097 (beginning-of-line 1)
8101 (match-beginning 1) (match-end 1) face2))))
8136 (message "Named field, column %d of line %d" (nth 2 e) (nth 1 e)))
8142 (org-table-end) t)
8185 (beginning-of-line 1)
8218 Use COMMAND to do the motion, repeat if necessary to end up in a data line."
8242 (defun org-table-add-rectangle-overlay (beg end &optional face)
8244 (let ((ov (org-make-overlay beg end)))
8248 (defun org-table-highlight-rectangle (&optional beg end face)
8250 (setq beg (or beg (point)) end (or end (point)))
8251 (let ((b (min beg end))
8252 (e (max beg end))
8256 (goto-char (min beg end))
8259 (goto-char (max beg end))
8264 (beginning-of-line 1)
8270 (skip-chars-forward "^|\n") (setq end (point))
8271 (org-table-add-rectangle-overlay beg end face))
8272 (beginning-of-line 2))
8311 (beginning-of-line 2)))))
8314 "Toggle the display of Row/Column numbers in tables."
8342 ;; is the case, the table editor command is executed. However, when any of
8346 ;; There might be problems if any of the keys used by the table editor is
8449 to execute outside of tables."
8455 "Outside of tables, run the binding of `"
8610 (beginning-of-line 1)
8611 (setq action (cond ((looking-at "#\\+ORGTBL:.*\n[ \t]*|") (match-end 0))
8625 (beginning-of-line 1)
8665 (goto-char (1- (match-end 0)))
8684 "Send a tranformed version of this table to the receiver position.
8694 (beginning-of-line 0)
8702 (params (if (match-end 3) (read (concat "(" (match-string 3) ")"))))
8706 (org-table-begin) (org-table-end)))
8736 (beginning-of-line 2)
8739 (error "Cannot find end of insertion region"))
8740 (beginning-of-line 1)
8763 (commented (save-excursion (beginning-of-line 1)
8768 beg end)
8770 (beginning-of-line 1)
8771 (while (looking-at re) (beginning-of-line 0))
8772 (beginning-of-line 2)
8774 (while (looking-at re) (beginning-of-line 2))
8775 (setq end (point)))
8776 (comment-region beg end (if commented '(4) nil))))
8807 separator line, or a list of fields for that line.
8808 PARAMS is a property list of parameters that can influence the conversion.
8810 specify either :lfmt, or all of (:lstart :lend :sep). If you do not use
8816 :tend String to end the table. Ignored when :splice is t.
8825 :lend String to end a table line
8838 If any of these is not present, the data line value is used.
8898 separator line, or a list of fields for that line.
8899 PARAMS is a property list of parameters that can influence the conversion.
8923 :tend "\\end{tabular}"
8931 separator line, or a list of fields for that line.
8932 PARAMS is a property list of parameters that can influence the conversion.
8960 separator line, or a list of fields for that line.
8961 PARAMS is a property list of parameters that can influence the conversion.
8975 are computed automatically from the width of the columns
8988 :tend "@end multitable"
9003 (tag (and (match-end 2) (match-string 3 link)))
9213 (buffer-substring (region-beginning) (region-end)))
9230 (buffer-substring (region-beginning) (region-end))
9277 "Return the description part of an email link.
9327 "Make a link with brackets, consisting of LINK and DESCRIPTION."
9343 "Association list of escapes for some characters problematic in links.")
9358 "Reverse the action of `org-link-escape'."
9414 use M-SPC or C-q SPC to force the insertion of a space character.
9417 be displayed in the buffer instead of the link.
9430 With three \\[universal-argument] prefixes, negate the meaning of
9434 (prog1 (buffer-substring (region-beginning) (region-end))
9435 (delete-region (region-beginning) (region-end)))))
9441 (setq remove (list (match-beginning 0) (match-end 0)))
9442 (setq desc (if (match-end 3) (org-match-string-no-properties 3)))
9449 (setq remove (list (match-beginning 0) (match-end 0))
9489 ;; URL-like link, normalize the use of angular brackets.
9523 (match-end 0)))))))
9546 (message "Link search wrapped back to beginning of buffer"))
9566 (message "Link search wrapped back to end of buffer"))
9602 the end of the current subtree.
9781 "List of functions to construct the right search string for a file link.
9790 when following the link. The search string will be part of the
9803 "List of functions to execute a file search triggered by a link.
9806 search string that was part of the file link, the part after the
9866 ;; Make a series of regular expressions to find a match
9907 enclose the position of `org-open-link-marker'."
9911 (goto-char (match-end group))
9914 (< (match-end 0) (marker-position m)))
9917 (not (match-end 4)) ; no description
9919 (>= (match-end 4) (point))))))
9923 "Return a buffer to be used for displaying the link target of internal links."
9940 If CLEANUP is non-nil, remove the printout of the regular expression
9945 (let ((cwin (selected-window)) win beg end)
9950 (setq beg (match-end 0))
9952 (setq end (1- (match-beginning 0)))))
9953 (and beg end (let ((buffer-read-only)) (delete-region beg end)))
10104 (vm-beginning-of-message)
10148 "Return the name of the current message real folder, so if you use
10156 (end-index
10163 (string= mh-index-folder (substring folder 0 end-index)))
10179 "Returns the name of the message folder in a index folder buffer."
10186 "Return the name of the current message folder. Be careful if you
10195 "Return the number of the current message. Be careful if you
10204 "Return a header of the message in folder mode. This will create a
10277 (bibtex-beginning-of-entry)
10296 (recenter 0)) ; Move entry start to beginning of window
10304 ;; end of Bibtex link setup
10417 RET at beg-of-buf -> Append to file as level 2 headline
10494 (setq char (if (match-end 3) (match-string 3))
10495 prompt (if (match-end 2) (match-string 2)))
10518 of the remember buffer."
10537 of `org-default-notes-file' is used.
10538 Then the command offers the headings tree of the selected file in order to
10546 RET buffer-start as level 2 heading at end of file
10547 RET on headline as sublevel of the heading at cursor
10554 the default file. This way your current train of thought is not
10555 interrupted, in accordance with the principles of remember.el. But with
10580 ;; Modify text so that it becomes a nice subtree which can be inserted
10625 ;; Put it at the end, one level below level 1
10630 (org-paste-subtree (org-get-legal-level 1 1) txt)))
10637 (beginning-of-line 1)
10638 (org-paste-subtree 1 txt)))
10640 ;; Put it below this entry, at the beg/end of the subtree
10644 (outline-end-of-heading)
10645 (org-end-of-subtree t))
10647 (beginning-of-line 1)
10648 (org-paste-subtree (org-get-legal-level level 1) txt))
10651 ;; org-paste-subtree or from prefix arg
10652 (org-paste-subtree current-prefix-arg txt)))
10656 t) ;; return t to indicate that we took care of this note.
10695 "Matches the startline of a dynamic block, with parameters.")
10697 (defconst org-dblock-end-re "^#\\+END\\([: \t\r\n]\\|$\\)"
10698 "Matches the end of a dyhamic block.")
10702 PLIST must containe a :name entry which is used as name of the block."
10711 (beginning-of-line -2)))
10719 (let* ((begdel (1+ (match-end 0)))
10723 (unless (re-search-forward org-dblock-end-re nil t)
10741 (error (message "Error during update of dynamic block")))
10743 (unless (re-search-forward org-dblock-end-re nil t)
10754 (org-beginning-of-dblock))
10768 (defun org-beginning-of-dblock ()
10769 "Find the beginning of the dynamic block at point.
10773 (end-of-line 1)
10776 (re-search-forward org-dblock-end-re nil t)
10777 (> (match-end 0) pos))
10793 At the beginning of a headline, this completes TODO keywords as given in
10803 (let* ((end (point))
10855 (pattern (buffer-substring-no-properties beg end))
10866 (delete-region beg end)
10892 "Change the COMMENT state of an entry."
10901 (goto-char (match-end 0))
10910 "Change the TODO state of an item.
10911 The state of an item is given by a keyword at the start of the heading,
10920 DONE are present, add TODO at the beginning of the heading.
10930 really is a member of `org-todo-keywords'."
10934 (if (looking-at outline-regexp) (goto-char (match-end 0)))
11004 (save-excursion (beginning-of-line 1)
11006 (< (point) (+ 2 (or (match-end 2) (match-end 1)))))
11008 (goto-char (or (match-end 2) (match-end 1)))
11012 "Return the REPEAT statement of this entry."
11047 (setq type (if (match-end 1) org-scheduled-string org-deadline-string)
11050 (setq start (match-end 0)
11065 of `org-todo-keywords'."
11094 WHAT indicates what kind of time stamp to add. TIME indicated the time to use.
11096 REMOVE indicates what kind of entries to remove. An old WHAT entry will also
11112 (goto-char (match-end 1))
11114 (goto-char (1+ (match-end 0)))
11119 (narrow-to-region (match-beginning 0) (match-end 0))
11149 (end-of-line 1))
11174 (goto-char (match-end 0)))
11229 (end-of-line 1)
11245 "Make a compact tree which shows all matches of REGEXP.
11250 call to `org-occur' will be kept, to allow stacking of calls to this
11267 (org-highlight-new-match (match-beginning 0) (match-end 0))
11312 This can be used to show a consistent set of context around locations
11316 With optional argument SIBLINGS, on each level of the hierarchy all
11325 (defun org-highlight-new-match (beg end)
11327 (let ((ov (org-make-overlay beg end)))
11331 (defun org-remove-occur-highlights (&optional beg end noremove)
11351 "Increase the priority of the current item."
11356 "Decrease the priority of the current item."
11361 "Change the priority of an item by ARG.
11394 (if (match-end 2)
11396 (goto-char (match-end 2))
11402 (message "Priority of current item set to %s" news))))
11418 evaluated, testing if a given set of tags qualifies a headline for
11444 (setq todo (if (match-end 1) (match-string 2))
11445 tags (if (match-end 4) (match-string 4)))
11486 ;; if we are to skip sublevels, jump to end of subtree
11487 (or org-tags-match-list-sublevels (org-end-of-subtree t))))))
11497 MATCH can contain positive and negative selection of tags, like
11527 todomatch (substring match (match-end 0)))
11543 (setq minus (and (match-end 1)
11547 level-p (match-end 3)
11554 term (substring term (match-end 0)))
11569 (setq minus (and (match-end 1)
11573 term (substring term (match-end 0))
11587 ;; Return the string and lisp forms of the matcher
11594 "Does re match any element of list?"
11616 (end-of-line 1)))
11620 ;; Get a new set of tags from the user
11646 (beginning-of-line 1)
11690 (defun org-fast-tag-insert (kwd tags face &optional end)
11694 (or end "")))
11702 (end-of-line 1)
11716 CURRENT is the current list of tags in the headline, INHERITED is the
11717 list of inherited tags, and TABLE is an alist of tags and corresponding keys,
11733 ov-start ov-end ov-prefix
11737 (beginning-of-line 1)
11740 ov-end (match-end 1)
11743 ov-end (1+ ov-start))
11751 (org-move-overlay org-tags-overlay ov-start ov-end)
11869 (beginning-of-line 2)
11875 (add-text-properties (match-beginning 1) (match-end 1)
11892 (beginning-of-line 1)
11898 "Get a table of all tags used in the buffer, for completion."
11917 Otherwise, only the date will be included. All parts of a date not
11947 An inactive time stamp is enclosed in square brackets instead of angle
11967 Unrecognized parts of the date will default to the current day, month, year,
11983 date with the mouse (button 1). The calendar shows a period of three
12083 (setq year (if (match-end 2)
12141 WITH-HM means, use the stamp format that includes the time of the day.
12142 INACTIVE means use square brackets instead of angular ones, so that the
12156 "Toggle the use of custom time stamp formats."
12169 (remove-text-properties (point-min) (point-max) '(end-glyph t)))
12176 (defun org-display-custom-time (beg end)
12179 (org-parse-time-string (buffer-substring beg end) t)))
12180 (w1 (- end beg))
12194 (put-text-property beg end 'invisible t)
12195 (put-text-property beg end 'end-glyph (make-glyph str)))
12196 (put-text-property beg end 'display str))))
12205 t1 with-hm inactive tf time str beg end)
12208 end (match-end 0)
12210 (org-parse-time-string (substring string beg end) t))
12226 "Set 0 instead of nil for the first 6 elements of time.
12275 "Evaluate a time range by computing the difference between start and end.
12294 (match-end (match-end 0))
12323 (goto-char match-end)
12325 (and (looking-at " *|") (goto-char (match-end 0))))
12406 (>= (match-end n) pos)))
12418 (> (- (match-end 0) pos) -1))))))
12449 (- (match-end 0) (match-beginning 0))))
12510 (beginning-of-line 1)
12533 If necessary, clock-out of the currently active clock."
12539 (beginning-of-line 2)
12543 (beginning-of-line 2)
12563 (beginning-of-line 1)
12598 "Sum the times for each subtree.
12615 (if (match-end 2)
12628 (setq level (- (match-end 1) (match-beginning 1)))
12641 "Show subtree times in the entire buffer.
12668 If LEVEL is given, prefix time with a corresponding number of stars.
12689 (org-overlay-put ov 'end-glyph (make-glyph tx)))
12692 (defun org-remove-clock-overlays (&optional beg end noremove)
12756 (beginning-of-line 1)
12765 (and (match-end 3) (delete-region (match-beginning 3) (match-end 3)))
12766 (end-of-line 1)
12782 Key is a symbol specifying the range and can be one of `today', `yesterday',
12863 (beginning-of-line 1)
12865 (setq level (- (match-end 1) (match-beginning 1)))
12894 rtn beg end next cont level title total closedp leafp
12901 beg (match-string 1) end (match-string 2)
12902 cont (match-end 0))
12904 end (apply 'encode-time (org-parse-time-string end)))
12912 (setq level (- (match-end 1) (match-beginning 1))
12918 (<= (- (match-end 0) (point)) level)))
12919 (push (list beg end clockpos closedp donep
13041 (define-key org-agenda-mode-map "m" 'org-agenda-phases-of-moon)
13042 (define-key org-agenda-mode-map "M" 'org-agenda-phases-of-moon)
13079 ["Archive subtree" org-agenda-archive t]
13080 ["Delete subtree" org-agenda-kill t]
13104 ["Phases of the Moon" org-agenda-phases-of-moon (org-agenda-check-type nil 'agenda 'timeline)]
13137 "List of undoable operations in the agenda since last refresh.")
13141 "In a series of undo commands, this is the list of remaning undo items.")
13217 (defvar org-agenda-restrict-end (make-marker))
13241 next use of \\[org-agenda]) restricted to the current file."
13253 (move-marker org-agenda-restrict-end nil)
13265 t List of all TODO entries T Entries with special TODO kwd
13271 (setq start (match-end 0))
13272 (add-text-properties (match-beginning 2) (match-end 2)
13292 (format "set of %d commands" (length match))))))
13295 (org-add-props "1 Restrict call to current buffer 0 Restrict call to region or subtree" nil 'face 'org-table)))
13316 (move-marker org-agenda-restrict-end (region-end)))
13320 (move-marker org-agenda-restrict-end
13321 (progn (org-end-of-subtree t)))))))
13440 "Get the list of agenda files.
13447 (t (error "Invalid value of `org-agenda-files'"))))
13450 "Edit the list of agenda files.
13484 "Read the list of agenda files from a file."
13511 (defun org-agenda-file-to-end ()
13512 "Move/add the current file to the end of the agenda file list.
13516 (org-agenda-file-to-front 'to-end))
13518 (defun org-agenda-file-to-front (&optional to-end)
13519 "Move/add the current file to the top of the agenda file list.
13522 end of the list."
13532 (if to-end
13537 (message "File %s to %s of agenda file list"
13538 (if had "moved" "added") (if to-end "end" "front"))))
13541 "Remove current file from the list of files in variable `org-agenda-files'.
13543 Optional argument FILE means, use this file instead of the current."
13619 (add-text-properties (match-beginning 0) (match-end 0)
13644 (add-text-properties (point-at-bol) (org-end-of-subtree t) pa))))
13649 (match-beginning 0) (org-end-of-subtree t) pc)))
13663 Also moves point to the end of the skipped region, so that search can
13668 (org-end-of-subtree t)
13671 (org-end-of-subtree t)
13682 "List of all currently active markers created by `org-agenda'.")
13684 "Creation time of the last agenda marker.")
13688 Org-mode keeps a list of these markers and resets them when they are
13709 it to the list of buffers which might be released later."
13733 "Get the table of categories and positions in current buffer."
13762 "Show a time-sorted view of the entries in the current org file.
13763 Only entries with a time stamp of today or later will be listed. With
13778 (end (if (org-region-active-p) (region-end) (point-max)))
13779 (day-numbers (org-get-all-dates beg end 'no-ranges
13791 ;; Remove past dates from the list of dates.
13840 (defun org-get-all-dates (beg end &optional no-ranges force-today inactive empty)
13841 "Return a list of all relevant day numbers from BEG to END buffer positions.
13842 If NO-RANGES is non-nil, include only the start and end dates of a range,
13853 (while (re-search-forward re end t)
13859 (while (re-search-forward org-tr-regexp end t)
13884 "The arguments of the previous call to org-agenda")
13922 (let* ((nt (calendar-day-of-week
13929 s e rtn rtnall file date d start-pos end-pos todayp nd)
13932 ;; Make the list of days
13967 (if (and start-pos (not end-pos))
13968 (setq end-pos (point))))
14067 (insert "Global list of TODO items of type: ")
14132 org-agenda-restrict-end)
14167 (defun org-agenda-skip-subtree-when-regexp-matches ()
14168 "Checks if the current subtree contains match for `org-agenda-skip-regexp'.
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
14171 `org-agenda-skip-function' for the duration of a command."
14173 (let ((end (save-excursion (org-end-of-subtree t)))
14176 (setq skip (re-search-forward org-agenda-skip-regexp end t)))
14177 (and skip end))))
14182 of what a project is and how to check if it stuck, customize the variable
14186 (let* ((org-agenda-skip-function 'org-agenda-skip-subtree-when-regexp-matches)
14187 (org-agenda-overriding-header "List of stuck projects: ")
14249 ;; Extend the text properties to the beginning of the line
14255 This gets rid of the date, the underline under the date, and
14266 (delete-region (point-min) (min (point-max) (1+ (match-end 0)))))
14315 :timestamp List the headlines of items containing a date stamp or
14374 which kind of entries should be extracted. For details about these, see
14375 the documentation of `org-diary'."
14395 org-agenda-restrict-end)
14436 (>= (match-end 0) pos)
14441 (>= (match-end 0) pos)
14462 ee txt beg end)
14467 (beginning-of-line)
14468 (setq beg (point) end (progn (outline-next-heading) (point)))
14470 (re-search-forward org-scheduled-time-regexp end t))
14472 (re-search-forward org-deadline-time-regexp end t)
14475 (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
14496 (goto-char (match-end 1))
14497 (org-end-of-subtree 'invisible))))
14540 ;; substring should only run to end of time stamp
14541 (setq timestr (substring timestr 0 (match-end 0))))
14545 (goto-char (match-end 1))
14603 ;; substring should only run to end of time stamp
14604 (setq timestr (substring timestr 0 (match-end 0))))
14608 (goto-char (match-end 1))
14655 (goto-char (match-end 0))
14656 (setq pos1 (match-end 1))
14711 (goto-char (match-end 0))
14712 (setq pos1 (match-end 1))
14762 (setq hdmarker (org-agenda-new-marker (match-end 1)))
14763 (goto-char (match-end 1))
14783 (defconst org-plain-time-of-day-regexp
14798 (defconst org-stamp-time-of-day-regexp
14826 time-of-day should be extracted from TXT for sorting of this entry, and for
14830 `org-agenda-change-all-lines'. TAGS can be the tags of the headline."
14841 time ; time and tag are needed for the eval of the prefix format
14843 (time-of-day (and dotime (org-get-time-of-day ts)))
14845 (when (and dotime time-of-day org-prefix-has-time)
14847 (when (or (setq stamp (string-match org-stamp-time-of-day-regexp ts))
14848 (setq plain (string-match org-plain-time-of-day-regexp ts)))
14863 (if s1 (setq s1 (org-get-time-of-day s1 'string t)))
14864 (if s2 (setq s2 (org-get-time-of-day s2 'string t))))
14880 ;; Prepare the variables needed in the eval of the compiled format
14893 'time-of-day time-of-day
14907 (lambda (x) (get-text-property 1 'time-of-day x))
14974 (defun org-get-time-of-day (s &optional string mod24)
14975 "Check string S for a time of day.
14988 (m (if (match-end 3) (string-to-number (match-string 3 s)) 0))
14989 (ampm (if (match-end 4) (downcase (match-string 4 s))))
15014 (beginning-of-line 1)
15018 (add-text-properties (match-beginning 0) (match-end 0)
15023 (add-text-properties (or (match-end 1) (match-end 0)) (match-end 0)
15028 "Compare the priorities of string A and B."
15036 "Compare the string values of categories of strings A and B."
15044 "Compare the string values of categories of strings A and B."
15054 "Compare the time-of-day values of strings A and B."
15056 (ta (or (get-text-property 1 'time-of-day a) def))
15057 (tb (or (get-text-property 1 'time-of-day b) def)))
15082 "Check if agenda buffer is of allowed type.
15217 (beginning-of-line 1)
15229 (beginning-of-line 1)
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)
15312 "Show the priority of the current item.
15313 This priority is composed of the main priority given with the [#A] cookies,
15314 and by additional input from the age of a schedules or deadline entry."
15346 "Kill the entry or subtree belonging to the current agenda entry."
15360 dend (org-end-of-subtree t))
15373 (org-remove-subtree-entries-from-agenda buffer dbeg dend)
15378 "Kill the entry or subtree belonging to the current agenda entry."
15390 (org-remove-subtree-entries-from-agenda)
15392 (org-archive-subtree))
15395 (defun org-remove-subtree-entries-from-agenda (&optional buf beg end)
15396 "Remove all lines in the agenda that correspond to a given subtree.
15397 The subtree is the one in buffer BUF, starting at BEG and ending at END.
15401 (unless (and beg end)
15404 (org-end-of-subtree t)
15405 (setq end (point)))
15409 (beginning-of-line 1)
15415 (<= p end))
15418 (beginning-of-line 0))))))
15484 "Show the subtree corresponding to the current entry in an indirect buffer.
15506 "Cycle TODO state of line at point, also in Org-mode file.
15508 the same tree node, and the headline of the tree node in the Org-mode file."
15533 (beginning-of-line 1)
15540 The new content of the line will be NEWHEAD (as modified by
15543 If FIXFACE is non-nil, the face of each item is modified acording to
15549 (beginning-of-line 1)
15565 (beginning-of-line 1)
15569 (beginning-of-line 1)
15578 (beginning-of-line 1))
15580 (beginning-of-line 0)))
15592 (delete-region (match-beginning 1) (match-end 1))
15600 "Increase the priority of line at point, also in Org-mode file."
15605 "Decrease the priority of line at point, also in Org-mode file."
15610 "Set the priority of line at point, also in Org-mode file.
15612 the same tree node, and the headline of the tree node in the Org-mode file."
15631 (end-of-line 1)
15634 (beginning-of-line 1))))
15637 "Get a list of all headline tags applicable at POS.
15640 the tags of the current headline come last."
15660 ;; FIXME: should fix the tags property of the agenda line.
15681 (end-of-line 1)
15684 (beginning-of-line 1))))
15706 (end-of-line 1)
15709 (beginning-of-line 1))))
15712 "Change the date of this item to one day later."
15731 "Change the date of this item to one day earlier."
15751 ex (list 'invisible t 'end-glyph gl 'duplicable t))
15757 (beginning-of-line 1))
15758 (beginning-of-line 0)))))
15761 "Change the date of this item. Date is prompted for, with default today.
15817 "Return the heading of the current entry, without the stars."
15879 ;; and the `calendar-mark-ring' variable. Saves a lot of code.
15918 (defun org-agenda-phases-of-moon ()
15919 "Display the phases of the moon for the 3 months around the cursor date."
15921 (org-agenda-execute-calendar-command 'calendar-phases-of-moon))
15972 "Day of Yr: " (calendar-day-of-year-string date) "\n"
16045 and the position of this delimiter.
16066 ((= (match-end 0) (length str))
16068 ((= (match-end 0) (- (length str) 5))
16070 (t (setq start (match-end 0))))))
16071 (when (setq m (re-search-backward "\\(\\\\begin{[^}]*}\\|\\\\(\\|\\\\\\[\\)\\|\\(\\\\end{[^}]*}\\|\\\\)\\|\\\\\\]\\)\\|\\(\\$\\$\\)" lim t))
16101 Revert to the normal definition outside of these fragments."
16110 Revert to the normal definition outside of these fragments."
16118 "List of overlays carrying the images of latex fragments.")
16126 (defun org-preview-latex-fragment (&optional subtree)
16131 prefix SUBTREE, display all fragments in the current subtree. With a
16139 (let (beg end at msg)
16141 ((or (equal subtree '(16))
16144 (setq beg (point-min) end (point-max)
16146 ((equal subtree '(4))
16148 (setq beg (point) end (org-end-of-subtree t)
16149 msg "Creating images for subtree...%s"))
16154 (setq beg (point) end (progn (outline-next-heading) (point))
16158 (narrow-to-region beg end)
16167 '(("begin" "^[ \t]*\\(\\\\begin{\\([a-zA-Z0-9\\*]+\\)[^\000]+?\\\\end{\\2}\\)" 1 t)
16185 (cnt 0) txt link beg end re e checkdir
16202 beg (match-beginning n) end (match-end n)
16216 (setq ov (org-make-overlay beg end))
16221 ov 'end-glyph
16227 (goto-char end))
16228 (delete-region beg end)
16256 \\begin{document}\n" string "\n\\end{document}\n"))
16302 (:table-of-contents . org-export-with-toc)
16354 ("toc" . :table-of-contents)
16397 (setq level (- (match-end 1) (match-beginning 1))))
16398 ;; Beginning of a COMMENT subtree. Skip it.
16401 (> (- (match-end 1) (match-beginning 1)) level))))
16419 \[v] limit export to visible part of outline tree
16755 It is supplemented by a number of commonly used TeX macros with appropriate
16779 ;; Get rid of archived trees
16784 (org-end-of-subtree t)
16785 (beginning-of-line 1)
16788 (org-end-of-subtree t)))))
16793 (add-text-properties (match-beginning 0) (match-end 0)
16806 (add-text-properties (match-beginning 1) (1+ (match-end 1))
16808 (delete-region (match-beginning 0) (match-end 0))))
16812 (end-of-line 1)
16813 (add-text-properties (point) (org-end-of-subtree t)
16816 ;; Find targets in comments and move them out of comments,
16873 (if (match-end 3)
16884 (subst-char-in-region (match-beginning 0) (match-end 0) ?\n ?\ t)
16885 (goto-char (1- (match-end 0))))))
16892 "Take link text and make a safe target out of it."
16956 The prefix ARG specifies how many levels of the outline should become
16965 (if (org-region-active-p) (region-end) (point-max))))
17044 (setq level (- (match-end 1) (match-beginning 1))
17087 (if (match-end 3) "[\\3]" "[\\1]")
17094 (setq level (org-tr-level (- (match-end 1) (match-beginning 1)))
17102 (let (beg end)
17105 (setq end (next-single-property-change beg 'display))
17106 (delete-region beg end)
17111 (setq end (next-single-property-change beg 'org-cwidth))
17112 (delete-region beg end)
17117 "Search the subtree below LINE for any TODO entries."
17125 (setq lv (- (match-end 1) (match-beginning 1))
17159 ;; find the indentation of the next non-empty line
17180 "Create a copy of the visible part of the current buffer, and export it.
17215 ;; Copy all comment lines to the end, to make sure #+ settings are
17216 ;; still available for the second export step. Kind of a hack, but
17219 (append-to-buffer buffer (match-beginning 0) (1+ (match-end 0))))
17222 (min (point-max) (1+ (match-end 0))))))
17320 first character of this line. If the first character of a line is a colon,
17326 (end (if regionp (region-end)))
17327 (nlines (or arg (if (and beg end) (count-lines beg end) 1)))
17334 (beginning-of-line 1)
17338 (beginning-of-line 1)
17355 (goto-char (match-end 0))
17361 The prefix ARG specifies how many levels of the outline should become
17378 The prefix ARG specifies how many levels of the outline should become
17401 (if region-p (region-end) (point-max))))
17525 (setq level (- (match-end 1) (match-beginning 1))
17596 ;; end of quote section?
17632 ((match-end 2)
17661 (setq type (if (match-end 2) (match-string 2 line) "internal"))
17663 (setq desc1 (if (match-end 5) (match-string 5 line))
17664 desc2 (if (match-end 2) (concat type ":" path) path)
17667 ;; Make an image out of the description if that is so wanted
17671 (setq desc (substring desc (match-end 0)))))
17751 (setq level (org-tr-level (- (match-end 1) (match-beginning 1)))
17795 (t (error "Invalid value of `org-plain-list-ordered-item-terminator'")))
17817 ;; Start new (level of ) list
17919 ;; Get rid of hlines at beginning and end
18075 (if (and (match-end 1) (equal (match-string 1 s) org-clock-string))
18081 s (substring s (match-end 0)))
18084 (if (match-end 1)
18090 s (substring s (match-end 0)))))
18127 string (substring string (match-end 0)))
18160 match except for the outermost delimiters. The maximum depth of
18299 "Create iCalendar files for all elements of FILES.
18369 (goto-char (match-end 0))
18383 (setq hd (replace-match (if (match-end 3) (match-string 3 hd)
18410 (substring hd (match-end 1))))
18475 (goto-char (point-min)) ;; CD: beginning-of-buffer is not allowed.
18496 (goto-char (match-end 0))
18621 (define-key org-mode-map "\C-xns" 'org-narrow-to-subtree)
18622 (define-key org-mode-map "\C-c$" 'org-archive-subtree)
18623 (define-key org-mode-map "\C-c\C-x\C-s" 'org-advertized-archive-subtree)
18715 (goto-char (1- (match-end 0)))
18723 "Like `delete-backward-char', insert whitespace at field end in tables.
18725 front of the next \"|\" separator, to keep the table aligned. The table will
18740 ;; noalign: if there were two spaces at the end, this field
18741 ;; does not determine the width of the column.
18746 "Like `delete-char', but insert whitespace at field end in tables.
18748 front of the next \"|\" separator, to keep the table aligned. The table will
18764 ;; noalign: if there were two spaces at the end, this field
18765 ;; does not determine the width of the column.
18783 ;; How to do this: Measure non-white length of current string
18788 COMMANDS is a list of alternating OLDDEF NEWDEF command names."
18823 "Promote subtree or delete table column.
18824 Calls `org-promote-subtree' or `org-table-delete-column', depending on context.
18829 ((org-on-heading-p) (call-interactively 'org-promote-subtree))
18834 "Demote subtree or insert table column.
18835 Calls `org-demote-subtree' or `org-table-insert-column', depending on context.
18840 ((org-on-heading-p) (call-interactively 'org-demote-subtree))
18845 "Move subtree up or kill table row.
18846 Calls `org-move-subtree-up' or `org-table-kill-row' or
18852 ((org-on-heading-p) (call-interactively 'org-move-subtree-up))
18856 "Move subtree down or insert table row.
18857 Calls `org-move-subtree-down' or `org-table-insert-row' or
18863 ((org-on-heading-p) (call-interactively 'org-move-subtree-down))
18881 "Demote subtree or move table column to right.
18894 "Move subtree up or move table row up.
18895 Calls `org-move-subtree-up' or `org-table-move-row' or
18901 ((org-on-heading-p) (call-interactively 'org-move-subtree-up))
18906 "Move subtree down or move table row down.
18907 Calls `org-move-subtree-down' or `org-table-move-row' or
18913 ((org-on-heading-p) (call-interactively 'org-move-subtree-down))
18918 "Increase item in timestamp or increase priority of current headline.
18926 (t (call-interactively 'org-beginning-of-item) (beginning-of-line 1))))
18929 "Decrease item in timestamp or decrease priority of current headline.
18955 "Copy region in table or copy current subtree.
18956 Calls `org-table-copy' or `org-copy-subtree', depending on context.
18960 (if (org-at-table-p) 'org-table-copy-region 'org-copy-subtree)))
18963 "Cut region in table or cut current subtree.
18964 Calls `org-table-copy' or `org-cut-subtree', depending on context.
18968 (if (org-at-table-p) 'org-table-cut-region 'org-cut-subtree)))
18971 "Paste rectangular region into table, or past subtree relative to level.
18972 Calls `org-table-paste-rectangle' or `org-paste-subtree', depending on context.
18977 (org-paste-subtree arg)))
18988 - If the cursor is in one of the special #+KEYWORD lines, this
19027 (beginning-of-line 1)
19028 (re-search-forward "|" (save-excursion (end-of-line 2) (point)))
19040 ((save-excursion (beginning-of-line 1) (looking-at "#\\+\\([A-Z]+\\)"))
19045 (beginning-of-line 1)
19195 ["Move Subtree to Archive" org-advertized-archive-subtree t]
19196 ; ["Check and Move Children" (org-archive-subtree '(4))
19328 ["Add/Move Current File to Front of List" org-agenda-file-to-front t]
19357 (error "Cannot expand menu (outdated version of cus-edit.el)")))
19365 "Return a list of contexts of the current cursor position.
19368 two positions indicating start and end of the context. Possible
19376 :item on the first line of a plain list item
19377 :item-bullet on the bullet/number of a plain list item
19400 (beginning-of-line 1)
19413 (save-excursion (org-end-of-item) (point)))
19419 (push (list :table (org-table-begin) (org-table-end)) clist)
19452 (org-overlay-start o) (org-overlay-end o)) clist)
19454 (org-overlay-start o) (org-overlay-end o)) clist))
19463 "Check if point is inside a match of regexp.
19473 (beginning-of-line (- 1 (or nlines 0)))
19476 (>= (+ inc (match-end 0)) pos))
19477 (throw 'exit (cons (match-beginning 0) (match-end 0)))))))))
19481 If CONTEXT is non-nil, return a list with CONTEXT and the boundaries of the
19486 (<= point (match-end group))
19488 (list context (match-beginning group) (match-end group))
19509 beg end pos)
19510 (beginning-of-line 1) (setq beg (point))
19511 (beginning-of-line 2) (setq end (point))
19512 (beginning-of-line (+ 1 arg))
19514 (insert (delete-and-extract-region beg end))
19522 beg end pos)
19523 (beginning-of-line 1) (setq beg (point))
19524 (beginning-of-line 2) (setq end (point))
19525 (beginning-of-line (- arg))
19527 (insert (delete-and-extract-region beg end))
19548 (defun org-sublist (list start end)
19549 "Return a section of LIST, from START to END.
19553 (while (and list (<= c end))
19559 "Is point inside a match of REGEXP in the current line?"
19562 (let ((pos (point)) (end (point-at-eol)))
19563 (beginning-of-line 1)
19564 (while (re-search-forward regexp end t)
19566 (>= (match-end 0) pos))
19621 ;; For reference, this is the default value of adaptive-fill-regexp
19631 (make-string (- (match-end 0) (match-beginning 0)) ?\ ))
19636 "Return regexp matching the file names of images."
19656 ;; C-a should go to the beginning of a *visible* line, also in the
19658 (defun org-beginning-of-line ()
19659 "Go to the beginning of the current line. If that is invisible, continue
19660 to a visible line beginning. This makes the function of C-a more intuitive."
19662 (beginning-of-line 1)
19669 (beginning-of-line 1))
19672 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
19676 ;; Early versions of noutline don't have `outline-invisible-p'.
19685 ;; Early versions of noutline don't have `outline-invisible-p'.
19698 "Move to the heading line of which the present line is a subheading.
19702 (outline-up-heading-all arg) ; emacs 21 version of outline.el
19703 (outline-up-heading arg t))) ; emacs 22 version of outline.el
19726 "Show all siblings of the current headline."
19751 (save-excursion (outline-end-of-heading) (point))
19754 (defun org-end-of-subtree (&optional invisible-OK)
19755 ;; This is an exact copy of the original function, but it uses
19768 ;; Go to end of line before heading
19775 (defun org-show-subtree ()
19780 (outline-end-of-subtree) (outline-next-heading) (point))
19806 (defun org-isearch-end ()
19816 (unless (and (boundp 'isearch-mode-end-hook-quit)
19817 isearch-mode-end-hook-quit)