Mercurial > emacs
comparison lisp/textmodes/org.el @ 69454:d60237bf3ccc
(org-link-search): Avoid self-matching of links, allow
target text to be distributed over several lines.
(org-search-not-link): New function.
(org-set-regexps-and-options, org-get-current-options): New
startup options.
(org-export-as-html): Take odd-level setting from local variable.
(org-fontify-emphasized-text): New option.
(org-set-font-lock-defaults): Include emphasized text.
(org-follow-mhe-link): Allow folder-only links, fix folder name.
(org-font-lock): Customize group renamed from `org-faces'.
author | Carsten Dominik <dominik@science.uva.nl> |
---|---|
date | Mon, 13 Mar 2006 07:08:15 +0000 |
parents | 7aecee7bf0d9 |
children | a305f07816a9 a802c5505156 |
comparison
equal
deleted
inserted
replaced
69453:91b04387dd58 | 69454:d60237bf3ccc |
---|---|
3 ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. |
4 ;; | 4 ;; |
5 ;; Author: Carsten Dominik <dominik at science dot uva dot nl> | 5 ;; Author: Carsten Dominik <dominik at science dot uva dot nl> |
6 ;; Keywords: outlines, hypermedia, calendar, wp | 6 ;; Keywords: outlines, hypermedia, calendar, wp |
7 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ | 7 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ |
8 ;; Version: 4.08 | 8 ;; Version: 4.09 |
9 ;; | 9 ;; |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 ;; | 11 ;; |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
79 ;; excellent reference card made by Philip Rooke. This card can be found | 79 ;; excellent reference card made by Philip Rooke. This card can be found |
80 ;; in the etc/ directory of Emacs 22. | 80 ;; in the etc/ directory of Emacs 22. |
81 ;; | 81 ;; |
82 ;; Changes since version 4.00: | 82 ;; Changes since version 4.00: |
83 ;; --------------------------- | 83 ;; --------------------------- |
84 ;; Version 4.09 | |
85 ;; - Bug fixes. | |
86 ;; - Small improvements to font-lock support. | |
87 ;; - MHE support finalized. | |
88 ;; | |
84 ;; Version 4.08 | 89 ;; Version 4.08 |
85 ;; | 90 ;; - Bug fixes. |
91 ;; - Improved MHE support | |
86 ;; | 92 ;; |
87 ;; Version 4.07 | 93 ;; Version 4.07 |
88 ;; - Bug fixes. | 94 ;; - Bug fixes. |
89 ;; - Leading stars in headlines can be hidden, so make the outline look | 95 ;; - Leading stars in headlines can be hidden, so make the outline look |
90 ;; cleaner. | 96 ;; cleaner. |
137 (defvar calc-embedded-open-formula) | 143 (defvar calc-embedded-open-formula) |
138 (defvar font-lock-unfontify-region-function) | 144 (defvar font-lock-unfontify-region-function) |
139 | 145 |
140 ;;; Customization variables | 146 ;;; Customization variables |
141 | 147 |
142 (defvar org-version "4.08" | 148 (defvar org-version "4.09" |
143 "The version number of the file org.el.") | 149 "The version number of the file org.el.") |
144 (defun org-version () | 150 (defun org-version () |
145 (interactive) | 151 (interactive) |
146 (message "Org-mode version %s" org-version)) | 152 (message "Org-mode version %s" org-version)) |
147 | 153 |
794 This can be used to recenter the window to show as much of the structure | 800 This can be used to recenter the window to show as much of the structure |
795 as possible." | 801 as possible." |
796 :group 'org-structure | 802 :group 'org-structure |
797 :type 'hook) | 803 :type 'hook) |
798 | 804 |
799 (defcustom org-level-color-stars-only nil | |
800 "Non-nil means fontify only the stars in each headline. | |
801 When nil, the entire headline is fontified. | |
802 Changing it requires restart of `font-lock-mode' to become effective." | |
803 :group 'org-structure | |
804 :type 'boolean) | |
805 | |
806 (defcustom org-hide-leading-stars nil | |
807 "Non-nil means, hide the first N-1 stars in a headline. | |
808 This works by using the face `org-hide' for these stars. This | |
809 face is white for a light background, and black for a dark | |
810 background. You may have to customize the face `org-hide' to | |
811 make this work. | |
812 Changing it requires restart of `font-lock-mode' to become effective." | |
813 :group 'org-structure | |
814 :type 'boolean) | |
815 | |
816 (defcustom org-odd-levels-only nil | 805 (defcustom org-odd-levels-only nil |
817 "Non-nil means, skip even levels and only use odd levels for the outline. | 806 "Non-nil means, skip even levels and only use odd levels for the outline. |
818 This has the effect that two stars are being added/taken away in | 807 This has the effect that two stars are being added/taken away in |
819 promotion/demotion commands. It also influences how levels are | 808 promotion/demotion commands. It also influences how levels are |
820 handled by the exporters. | 809 handled by the exporters. |
821 Changing it requires restart of `font-lock-mode' to become effective | 810 Changing it requires restart of `font-lock-mode' to become effective |
822 for fontification." | 811 for fontification also in regions already fontified." |
823 :group 'org-structure | 812 :group 'org-structure |
813 :group 'org-font-lock | |
824 :type 'boolean) | 814 :type 'boolean) |
825 | 815 |
826 (defcustom org-adapt-indentation t | 816 (defcustom org-adapt-indentation t |
827 "Non-nil means, adapt indentation when promoting and demoting. | 817 "Non-nil means, adapt indentation when promoting and demoting. |
828 When this is set and the *entire* text in an entry is indented, the | 818 When this is set and the *entire* text in an entry is indented, the |
1708 (defcustom org-icalendar-combined-name "OrgMode" | 1698 (defcustom org-icalendar-combined-name "OrgMode" |
1709 "Calendar name for the combined iCalendar representing all agenda files." | 1699 "Calendar name for the combined iCalendar representing all agenda files." |
1710 :group 'org-export | 1700 :group 'org-export |
1711 :type 'string) | 1701 :type 'string) |
1712 | 1702 |
1713 (defgroup org-faces nil | 1703 (defgroup org-font-lock nil |
1714 "Faces for highlighting in Org-mode." | 1704 "Faces and settings for highlighting in Org-mode." |
1715 :tag "Org Faces" | 1705 :tag "Org Font Lock" |
1716 :group 'org) | 1706 :group 'org) |
1707 | |
1708 (defcustom org-level-color-stars-only nil | |
1709 "Non-nil means fontify only the stars in each headline. | |
1710 When nil, the entire headline is fontified. | |
1711 Changing it requires restart of `font-lock-mode' to become effective | |
1712 also in regions already fontified." | |
1713 :group 'org-font-lock | |
1714 :type 'boolean) | |
1715 | |
1716 (defcustom org-hide-leading-stars nil | |
1717 "Non-nil means, hide the first N-1 stars in a headline. | |
1718 This works by using the face `org-hide' for these stars. This | |
1719 face is white for a light background, and black for a dark | |
1720 background. You may have to customize the face `org-hide' to | |
1721 make this work. | |
1722 Changing it requires restart of `font-lock-mode' to become effective | |
1723 also in regions already fontified." | |
1724 :group 'org-font-lock | |
1725 :type 'boolean) | |
1726 | |
1727 (defcustom org-fontify-done-headline nil | |
1728 "Non-nil means, change the face of a headline if it is marked DONE. | |
1729 Normally, only the TODO/DONE keyword indicates the state of a headline. | |
1730 When this is non-nil, the headline after the keyword is set to the | |
1731 `org-headline-done' as an additional indication." | |
1732 :group 'org-font-lock | |
1733 :type 'boolean) | |
1734 | |
1735 (defcustom org-fontify-emphasized-text t | |
1736 "Non-nil means fontify *bold*, /italic/ and _underlined_ text. | |
1737 Changing this variable requires a restart of Emacs to take effect." | |
1738 :group 'org-font-lock | |
1739 :type 'boolean) | |
1717 | 1740 |
1718 (defface org-hide | 1741 (defface org-hide |
1719 '((((type tty) (class color)) (:foreground "blue" :weight bold)) | 1742 '((((type tty) (class color)) (:foreground "blue" :weight bold)) |
1720 (((class color) (background light)) (:foreground "white")) | 1743 (((class color) (background light)) (:foreground "white")) |
1721 (((class color) (background dark)) (:foreground "black")) | 1744 (((class color) (background dark)) (:foreground "black")) |
1722 ; (((class color) (background light)) (:foreground "grey90")) | 1745 ; (((class color) (background light)) (:foreground "grey90")) |
1723 ; (((class color) (background dark)) (:foreground "grey10")) | 1746 ; (((class color) (background dark)) (:foreground "grey10")) |
1724 (t (:inverse-video nil))) | 1747 (t (:inverse-video nil))) |
1725 "Face used for level 1 headlines." | 1748 "Face used for level 1 headlines." |
1726 :group 'org-faces) | 1749 :group 'org-font-lock) |
1727 | 1750 |
1728 (defface org-level-1 ;; font-lock-function-name-face | 1751 (defface org-level-1 ;; font-lock-function-name-face |
1729 '((((type tty) (class color)) (:foreground "blue" :weight bold)) | 1752 '((((type tty) (class color)) (:foreground "blue" :weight bold)) |
1730 (((class color) (background light)) (:foreground "Blue")) | 1753 (((class color) (background light)) (:foreground "Blue")) |
1731 (((class color) (background dark)) (:foreground "LightSkyBlue")) | 1754 (((class color) (background dark)) (:foreground "LightSkyBlue")) |
1732 (t (:inverse-video t :bold t))) | 1755 (t (:inverse-video t :bold t))) |
1733 "Face used for level 1 headlines." | 1756 "Face used for level 1 headlines." |
1734 :group 'org-faces) | 1757 :group 'org-font-lock) |
1735 | 1758 |
1736 (defface org-level-2 ;; font-lock-variable-name-face | 1759 (defface org-level-2 ;; font-lock-variable-name-face |
1737 '((((type tty) (class color)) (:foreground "yellow" :weight light)) | 1760 '((((type tty) (class color)) (:foreground "yellow" :weight light)) |
1738 (((class color) (background light)) (:foreground "DarkGoldenrod")) | 1761 (((class color) (background light)) (:foreground "DarkGoldenrod")) |
1739 (((class color) (background dark)) (:foreground "LightGoldenrod")) | 1762 (((class color) (background dark)) (:foreground "LightGoldenrod")) |
1740 (t (:bold t :italic t))) | 1763 (t (:bold t :italic t))) |
1741 "Face used for level 2 headlines." | 1764 "Face used for level 2 headlines." |
1742 :group 'org-faces) | 1765 :group 'org-font-lock) |
1743 | 1766 |
1744 (defface org-level-3 ;; font-lock-keyword-face | 1767 (defface org-level-3 ;; font-lock-keyword-face |
1745 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) | 1768 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) |
1746 (((class color) (background light)) (:foreground "Purple")) | 1769 (((class color) (background light)) (:foreground "Purple")) |
1747 (((class color) (background dark)) (:foreground "Cyan")) | 1770 (((class color) (background dark)) (:foreground "Cyan")) |
1748 (t (:bold t))) | 1771 (t (:bold t))) |
1749 "Face used for level 3 headlines." | 1772 "Face used for level 3 headlines." |
1750 :group 'org-faces) | 1773 :group 'org-font-lock) |
1751 | 1774 |
1752 (defface org-level-4 ;; font-lock-comment-face | 1775 (defface org-level-4 ;; font-lock-comment-face |
1753 '((((type tty pc) (class color) (background light)) (:foreground "red")) | 1776 '((((type tty pc) (class color) (background light)) (:foreground "red")) |
1754 (((type tty pc) (class color) (background dark)) (:foreground "red1")) | 1777 (((type tty pc) (class color) (background dark)) (:foreground "red1")) |
1755 (((class color) (background light)) (:foreground "Firebrick")) | 1778 (((class color) (background light)) (:foreground "Firebrick")) |
1756 (((class color) (background dark)) (:foreground "chocolate1")) | 1779 (((class color) (background dark)) (:foreground "chocolate1")) |
1757 (t (:bold t :italic t))) | 1780 (t (:bold t :italic t))) |
1758 "Face used for level 4 headlines." | 1781 "Face used for level 4 headlines." |
1759 :group 'org-faces) | 1782 :group 'org-font-lock) |
1760 | 1783 |
1761 (defface org-level-5 ;; font-lock-type-face | 1784 (defface org-level-5 ;; font-lock-type-face |
1762 '((((type tty) (class color)) (:foreground "green")) | 1785 '((((type tty) (class color)) (:foreground "green")) |
1763 (((class color) (background light)) (:foreground "ForestGreen")) | 1786 (((class color) (background light)) (:foreground "ForestGreen")) |
1764 (((class color) (background dark)) (:foreground "PaleGreen")) | 1787 (((class color) (background dark)) (:foreground "PaleGreen")) |
1765 (t (:bold t :underline t))) | 1788 (t (:bold t :underline t))) |
1766 "Face used for level 5 headlines." | 1789 "Face used for level 5 headlines." |
1767 :group 'org-faces) | 1790 :group 'org-font-lock) |
1768 | 1791 |
1769 (defface org-level-6 ;; font-lock-constant-face | 1792 (defface org-level-6 ;; font-lock-constant-face |
1770 '((((type tty) (class color)) (:foreground "magenta")) | 1793 '((((type tty) (class color)) (:foreground "magenta")) |
1771 (((class color) (background light)) (:foreground "CadetBlue")) | 1794 (((class color) (background light)) (:foreground "CadetBlue")) |
1772 (((class color) (background dark)) (:foreground "Aquamarine")) | 1795 (((class color) (background dark)) (:foreground "Aquamarine")) |
1773 (t (:bold t :underline t))) | 1796 (t (:bold t :underline t))) |
1774 "Face used for level 6 headlines." | 1797 "Face used for level 6 headlines." |
1775 :group 'org-faces) | 1798 :group 'org-font-lock) |
1776 | 1799 |
1777 (defface org-level-7 ;; font-lock-builtin-face | 1800 (defface org-level-7 ;; font-lock-builtin-face |
1778 '((((type tty) (class color)) (:foreground "blue" :weight light)) | 1801 '((((type tty) (class color)) (:foreground "blue" :weight light)) |
1779 (((class color) (background light)) (:foreground "Orchid")) | 1802 (((class color) (background light)) (:foreground "Orchid")) |
1780 (((class color) (background dark)) (:foreground "LightSteelBlue")) | 1803 (((class color) (background dark)) (:foreground "LightSteelBlue")) |
1781 (t (:bold t))) | 1804 (t (:bold t))) |
1782 "Face used for level 7 headlines." | 1805 "Face used for level 7 headlines." |
1783 :group 'org-faces) | 1806 :group 'org-font-lock) |
1784 | 1807 |
1785 (defface org-level-8 ;; font-lock-string-face | 1808 (defface org-level-8 ;; font-lock-string-face |
1786 '((((type tty) (class color)) (:foreground "green")) | 1809 '((((type tty) (class color)) (:foreground "green")) |
1787 (((class color) (background light)) (:foreground "RosyBrown")) | 1810 (((class color) (background light)) (:foreground "RosyBrown")) |
1788 (((class color) (background dark)) (:foreground "LightSalmon")) | 1811 (((class color) (background dark)) (:foreground "LightSalmon")) |
1789 (t (:italic t))) | 1812 (t (:italic t))) |
1790 "Face used for level 8 headlines." | 1813 "Face used for level 8 headlines." |
1791 :group 'org-faces) | 1814 :group 'org-font-lock) |
1792 | 1815 |
1793 (defface org-special-keyword ;; font-lock-string-face | 1816 (defface org-special-keyword ;; font-lock-string-face |
1794 '((((type tty) (class color)) (:foreground "green")) | 1817 '((((type tty) (class color)) (:foreground "green")) |
1795 (((class color) (background light)) (:foreground "RosyBrown")) | 1818 (((class color) (background light)) (:foreground "RosyBrown")) |
1796 (((class color) (background dark)) (:foreground "LightSalmon")) | 1819 (((class color) (background dark)) (:foreground "LightSalmon")) |
1797 (t (:italic t))) | 1820 (t (:italic t))) |
1798 "Face used for special keywords." | 1821 "Face used for special keywords." |
1799 :group 'org-faces) | 1822 :group 'org-font-lock) |
1800 | 1823 |
1801 (defface org-warning ;; font-lock-warning-face | 1824 (defface org-warning ;; font-lock-warning-face |
1802 '((((type tty) (class color)) (:foreground "red")) | 1825 '((((type tty) (class color)) (:foreground "red")) |
1803 (((class color) (background light)) (:foreground "Red" :bold t)) | 1826 (((class color) (background light)) (:foreground "Red" :bold t)) |
1804 (((class color) (background dark)) (:foreground "Red1" :bold t)) | 1827 (((class color) (background dark)) (:foreground "Red1" :bold t)) |
1805 ; (((class color) (background dark)) (:foreground "Pink" :bold t)) | 1828 ; (((class color) (background dark)) (:foreground "Pink" :bold t)) |
1806 (t (:inverse-video t :bold t))) | 1829 (t (:inverse-video t :bold t))) |
1807 "Face for deadlines and TODO keywords." | 1830 "Face for deadlines and TODO keywords." |
1808 :group 'org-faces) | 1831 :group 'org-font-lock) |
1809 | |
1810 (defcustom org-fontify-done-headline nil | |
1811 "Non-nil means, change the face of a headline if it is marked DONE. | |
1812 Normally, only the TODO/DONE keyword indicates the state of a headline. | |
1813 When this is non-nil, the headline after the keyword is set to the | |
1814 `org-headline-done' as an additional indication." | |
1815 :group 'org-faces | |
1816 :type 'boolean) | |
1817 | 1832 |
1818 (defface org-headline-done ;; font-lock-string-face | 1833 (defface org-headline-done ;; font-lock-string-face |
1819 '((((type tty) (class color)) (:foreground "green")) | 1834 '((((type tty) (class color)) (:foreground "green")) |
1820 (((class color) (background light)) (:foreground "RosyBrown")) | 1835 (((class color) (background light)) (:foreground "RosyBrown")) |
1821 (((class color) (background dark)) (:foreground "LightSalmon")) | 1836 (((class color) (background dark)) (:foreground "LightSalmon")) |
1822 (t (:italic t))) | 1837 (t (:italic t))) |
1823 "Face used to indicate that a headline is DONE. See also the variable | 1838 "Face used to indicate that a headline is DONE. See also the variable |
1824 `org-fontify-done-headline'." | 1839 `org-fontify-done-headline'." |
1825 :group 'org-faces) | 1840 :group 'org-font-lock) |
1826 | 1841 |
1827 ;; Inheritance does not yet work for xemacs. So we just copy... | 1842 ;; Inheritance does not yet work for xemacs. So we just copy... |
1828 | 1843 |
1829 (defface org-deadline-announce | 1844 (defface org-deadline-announce |
1830 '((((type tty) (class color)) (:foreground "blue" :weight bold)) | 1845 '((((type tty) (class color)) (:foreground "blue" :weight bold)) |
1831 (((class color) (background light)) (:foreground "Blue")) | 1846 (((class color) (background light)) (:foreground "Blue")) |
1832 (((class color) (background dark)) (:foreground "LightSkyBlue")) | 1847 (((class color) (background dark)) (:foreground "LightSkyBlue")) |
1833 (t (:inverse-video t :bold t))) | 1848 (t (:inverse-video t :bold t))) |
1834 "Face for upcoming deadlines." | 1849 "Face for upcoming deadlines." |
1835 :group 'org-faces) | 1850 :group 'org-font-lock) |
1836 | 1851 |
1837 (defface org-scheduled-today | 1852 (defface org-scheduled-today |
1838 '((((type tty) (class color)) (:foreground "green")) | 1853 '((((type tty) (class color)) (:foreground "green")) |
1839 (((class color) (background light)) (:foreground "DarkGreen")) | 1854 (((class color) (background light)) (:foreground "DarkGreen")) |
1840 (((class color) (background dark)) (:foreground "PaleGreen")) | 1855 (((class color) (background dark)) (:foreground "PaleGreen")) |
1841 (t (:bold t :underline t))) | 1856 (t (:bold t :underline t))) |
1842 "Face for items scheduled for a certain day." | 1857 "Face for items scheduled for a certain day." |
1843 :group 'org-faces) | 1858 :group 'org-font-lock) |
1844 | 1859 |
1845 (defface org-scheduled-previously | 1860 (defface org-scheduled-previously |
1846 '((((type tty pc) (class color) (background light)) (:foreground "red")) | 1861 '((((type tty pc) (class color) (background light)) (:foreground "red")) |
1847 (((type tty pc) (class color) (background dark)) (:foreground "red1")) | 1862 (((type tty pc) (class color) (background dark)) (:foreground "red1")) |
1848 (((class color) (background light)) (:foreground "Firebrick")) | 1863 (((class color) (background light)) (:foreground "Firebrick")) |
1849 (((class color) (background dark)) (:foreground "chocolate1")) | 1864 (((class color) (background dark)) (:foreground "chocolate1")) |
1850 (t (:bold t :italic t))) | 1865 (t (:bold t :italic t))) |
1851 "Face for items scheduled previously, and not yet done." | 1866 "Face for items scheduled previously, and not yet done." |
1852 :group 'org-faces) | 1867 :group 'org-font-lock) |
1853 | 1868 |
1854 (defface org-formula | 1869 (defface org-formula |
1855 '((((type tty pc) (class color) (background light)) (:foreground "red")) | 1870 '((((type tty pc) (class color) (background light)) (:foreground "red")) |
1856 (((type tty pc) (class color) (background dark)) (:foreground "red1")) | 1871 (((type tty pc) (class color) (background dark)) (:foreground "red1")) |
1857 (((class color) (background light)) (:foreground "Firebrick")) | 1872 (((class color) (background light)) (:foreground "Firebrick")) |
1858 (((class color) (background dark)) (:foreground "chocolate1")) | 1873 (((class color) (background dark)) (:foreground "chocolate1")) |
1859 (t (:bold t :italic t))) | 1874 (t (:bold t :italic t))) |
1860 "Face for formulas." | 1875 "Face for formulas." |
1861 :group 'org-faces) | 1876 :group 'org-font-lock) |
1862 | 1877 |
1863 (defface org-link | 1878 (defface org-link |
1864 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) | 1879 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) |
1865 (((class color) (background light)) (:foreground "Purple")) | 1880 (((class color) (background light)) (:foreground "Purple")) |
1866 (((class color) (background dark)) (:foreground "Cyan")) | 1881 (((class color) (background dark)) (:foreground "Cyan")) |
1867 (t (:bold t))) | 1882 (t (:bold t))) |
1868 "Face for links." | 1883 "Face for links." |
1869 :group 'org-faces) | 1884 :group 'org-font-lock) |
1870 | 1885 |
1871 (defface org-tag | 1886 (defface org-tag |
1872 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) | 1887 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) |
1873 (((class color) (background light)) (:foreground "Purple" :weight bold)) | 1888 (((class color) (background light)) (:foreground "Purple" :weight bold)) |
1874 (((class color) (background dark)) (:foreground "Cyan" :weight bold)) | 1889 (((class color) (background dark)) (:foreground "Cyan" :weight bold)) |
1875 (t (:bold t))) | 1890 (t (:bold t))) |
1876 "Face for links." | 1891 "Face for tags." |
1877 :group 'org-faces) | 1892 :group 'org-font-lock) |
1878 | 1893 |
1879 (defface org-done ;; font-lock-type-face | 1894 (defface org-done ;; font-lock-type-face |
1880 '((((type tty) (class color)) (:foreground "green")) | 1895 '((((type tty) (class color)) (:foreground "green")) |
1881 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) | 1896 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) |
1882 (((class color) (background dark)) (:foreground "PaleGreen" :bold t)) | 1897 (((class color) (background dark)) (:foreground "PaleGreen" :bold t)) |
1883 (t (:bold t :underline t))) | 1898 (t (:bold t :underline t))) |
1884 "Face used for DONE." | 1899 "Face used for DONE." |
1885 :group 'org-faces) | 1900 :group 'org-font-lock) |
1886 | 1901 |
1887 (defface org-table ;; font-lock-function-name-face | 1902 (defface org-table ;; font-lock-function-name-face |
1888 '((((type tty) (class color)) (:foreground "blue" :weight bold)) | 1903 '((((type tty) (class color)) (:foreground "blue" :weight bold)) |
1889 (((class color) (background light)) (:foreground "Blue")) | 1904 (((class color) (background light)) (:foreground "Blue")) |
1890 (((class color) (background dark)) (:foreground "LightSkyBlue")) | 1905 (((class color) (background dark)) (:foreground "LightSkyBlue")) |
1891 (t (:inverse-video t :bold t))) | 1906 (t (:inverse-video t :bold t))) |
1892 "Face used for tables." | 1907 "Face used for tables." |
1893 :group 'org-faces) | 1908 :group 'org-font-lock) |
1894 | 1909 |
1895 (defface org-time-grid ;; font-lock-variable-name-face | 1910 (defface org-time-grid ;; font-lock-variable-name-face |
1896 '((((type tty) (class color)) (:foreground "yellow" :weight light)) | 1911 '((((type tty) (class color)) (:foreground "yellow" :weight light)) |
1897 (((class color) (background light)) (:foreground "DarkGoldenrod")) | 1912 (((class color) (background light)) (:foreground "DarkGoldenrod")) |
1898 (((class color) (background dark)) (:foreground "LightGoldenrod")) | 1913 (((class color) (background dark)) (:foreground "LightGoldenrod")) |
1899 (t (:bold t :italic t))) | 1914 (t (:bold t :italic t))) |
1900 "Face used for time grids." | 1915 "Face used for time grids." |
1901 :group 'org-faces) | 1916 :group 'org-font-lock) |
1902 | 1917 |
1903 (defvar org-level-faces | 1918 (defvar org-level-faces |
1904 '(org-level-1 org-level-2 org-level-3 org-level-4 | 1919 '(org-level-1 org-level-2 org-level-3 org-level-4 |
1905 org-level-5 org-level-6 org-level-7 org-level-8 | 1920 org-level-5 org-level-6 org-level-7 org-level-8 |
1906 )) | 1921 )) |
1937 ((equal key "STARTUP") | 1952 ((equal key "STARTUP") |
1938 (let ((opts (org-split-string value splitre)) | 1953 (let ((opts (org-split-string value splitre)) |
1939 (set '(("fold" org-startup-folded t) | 1954 (set '(("fold" org-startup-folded t) |
1940 ("nofold" org-startup-folded nil) | 1955 ("nofold" org-startup-folded nil) |
1941 ("content" org-startup-folded content) | 1956 ("content" org-startup-folded content) |
1957 ("hidestars" org-hide-leading-stars t) | |
1958 ("showstars" org-hide-leading-stars nil) | |
1959 ("odd" org-odd-levels-only t) | |
1960 ("oddeven" org-odd-levels-only nil) | |
1942 ("dlcheck" org-startup-with-deadline-check t) | 1961 ("dlcheck" org-startup-with-deadline-check t) |
1943 ("nodlcheck" org-startup-with-deadline-check nil))) | 1962 ("nodlcheck" org-startup-with-deadline-check nil))) |
1944 l var val) | 1963 l var val) |
1945 (while (setq l (assoc (pop opts) set)) | 1964 (while (setq l (assoc (pop opts) set)) |
1946 (setq var (nth 1 l) val (nth 2 l)) | 1965 (setq var (nth 1 l) val (nth 2 l)) |
2305 (- (match-end 0) (match-beginning 0))))) | 2324 (- (match-end 0) (match-beginning 0))))) |
2306 | 2325 |
2307 (defvar org-font-lock-keywords nil) | 2326 (defvar org-font-lock-keywords nil) |
2308 | 2327 |
2309 (defun org-set-font-lock-defaults () | 2328 (defun org-set-font-lock-defaults () |
2310 (let ((org-font-lock-extra-keywords | 2329 (let* ((em org-fontify-emphasized-text) |
2311 (list | 2330 (org-font-lock-extra-keywords |
2312 '("^\\(\\**\\)\\(\\*\\)\\(.*\\)" (1 (org-get-level-face 1)) | 2331 (list |
2313 (2 (org-get-level-face 2)) (3 (org-get-level-face 3))) | 2332 '("^\\(\\**\\)\\(\\*\\)\\(.*\\)" (1 (org-get-level-face 1)) |
2314 '(org-activate-links (0 'org-link t)) | 2333 (2 (org-get-level-face 2)) (3 (org-get-level-face 3))) |
2315 '(org-activate-links2 (0 'org-link t)) | 2334 '(org-activate-links (0 'org-link t)) |
2316 '(org-activate-target-links (0 'org-link t)) | 2335 '(org-activate-links2 (0 'org-link t)) |
2317 '(org-activate-dates (0 'org-link t)) | 2336 '(org-activate-target-links (0 'org-link t)) |
2318 '(org-activate-camels (0 'org-link t)) | 2337 '(org-activate-dates (0 'org-link t)) |
2319 '(org-activate-tags (1 'org-tag t)) | 2338 '(org-activate-camels (0 'org-link t)) |
2320 (list (concat "^\\*+[ \t]*" org-not-done-regexp) | 2339 '(org-activate-tags (1 'org-tag t)) |
2321 '(1 'org-warning t)) | 2340 (list (concat "^\\*+[ \t]*" org-not-done-regexp) |
2322 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) | 2341 '(1 'org-warning t)) |
2323 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) | 2342 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) |
2324 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) | 2343 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) |
2325 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) | 2344 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) |
2326 ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" | 2345 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) |
2327 ;; (3 'bold)) | 2346 ; (if em '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" (3 'bold))) |
2328 ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" | 2347 ; (if em '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" (3 'italic))) |
2329 ;; (3 'italic)) | 2348 ; (if em '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" (3 'underline))) |
2330 ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" | 2349 (if em '("\\*[a-zA-Z]+\\*" 0 'bold)) |
2331 ;; (3 'underline)) | 2350 (if em '("/*[a-zA-Z]+/" 0 'italic)) |
2332 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string | 2351 (if em '("_[a-zA-Z]+_" 0 'underline)) |
2333 "\\|" org-quote-string "\\)\\>") | 2352 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string |
2334 '(1 'org-special-keyword t)) | 2353 "\\|" org-quote-string "\\)\\>") |
2335 '("^#.*" (0 'font-lock-comment-face t)) | 2354 '(1 'org-special-keyword t)) |
2336 (if org-fontify-done-headline | 2355 '("^#.*" (0 'font-lock-comment-face t)) |
2337 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") | 2356 (if org-fontify-done-headline |
2338 '(1 'org-done t) '(2 'org-headline-done t)) | 2357 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") |
2339 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") | 2358 '(1 'org-done t) '(2 'org-headline-done t)) |
2340 '(1 'org-done t))) | 2359 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") |
2341 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" | 2360 '(1 'org-done t))) |
2342 (1 'org-table t)) | 2361 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" |
2343 '("^[ \t]*\\(:.*\\)" (1 'org-table t)) | 2362 (1 'org-table t)) |
2344 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) | 2363 '("^[ \t]*\\(:.*\\)" (1 'org-table t)) |
2345 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) | 2364 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) |
2346 ))) | 2365 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) |
2347 | 2366 ))) |
2367 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords)) | |
2348 ;; Now set the full font-lock-keywords | 2368 ;; Now set the full font-lock-keywords |
2349 (set (make-local-variable 'org-font-lock-keywords) | 2369 (set (make-local-variable 'org-font-lock-keywords) |
2350 org-font-lock-extra-keywords) | 2370 org-font-lock-extra-keywords) |
2351 (set (make-local-variable 'font-lock-defaults) | 2371 (set (make-local-variable 'font-lock-defaults) |
2352 '(org-font-lock-keywords t nil nil backward-paragraph)) | 2372 '(org-font-lock-keywords t nil nil backward-paragraph)) |
6958 in all files." | 6978 in all files." |
6959 (let ((case-fold-search t) | 6979 (let ((case-fold-search t) |
6960 (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) | 6980 (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) |
6961 (pos (point)) | 6981 (pos (point)) |
6962 (pre "") (post "") | 6982 (pre "") (post "") |
6963 words re0 re1 re2 re3 re4 re5 reall camel) | 6983 words re0 re1 re2 re3 re4 re5 re2a reall camel) |
6964 (cond ((save-excursion | 6984 (cond ((save-excursion |
6965 (goto-char (point-min)) | 6985 (goto-char (point-min)) |
6966 (and | 6986 (and |
6967 (re-search-forward | 6987 (re-search-forward |
6968 (concat "<<" (regexp-quote s0) ">>") nil t) | 6988 (concat "<<" (regexp-quote s0) ">>") nil t) |
6993 (if camel | 7013 (if camel |
6994 (org-camel-to-words s) | 7014 (org-camel-to-words s) |
6995 (org-split-string s "[ \n\r\t]+")) | 7015 (org-split-string s "[ \n\r\t]+")) |
6996 re0 (concat "<<" (regexp-quote s0) ">>") | 7016 re0 (concat "<<" (regexp-quote s0) ">>") |
6997 re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") | 7017 re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") |
7018 re2a (concat "\\<" (mapconcat 'downcase words "[ \t\r\n]+") "\\>") | |
6998 re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") | 7019 re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") |
6999 re1 (concat pre re2 post) | 7020 re1 (concat pre re2 post) |
7000 re3 (concat pre re4 post) | 7021 re3 (concat pre re4 post) |
7001 re5 (concat pre ".*" re4) | 7022 re5 (concat pre ".*" re4) |
7002 re2 (concat pre re2) | 7023 re2 (concat pre re2) |
7024 re2a (concat pre re2a) | |
7003 re4 (concat pre re4) | 7025 re4 (concat pre re4) |
7004 reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2 | 7026 reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2 |
7005 "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\(" | 7027 "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\(" |
7006 re5 "\\)" | 7028 re5 "\\)" |
7007 )) | 7029 )) |
7008 (cond | 7030 (cond |
7009 ((eq type 'org-occur) (org-occur reall)) | 7031 ((eq type 'org-occur) (org-occur reall)) |
7010 ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) | 7032 ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) |
7011 (t (goto-char (point-min)) | 7033 (t (goto-char (point-min)) |
7012 (if (or (re-search-forward re0 nil t) | 7034 (if (or (org-search-not-link re0 nil t) |
7013 (re-search-forward re1 nil t) | 7035 (org-search-not-link re1 nil t) |
7014 (re-search-forward re2 nil t) | 7036 (org-search-not-link re2 nil t) |
7015 (re-search-forward re3 nil t) | 7037 (org-search-not-link re2a nil t) ;; FIXME: Right place??? |
7016 (re-search-forward re4 nil t) | 7038 (org-search-not-link re3 nil t) |
7017 (re-search-forward re5 nil t)) | 7039 (org-search-not-link re4 nil t) |
7040 (org-search-not-link re5 nil t) | |
7041 ) | |
7018 (goto-char (match-beginning 0)) | 7042 (goto-char (match-beginning 0)) |
7019 (goto-char pos) | 7043 (goto-char pos) |
7020 (error "No match"))))) | 7044 (error "No match"))))) |
7021 (t | 7045 (t |
7022 ;; Normal string-search | 7046 ;; Normal string-search |
7023 (goto-char (point-min)) | 7047 (goto-char (point-min)) |
7024 (if (search-forward s nil t) | 7048 (if (search-forward s nil t) |
7025 (goto-char (match-beginning 0)) | 7049 (goto-char (match-beginning 0)) |
7026 (error "No match")))) | 7050 (error "No match")))) |
7027 (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) | 7051 (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) |
7052 | |
7053 (defun org-search-not-link (&rest args) | |
7054 "Execute `re-search-forward', but only accept matches that are not a link." | |
7055 (catch 'exit | |
7056 (let ((pos (point)) p1) | |
7057 (while (apply 're-search-forward args) | |
7058 (setq p1 (point)) | |
7059 (if (not (save-match-data | |
7060 (and (re-search-backward "\\[\\[" nil t) | |
7061 (looking-at org-bracket-link-regexp) | |
7062 (<= (match-beginning 0) p1) | |
7063 (>= (match-end 0) p1)))) | |
7064 (progn (goto-char (match-end 0)) | |
7065 (throw 'exit (point))) | |
7066 (goto-char (match-end 0))))))) | |
7028 | 7067 |
7029 (defun org-do-occur (regexp &optional cleanup) | 7068 (defun org-do-occur (regexp &optional cleanup) |
7030 "Call the Emacs command `occur'. | 7069 "Call the Emacs command `occur'. |
7031 If CLEANUP is non-nil, remove the printout of the regular expression | 7070 If CLEANUP is non-nil, remove the printout of the regular expression |
7032 in the *Occur* buffer. This is useful if the regex is long and not useful | 7071 in the *Occur* buffer. This is useful if the regex is long and not useful |
7282 (mh-show) | 7321 (mh-show) |
7283 (mh-show-show)) | 7322 (mh-show-show)) |
7284 header-field))) | 7323 header-field))) |
7285 | 7324 |
7286 (defun org-follow-mhe-link (folder article) | 7325 (defun org-follow-mhe-link (folder article) |
7287 "Follow an MHE link to FOLDER and ARTICLE." | 7326 "Follow an MHE link to FOLDER and ARTICLE. |
7288 (setq article (org-add-angle-brackets article)) | 7327 If ARTICLE is nil FOLDER is shown. If the configuration variable |
7328 `org-mhe-search-all-folders' is t and `mh-searcher' is pick, | |
7329 ARTICLE is searched in all folders. Indexed searches (swish++, | |
7330 namazu, and others supported by MH-E) will always search in all | |
7331 folders." | |
7289 (require 'mh-e) | 7332 (require 'mh-e) |
7290 (require 'mh-search) | 7333 (require 'mh-search) |
7334 (require 'mh-utils) | |
7291 (mh-find-path) | 7335 (mh-find-path) |
7292 (mh-search-choose) | 7336 (if (not article) |
7293 (if (equal mh-searcher 'pick) | 7337 (mh-visit-folder (mh-normalize-folder-name folder)) |
7294 (progn | 7338 (setq article (org-add-angle-brackets article)) |
7295 (mh-search folder (list "--message-id" article)) | 7339 (mh-search-choose) |
7296 (when (and org-mhe-search-all-folders | 7340 (if (equal mh-searcher 'pick) |
7297 (not (org-mhe-get-message-real-folder))) | 7341 (progn |
7298 (kill-this-buffer) | 7342 (mh-search folder (list "--message-id" article)) |
7299 (mh-search "+" (list "--message-id" article)))) | 7343 (when (and org-mhe-search-all-folders |
7300 (mh-search "+" article)) | 7344 (not (org-mhe-get-message-real-folder))) |
7301 (if (org-mhe-get-message-real-folder) | 7345 (kill-this-buffer) |
7302 (mh-show-msg 1) | 7346 (mh-search "+" (list "--message-id" article)))) |
7303 (kill-this-buffer) | 7347 (mh-search "+" article)) |
7304 (error "Message not found"))) | 7348 (if (org-mhe-get-message-real-folder) |
7349 (mh-show-msg 1) | |
7350 (kill-this-buffer) | |
7351 (error "Message not found")))) | |
7305 | 7352 |
7306 (defun org-open-file (path &optional in-emacs line search) | 7353 (defun org-open-file (path &optional in-emacs line search) |
7307 "Open the file at PATH. | 7354 "Open the file at PATH. |
7308 First, this expands any special file name abbreviations. Then the | 7355 First, this expands any special file name abbreviations. Then the |
7309 configuration variable `org-file-apps' is checked if it contains an | 7356 configuration variable `org-file-apps' is checked if it contains an |
10561 (defun org-convert-to-odd-levels () | 10608 (defun org-convert-to-odd-levels () |
10562 "Convert an org-mode file with all levels allowed to one with odd levels. | 10609 "Convert an org-mode file with all levels allowed to one with odd levels. |
10563 This will leave level 1 alone, convert level 2 to level 3, level 3 to | 10610 This will leave level 1 alone, convert level 2 to level 3, level 3 to |
10564 level 5 etc." | 10611 level 5 etc." |
10565 (interactive) | 10612 (interactive) |
10566 (when (yes-or-no-p "Are you sure you want to globally change levels? ") | 10613 (when (yes-or-no-p "Are you sure you want to globally change levels to odd? ") |
10567 (let ((org-odd-levels-only nil) n) | 10614 (let ((org-odd-levels-only nil) n) |
10568 (save-excursion | 10615 (save-excursion |
10569 (goto-char (point-min)) | 10616 (goto-char (point-min)) |
10570 (while (re-search-forward "^\\*\\*+" nil t) | 10617 (while (re-search-forward "^\\*\\*+" nil t) |
10571 (setq n (1- (length (match-string 0)))) | 10618 (setq n (1- (length (match-string 0)))) |
10572 (while (>= (setq n (1- n)) 0) | 10619 (while (>= (setq n (1- n)) 0) |
10573 (org-demote)) | 10620 (org-demote)) |
10621 (end-of-line 1)))))) | |
10622 | |
10623 | |
10624 (defun org-convert-to-oddeven-levels () | |
10625 "Convert an org-mode file with only odd levels to one with odd and even levels. | |
10626 This promotes level 3 to level 2, level 5 to level 3 etc. If the file contains a | |
10627 section with an even level, conversion would destroy the structure of the file. An error | |
10628 is signaled in this case." | |
10629 (interactive) | |
10630 (goto-char (point-min)) | |
10631 ;; First check if there are no even levels | |
10632 (when (re-search-forward "^\\(\\*\\*\\)+[^*]" nil t) | |
10633 (org-show-hierarchy-above) | |
10634 (error "Not all levels are odd in this file. Conversion not possible.")) | |
10635 (when (yes-or-no-p "Are you sure you want to globally change levels to odd-even? ") | |
10636 (let ((org-odd-levels-only nil) n) | |
10637 (save-excursion | |
10638 (goto-char (point-min)) | |
10639 (while (re-search-forward "^\\*\\*+" nil t) | |
10640 (setq n (/ (length (match-string 0)) 2)) | |
10641 (while (>= (setq n (1- n)) 0) | |
10642 (org-promote)) | |
10574 (end-of-line 1)))))) | 10643 (end-of-line 1)))))) |
10575 | 10644 |
10576 (defun org-tr-level (n) | 10645 (defun org-tr-level (n) |
10577 "Make N odd if required." | 10646 "Make N odd if required." |
10578 (if org-odd-levels-only (1+ (/ n 2)) n)) | 10647 (if org-odd-levels-only (1+ (/ n 2)) n)) |
10815 #+TEXT: Some descriptive text to be emitted. Several lines OK. | 10884 #+TEXT: Some descriptive text to be emitted. Several lines OK. |
10816 #+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s *:%s TeX:%s | 10885 #+OPTIONS: H:%d num:%s toc:%s \\n:%s @:%s ::%s |:%s ^:%s *:%s TeX:%s |
10817 #+CATEGORY: %s | 10886 #+CATEGORY: %s |
10818 #+SEQ_TODO: %s | 10887 #+SEQ_TODO: %s |
10819 #+TYP_TODO: %s | 10888 #+TYP_TODO: %s |
10820 #+STARTUP: %s %s | 10889 #+STARTUP: %s %s %s %s |
10821 #+ARCHIVE: %s | 10890 #+ARCHIVE: %s |
10822 " | 10891 " |
10823 (buffer-name) (user-full-name) user-mail-address org-export-default-language | 10892 (buffer-name) (user-full-name) user-mail-address org-export-default-language |
10824 org-export-headline-levels | 10893 org-export-headline-levels |
10825 org-export-with-section-numbers | 10894 org-export-with-section-numbers |
10839 (mapconcat 'identity org-todo-keywords " ") | 10908 (mapconcat 'identity org-todo-keywords " ") |
10840 "Me Jason Marie DONE") | 10909 "Me Jason Marie DONE") |
10841 (cdr (assoc org-startup-folded | 10910 (cdr (assoc org-startup-folded |
10842 '((nil . "nofold")(t . "fold")(content . "content")))) | 10911 '((nil . "nofold")(t . "fold")(content . "content")))) |
10843 (if org-startup-with-deadline-check "dlcheck" "nodlcheck") | 10912 (if org-startup-with-deadline-check "dlcheck" "nodlcheck") |
10913 (if org-odd-levels-only "odd" "oddeven") | |
10914 (if org-hide-leading-stars "hidestars" "showstars") | |
10844 org-archive-location | 10915 org-archive-location |
10845 )) | 10916 )) |
10846 | 10917 |
10847 (defun org-insert-export-options-template () | 10918 (defun org-insert-export-options-template () |
10848 "Insert into the buffer a template with information for exporting." | 10919 "Insert into the buffer a template with information for exporting." |
10922 (interactive "P") | 10993 (interactive "P") |
10923 (setq-default org-todo-line-regexp org-todo-line-regexp) | 10994 (setq-default org-todo-line-regexp org-todo-line-regexp) |
10924 (setq-default org-deadline-line-regexp org-deadline-line-regexp) | 10995 (setq-default org-deadline-line-regexp org-deadline-line-regexp) |
10925 (setq-default org-done-string org-done-string) | 10996 (setq-default org-done-string org-done-string) |
10926 (let* ((style org-export-html-style) | 10997 (let* ((style org-export-html-style) |
10998 (odd org-odd-levels-only) | |
10927 (region-p (org-region-active-p)) | 10999 (region-p (org-region-active-p)) |
10928 (region | 11000 (region |
10929 (buffer-substring | 11001 (buffer-substring |
10930 (if region-p (region-beginning) (point-min)) | 11002 (if region-p (region-beginning) (point-min)) |
10931 (if region-p (region-end) (point-max)))) | 11003 (if region-p (region-end) (point-max)))) |
10985 (if (or hidden (not org-export-html-show-new-buffer)) | 11057 (if (or hidden (not org-export-html-show-new-buffer)) |
10986 (set-buffer buffer) | 11058 (set-buffer buffer) |
10987 (switch-to-buffer-other-window buffer)) | 11059 (switch-to-buffer-other-window buffer)) |
10988 (erase-buffer) | 11060 (erase-buffer) |
10989 (fundamental-mode) | 11061 (fundamental-mode) |
10990 (let ((case-fold-search nil)) | 11062 (let ((case-fold-search nil) |
11063 (org-odd-levels-only odd)) | |
10991 (if options (org-parse-export-options options)) | 11064 (if options (org-parse-export-options options)) |
10992 (setq umax (if arg (prefix-numeric-value arg) | 11065 (setq umax (if arg (prefix-numeric-value arg) |
10993 org-export-headline-levels)) | 11066 org-export-headline-levels)) |
10994 | 11067 |
10995 ;; File header | 11068 ;; File header |
12370 ["Demote Heading" org-metaright (not (org-at-table-p))] | 12443 ["Demote Heading" org-metaright (not (org-at-table-p))] |
12371 ["Demote Subtree" org-shiftmetaright (not (org-at-table-p))] | 12444 ["Demote Subtree" org-shiftmetaright (not (org-at-table-p))] |
12372 "--" | 12445 "--" |
12373 ["Archive Subtree" org-archive-subtree t] | 12446 ["Archive Subtree" org-archive-subtree t] |
12374 "--" | 12447 "--" |
12375 ["Convert file to odd levels" org-convert-to-odd-levels t]) | 12448 ["Convert to odd levels" org-convert-to-odd-levels t] |
12449 ["Convert to odd/even levels" org-convert-to-oddeven-levels t]) | |
12376 "--" | 12450 "--" |
12377 ("TODO Lists" | 12451 ("TODO Lists" |
12378 ["TODO/DONE/-" org-todo t] | 12452 ["TODO/DONE/-" org-todo t] |
12379 ["Show TODO Tree" org-show-todo-tree t] | 12453 ["Show TODO Tree" org-show-todo-tree t] |
12380 ["Global TODO list" org-todo-list t] | 12454 ["Global TODO list" org-todo-list t] |
12849 | 12923 |
12850 (run-hooks 'org-load-hook) | 12924 (run-hooks 'org-load-hook) |
12851 | 12925 |
12852 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd | 12926 ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd |
12853 ;;; org.el ends here | 12927 ;;; org.el ends here |
12928 |