>From 055af9e9545947b9aeccc3370c8b67a237eea5d8 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Mon, 30 Oct 2017 10:55:29 -0700 Subject: [PATCH] Replace easy templates with org-insert-structure-template * lisp/org.el (org-insert-structure-template): New function for wrapping region (or element at point) in a begin/end block. (org-structure-predefined-blocks): New option holding predefined blocks, for completion. (org-try-structure-completion, org-complete-expand-structure-template): Remove functions. * doc/org.texi (Inserting structure templates): Document. * testing/lisp/test-org.el (test-org/insert-template): New test. --- doc/org.texi | 756 +++++++++++++++++++++++------------------------ etc/ORG-NEWS | 4 + lisp/org.el | 132 ++++----- testing/lisp/test-org.el | 46 +++ 4 files changed, 491 insertions(+), 447 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 77da6d335..486fe88fe 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -652,7 +652,7 @@ Texinfo export * Texinfo specific export settings:: Setting the environment. * Texinfo file header:: Generating the header. * Texinfo title and copyright page:: Creating preamble pages. -* Info directory file:: Installing a manual in Info file hierarchy. +* Info directory file:: Installing a manual in Info file hierarchy. * Headings and sectioning structure:: Building document structure. * Indices:: Creating indices. * Quoting Texinfo code:: Incorporating literal Texinfo code. @@ -749,7 +749,7 @@ Specific header arguments Miscellaneous * Completion:: M-TAB guesses completions -* Easy templates:: Quick insertion of structural elements +* Inserting structure templates:: Wrapping text in code blocks * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code * Customization:: Adapting Org to changing tastes @@ -796,7 +796,7 @@ MobileOrg @end detailmenu @end menu address@hidden Introduction address@hidden Introduction, Document structure, Top, Top @chapter Introduction @cindex introduction @@ -808,7 +808,7 @@ MobileOrg * Conventions:: Typesetting conventions in the manual @end menu address@hidden Summary address@hidden Summary, Installation, Introduction, Introduction @section Summary @cindex summary @@ -864,7 +864,7 @@ Network Theory Ltd.} @page address@hidden Installation address@hidden Installation, Activation, Summary, Introduction @section Installation @cindex installation @@ -940,7 +940,7 @@ For more detailed explanations on Org's build system, please check the Org Build System page on @uref{http://orgmode.org/worg/dev/org-build-system.html, Worg}. address@hidden Activation address@hidden Activation, Feedback, Installation, Introduction @section Activation @cindex activation @cindex autoload @@ -991,7 +991,7 @@ the default. If you do not like @code{transient-mark-mode}, you can create an active region by using the mouse to select a region, or pressing @address@hidden twice before moving the cursor. address@hidden Feedback address@hidden Feedback, Conventions, Activation, Introduction @section Feedback @cindex feedback @cindex bug reports @@ -1091,7 +1091,7 @@ screen. Save this buffer to a file (for example using @kbd{C-x C-w}) and attach it to your bug report. @end enumerate address@hidden Conventions address@hidden Conventions, , Feedback, Introduction @section Typesetting conventions used in this manual @subsubheading TODO keywords, tags, properties, etc. @@ -1141,7 +1141,7 @@ will be listed to call @code{org-table-move-column-right}. If you prefer, you can compile the manual without the command names by unsetting the flag @code{cmdnames} in @file{org.texi}. address@hidden Document structure address@hidden Document structure, Tables, Introduction, Top @chapter Document structure @cindex document structure @cindex structure of document @@ -1164,7 +1164,7 @@ edit the structure of the document. * Org syntax:: Formal description of Org's syntax @end menu address@hidden Outlines address@hidden Outlines, Headlines, Document structure, Document structure @section Outlines @cindex outlines @cindex Outline mode @@ -1178,7 +1178,7 @@ currently being worked on. Org greatly simplifies the use of outlines by compressing the entire show/hide functionality into a single command, @command{org-cycle}, which is bound to the @key{TAB} key. address@hidden Headlines address@hidden Headlines, Visibility cycling, Outlines, Document structure @section Headlines @cindex headlines @cindex outline tree @@ -1220,7 +1220,7 @@ least two empty lines, one empty line will remain visible after folding the subtree, in order to structure the collapsed view. See the variable @code{org-cycle-separator-lines} to modify this behavior. address@hidden Visibility cycling address@hidden Visibility cycling, Motion, Headlines, Document structure @section Visibility cycling @cindex cycling, visibility @cindex visibility cycling @@ -1234,7 +1234,7 @@ variable @code{org-cycle-separator-lines} to modify this behavior. * Catching invisible edits:: Preventing mistakes when editing invisible parts @end menu address@hidden Global and local cycling address@hidden Global and local cycling, Initial visibility, Visibility cycling, Visibility cycling @subsection Global and local cycling Outlines make it possible to hide parts of the text in the buffer. @@ -1315,7 +1315,7 @@ a @kbd{C-u} prefix, do not remove the previously used indirect buffer. Copy the @i{visible} text in the region into the kill ring. @end table address@hidden Initial visibility address@hidden Initial visibility, Catching invisible edits, Global and local cycling, Visibility cycling @subsection Initial visibility @cindex visibility, initialize @@ -1355,7 +1355,7 @@ requested by startup options and @samp{VISIBILITY} properties in individual entries. @end table address@hidden Catching invisible edits address@hidden Catching invisible edits, , Initial visibility, Visibility cycling @subsection Catching invisible edits @vindex org-catch-invisible-edits @@ -1366,7 +1366,7 @@ confused on what has been edited and how to undo the mistake. Setting docstring of this option on how Org should catch invisible edits and process them. address@hidden Motion address@hidden Motion, Structure editing, Visibility cycling, Document structure @section Motion @cindex motion, between headlines @cindex jumping, to headlines @@ -1406,7 +1406,7 @@ q @r{Quit} See also the option @code{org-goto-interface}. @end table address@hidden Structure editing address@hidden Structure editing, Sparse trees, Motion, Document structure @section Structure editing @cindex structure editing @cindex headline, promotion and demotion @@ -1542,7 +1542,7 @@ inside a table (@pxref{Tables}), the Meta-Cursor keys have different functionality. address@hidden Sparse trees address@hidden Sparse trees, Plain lists, Structure editing, Document structure @section Sparse trees @cindex sparse trees @cindex trees, sparse @@ -1609,7 +1609,7 @@ To print a sparse tree, you can use the Emacs command document. Or you can use @kbd{C-c C-e C-v} to export only the visible part of the document and print the resulting file. address@hidden Plain lists address@hidden Plain lists, Drawers, Sparse trees, Document structure @section Plain lists @cindex plain lists @cindex lists, plain @@ -1813,7 +1813,7 @@ numerically, alphabetically, by time, by checked status for check lists, or by a custom function. @end table address@hidden Drawers address@hidden Drawers, Blocks, Plain lists, Document structure @section Drawers @cindex drawers @cindex visibility cycling, drawers @@ -1866,7 +1866,7 @@ You can select the name of the drawers which should be exported with export output. Property drawers are not affected by this variable: configure @code{org-export-with-properties} instead. address@hidden Blocks address@hidden Blocks, Footnotes, Drawers, Document structure @section Blocks @vindex org-hide-block-startup @@ -1885,7 +1885,7 @@ or on a per-file basis by using #+STARTUP: nohideblocks @end example address@hidden Footnotes address@hidden Footnotes, Orgstruct mode, Blocks, Document structure @section Footnotes @cindex footnotes @@ -1990,7 +1990,7 @@ a separate window. The window can be closed by pressing @kbd{C-c '}. @end table address@hidden Orgstruct mode address@hidden Orgstruct mode, Org syntax, Footnotes, Document structure @section The Orgstruct minor mode @cindex Orgstruct mode @cindex minor mode for structure editing @@ -2025,7 +2025,7 @@ Lisp files, you will be able to fold and unfold headlines in Emacs Lisp commented lines. Some commands like @code{org-demote} are disabled when the prefix is set, but folding/unfolding will work correctly. address@hidden Org syntax address@hidden Org syntax, , Orgstruct mode, Document structure @section Org syntax @cindex Org syntax @@ -2051,7 +2051,7 @@ rely on the syntactic meaning of the surrounding context. @cindex linter You can check syntax in your documents using @code{org-lint} command. address@hidden Tables address@hidden Tables, Hyperlinks, Document structure, Top @chapter Tables @cindex tables @cindex editing tables @@ -2069,7 +2069,7 @@ calculations are supported using the Emacs @file{calc} package * Org-Plot:: Plotting from org tables @end menu address@hidden Built-in table editor address@hidden Built-in table editor, Column width and alignment, Tables, Tables @section The built-in table editor @cindex table editor, built-in @@ -2289,7 +2289,7 @@ it off with @noindent Then the only table command that still works is @kbd{C-c C-c} to do a manual re-align. address@hidden Column width and alignment address@hidden Column width and alignment, Column groups, Built-in table editor, Tables @section Column width and alignment @cindex narrow columns in tables @cindex alignment in tables @@ -2380,7 +2380,7 @@ alignment and field width like this: @samp{}. Lines which only contain these formatting cookies are removed automatically upon exporting the document. address@hidden Column groups address@hidden Column groups, Orgtbl mode, Column width and alignment, Tables @section Column groups @cindex grouping columns in tables @@ -2415,7 +2415,7 @@ every vertical line you would like to have: | / | < | | | < | | @end example address@hidden Orgtbl mode address@hidden Orgtbl mode, The spreadsheet, Column groups, Tables @section The Orgtbl minor mode @cindex Orgtbl mode @cindex minor mode for tables @@ -2436,7 +2436,7 @@ construct @LaTeX{} tables with the underlying ease and power of Orgtbl mode, including spreadsheet capabilities. For details, see @ref{Tables in arbitrary syntax}. address@hidden The spreadsheet address@hidden The spreadsheet, Org-Plot, Orgtbl mode, Tables @section The spreadsheet @cindex calculations, in tables @cindex spreadsheet capabilities @@ -2465,7 +2465,7 @@ formula, moving these references by arrow keys * Advanced features:: Field and column names, parameters and automatic recalc @end menu address@hidden References address@hidden References, Formula syntax for Calc, The spreadsheet, The spreadsheet @subsection References @cindex references @@ -2657,7 +2657,7 @@ table. For example @code{remote($1, @@>$2)} => @code{remote(year_2013, @@>$1)}. The format @code{B3} is not supported because it can not be distinguished from a plain table name or ID. address@hidden Formula syntax for Calc address@hidden Formula syntax for Calc, Formula syntax for Lisp, References, The spreadsheet @subsection Formula syntax for Calc @cindex formula syntax, Calc @cindex syntax, of formulas @@ -2772,7 +2772,7 @@ should be padded with 0 to the full size. You can add your own Calc functions defined in Emacs Lisp with @code{defmath} and use them in formula syntax for Calc. address@hidden Formula syntax for Lisp address@hidden Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet @subsection Emacs Lisp forms as formulas @cindex Lisp forms, as table formulas @@ -2808,7 +2808,7 @@ Add columns 1 and 2, equivalent to Calc's @code{$1+$2}. Compute the sum of columns 1 to 4, like Calc's @code{vsum($1..$4)}. @end table address@hidden Durations and time values address@hidden Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet @subsection Durations and time values @cindex Duration, computing @cindex Time, computing @@ -2843,7 +2843,7 @@ third formula in the example above). Negative duration values can be manipulated as well, and integers will be considered as seconds in addition and subtraction. address@hidden Field and range formulas address@hidden Field and range formulas, Column formulas, Durations and time values, The spreadsheet @subsection Field and range formulas @cindex field formula @cindex range formula @@ -2899,7 +2899,7 @@ can also be used to assign a formula to some but not all fields in a row. Named field, see @ref{Advanced features}. @end table address@hidden Column formulas address@hidden Column formulas, Lookup functions, Field and range formulas, The spreadsheet @subsection Column formulas @cindex column formula @cindex formula, for table column @@ -2938,7 +2938,7 @@ stores it. With a numeric prefix argument(e.g., @kbd{C-5 C-c =}) the command will apply it to that many consecutive fields in the current column. @end table address@hidden Lookup functions address@hidden Lookup functions, Editing and debugging formulas, Column formulas, The spreadsheet @subsection Lookup functions @cindex lookup functions in tables @cindex table lookup functions @@ -2982,7 +2982,7 @@ matching cells, rank results, group data etc. For practical examples see @uref{http://orgmode.org/worg/org-tutorials/org-lookups.html, this tutorial on Worg}. address@hidden Editing and debugging formulas address@hidden Editing and debugging formulas, Updating the table, Lookup functions, The spreadsheet @subsection Editing and debugging formulas @cindex formula editing @cindex editing, of table formulas @@ -3135,7 +3135,7 @@ turn on formula debugging in the @code{Tbl} menu and repeat the calculation, for example by pressing @kbd{C-u C-u C-c = @key{RET}} in a field. Detailed information will be displayed. address@hidden Updating the table address@hidden Updating the table, Advanced features, Editing and debugging formulas, The spreadsheet @subsection Updating the table @cindex recomputing table fields @cindex updating, table @@ -3172,7 +3172,7 @@ Iterate all tables in the current buffer, in order to converge table-to-table dependencies. @end table address@hidden Advanced features address@hidden Advanced features, , Updating the table, The spreadsheet @subsection Advanced features If you want the recalculation of fields to happen automatically, or if you @@ -3277,7 +3277,7 @@ functions. @end group @end example address@hidden Org-Plot address@hidden Org-Plot, , The spreadsheet, Tables @section Org-Plot @cindex graph, in tables @cindex plot tables using Gnuplot @@ -3409,7 +3409,7 @@ The formula is an elisp call: @end table address@hidden Hyperlinks address@hidden Hyperlinks, TODO items, Tables, Top @chapter Hyperlinks @cindex hyperlinks @@ -3427,7 +3427,7 @@ other files, Usenet articles, emails, and much more. * Custom searches:: When the default search is not enough @end menu address@hidden Link format address@hidden Link format, Internal links, Hyperlinks, Hyperlinks @section Link format @cindex link format @cindex format, of links @@ -3458,7 +3458,7 @@ missing bracket hides the link internals again. To show the internal structure of all links, use the menu entry @code{Org->Hyperlinks->Literal links}. address@hidden Internal links address@hidden Internal links, External links, Link format, Hyperlinks @section Internal links @cindex internal links @cindex links, internal @@ -3529,7 +3529,7 @@ earlier. * Radio targets:: Make targets trigger links in plain text @end menu address@hidden Radio targets address@hidden Radio targets, , Internal links, Internal links @subsection Radio targets @cindex radio targets @cindex targets, radio @@ -3545,7 +3545,7 @@ for radio targets only when the file is first loaded into Emacs. To update the target list during editing, press @kbd{C-c C-c} with the cursor on or at a target. address@hidden External links address@hidden External links, Handling links, Internal links, Hyperlinks @section External links @cindex links, external @cindex external links @@ -3648,7 +3648,7 @@ as links. If spaces must be part of the link (for example in @samp{bbdb:Richard Stallman}), or if you need to remove ambiguities about the end of the link, enclose them in square brackets. address@hidden Handling links address@hidden Handling links, Using links outside Org, External links, Hyperlinks @section Handling links @cindex links, handling @@ -3846,7 +3846,7 @@ to @kbd{C-n} and @kbd{C-p} @end lisp @end table address@hidden Using links outside Org address@hidden Using links outside Org, Link abbreviations, Handling links, Hyperlinks @section Using links outside Org You can insert and follow links that have Org syntax not only in @@ -3859,7 +3859,7 @@ yourself): (global-set-key "\C-c o" 'org-open-at-point-global) @end lisp address@hidden Link abbreviations address@hidden Link abbreviations, Search options, Using links outside Org, Hyperlinks @section Link abbreviations @cindex link abbreviations @cindex abbreviation, links @@ -3933,7 +3933,7 @@ link with prefix. You can add a completion function to a link like this: @end lisp address@hidden Search options address@hidden Search options, Custom searches, Link abbreviations, Hyperlinks @section Search options in file links @cindex search option in file links @cindex file links, searching @@ -3985,7 +3985,7 @@ to search the current file. For example, @code{[[file:::find me]]} does a search for @samp{find me} in the current file, just as @samp{[[find me]]} would. address@hidden Custom searches address@hidden Custom searches, , Search options, Hyperlinks @section Custom Searches @cindex custom search strings @cindex search strings, custom @@ -4009,7 +4009,7 @@ variables for more information. Org actually uses this mechanism for address@hidden database files, and you can use the corresponding code as an implementation example. See the file @file{org-bibtex.el}. address@hidden TODO items address@hidden TODO items, Tags, Hyperlinks, Top @chapter TODO items @cindex TODO items @@ -4034,7 +4034,7 @@ methods to give you an overview of all the things that you have to do. * Checkboxes:: Tick-off lists @end menu address@hidden TODO basics address@hidden TODO basics, TODO extensions, TODO items, TODO items @section Basic TODO functionality Any headline becomes a TODO item when it starts with the word @@ -4108,7 +4108,7 @@ Insert a new TODO entry below the current one. Changing a TODO state can also trigger tag changes. See the docstring of the option @code{org-todo-state-tags-triggers} for details. address@hidden TODO extensions address@hidden TODO extensions, Progress logging, TODO basics, TODO items @section Extended use of TODO keywords @cindex extended TODO keywords @@ -4132,7 +4132,7 @@ TODO items in particular (@pxref{Tags}). * TODO dependencies:: When one task needs to wait for others @end menu address@hidden Workflow states address@hidden Workflow states, TODO types, TODO extensions, TODO extensions @subsection TODO keywords as workflow states @cindex TODO workflow @cindex workflow states as TODO keywords @@ -4163,7 +4163,7 @@ define many keywords, you can use in-buffer completion buffer. Changing a TODO state can be logged with a timestamp, see @ref{Tracking TODO state changes}, for more information. address@hidden TODO types address@hidden TODO types, Multiple sets in one file, Workflow states, TODO extensions @subsection TODO keywords as types @cindex TODO types @cindex names as TODO keywords @@ -4195,7 +4195,7 @@ has to do, you would use @kbd{C-3 C-c / t}. To collect Lucy's items from all agenda files into a single buffer, you would use the numeric prefix argument as well when creating the global TODO list: @kbd{C-3 C-c a t}. address@hidden Multiple sets in one file address@hidden Multiple sets in one file, Fast access to TODO states, TODO types, TODO extensions @subsection Multiple keyword sets in one file @cindex TODO keyword sets @@ -4244,7 +4244,7 @@ from @code{DONE} to @code{REPORT} in the example above. See also @code{shift-selection-mode}. @end table address@hidden Fast access to TODO states address@hidden Fast access to TODO states, Per-file keywords, Multiple sets in one file, TODO extensions @subsection Fast access to TODO states If you would like to quickly change an entry to an arbitrary TODO state @@ -4269,7 +4269,7 @@ state through the tags interface (@pxref{Setting tags}), in case you like to mingle the two concepts. Note that this means you need to come up with unique keys across both sets of keywords.} address@hidden Per-file keywords address@hidden Per-file keywords, Faces for TODO keywords, Fast access to TODO states, TODO extensions @subsection Setting up keywords for individual files @cindex keyword options @cindex per-file keywords @@ -4315,7 +4315,7 @@ Org mode is activated after visiting a file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+} is simply restarting Org mode for the current buffer.}. address@hidden Faces for TODO keywords address@hidden Faces for TODO keywords, TODO dependencies, Per-file keywords, TODO extensions @subsection Faces for TODO keywords @cindex faces, for TODO keywords @@ -4343,7 +4343,7 @@ special face and use that. A string is interpreted as a color. The option @code{org-faces-easy-properties} determines if that color is interpreted as a foreground or a background color. address@hidden TODO dependencies address@hidden TODO dependencies, , Faces for TODO keywords, TODO extensions @subsection TODO dependencies @cindex TODO dependencies @cindex dependencies, of TODO states @@ -4416,7 +4416,7 @@ between entries in different trees or files, check out the contributed module @file{org-depend.el}. @page address@hidden Progress logging address@hidden Progress logging, Priorities, TODO extensions, TODO items @section Progress logging @cindex progress logging @cindex logging, of progress @@ -4434,7 +4434,7 @@ work time}. * Tracking your habits:: How consistent have you been? @end menu address@hidden Closing items address@hidden Closing items, Tracking TODO state changes, Progress logging, Progress logging @subsection Closing items The most basic logging is to keep track of @emph{when} a certain TODO @@ -4465,7 +4465,7 @@ lognotedone}.} You will then be prompted for a note, and that note will be stored below the entry with a @samp{Closing Note} heading. address@hidden Tracking TODO state changes address@hidden Tracking TODO state changes, Tracking your habits, Closing items, Progress logging @subsection Tracking TODO state changes @cindex drawer, for state change recording @@ -4548,7 +4548,7 @@ settings like @code{TODO(!)}. For example :END: @end example address@hidden Tracking your habits address@hidden Tracking your habits, , Tracking TODO state changes, Progress logging @subsection Tracking your habits @cindex habits @@ -4648,7 +4648,7 @@ temporarily be disabled and they won't appear at all. Press @kbd{K} again to bring them back. They are also subject to tag filtering, if you have habits which should only be done in certain contexts, for example. address@hidden Priorities address@hidden Priorities, Breaking down tasks, Progress logging, TODO items @section Priorities @cindex priorities @@ -4706,7 +4706,7 @@ priority): #+PRIORITIES: A C B @end example address@hidden Breaking down tasks address@hidden Breaking down tasks, Checkboxes, Priorities, TODO items @section Breaking tasks down into subtasks @cindex tasks, breaking down @cindex statistics, for TODO items @@ -4767,7 +4767,7 @@ Another possibility is the use of checkboxes to identify (a hierarchy of) a large number of subtasks (@pxref{Checkboxes}). address@hidden Checkboxes address@hidden Checkboxes, , Breaking down tasks, TODO items @section Checkboxes @cindex checkboxes @@ -4876,7 +4876,7 @@ changing TODO states. If you delete boxes/entries or add/change them by hand, use this command to get things back into sync. @end table address@hidden Tags address@hidden Tags, Properties and columns, TODO items, Top @chapter Tags @cindex tags @cindex headline tagging @@ -4904,7 +4904,7 @@ You may specify special faces for specific tags using the option * Tag searches:: Searching for combinations of tags @end menu address@hidden Tag inheritance address@hidden Tag inheritance, Setting tags, Tags, Tags @section Tag inheritance @cindex tag inheritance @cindex inheritance, of tags @@ -4958,7 +4958,7 @@ with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control this: the default value includes all agenda types, but setting this to @code{nil} can really speed up agenda generation. address@hidden Setting tags address@hidden Setting tags, Tag hierarchy, Tag inheritance, Tags @section Setting tags @cindex setting tags @cindex tags, setting @@ -5145,7 +5145,7 @@ instead of @kbd{C-c C-c}). If you set the variable to the value @code{expert}, the special window is not even shown for single-key tag selection, it comes up only when you press an extra @kbd{C-c}. address@hidden Tag hierarchy address@hidden Tag hierarchy, Tag searches, Setting tags, Tags @section Tag hierarchy @cindex group tags @@ -5250,7 +5250,7 @@ If you want to ignore group tags temporarily, toggle group tags support with @command{org-toggle-tags-groups}, bound to @kbd{C-c C-x q}. If you want to disable tag groups completely, set @code{org-group-tags} to @code{nil}. address@hidden Tag searches address@hidden Tag searches, , Tag hierarchy, Tags @section Tag searches @cindex tag searches @cindex searching for tags @@ -5282,7 +5282,7 @@ properties. For a complete description with many examples, see @ref{Matching tags and properties}. address@hidden Properties and columns address@hidden Properties and columns, Dates and times, Tags, Top @chapter Properties and columns @cindex properties @@ -5312,7 +5312,7 @@ Properties can be conveniently edited and viewed in column view * Property API:: Properties for Lisp programmers @end menu address@hidden Property syntax address@hidden Property syntax, Special properties, Properties and columns, Properties and columns @section Property syntax @cindex property syntax @cindex drawer, for properties @@ -5436,7 +5436,7 @@ Compute the property at point, using the operator and scope from the nearest column format definition. @end table address@hidden Special properties address@hidden Special properties, Property searches, Property syntax, Properties and columns @section Special properties @cindex properties, special @@ -5481,7 +5481,7 @@ TIMESTAMP_IA @r{The first inactive timestamp in the entry.} TODO @r{The TODO keyword of the entry.} @end example address@hidden Property searches address@hidden Property searches, Property inheritance, Special properties, Properties and columns @section Property searches @cindex properties, searching @cindex searching, of properties @@ -5518,7 +5518,7 @@ value. If you enclose the value in curly braces, it is interpreted as a regular expression and matched against the property values. @end table address@hidden Property inheritance address@hidden Property inheritance, Column view, Property searches, Properties and columns @section Property Inheritance @cindex properties, inheritance @cindex inheritance, of properties @@ -5562,7 +5562,7 @@ The LOGGING property may define logging settings for an entry or a subtree (@pxref{Tracking TODO state changes}). @end table address@hidden Column view address@hidden Column view, Property API, Property inheritance, Properties and columns @section Column view A great way to view and edit properties in an outline tree is @@ -5585,7 +5585,7 @@ queries have collected selected items, possibly from a number of files. * Capturing column view:: A dynamic block for column view @end menu address@hidden Defining columns address@hidden Defining columns, Using column view, Column view, Column view @subsection Defining columns @cindex column view, for properties @cindex properties, column view @@ -5598,7 +5598,7 @@ done by defining a column format line. * Column attributes:: Appearance and content of a column @end menu address@hidden Scope of column definitions address@hidden Scope of column definitions, Column attributes, Defining columns, Defining columns @subsubsection Scope of column definitions To define a column format for an entire file, use a line like @@ -5625,7 +5625,7 @@ you can define columns on level 1 that are general enough for all sublevels, and more specific columns further down, when you edit a deeper part of the tree. address@hidden Column attributes address@hidden Column attributes, , Scope of column definitions, Defining columns @subsubsection Column attributes A column definition sets the attributes of a column. The general definition looks like this: @@ -5731,7 +5731,7 @@ an @samp{[X]} status if all children have been checked. The sums of CLOCK intervals in the subtree, either for all clocks or just for today. address@hidden Using column view address@hidden Using column view, Capturing column view, Defining columns, Column view @subsection Using column view @table @kbd @@ -5790,7 +5790,7 @@ Insert a new column, to the left of the current column. Delete the current column. @end table address@hidden Capturing column view address@hidden Capturing column view, , Using column view, Column view @subsection Capturing column view Since column view is just an overlay over a buffer, it cannot be @@ -5869,7 +5869,7 @@ distributed with the main distribution of Org (visit properties from entries in a certain scope, and arbitrary Lisp expressions to process these values before inserting them into a table or a dynamic block. address@hidden Property API address@hidden Property API, , Column view, Properties and columns @section The Property API @cindex properties, API @cindex API, for properties @@ -5879,7 +5879,7 @@ be used by Emacs Lisp programs to work with properties and to implement features based on them. For more information see @ref{Using the property API}. address@hidden Dates and times address@hidden Dates and times, Capture - Refile - Archive, Properties and columns, Top @chapter Dates and times @cindex dates @cindex times @@ -5903,7 +5903,7 @@ is used in a much wider sense. @end menu address@hidden Timestamps address@hidden Timestamps, Creating timestamps, Dates and times, Dates and times @section Timestamps, deadlines, and scheduling @cindex timestamps @cindex ranges, time @@ -5997,7 +5997,7 @@ angular ones. These timestamps are inactive in the sense that they do @end table address@hidden Creating timestamps address@hidden Creating timestamps, Deadlines and scheduling, Timestamps, Dates and times @section Creating timestamps @cindex creating timestamps @cindex timestamps, creating @@ -6068,7 +6068,7 @@ the following column). * Custom time format:: Making dates look different @end menu address@hidden The date/time prompt address@hidden The date/time prompt, Custom time format, Creating timestamps, Creating timestamps @subsection The date/time prompt @cindex date, reading in minibuffer @cindex time, reading in minibuffer @@ -6198,7 +6198,7 @@ on, the current interpretation of your input will be displayed live in the address@hidden you find this distracting, turn the display off with @code{org-read-date-display-live}.}. address@hidden Custom time format address@hidden Custom time format, , The date/time prompt, Creating timestamps @subsection Custom time format @cindex custom date/time format @cindex time format, custom @@ -6246,7 +6246,7 @@ format is shorter, things do work as expected. @end itemize address@hidden Deadlines and scheduling address@hidden Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and times @section Deadlines and scheduling A timestamp may be preceded by special keywords to facilitate planning. Both @@ -6337,7 +6337,7 @@ sexp entry matches. * Repeated tasks:: Items that show up again and again @end menu address@hidden Inserting deadline/schedule address@hidden Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling @subsection Inserting deadlines or schedules The following commands allow you to quickly insert a deadline or to schedule @@ -6384,7 +6384,7 @@ setting the date by indicating a relative time: e.g., +1d will set the date to the next day after today, and --1w will set the date to the previous week before any current timestamp. address@hidden Repeated tasks address@hidden Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling @subsection Repeated tasks @cindex tasks, repeated @cindex repeated tasks @@ -6485,7 +6485,7 @@ subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was created for this purpose, it is described in @ref{Structure editing}. address@hidden Clocking work time address@hidden Clocking work time, Effort estimates, Deadlines and scheduling, Dates and times @section Clocking work time @cindex clocking time @cindex time clocking @@ -6517,7 +6517,7 @@ what to do with it. * Resolving idle time:: Resolving time when you've been idle @end menu address@hidden Clocking commands address@hidden Clocking commands, The clock table, Clocking work time, Clocking work time @subsection Clocking commands @table @kbd @@ -6616,7 +6616,7 @@ which tasks have been worked on or closed during a day. @code{org-clock-in-last} can have a global key binding and will not modify the window disposition. address@hidden The clock table address@hidden The clock table, Resolving idle time, Clocking commands, Clocking work time @subsection The clock table @cindex clocktable, dynamic block @cindex report, of clocked time @@ -6768,7 +6768,7 @@ would be #+END: clocktable @end example address@hidden Resolving idle time address@hidden Resolving idle time, , The clock table, Clocking work time @subsection Resolving idle time and continuous clocking @subsubheading Resolving idle time @@ -6853,7 +6853,7 @@ last clocked entry for this session, and start the new clock from there. If you only want this from time to time, use three universal prefix arguments with @code{org-clock-in} and two @kbd{C-u C-u} with @code{org-clock-in-last}. address@hidden Effort estimates address@hidden Effort estimates, Timers, Clocking work time, Dates and times @section Effort estimates @cindex effort estimates @@ -6914,7 +6914,7 @@ with the @kbd{/} key in the agenda (@pxref{Agenda commands}). If you have these estimates defined consistently, two or three key presses will narrow down the list to stuff that fits into an available time slot. address@hidden Timers address@hidden Timers, , Effort estimates, Dates and times @section Taking notes with a timer @cindex relative timer @cindex countdown timer @@ -6964,7 +6964,7 @@ Stop the timer. After this, you can only start a new timer, not continue the old one. This command also removes the timer from the mode line. @end table address@hidden Capture - Refile - Archive address@hidden Capture - Refile - Archive, Agenda views, Dates and times, Top @chapter Capture - Refile - Archive @cindex capture @@ -6984,7 +6984,7 @@ trees to an archive file keeps the system compact and fast. * Archiving:: What to do with finished projects @end menu address@hidden Capture address@hidden Capture, Attachments, Capture - Refile - Archive, Capture - Refile - Archive @section Capture @cindex capture @@ -7011,7 +7011,7 @@ customization. * Capture templates:: Define the outline of different note types @end menu address@hidden Setting up capture address@hidden Setting up capture, Using capture, Capture, Capture @subsection Setting up capture The following customization sets a default target file for notes, and defines @@ -7026,7 +7026,7 @@ suggestion.} for capturing new material. @end group @end smalllisp address@hidden Using capture address@hidden Using capture, Capture templates, Setting up capture, Capture @subsection Using capture @table @kbd @@ -7083,7 +7083,7 @@ automatically be created unless you set @code{org-capture-bookmark} to To insert the capture at point in an Org buffer, call @code{org-capture} with a @code{C-0} prefix argument. address@hidden Capture templates address@hidden Capture templates, , Using capture, Capture @subsection Capture templates @cindex templates, for Capture @@ -7142,7 +7142,7 @@ like this: * Templates in contexts:: Only show a template in a specific context @end menu address@hidden Template elements address@hidden Template elements, Template expansion, Capture templates, Capture templates @subsubsection Template elements Now lets look at the elements of a template definition. Each entry in @@ -7307,7 +7307,7 @@ buffer again after capture is completed. @end table @end table address@hidden Template expansion address@hidden Template expansion, Templates in contexts, Template elements, Capture templates @subsubsection Template expansion In the template itself, special @address@hidden you need one of @@ -7392,7 +7392,7 @@ To place the cursor after template expansion use: %? @r{After completing the template, position cursor here.} @end smallexample address@hidden Templates in contexts address@hidden Templates in contexts, , Template expansion, Capture templates @subsubsection Templates in contexts @vindex org-capture-templates-contexts @@ -7416,7 +7416,7 @@ template. In that case, add this command key like this: See the docstring of the variable for more information. address@hidden Attachments address@hidden Attachments, RSS feeds, Capture, Capture - Refile - Archive @section Attachments @cindex attachments @@ -7507,7 +7507,7 @@ same directory for attachments as the parent does. @end table @end table address@hidden RSS feeds address@hidden RSS feeds, Protocols, Attachments, Capture - Refile - Archive @section RSS feeds @cindex RSS feeds @cindex Atom feeds @@ -7550,7 +7550,7 @@ adding the same item several times. For more information, including how to read atom feeds, see @file{org-feed.el} and the docstring of @code{org-feed-alist}. address@hidden Protocols address@hidden Protocols, Refile and copy, RSS feeds, Capture - Refile - Archive @section Protocols for external access @cindex protocols, for external access @@ -7588,7 +7588,7 @@ sections. Configure @code{org-protocol-protocol-alist} to define your own. * @code{open-source} protocol:: Edit published contents. @end menu address@hidden @code{store-link} protocol address@hidden @code{store-link} protocol, @code{capture} protocol, Protocols, Protocols @subsection @code{store-link} protocol @cindex store-link protocol @cindex protocol, store-link @@ -7619,7 +7619,7 @@ javascript:location.href='org-protocol://store-link?url='+ encodeURIComponent(location.href); @end example address@hidden @code{capture} protocol address@hidden @code{capture} protocol, @code{open-source} protocol, @code{store-link} protocol, Protocols @subsection @code{capture} protocol @cindex capture protocol @cindex protocol, capture @@ -7661,7 +7661,7 @@ The following template placeholders are available: %i The selected text @end example address@hidden @code{open-source} protocol address@hidden @code{open-source} protocol, , @code{capture} protocol, Protocols @subsection @code{open-source} protocol @cindex open-source protocol @cindex protocol, open-source @@ -7758,7 +7758,7 @@ valid contents: @code{org-protocol-create} and @code{org-protocol-create-for-org}. The latter is of use if you're editing an Org file that is part of a publishing project. address@hidden Refile and copy address@hidden Refile and copy, Archiving, Protocols, Capture - Refile - Archive @section Refile and copy @cindex refiling notes @cindex copying notes @@ -7815,7 +7815,7 @@ setting @code{org-refile-use-cache}. To make the command see new possible targets, you have to clear the cache with this command. @end table address@hidden Archiving address@hidden Archiving, , Refile and copy, Capture - Refile - Archive @section Archiving @cindex archiving @@ -7836,7 +7836,7 @@ Archive the current entry using the command specified in the variable * Internal archiving:: Switch off a tree but keep it in the file @end menu address@hidden Moving subtrees address@hidden Moving subtrees, Internal archiving, Archiving, Archiving @subsection Moving a tree to the archive file @cindex external archiving @@ -7890,7 +7890,7 @@ outline path the archiving time etc. Configure the variable added. address@hidden Internal archiving address@hidden Internal archiving, , Moving subtrees, Archiving @subsection Internal archiving @cindex archive tag @@ -7954,7 +7954,7 @@ outline. @end table address@hidden Agenda views address@hidden Agenda views, Markup, Capture - Refile - Archive, Top @chapter Agenda views @cindex agenda views @@ -8021,7 +8021,7 @@ window configuration is restored when the agenda exits: * Agenda column view:: Using column view for collected entries @end menu address@hidden Agenda files address@hidden Agenda files, Agenda dispatcher, Agenda views, Agenda views @section Agenda files @cindex agenda files @cindex files for agenda @@ -8098,7 +8098,7 @@ effect immediately. Lift the restriction. @end table address@hidden Agenda dispatcher address@hidden Agenda dispatcher, Built-in agenda views, Agenda files, Agenda views @section The agenda dispatcher @cindex agenda dispatcher @cindex dispatching agenda commands @@ -8161,7 +8161,7 @@ possibility to create extended agenda buffers that contain several blocks together, for example the weekly agenda, the global TODO list and a number of special tags matches. @xref{Custom agenda views}. address@hidden Built-in agenda views address@hidden Built-in agenda views, Presentation and sorting, Agenda dispatcher, Agenda views @section The built-in agenda views In this section we describe the built-in views. @@ -8174,7 +8174,7 @@ In this section we describe the built-in views. * Stuck projects:: Find projects you need to review @end menu address@hidden Weekly/daily agenda address@hidden Weekly/daily agenda, Global TODO list, Built-in agenda views, Built-in agenda views @subsection The weekly/daily agenda @cindex agenda @cindex weekly agenda @@ -8333,7 +8333,7 @@ It also reads a @code{APPT_WARNTIME} property which will then override the value of @code{appt-message-warning-time} for this appointment. See the docstring for details. address@hidden Global TODO list address@hidden Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views @subsection The global TODO list @cindex global TODO list @cindex TODO list, global @@ -8394,7 +8394,7 @@ and omit the sublevels from the global list. Configure the variable @code{org-agenda-todo-list-sublevels} to get this behavior. @end itemize address@hidden Matching tags and properties address@hidden Matching tags and properties, Search view, Global TODO list, Built-in agenda views @subsection Matching tags and properties @cindex matching, of tags @cindex matching, of properties @@ -8567,7 +8567,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or @samp{NEXT}. @end table address@hidden Search view address@hidden Search view, Stuck projects, Matching tags and properties, Built-in agenda views @subsection Search view @cindex search view @cindex text search @@ -8597,7 +8597,7 @@ the docstring of the command @code{org-search-view}. Note that in addition to the agenda files, this command will also search the files listed in @code{org-agenda-text-search-extra-files}. address@hidden Stuck projects address@hidden Stuck projects, , Search view, Built-in agenda views @subsection Stuck projects @pindex GTD, Getting Things Done @@ -8645,7 +8645,7 @@ correct customization for this is Note that if a project is identified as non-stuck, the subtree of this entry will still be searched for stuck projects. address@hidden Presentation and sorting address@hidden Presentation and sorting, Agenda commands, Built-in agenda views, Agenda views @section Presentation and sorting @cindex presentation, of agenda items @@ -8667,7 +8667,7 @@ associated with the item. * Filtering/limiting agenda items:: Dynamically narrow the agenda @end menu address@hidden Categories address@hidden Categories, Time-of-day specifications, Presentation and sorting, Presentation and sorting @subsection Categories @cindex category @@ -8694,7 +8694,7 @@ longer than 10 characters. You can set up icons for category by customizing the @code{org-agenda-category-icon-alist} variable. address@hidden Time-of-day specifications address@hidden Time-of-day specifications, Sorting agenda items, Categories, Presentation and sorting @subsection Time-of-day specifications @cindex time-of-day specification @@ -8745,7 +8745,7 @@ The time grid can be turned on and off with the variable @code{org-agenda-use-time-grid}, and can be configured with @code{org-agenda-time-grid}. address@hidden Sorting agenda items address@hidden Sorting agenda items, Filtering/limiting agenda items, Time-of-day specifications, Presentation and sorting @subsection Sorting agenda items @cindex sorting, of agenda items @cindex priorities, of agenda items @@ -8779,7 +8779,7 @@ Sorting can be customized using the variable @code{org-agenda-sorting-strategy}, and may also include criteria based on the estimated effort of an entry (@pxref{Effort estimates}). address@hidden Filtering/limiting agenda items address@hidden Filtering/limiting agenda items, , Sorting agenda items, Presentation and sorting @subsection Filtering/limiting agenda items Agenda built-in or customized commands are statically defined. Agenda @@ -8965,7 +8965,7 @@ rebuilding the agenda: This prompts for the type of limit to apply and its value. @end table address@hidden Agenda commands address@hidden Agenda commands, Custom agenda views, Presentation and sorting, Agenda views @section Commands in the agenda buffer @cindex commands, in agenda buffer @@ -9488,7 +9488,7 @@ visit Org files will not be removed. @end table address@hidden Custom agenda views address@hidden Custom agenda views, Exporting agenda views, Agenda commands, Agenda views @section Custom agenda views @cindex custom agenda views @cindex agenda views, custom @@ -9504,7 +9504,7 @@ dispatcher (@pxref{Agenda dispatcher}), just like the default commands. * Setting options:: Changing the rules @end menu address@hidden Storing searches address@hidden Storing searches, Block agenda, Custom agenda views, Custom agenda views @subsection Storing searches The first application of custom searches is the definition of keyboard @@ -9596,7 +9596,7 @@ Peter, or Kim) as additional tag to match. Note that the @code{*-tree} agenda views need to be called from an Org buffer as they operate on the current buffer only. address@hidden Block agenda address@hidden Block agenda, Setting options, Storing searches, Custom agenda views @subsection Block agenda @cindex block agenda @cindex agenda, with block views @@ -9630,7 +9630,7 @@ your agenda for the current week, all TODO items that carry the tag @samp{home}, and also all lines tagged with @samp{garden}. Finally the command @kbd{C-c a o} provides a similar view for office tasks. address@hidden Setting options address@hidden Setting options, , Block agenda, Custom agenda views @subsection Setting options for custom commands @cindex options, for custom agenda views @@ -9722,7 +9722,7 @@ command key @code{"r"}. In that case, add this command key like this: See the docstring of the variable for more information. address@hidden Exporting agenda views address@hidden Exporting agenda views, Agenda column view, Custom agenda views, Agenda views @section Exporting agenda views @cindex agenda views, exporting @@ -9862,7 +9862,7 @@ processing by other programs. See @ref{Extracting agenda information}, for more information. address@hidden Agenda column view address@hidden Agenda column view, , Exporting agenda views, Agenda views @section Using column view in the agenda @cindex column view, in agenda @cindex agenda, column view @@ -9928,7 +9928,7 @@ spent ---via @code{CLOCKSUM}---and with the planned total effort for it. @end enumerate address@hidden Markup address@hidden Markup, Exporting, Agenda views, Top @chapter Markup for rich export When exporting Org mode documents, the exporter tries to reflect the @@ -9948,7 +9948,7 @@ markup rules used in an Org mode buffer. * Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents @end menu address@hidden Paragraphs address@hidden Paragraphs, Emphasis and monospace, Markup, Markup @section Paragraphs, line breaks, and quoting @cindex paragraphs, markup rules @@ -9994,7 +9994,7 @@ but not any simpler #+END_CENTER @end example address@hidden Emphasis and monospace address@hidden Emphasis and monospace, Horizontal rules, Paragraphs, Markup @section Emphasis and monospace @cindex underlined text, markup rules @@ -10019,13 +10019,13 @@ can tweak @code{org-emphasis-regexp-components}. Beware that changing one of the above variables will no take effect until you reload Org, for which you may need to restart Emacs. address@hidden Horizontal rules address@hidden Horizontal rules, Images and tables, Emphasis and monospace, Markup @section Horizontal rules @cindex horizontal rules, markup rules A line consisting of only dashes, and at least 5 of them, will be exported as a horizontal line. address@hidden Images and tables address@hidden Images and tables, Literal examples, Horizontal rules, Markup @section Images and Tables @cindex tables, markup rules @@ -10073,7 +10073,7 @@ the same caption mechanism can apply to many others (e.g., @LaTeX{} equations, source code blocks). Depending on the export back-end, those may or may not be handled. address@hidden Literal examples address@hidden Literal examples, Special symbols, Images and tables, Markup @section Literal examples @cindex literal examples, markup rules @cindex code line references, markup rules @@ -10118,8 +10118,8 @@ for details.}. This is done with the @samp{src} block, where you also need to specify the name of the major mode that should be used to fontify the address@hidden in @samp{src} blocks may also be evaluated either interactively or on export. @xref{Working with source code}, for more -information on evaluating code blocks.}, see @ref{Easy templates} for -shortcuts to easily insert code blocks. +information on evaluating code blocks.}, see @ref{Inserting structure +templates} for shortcuts to easily insert code blocks. @cindex #+BEGIN_SRC @example @@ -10186,8 +10186,7 @@ HTML export also allows examples to be published as text areas (@pxref{Text areas in HTML export}). Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added -so often, shortcuts are provided using the Easy templates facility -(@pxref{Easy templates}). +so often, a shortcut is provided (@pxref{Inserting structure templates}). @table @kbd @kindex C-c ' @@ -10213,7 +10212,7 @@ formatting like @samp{(ref:label)} at the end of the current line. Then the label is stored as a link @samp{(label)}, for retrieval with @kbd{C-c C-l}. @end table address@hidden Special symbols address@hidden Special symbols, Subscripts and superscripts, Literal examples, Markup @section Special symbols @cindex Org entities @cindex math symbols @@ -10274,7 +10273,7 @@ address@hidden behaviour can be disabled with @code{-} export setting combinations: @samp{\-} is treated as a shy hyphen, @samp{--} and @samp{---} are converted into dashes, and @samp{...} becomes a compact set of dots. address@hidden Subscripts and superscripts address@hidden Subscripts and superscripts, Embedded @LaTeX{}, Special symbols, Markup @section Subscripts and superscripts @cindex subscript @cindex superscript @@ -10303,7 +10302,7 @@ In addition to showing entities as UTF-8 characters, this command will also format sub- and superscripts in a WYSIWYM way. @end table address@hidden Embedded @LaTeX{} address@hidden Embedded @LaTeX{}, , Subscripts and superscripts, Markup @section Embedded @LaTeX{} @cindex @TeX{} interpretation @cindex @LaTeX{} interpretation @@ -10324,7 +10323,7 @@ readily processed to produce pretty output for a number of export back-ends. * CDLaTeX mode:: Speed up entering of formulas @end menu address@hidden @LaTeX{} fragments address@hidden @LaTeX{} fragments, Previewing @LaTeX{} fragments, Embedded @LaTeX{}, Embedded @LaTeX{} @subsection @LaTeX{} fragments @cindex @LaTeX{} fragments @@ -10388,7 +10387,7 @@ lines: #+OPTIONS: tex:verbatim @r{Verbatim export, for jsMath or so} @end example address@hidden Previewing @LaTeX{} fragments address@hidden Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{} @subsection Previewing @LaTeX{} fragments @cindex @LaTeX{} fragments, preview @@ -10436,7 +10435,7 @@ To disable it, simply use #+STARTUP: nolatexpreview @end example address@hidden CDLaTeX mode address@hidden CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{} @subsection Using address@hidden to enter math @cindex address@hidden @@ -10497,7 +10496,7 @@ modification will work only inside @LaTeX{} fragments; outside the quote is normal. @end itemize address@hidden Exporting address@hidden Exporting, Publishing, Markup, Top @chapter Exporting @cindex exporting @@ -10564,7 +10563,7 @@ library in the Emacs init file like this: * Export in foreign buffers:: Author tables and lists in Org syntax @end menu address@hidden The export dispatcher address@hidden The export dispatcher, Export settings, Exporting, Exporting @section The export dispatcher @vindex org-export-dispatch-use-expert-ui @cindex Export, dispatcher @@ -10631,7 +10630,7 @@ Toggle visible-only export. Useful for exporting only visible parts of an Org document by adjusting outline visibility settings. @end table address@hidden Export settings address@hidden Export settings, Table of contents, The export dispatcher, Exporting @section Export settings @cindex Export, settings @@ -10903,7 +10902,7 @@ can become buffer-local during export by using the BIND keyword. Its syntax is @samp{#+BIND: variable value}. This is particularly useful for in-buffer settings that cannot be changed using keywords. address@hidden Table of contents address@hidden Table of contents, Include files, Export settings, Exporting @section Table of contents @cindex table of contents @cindex list of tables @@ -10980,7 +10979,7 @@ Normally Org uses the headline for its entry in the table of contents. But with @code{ALT_TITLE} property, a different entry can be specified for the table of contents. address@hidden Include files address@hidden Include files, Macro replacement, Table of contents, Exporting @section Include files @cindex include files, during export Include other files during export. For example, to include your @file{.emacs} @@ -11054,7 +11053,7 @@ element. Some examples: Visit the include file at point. @end table address@hidden Macro replacement address@hidden Macro replacement, Comment lines, Include files, Exporting @section Macro replacement @cindex macro replacement, during export @cindex #+MACRO @@ -11140,7 +11139,7 @@ The surrounding brackets can be made invisible by setting Org expands macros at the very beginning of the export process. address@hidden Comment lines address@hidden Comment lines, ASCII/Latin-1/UTF-8 export, Macro replacement, Exporting @section Comment lines @cindex exporting, not @@ -11167,7 +11166,7 @@ comment status of a headline. Toggle the @samp{COMMENT} keyword at the beginning of an entry. @end table address@hidden ASCII/Latin-1/UTF-8 export address@hidden ASCII/Latin-1/UTF-8 export, Beamer export, Comment lines, Exporting @section ASCII/Latin-1/UTF-8 export @cindex ASCII export @cindex Latin-1 export @@ -11267,7 +11266,7 @@ It's just a jump to the left... #+END_JUSTIFYRIGHT @end example address@hidden Beamer export address@hidden Beamer export, HTML export, ASCII/Latin-1/UTF-8 export, Exporting @section Beamer export @cindex Beamer export @@ -11285,7 +11284,7 @@ popular display formats. * A Beamer example:: A complete presentation. @end menu address@hidden Beamer export commands address@hidden Beamer export commands, Beamer specific export settings, Beamer export, Beamer export @subsection Beamer export commands @table @kbd @@ -11301,7 +11300,7 @@ Export as @LaTeX{} file, convert it to PDF format, and then open the PDF file. @end table address@hidden Beamer specific export settings address@hidden Beamer specific export settings, Sectioning Frames and Blocks in Beamer, Beamer export commands, Beamer export @subsection Beamer specific export settings Beamer export back-end has several additional keywords for customizing Beamer @@ -11360,7 +11359,7 @@ metadata. Use @code{org-latex-title-command} to configure typesetting of subtitle as part of front matter. @end table address@hidden Sectioning Frames and Blocks in Beamer address@hidden Sectioning Frames and Blocks in Beamer, Beamer specific syntax, Beamer specific export settings, Beamer export @subsection Sectioning, Frames and Blocks in Beamer Org transforms heading levels into Beamer's sectioning elements, frames and @@ -11429,7 +11428,7 @@ Beamer export automatically handles @LaTeX{} column separations for contiguous headlines. To manually adjust them for any unique configurations needs, use the @code{BEAMER_ENV} property. address@hidden Beamer specific syntax address@hidden Beamer specific syntax, Editing support, Sectioning Frames and Blocks in Beamer, Beamer export @subsection Beamer specific syntax Since Org's Beamer export back-end is an extension of the @LaTeX{} back-end, it recognizes other @LaTeX{} specific syntax---for example, @samp{#+LATEX:} @@ -11493,7 +11492,7 @@ Let $G$ be a finite group, and let $H$ be a subgroup of $G$. Then the order of $H$ divides the order of $G$. @end example address@hidden Editing support address@hidden Editing support, A Beamer example, Beamer specific syntax, Beamer export @subsection Editing support @@ -11510,7 +11509,7 @@ The @code{org-beamer-mode} provides this key for quicker selections in Beamer normal environments, and for selecting the @code{BEAMER_COL} property. @end table address@hidden A Beamer example address@hidden A Beamer example, , Editing support, Beamer export @subsection A Beamer example Here is an example of an Org document ready for Beamer export. @@ -11549,7 +11548,7 @@ Here is an example of an Org document ready for Beamer export. Please test this stuff! @end example address@hidden HTML export address@hidden HTML export, @LaTeX{} export, Beamer export, Exporting @section HTML export @cindex HTML export @@ -11572,7 +11571,7 @@ with XHTML 1.0 strict standard. @end menu address@hidden HTML Export commands address@hidden HTML Export commands, HTML Specific export settings, HTML export, HTML export @subsection HTML export commands @table @kbd @@ -11585,7 +11584,7 @@ h o} Exports to HTML and opens it in a web browser. Exports to a temporary buffer. Does not create a file. @end table address@hidden HTML Specific export settings address@hidden HTML Specific export settings, HTML doctypes, HTML Export commands, HTML export @subsection HTML Specific export settings HTML export has a number of keywords, similar to the general options settings described in @ref{Export settings}. @@ -11659,7 +11658,7 @@ The document's subtitle. HTML exporter formats subtitle if document type is Some of these keywords are explained in more detail in the following sections of the manual. address@hidden HTML doctypes address@hidden HTML doctypes, HTML preamble and postamble, HTML Specific export settings, HTML export @subsection HTML doctypes Org can export to various (X)HTML flavors. @@ -11747,7 +11746,7 @@ Special blocks cannot have headlines. For the HTML exporter to wrap the headline and its contents in @samp{
} or @samp{
} tags, set the @code{HTML_CONTAINER} property for the headline. address@hidden HTML preamble and postamble address@hidden HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export @subsection HTML preamble and postamble @vindex org-html-preamble @vindex org-html-postamble @@ -11775,7 +11774,7 @@ to insert the postamble in the format specified in the @code{org-html-postamble-format} variable. The HTML exporter will not insert a postamble if @code{org-html-postamble} is set to @code{nil}. address@hidden Quoting HTML tags address@hidden Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export @subsection Quoting HTML tags The HTML export back-end transforms @samp{<} and @samp{>} to @samp{<} and @@ -11801,7 +11800,7 @@ All lines between these markers are exported literally @end example address@hidden Links in HTML export address@hidden Links in HTML export, Tables in HTML export, Quoting HTML tags, HTML export @subsection Links in HTML export @cindex links, in HTML export @@ -11835,7 +11834,7 @@ to @code{} or @code{} tags. This example shows changing the link's [[http://orgmode.org]] @end example address@hidden Tables in HTML export address@hidden Tables in HTML export, Images in HTML export, Links in HTML export, HTML export @subsection Tables in HTML export @cindex tables, in HTML @vindex org-html-table-default-attributes @@ -11887,7 +11886,7 @@ Opening and ending tags for table rows. address@hidden formats column one in tables with header tags. @end table address@hidden Images in HTML export address@hidden Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export @subsection Images in HTML export @cindex images, inline in HTML @@ -11931,7 +11930,7 @@ standards. The HTML export back-end copies the @code{http} links from the Org file as is. address@hidden Math formatting in HTML export address@hidden Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export @subsection Math formatting in HTML export @cindex MathJax @cindex dvipng @@ -11976,7 +11975,7 @@ or: #+OPTIONS: tex:imagemagick @end example address@hidden Text areas in HTML export address@hidden Text areas in HTML export, CSS support, Math formatting in HTML export, HTML export @subsection Text areas in HTML export @cindex text areas, in HTML @@ -12005,7 +12004,7 @@ and height just enough to fit the content. Override these defaults with @end example address@hidden CSS support address@hidden CSS support, JavaScript support, Text areas in HTML export, HTML export @subsection CSS support @cindex CSS, for HTML export @cindex HTML export, CSS @@ -12096,7 +12095,7 @@ simpler ways of customizing as described above. @c FIXME: More about header and footer styles @c FIXME: Talk about links and targets. address@hidden JavaScript support address@hidden JavaScript support, , CSS support, HTML export @subsection JavaScript supported display of web pages @cindex Rose, Sebastian @@ -12158,7 +12157,7 @@ You can choose default values for these options by customizing the variable @code{org-html-infojs-options}. If you want the script to always apply to your pages, configure the variable @code{org-html-use-infojs}. address@hidden @LaTeX{} export address@hidden @LaTeX{} export, Markdown export, HTML export, Exporting @section @LaTeX{} export @cindex @LaTeX{} export @cindex PDF export @@ -12193,7 +12192,7 @@ blank lines to tell apart syntactical elements, such as paragraphs. * Horizontal rules in @LaTeX{} export:: Attributes specific to horizontal rules. @end menu address@hidden @LaTeX{} export commands address@hidden @LaTeX{} export commands, @LaTeX{} specific export settings, @LaTeX{} export, @LaTeX{} export @subsection @LaTeX{} export commands @table @kbd @@ -12226,7 +12225,7 @@ compilers for different files. However, ``smart'' @LaTeX{} compilation systems, such as @samp{latexmk}, can select the correct bibliography compiler.}. address@hidden @LaTeX{} specific export settings address@hidden @LaTeX{} specific export settings, @LaTeX{} header and sectioning, @LaTeX{} export commands, @LaTeX{} export @subsection @LaTeX{} specific export settings The @LaTeX{} export back-end has several additional keywords for customizing @@ -12302,7 +12301,7 @@ document's front matter. The following sections have further details. address@hidden @LaTeX{} header and sectioning address@hidden @LaTeX{} header and sectioning, Quoting @LaTeX{} code, @LaTeX{} specific export settings, @LaTeX{} export @subsection @LaTeX{} header and sectioning structure @cindex @LaTeX{} class @cindex @LaTeX{} sectioning structure @@ -12365,7 +12364,7 @@ A sample Org file with the above headers: some more text @end example address@hidden Quoting @LaTeX{} code address@hidden Quoting @LaTeX{} code, Tables in @LaTeX{} export, @LaTeX{} header and sectioning, @LaTeX{} export @subsection Quoting @LaTeX{} code The @LaTeX{} export back-end can insert any arbitrary @LaTeX{} code, @@ -12393,7 +12392,7 @@ any arbitrary LaTeX code #+END_EXPORT @end example address@hidden Tables in @LaTeX{} export address@hidden Tables in @LaTeX{} export, Images in @LaTeX{} export, Quoting @LaTeX{} code, @LaTeX{} export @subsection Tables in @LaTeX{} export @cindex tables, in @LaTeX{} export @cindex #+ATTR_LATEX, in tables @@ -12496,7 +12495,7 @@ Set the caption with the @LaTeX{} command @end example address@hidden Images in @LaTeX{} export address@hidden Images in @LaTeX{} export, Plain lists in @LaTeX{} export, Tables in @LaTeX{} export, @LaTeX{} export @subsection Images in @LaTeX{} export @cindex images, inline in @LaTeX{} @cindex inlining images in @LaTeX{} @@ -12567,7 +12566,7 @@ centering globally, set @code{org-latex-images-centered} to @code{t}. Set the @code{:comment-include} attribute to address@hidden value for the @LaTeX{} export back-end to comment out the @code{\includegraphics} macro. address@hidden Plain lists in @LaTeX{} export address@hidden Plain lists in @LaTeX{} export, Source blocks in @LaTeX{} export, Images in @LaTeX{} export, @LaTeX{} export @subsection Plain lists in @LaTeX{} export @cindex plain lists, in @LaTeX{} export @cindex #+ATTR_LATEX, in plain lists @@ -12601,7 +12600,7 @@ four: - Five @end example address@hidden Source blocks in @LaTeX{} export address@hidden Source blocks in @LaTeX{} export, Example blocks in @LaTeX{} export, Plain lists in @LaTeX{} export, @LaTeX{} export @subsection Source blocks in @LaTeX{} export @cindex source blocks, in @LaTeX{} export @cindex #+ATTR_LATEX, in source blocks @@ -12647,7 +12646,7 @@ To apply similar configuration options for all source blocks in a file, use the @code{org-latex-listings-options} and @code{org-latex-minted-options} variables. address@hidden Example blocks in @LaTeX{} export address@hidden Example blocks in @LaTeX{} export, Special blocks in @LaTeX{} export, Source blocks in @LaTeX{} export, @LaTeX{} export @subsection Example blocks in @LaTeX{} export @cindex example blocks, in @LaTeX{} export @cindex verbatim blocks, in @LaTeX{} export @@ -12666,7 +12665,7 @@ This sentence is false. #+END_EXAMPLE @end example address@hidden Special blocks in @LaTeX{} export address@hidden Special blocks in @LaTeX{} export, Horizontal rules in @LaTeX{} export, Example blocks in @LaTeX{} export, @LaTeX{} export @subsection Special blocks in @LaTeX{} export @cindex special blocks, in @LaTeX{} export @cindex abstract, in @LaTeX{} export @@ -12716,7 +12715,7 @@ example: #+END_proof @end example address@hidden Horizontal rules in @LaTeX{} export address@hidden Horizontal rules in @LaTeX{} export, , Special blocks in @LaTeX{} export, @LaTeX{} export @subsection Horizontal rules in @LaTeX{} export @cindex horizontal rules, in @LaTeX{} export @cindex #+ATTR_LATEX, in horizontal rules @@ -12729,7 +12728,7 @@ The @LaTeX{} export back-end converts horizontal rules by the specified ----- @end example address@hidden Markdown export address@hidden Markdown export, OpenDocument Text export, @LaTeX{} export, Exporting @section Markdown export @cindex Markdown export @@ -12763,7 +12762,7 @@ level before the absolute limit (@pxref{Export settings}). @c begin opendocument address@hidden OpenDocument Text export address@hidden OpenDocument Text export, Org export, Markdown export, Exporting @section OpenDocument Text export @cindex ODT @cindex OpenDocument @@ -12791,14 +12790,14 @@ is compatible with LibreOffice 3.4. * Advanced topics in ODT export:: For power users. @end menu address@hidden Pre-requisites for ODT export address@hidden Pre-requisites for ODT export, ODT export commands, OpenDocument Text export, OpenDocument Text export @subsection Pre-requisites for ODT export @cindex zip The ODT export back-end relies on the @file{zip} program to create the final compressed ODT output. Check if @file{zip} is locally available and executable. Without @file{zip}, export cannot finish. address@hidden ODT export commands address@hidden ODT export commands, ODT specific export settings, Pre-requisites for ODT export, OpenDocument Text export @subsection ODT export commands @anchor{x-export-to-odt} @cindex region, active @@ -12835,7 +12834,7 @@ file instead. @xref{x-export-to-other-formats, , Automatically exporting to other formats}. @end table address@hidden ODT specific export settings address@hidden ODT specific export settings, Extending ODT export, ODT export commands, OpenDocument Text export @subsection ODT specific export settings The ODT export back-end has several additional keywords for customizing ODT output. Setting these keywords works similar to the general options @@ -12866,7 +12865,7 @@ The ODT export back-end uses the @code{org-odt-styles-file} by default. See The document subtitle. @end table address@hidden Extending ODT export address@hidden Extending ODT export, Applying custom styles, ODT specific export settings, OpenDocument Text export @subsection Extending ODT export The ODT export back-end can produce documents in other formats besides ODT @@ -12909,7 +12908,7 @@ Convert an existing document from one format to another. With a prefix argument, opens the newly produced file. @end table address@hidden Applying custom styles address@hidden Applying custom styles, Links in ODT export, Extending ODT export, OpenDocument Text export @subsection Applying custom styles @cindex styles, custom @cindex template, custom @@ -12965,7 +12964,7 @@ The ODT export back-end relies on many templates and style names. Using third-party styles and templates can lead to mismatches. Templates derived from built in ODT templates and styles seem to have fewer problems. address@hidden Links in ODT export address@hidden Links in ODT export, Tables in ODT export, Applying custom styles, OpenDocument Text export @subsection Links in ODT export @cindex links, in ODT export @@ -12979,7 +12978,7 @@ A @address@hidden@}}-style reference to an image, table etc.@: is replaced with a cross-reference and sequence number of the labeled entity. @xref{Labels and captions in ODT export}. address@hidden Tables in ODT export address@hidden Tables in ODT export, Images in ODT export, Links in ODT export, OpenDocument Text export @subsection Tables in ODT export @cindex tables, in ODT export @@ -13024,7 +13023,7 @@ For even more customization, create custom table styles and associate them with a table using the @code{#+ATTR_ODT} line. @xref{Customizing tables in ODT export}. address@hidden Images in ODT export address@hidden Images in ODT export, Math formatting in ODT export, Tables in ODT export, OpenDocument Text export @subsection Images in ODT export @cindex images, embedding in ODT @cindex embedding images in ODT @@ -13121,7 +13120,7 @@ To create an image that is anchored to a page: [[./img.png]] @end example address@hidden Math formatting in ODT export address@hidden Math formatting in ODT export, Labels and captions in ODT export, Images in ODT export, OpenDocument Text export @subsection Math formatting in ODT export The ODT export back-end has special support built-in for handling math. @@ -13131,7 +13130,7 @@ The ODT export back-end has special support built-in for handling math. * Working with MathML or OpenDocument formula files:: Embedding in native format. @end menu address@hidden Working with @LaTeX{} math snippets address@hidden Working with @LaTeX{} math snippets, Working with MathML or OpenDocument formula files, Math formatting in ODT export, Math formatting in ODT export @subsubheading Working with @LaTeX{} math snippets @LaTeX{} math snippets (@address@hidden fragments}) can be embedded in an ODT @@ -13214,7 +13213,7 @@ requires @file{dvipng} program, @file{dvisvgm} or @file{imagemagick} programs. @end enumerate address@hidden Working with MathML or OpenDocument formula files address@hidden Working with MathML or OpenDocument formula files, , Working with @LaTeX{} math snippets, Math formatting in ODT export @subsubheading Working with MathML or OpenDocument formula files When embedding @LaTeX{} math snippets in ODT documents is not reliable, there @@ -13232,7 +13231,7 @@ or [[./equation.odf]] @end example address@hidden Labels and captions in ODT export address@hidden Labels and captions in ODT export, Literal examples in ODT export, Math formatting in ODT export, OpenDocument Text export @subsection Labels and captions in ODT export ODT format handles labeling and captioning of objects based on their @@ -13270,7 +13269,7 @@ With the above modification, the previous example changes to: Illustration 2: Bell curve @end example address@hidden Literal examples in ODT export address@hidden Literal examples in ODT export, Advanced topics in ODT export, Labels and captions in ODT export, OpenDocument Text export @subsection Literal examples in ODT export The ODT export back-end supports literal examples (@pxref{Literal examples}) @@ -13288,7 +13287,7 @@ For custom fontification styles, customize the To turn off fontification of literal examples, customize the @code{org-odt-fontify-srcblocks} option. address@hidden Advanced topics in ODT export address@hidden Advanced topics in ODT export, , Literal examples in ODT export, OpenDocument Text export @subsection Advanced topics in ODT export The ODT export back-end has extensive features useful for power users and @@ -13302,7 +13301,7 @@ frequent uses of ODT formats. * Validating OpenDocument XML:: Debugging corrupted OpenDocument files. @end menu address@hidden Configuring a document converter address@hidden Configuring a document converter, Working with OpenDocument style files, Advanced topics in ODT export, Advanced topics in ODT export @subsubheading Configuring a document converter @cindex convert @cindex doc, docx, rtf @@ -13335,7 +13334,7 @@ Select the newly added converter as the preferred one by customizing the option @code{org-odt-convert-process}. @end enumerate address@hidden Working with OpenDocument style files address@hidden Working with OpenDocument style files, Creating one-off styles, Configuring a document converter, Advanced topics in ODT export @subsubheading Working with OpenDocument style files @cindex styles, custom @cindex template, custom @@ -13438,7 +13437,7 @@ Use this variable to specify the blank @file{content.xml} that will be used in the final output. @end itemize address@hidden Creating one-off styles address@hidden Creating one-off styles, Customizing tables in ODT export, Working with OpenDocument style files, Advanced topics in ODT export @subsubheading Creating one-off styles The ODT export back-end can read embedded raw OpenDocument XML from the Org @@ -13504,7 +13503,7 @@ This paragraph is specially formatted and uses bold text. @end enumerate address@hidden Customizing tables in ODT export address@hidden Customizing tables in ODT export, Validating OpenDocument XML, Creating one-off styles, Advanced topics in ODT export @subsubheading Customizing tables in ODT export @cindex tables, in ODT export @@ -13666,7 +13665,7 @@ the @code{ATTR_ODT} line as shown below. @end example @end enumerate address@hidden Validating OpenDocument XML address@hidden Validating OpenDocument XML, , Customizing tables in ODT export, Advanced topics in ODT export @subsubheading Validating OpenDocument XML Sometimes ODT format files may not open due to @file{.odt} file corruption. @@ -13685,7 +13684,7 @@ back-end takes care of updating the @code{rng-schema-locating-files}. @c end opendocument address@hidden Org export address@hidden Org export, Texinfo export, OpenDocument Text export, Exporting @section Org export @cindex Org export @@ -13706,7 +13705,7 @@ Export to a temporary buffer. Does not create a file. Export to an Org file, then open it. @end table address@hidden Texinfo export address@hidden Texinfo export, iCalendar export, Org export, Exporting @section Texinfo export @cindex Texinfo export @@ -13718,7 +13717,7 @@ can compile to Info format. * Texinfo specific export settings:: Setting the environment. * Texinfo file header:: Generating the header. * Texinfo title and copyright page:: Creating preamble pages. -* Info directory file:: Installing a manual in Info file hierarchy. +* Info directory file:: Installing a manual in Info file hierarchy. * Headings and sectioning structure:: Building document structure. * Indices:: Creating indices. * Quoting Texinfo code:: Incorporating literal Texinfo code. @@ -13729,7 +13728,7 @@ can compile to Info format. * A Texinfo example:: Processing Org to Texinfo. @end menu address@hidden Texinfo export commands address@hidden Texinfo export commands, Texinfo specific export settings, Texinfo export, Texinfo export @subsection Texinfo export commands @vindex org-texinfo-info-process @@ -13743,7 +13742,7 @@ generate other formats, such as DocBook, customize the @code{org-texinfo-info-process} variable. @end table address@hidden Texinfo specific export settings address@hidden Texinfo specific export settings, Texinfo file header, Texinfo export commands, Texinfo export @subsection Texinfo specific export settings The Texinfo export back-end has several additional keywords for customizing Texinfo output. Setting these keywords works similar to the general options @@ -13794,7 +13793,7 @@ The directory description of the document. The printed title of the document. @end table address@hidden Texinfo file header address@hidden Texinfo file header, Texinfo title and copyright page, Texinfo specific export settings, Texinfo export @subsection Texinfo file header @cindex #+TEXINFO_FILENAME @@ -13817,7 +13816,7 @@ Instead of repeatedly installing the same set of commands, define a class in @code{org-texinfo-classes} once, and then activate it in the document by setting the @code{#+TEXINFO_CLASS} keyword to that class. address@hidden Texinfo title and copyright page address@hidden Texinfo title and copyright page, Info directory file, Texinfo file header, Texinfo export @subsection Texinfo title and copyright page @cindex #+TEXINFO_PRINTED_TITLE @@ -13856,7 +13855,7 @@ Copyright information is printed on the back of the title page. Copyright \copy 2016 Free Software Foundation, Inc. @end example address@hidden Info directory file address@hidden Info directory file, Headings and sectioning structure, Texinfo title and copyright page, Texinfo export @subsection Info directory file @cindex @samp{dir} file, in Texinfo export @cindex Texinfo export, @samp{dir} file @@ -13882,7 +13881,7 @@ Here is an example that writes to the Info directory file: #+TEXINFO_DIR_DESC: Outline-based notes management and organizer @end example address@hidden Headings and sectioning structure address@hidden Headings and sectioning structure, Indices, Info directory file, Texinfo export @subsection Headings and sectioning structure @vindex org-texinfo-classes @@ -13930,7 +13929,7 @@ node in which a reader enters an Info manual. As such, it is expected not to appear in printed output generated from the @file{.texi} file. @inforef{The Top Node,,texinfo}, for more information. address@hidden Indices address@hidden Indices, Quoting Texinfo code, Headings and sectioning structure, Texinfo export @subsection Indices @cindex #+CINDEX @@ -13976,7 +13975,7 @@ inserts the index after its contents. :END: @end example address@hidden Quoting Texinfo code address@hidden Quoting Texinfo code, Plain lists in Texinfo export, Indices, Texinfo export @subsection Quoting Texinfo code Use any of the following three methods to insert or escape raw Texinfo code: @@ -13995,7 +13994,7 @@ This paragraph is preceded by... #+END_EXPORT @end example address@hidden Plain lists in Texinfo export address@hidden Plain lists in Texinfo export, Tables in Texinfo export, Quoting Texinfo code, Texinfo export @subsection Plain lists in Texinfo export @cindex #+ATTR_TEXINFO, in plain lists @cindex Two-column tables, in Texinfo export @@ -14039,7 +14038,7 @@ This is the common text for variables foo and bar. @@end table @end example address@hidden Tables in Texinfo export address@hidden Tables in Texinfo export, Images in Texinfo export, Plain lists in Texinfo export, Texinfo export @subsection Tables in Texinfo export @cindex #+ATTR_TEXINFO, in tables @@ -14052,7 +14051,7 @@ length, use the @code{:columns} attribute. See example below. | a cell | another cell | @end example address@hidden Images in Texinfo export address@hidden Images in Texinfo export, Special blocks in Texinfo export, Tables in Texinfo export, Texinfo export @subsection Images in Texinfo export @cindex #+ATTR_TEXINFO, in images @@ -14067,7 +14066,7 @@ the text using Texinfo code, as shown in the example: [[ridt.pdf]] @end example address@hidden Special blocks in Texinfo export address@hidden Special blocks in Texinfo export, A Texinfo example, Images in Texinfo export, Texinfo export @subsection Special blocks @cindex #+ATTR_TEXINFO, in special blocks @@ -14091,7 +14090,7 @@ A somewhat obsessive function. @@end defun @end example address@hidden A Texinfo example address@hidden A Texinfo example, , Special blocks in Texinfo export, Texinfo export @subsection A Texinfo example Here is a more detailed example Org file. See @ref{GNU Sample @@ -14163,7 +14162,7 @@ This manual is for GNU Sample (version @address@hidden@address@hidden@address@hidden, :END: @end example address@hidden iCalendar export address@hidden iCalendar export, Other built-in back-ends, Texinfo export, Exporting @section iCalendar export @cindex iCalendar export @@ -14246,7 +14245,7 @@ Exporting to iCalendar format depends in large part on the capabilities of the destination application. Some are more lenient than others. Consult the Org mode FAQ for advice on specific applications. address@hidden Other built-in back-ends address@hidden Other built-in back-ends, Advanced configuration, iCalendar export, Exporting @section Other built-in back-ends @cindex export back-ends, built-in @vindex org-export-backends @@ -14265,7 +14264,7 @@ dispatcher}). Follow the comment section of such files, for example, @file{ox-man.el}, for usage and configuration details. address@hidden Advanced configuration address@hidden Advanced configuration, Export in foreign buffers, Other built-in back-ends, Exporting @section Advanced configuration @subheading Hooks @@ -14463,7 +14462,7 @@ To use the newly defined back-end, call the following from an Org buffer: Further steps to consider would be an interactive function, self-installing an item in the export dispatcher menu, and other user-friendly improvements. address@hidden Export in foreign buffers address@hidden Export in foreign buffers, , Advanced configuration, Exporting @section Export in foreign buffers The export back-ends in Org often include commands to convert selected @@ -14488,7 +14487,7 @@ commands to create a list, select it, and covert it to HTML with @code{M-x org-html-convert-region-to-html RET}. address@hidden Publishing address@hidden Publishing, Working with source code, Exporting, Top @chapter Publishing @cindex publishing @@ -14510,7 +14509,7 @@ Publishing has been contributed to Org by David O'Toole. * Triggering publication:: Publication commands @end menu address@hidden Configuration address@hidden Configuration, Uploading files, Publishing, Publishing @section Configuration Publishing needs significant configuration to specify files, destination @@ -14527,7 +14526,7 @@ and many other properties of a project. * Generating an index:: An index that reaches across pages @end menu address@hidden Project alist address@hidden Project alist, Sources and destinations, Configuration, Configuration @subsection The variable @code{org-publish-project-alist} @cindex org-publish-project-alist @cindex projects, for publishing @@ -14554,7 +14553,7 @@ together files requiring different publishing options. When you publish such a ``meta-project'', all the components will also be published, in the sequence given. address@hidden Sources and destinations address@hidden Sources and destinations, Selecting files, Project alist, Configuration @subsection Sources and destinations for files @cindex directories, for publishing @@ -14583,7 +14582,7 @@ list. @end multitable @noindent address@hidden Selecting files address@hidden Selecting files, Publishing action, Sources and destinations, Configuration @subsection Selecting files @cindex files, selecting for publishing @@ -14609,7 +14608,7 @@ and @code{:exclude}. @tab address@hidden means, check base-directory recursively for files to publish. @end multitable address@hidden Publishing action address@hidden Publishing action, Publishing options, Selecting files, Configuration @subsection Publishing action @cindex action, for publishing @@ -14648,7 +14647,7 @@ and the path to the publishing directory of the output file. It should take the specified file, make the necessary transformation (if any) and place the result into the destination folder. address@hidden Publishing options address@hidden Publishing options, Publishing links, Publishing action, Configuration @subsection Options for the exporters @cindex options, for publishing @@ -14877,7 +14876,7 @@ however, override everything. @item @code{:texinfo-text-markup-alist} @tab @code{org-texinfo-text-markup-alist} @end multitable address@hidden Publishing links address@hidden Publishing links, Sitemap, Publishing options, Configuration @subsection Links between published files @cindex links, publishing @@ -14906,7 +14905,7 @@ all point to a dedicated anchor in @file{foo.html}. [[file:foo.org::target]] @end example address@hidden Sitemap address@hidden Sitemap, Generating an index, Publishing links, Configuration @subsection Generating a sitemap @cindex sitemap, of published pages @@ -14968,7 +14967,7 @@ a sitemap entry's date is to be formatted. This property bypasses @end multitable address@hidden Generating an index address@hidden Generating an index, , Sitemap, Configuration @subsection Generating an index @cindex index, in a publishing project @@ -14995,7 +14994,7 @@ contains an exclamation mark will create a sub item. #+INDEX: Application!CV @end example address@hidden Uploading files address@hidden Uploading files, Sample configuration, Configuration, Publishing @section Uploading files @cindex rsync @cindex unison @@ -15028,7 +15027,7 @@ benefit of re-including any changed external files such as source example files you might include with @code{#+INCLUDE:}. The timestamp mechanism in Org is not smart enough to detect if included files have been modified. address@hidden Sample configuration address@hidden Sample configuration, Triggering publication, Uploading files, Publishing @section Sample configuration Below we provide two example configurations. The first one is a simple @@ -15040,7 +15039,7 @@ more complex, with a multi-component project. * Complex example:: A multi-component publishing example @end menu address@hidden Simple example address@hidden Simple example, Complex example, Sample configuration, Sample configuration @subsection Example: simple publishing configuration This example publishes a set of Org files to the @file{public_html} @@ -15059,7 +15058,7 @@ directory on the local machine. type=\"text/css\"/>"))) @end lisp address@hidden Complex example address@hidden Complex example, , Simple example, Sample configuration @subsection Example: complex publishing configuration This more complicated example publishes an entire website, including @@ -15109,7 +15108,7 @@ right place on the web server, and publishing images to it. ("website" :components ("orgfiles" "images" "other")))) @end lisp address@hidden Triggering publication address@hidden Triggering publication, , Sample configuration, Publishing @section Triggering publication Once properly configured, Org can publish with the following commands: @@ -15134,7 +15133,7 @@ This may be necessary in particular if files include other files via @code{#+SETUPFILE:} or @code{#+INCLUDE:}. address@hidden Working with source code address@hidden Working with source code, Miscellaneous, Publishing, Top @chapter Working with source code @cindex Schulte, Eric @cindex Davison, Dan @@ -15224,7 +15223,7 @@ Details of Org's facilities for working with source code are shown next. @end menu address@hidden Structure of code blocks address@hidden Structure of code blocks, Editing source code, Working with source code, Working with source code @section Structure of code blocks @cindex code block, structure @cindex source code, block structure @@ -15243,12 +15242,12 @@ A @samp{src} block conforms to this structure: #+END_SRC @end example -Org mode's templates system (@pxref{Easy templates}) speeds up creating address@hidden code blocks with just three keystrokes. Do not be put-off by -having to remember the source block syntax. Org also works with other -completion systems in Emacs, some of which predate Org and have custom -domain-specific languages for defining templates. Regular use of templates -reduces errors, increases accuracy, and maintains consistency. +Do not be put off by having to remember the source block syntax. Org mode +offers a command for wrapping existing text in a block (@pxref{Inserting +structure templates}). Org also works with other completion systems in +Emacs, some of which predate Org and have custom domain-specific languages +for defining templates. Regular use of templates reduces errors, increases +accuracy, and maintains consistency. @cindex source code, inline An inline code block conforms to this structure: @@ -15296,7 +15295,7 @@ specific sub-trees of the Org document. Source code in the dialect of the specified language identifier. @end table address@hidden Editing source code address@hidden Editing source code, Exporting code blocks, Structure of code blocks, Working with source code @section Editing source code @cindex code block, editing @cindex source code, editing @@ -15360,7 +15359,7 @@ Emacs-Lisp languages. ("python" (:background "#E5FFB8")))) @end lisp address@hidden Exporting code blocks address@hidden Exporting code blocks, Extracting source code, Editing source code, Working with source code @section Exporting code blocks @cindex code block, exporting @cindex source code, exporting @@ -15413,7 +15412,7 @@ Org never evaluates code blocks in commented sub-trees when exporting (@pxref{Comment lines}). On the other hand, Org does evaluate code blocks in sub-trees excluded from export (@pxref{Export settings}). address@hidden Extracting source code address@hidden Extracting source code, Evaluating code blocks, Exporting code blocks, Working with source code @section Extracting source code @cindex tangling @cindex source code, extracting @@ -15478,7 +15477,7 @@ block header arguments: One, set @code{padline} (@pxref{padline}) to true (the default setting). Two, set @code{comments} (@pxref{comments}) to @code{link}, which makes Org insert links to the Org file. address@hidden Evaluating code blocks address@hidden Evaluating code blocks, Library of Babel, Extracting source code, Working with source code @section Evaluating code blocks @cindex code block, evaluating @cindex source code, evaluating @@ -15555,7 +15554,7 @@ For more examples of header arguments for @code{#+CALL:} lines, @pxref{Arguments in function calls}. @end table address@hidden Library of Babel address@hidden Library of Babel, Languages, Evaluating code blocks, Working with source code @section Library of Babel @cindex babel, library of @cindex source code, library @@ -15572,7 +15571,7 @@ For any user to add code to the library, first save the code in regular @samp{src} code blocks of an Org file, and then load the Org file with @code{org-babel-lob-ingest}, which is bound to @kbd{C-c C-v i}. address@hidden Languages address@hidden Languages, Header arguments, Library of Babel, Working with source code @section Languages @cindex babel, languages @cindex source code, languages @@ -15632,7 +15631,7 @@ following enables execution of @code{clojure} code blocks: (require 'ob-clojure) @end lisp address@hidden Header arguments address@hidden Header arguments, Results of evaluation, Languages, Working with source code @section Header arguments @cindex code block, header arguments @cindex source code, block header arguments @@ -15644,7 +15643,7 @@ Details of configuring header arguments are shown here. * Specific header arguments:: List of header arguments @end menu address@hidden Using header arguments address@hidden Using header arguments, Specific header arguments, Header arguments, Header arguments @subsection Using header arguments Since header arguments can be set in several ways, Org prioritizes them in @@ -15661,7 +15660,7 @@ global defaults. @end menu address@hidden System-wide header arguments address@hidden System-wide header arguments, Language-specific header arguments, Using header arguments, Using header arguments @subsubheading System-wide header arguments @vindex org-babel-default-header-args System-wide values of header arguments can be specified by adapting the @@ -15689,14 +15688,14 @@ Org expand @code{:noweb} references by default. (assq-delete-all :noweb org-babel-default-header-args))) @end lisp address@hidden Language-specific header arguments address@hidden Language-specific header arguments, Header arguments in Org mode properties, System-wide header arguments, Using header arguments @subsubheading Language-specific header arguments Each language can have separate default header arguments by customizing the variable @code{org-babel-default-header-args:}, where @code{} is the name of the language. For details, see the language-specific online documentation at @uref{http://orgmode.org/worg/org-contrib/babel}. address@hidden Header arguments in Org mode properties address@hidden Header arguments in Org mode properties, Language-specific mode properties, Language-specific header arguments, Using header arguments @subsubheading Header arguments in Org mode properties For header arguments applicable to the buffer, use @code{#+PROPERTY:} lines @@ -15734,7 +15733,7 @@ Properties defined through @code{org-set-property} function, bound to @kbd{C-c C-x p}, apply to all active languages. They override properties set in @code{org-babel-default-header-args}. address@hidden Language-specific mode properties address@hidden Language-specific mode properties, Code block specific header arguments, Header arguments in Org mode properties, Using header arguments @subsubheading Language-specific mode properties Language-specific header arguments are also read from properties @@ -15757,7 +15756,7 @@ would force separate sessions for clojure blocks in Heading and Subheading, but use the same session for all @samp{R} blocks. Blocks in Subheading inherit settings from Heading. address@hidden Code block specific header arguments address@hidden Code block specific header arguments, Arguments in function calls, Language-specific mode properties, Using header arguments @subsubheading Code block specific header arguments Header arguments are most commonly set at the @samp{src} code block level, on @@ -15815,7 +15814,7 @@ Multi-line header arguments on a named @samp{src} code block: : data:2 @end example address@hidden Arguments in function calls address@hidden Arguments in function calls, , Code block specific header arguments, Using header arguments @subsubheading Arguments in function calls Header arguments in function calls are the most specific and override all @@ -15837,7 +15836,7 @@ evaluation of @code{factorial} code block. #+CALL: factorial[:session special](n=5) @end example address@hidden Specific header arguments address@hidden Specific header arguments, , Using header arguments, Header arguments @subsection Specific header arguments Org comes with many header arguments common to all languages. New header arguments are added for specific languages as they become available for use @@ -15879,7 +15878,7 @@ are: For language-specific header arguments, see @ref{Languages}. address@hidden var address@hidden var, results, Specific header arguments, Specific header arguments @subsubsection @code{:var} @cindex @code{:var}, src header argument Use @code{:var} for passing arguments to @samp{src} code blocks. The @@ -16133,7 +16132,7 @@ as Emacs Lisp code, as illustrated in the following example. : (a b c) @end example address@hidden results address@hidden results, file, var, Specific header arguments @subsubsection @code{:results} @cindex @code{:results}, src header argument @@ -16241,7 +16240,7 @@ Prepend results to the Org buffer. Latest results are at the top. Does not remove previous results. Usage example: @code{:results output prepend}. @end itemize address@hidden file address@hidden file, file-desc, results, Specific header arguments @subsubsection @code{:file} @cindex @code{:file}, src header argument @@ -16254,7 +16253,7 @@ format}). Some languages, such as @samp{R}, @samp{dot}, @samp{ditaa}, and code. Such code wrapping helps recreate the output, especially graphics output, by executing just the @code{:file} contents. address@hidden file-desc address@hidden file-desc, file-ext, file, Specific header arguments @subsubsection @code{:file-desc} A description of the results file. Org uses this description for the link @@ -16262,7 +16261,7 @@ A description of the results file. Org uses this description for the link has no value, Org will use file name for both the ``link'' and the ``description'' portion of the Org mode link. address@hidden file-ext address@hidden file-ext, output-dir, file-desc, Specific header arguments @subsubsection @code{:file-ext} @cindex @code{:file-ext}, src header argument @@ -16271,7 +16270,7 @@ name, and extension by combining @code{:file-ext}, @code{#+NAME:} of the source block, and the @ref{output-dir} header argument. To override this auto generated file name, use the @code{:file} header argument. address@hidden output-dir address@hidden output-dir, dir, file-ext, Specific header arguments @subsubsection @code{:output-dir} @cindex @code{:output-dir}, src header argument @@ -16280,7 +16279,7 @@ absolute path (beginning with @code{/}) or a relative directory (without @code{/}). The value can be combined with @code{#+NAME:} of the source block and @ref{file} or @ref{file-ext} header arguments. address@hidden dir address@hidden dir, exports, output-dir, Specific header arguments @subsubsection @code{:dir} and remote execution @cindex @code{:dir}, src header argument @@ -16339,7 +16338,7 @@ Org does not expand @code{default directory} to avoid some underlying portability issues. @end itemize address@hidden exports address@hidden exports, tangle, dir, Specific header arguments @subsubsection @code{:exports} @cindex @code{:exports}, src header argument @@ -16363,7 +16362,7 @@ file. Whether the code is evaluated at all depends on other options. Example: @code{:exports none}. @end itemize address@hidden tangle address@hidden tangle, mkdirp, exports, Specific header arguments @subsubsection @code{:tangle} @cindex @code{:tangle}, src header argument @@ -16386,7 +16385,7 @@ the file name as being relative to the directory of the Org file's location. Example: @code{:tangle path}. @end itemize address@hidden mkdirp address@hidden mkdirp, comments, tangle, Specific header arguments @subsubsection @code{:mkdirp} @cindex @code{:mkdirp}, src header argument @@ -16394,7 +16393,7 @@ The @code{:mkdirp} header argument creates parent directories for tangled files if the directory does not exist. @code{yes} enables directory creation and @code{no} inhibits directory creation. address@hidden comments address@hidden comments, padline, mkdirp, Specific header arguments @subsubsection @code{:comments} @cindex @code{:comments}, src header argument Controls inserting comments into tangled files. These are above and beyond @@ -16418,7 +16417,7 @@ Includes ``link'' comment option, expands noweb references, and wraps them in link comments inside the body of the @samp{src} code block. @end itemize address@hidden padline address@hidden padline, no-expand, comments, Specific header arguments @subsubsection @code{:padline} @cindex @code{:padline}, src header argument Control insertion of newlines to pad @samp{src} code blocks in the tangled @@ -16431,7 +16430,7 @@ tangled file. Do not insert newlines to pad the tangled @samp{src} code blocks. @end itemize address@hidden no-expand address@hidden no-expand, session, padline, Specific header arguments @subsubsection @code{:no-expand} @cindex @code{:no-expand}, src header argument @@ -16444,7 +16443,7 @@ these expansions may cause premature assignment, hence this option. This option makes a difference only for tangling. It has no effect when exporting since @samp{src} code blocks for execution have to be expanded anyway. address@hidden session address@hidden session, noweb, no-expand, Specific header arguments @subsubsection @code{:session} @cindex @code{:session}, src header argument @@ -16467,7 +16466,7 @@ shared. Some interpreted languages support concurrent sessions when subsequent source code language blocks change session names. @end itemize address@hidden noweb address@hidden noweb, noweb-ref, session, Specific header arguments @subsubsection @code{:noweb} @cindex @code{:noweb}, src header argument @@ -16575,7 +16574,7 @@ and evaluates to: Do things when True @end example address@hidden noweb-ref address@hidden noweb-ref, noweb-sep, noweb, Specific header arguments @subsubsection @code{:noweb-ref} @cindex @code{:noweb-ref}, src header argument @@ -16613,7 +16612,7 @@ when tangled. #+END_SRC @end example address@hidden noweb-sep address@hidden noweb-sep, cache, noweb-ref, Specific header arguments @subsubsection @code{:noweb-sep} @cindex @code{:noweb-sep}, src header argument @@ -16621,7 +16620,7 @@ By default a newline separates each noweb reference concatenation. To change this newline separator, edit the @code{:noweb-sep} (@pxref{noweb-sep}) header argument. address@hidden cache address@hidden cache, sep, noweb-sep, Specific header arguments @subsubsection @code{:cache} @cindex @code{:cache}, src header argument @@ -16686,7 +16685,7 @@ the result from @code{random} has changed since the last run. 0.254227238707244 @end example address@hidden sep address@hidden sep, hlines, cache, Specific header arguments @subsubsection @code{:sep} @cindex @code{:sep}, src header argument @@ -16695,7 +16694,7 @@ to files (@pxref{file}) external to Org mode. Org defaults to tab delimited output. The function, @code{org-open-at-point}, which is bound to @kbd{C-c C-o}, also uses @code{:sep} for opening tabular results. address@hidden hlines address@hidden hlines, colnames, sep, Specific header arguments @subsubsection @code{:hlines} @cindex @code{:hlines}, src header argument @@ -16756,7 +16755,7 @@ For @code{:hlines yes}, the example shows hlines unchanged. @end example @end itemize address@hidden colnames address@hidden colnames, rownames, hlines, Specific header arguments @subsubsection @code{:colnames} @cindex @code{:colnames}, src header argument @@ -16803,7 +16802,7 @@ value. That is, Org removes the column names, processes the table, puts back the column names, and then writes the table to the results block. @end itemize address@hidden rownames address@hidden rownames, shebang, colnames, Specific header arguments @subsubsection @code{:rownames} @cindex @code{:rownames}, src header argument @@ -16842,7 +16841,7 @@ for indexing. @end itemize address@hidden shebang address@hidden shebang, tangle-mode, rownames, Specific header arguments @subsubsection @code{:shebang} @cindex @code{:shebang}, src header argument @@ -16852,7 +16851,7 @@ setting the @code{:shebang} header argument to a string value (for example, the tangled file that the @samp{src} code block is extracted to. Org then turns on the tangled file's executable permission. address@hidden tangle-mode address@hidden tangle-mode, eval, shebang, Specific header arguments @subsubsection @code{:tangle-mode} @cindex @code{:tangle-mode}, src header argument @@ -16870,7 +16869,7 @@ When multiple @samp{src} code blocks tangle to a single file with different and conflicting @code{tangle-mode} header arguments, Org's behavior is undefined. address@hidden eval address@hidden eval, wrap, tangle-mode, Specific header arguments @subsubsection @code{:eval} @cindex @code{:eval}, src header argument The @code{:eval} header argument can limit evaluation of specific code @@ -16894,14 +16893,14 @@ If @code{:eval} header argument is not set for a source block, then Org determines whether to evaluate from the @code{org-confirm-babel-evaluate} variable (@pxref{Code evaluation security}). address@hidden wrap address@hidden wrap, post, eval, Specific header arguments @subsubsection @code{:wrap} @cindex @code{:wrap}, src header argument The @code{:wrap} header argument marks the results block by appending strings to @code{#+BEGIN_} and @code{#+END_}. If no string is specified, Org wraps the results in a @code{#+BEGIN/END_RESULTS} block. address@hidden post address@hidden post, prologue, wrap, Specific header arguments @subsubsection @code{:post} @cindex @code{:post}, src header argument The @code{:post} header argument is for post-processing results from @@ -16963,7 +16962,7 @@ data.frame(foo=rnorm(1)) | 1.371 | @end example address@hidden prologue address@hidden prologue, epilogue, post, Specific header arguments @subsubsection @code{:prologue} @cindex @code{:prologue}, src header argument The @code{prologue} header argument is for appending to the top of the code @@ -16976,13 +16975,13 @@ execution of a @samp{src} code block. A @code{reset} for @samp{gnuplot}: '((:prologue . "reset"))) @end lisp address@hidden epilogue address@hidden epilogue, , prologue, Specific header arguments @subsubsection @code{:epilogue} @cindex @code{:epilogue}, src header argument The value of the @code{epilogue} header argument is for appending to the end of the code block for execution. See also @ref{prologue}. address@hidden Results of evaluation address@hidden Results of evaluation, Noweb reference syntax, Header arguments, Working with source code @section Results of evaluation @cindex code block, results of evaluation @cindex source code, results of evaluation @@ -17083,7 +17082,7 @@ in results. In the above @code{:session} mode, the interactive interpreter receives and prints ``2''. Results show that. address@hidden Noweb reference syntax address@hidden Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working with source code @section Noweb reference syntax @cindex code block, noweb reference @cindex syntax, noweb @@ -17165,7 +17164,7 @@ Note that now the expansion contains the @emph{results} of the code block @end example address@hidden Key bindings and useful functions address@hidden Key bindings and useful functions, Batch execution, Noweb reference syntax, Working with source code @section Key bindings and useful functions @cindex code block, key bindings @@ -17268,7 +17267,7 @@ Active key bindings in Org mode buffer: @c @item @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session} @c @end multitable address@hidden Batch execution address@hidden Batch execution, , Key bindings and useful functions, Working with source code @section Batch execution @cindex code block, batch execution @cindex source code, batch execution @@ -17294,12 +17293,12 @@ emacs -Q --batch --eval " " "$@@" @end example address@hidden Miscellaneous address@hidden Miscellaneous, Hacking, Working with source code, Top @chapter Miscellaneous @menu * Completion:: M-TAB guesses completions -* Easy templates:: Quick insertion of structural elements +* Inserting structure templates:: Wrapping text in code blocks * Speed keys:: Electric commands at the beginning of a headline * Code evaluation security:: Org mode files evaluate inline code * Customization:: Adapting Org to changing tastes @@ -17312,7 +17311,7 @@ emacs -Q --batch --eval " @end menu address@hidden Completion address@hidden Completion, Inserting structure templates, Miscellaneous, Miscellaneous @section Completion @cindex completion, of @TeX{} symbols @cindex completion, of TODO keywords @@ -17374,47 +17373,42 @@ If your desktop intercepts the combo @address@hidden to switch windows, use environment. @end table address@hidden Easy templates address@hidden Easy templates address@hidden Inserting structure templates, Speed keys, Completion, Miscellaneous address@hidden Inserting structure templates @cindex template insertion @cindex insertion, of templates -With just a few keystrokes, Org's easy templates inserts empty pairs of -structural elements, such as @code{#+BEGIN_SRC} and @code{#+END_SRC}. Easy -templates use an expansion mechanism, which is native to Org, in a process -similar to @file{yasnippet} and other Emacs template expansion packages. - address@hidden<} @kbd{s} @address@hidden expands to a @samp{src} code block. - address@hidden<} @kbd{l} @address@hidden expands to: - -#+BEGIN_EXPORT latex - -#+END_EXPORT +With just a few keystrokes, it's possible to insert empty structural blocks, +such as @code{#+begin_src} and @code{#+end_src}, or to wrap existing text in +such a block. + address@hidden org-insert-structure-template address@hidden C-c C-x w +Prompt for a type of block structure, and insert the block at point. If the +region is active, it will be wrapped in the block. First prompts the user +for a key, which is used to look up a structure type from the values below. +If the key is @key{TAB}, the user is prompted to enter a type. Bound to address@hidden C-x w}. address@hidden defun -Org comes with these pre-defined easy templates: - address@hidden @columnfractions 0.1 0.9 address@hidden @kbd{s} @tab @code{#+BEGIN_SRC ... #+END_SRC} address@hidden @kbd{e} @tab @code{#+BEGIN_EXAMPLE ... #+END_EXAMPLE} address@hidden @kbd{q} @tab @code{#+BEGIN_QUOTE ... #+END_QUOTE} address@hidden @kbd{v} @tab @code{#+BEGIN_VERSE ... #+END_VERSE} address@hidden @kbd{c} @tab @code{#+BEGIN_CENTER ... #+END_CENTER} address@hidden @kbd{C} @tab @code{#+BEGIN_COMMENT ... #+END_COMMENT} address@hidden @kbd{l} @tab @code{#+BEGIN_EXPORT latex ... #+END_EXPORT} address@hidden @kbd{L} @tab @code{#+LATEX:} address@hidden @kbd{h} @tab @code{#+BEGIN_EXPORT html ... #+END_EXPORT} address@hidden @kbd{H} @tab @code{#+HTML:} address@hidden @kbd{a} @tab @code{#+BEGIN_EXPORT ascii ... #+END_EXPORT} address@hidden @kbd{A} @tab @code{#+ASCII:} address@hidden @kbd{i} @tab @code{#+INDEX:} line address@hidden @kbd{I} @tab @code{#+INCLUDE:} line address@hidden org-structure-template-alist +Available structure types are defined in @code{org-structure-template-alist}, +see the docstring for adding or changing values. + address@hidden @columnfractions 0.2 0.8 address@hidden @kbd{s} @tab @code{src} address@hidden @kbd{e} @tab @code{example} address@hidden @kbd{E} @tab @code{export} address@hidden @kbd{q} @tab @code{quote} address@hidden @kbd{v} @tab @code{verse} address@hidden @kbd{c} @tab @code{center} address@hidden @kbd{C} @tab @code{comment} address@hidden @kbd{l} @tab @code{export latex} address@hidden @kbd{h} @tab @code{export html} address@hidden @kbd{a} @tab @code{export ascii} @end multitable -More templates can added by customizing the variable address@hidden, whose docstring has additional details. - address@hidden Speed keys address@hidden Speed keys, Code evaluation security, Inserting structure templates, Miscellaneous @section Speed keys @cindex speed keys @@ -17440,7 +17434,7 @@ org-speed-command-help}, or @kbd{?} when cursor is at the beginning of an Org headline, shows currently active Speed Keys, including the user-defined ones. address@hidden Code evaluation security address@hidden Code evaluation security, Customization, Speed keys, Miscellaneous @section Code evaluation and security issues Unlike plain text, running code comes with risk. Each @samp{src} code block, @@ -17501,7 +17495,7 @@ Org executes formulas in tables (@pxref{The spreadsheet}) either through the @emph{calc} or the @emph{Emacs Lisp} interpreters. @end table address@hidden Customization address@hidden Customization, In-buffer settings, Code evaluation security, Miscellaneous @section Customization @cindex customization @cindex options, for customization @@ -17512,7 +17506,7 @@ through the usual @kbd{M-x org-customize RET} command. Or through the Org menu, @code{Org->Customization->Browse Org Group}. Org also has per-file settings for some variables (@pxref{In-buffer settings}). address@hidden In-buffer settings address@hidden In-buffer settings, The very busy C-c C-c key, Customization, Miscellaneous @section Summary of in-buffer settings @cindex in-buffer settings @cindex special keywords @@ -17799,7 +17793,7 @@ These lines set the TODO keywords and their significance to the current file. The corresponding variable is @code{org-todo-keywords}. @end table address@hidden The very busy C-c C-c key address@hidden The very busy C-c C-c key, Clean view, In-buffer settings, Miscellaneous @section The very busy C-c C-c key @kindex C-c C-c @cindex C-c C-c, overview @@ -17851,7 +17845,7 @@ block is updated. If the cursor is at a timestamp, fix the day name in the timestamp. @end itemize address@hidden Clean view address@hidden Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous @section A cleaner outline view @cindex hiding leading stars @cindex dynamic indentation @@ -17969,7 +17963,7 @@ To switch between single and double stars layouts, use @kbd{M-x org-convert-to-odd-levels RET} and @kbd{M-x org-convert-to-oddeven-levels}. @end enumerate address@hidden TTY keys address@hidden TTY keys, Interaction, Clean view, Miscellaneous @section Using Org on a tty @cindex tty key bindings @@ -18003,7 +17997,7 @@ normal @address@hidden for editing timestamp might be better with @end multitable address@hidden Interaction address@hidden Interaction, org-crypt, TTY keys, Miscellaneous @section Interaction with other packages @cindex packages, interaction with other Org's compatibility and the level of interaction with other Emacs packages @@ -18015,7 +18009,7 @@ are documented here. * Conflicts:: Packages that lead to conflicts @end menu address@hidden Cooperation address@hidden Cooperation, Conflicts, Interaction, Interaction @subsection Packages that Org cooperates with @table @asis @@ -18084,7 +18078,7 @@ for details. @end table @end table address@hidden Conflicts address@hidden Conflicts, , Cooperation, Interaction @subsection Packages that conflict with Org mode @table @asis @@ -18208,7 +18202,7 @@ another key for this command, or override the key in @end table address@hidden org-crypt address@hidden org-crypt, , Interaction, Miscellaneous @section org-crypt.el @cindex @file{org-crypt.el} @cindex @code{org-decrypt-entry} @@ -18245,7 +18239,7 @@ Suggested Org crypt settings in Emacs init file: Excluding the crypt tag from inheritance prevents encrypting previously encrypted text. address@hidden Hacking address@hidden Hacking, MobileOrg, Miscellaneous, Top @appendix Hacking @cindex hacking @@ -18267,7 +18261,7 @@ Org. * Using the mapping API:: Mapping over all or selected entries @end menu address@hidden Hooks address@hidden Hooks, Add-on packages, Hacking, Hacking @section Hooks @cindex hooks @@ -18276,7 +18270,7 @@ appendix illustrates using a few. A complete list of hooks with documentation is maintained by the Worg project at @uref{http://orgmode.org/worg/doc.html#hooks}. address@hidden Add-on packages address@hidden Add-on packages, Adding hyperlink types, Hooks, Hacking @section Add-on packages @cindex add-on packages @@ -18288,7 +18282,7 @@ See the @file{contrib/README} file in the source code directory for a list of contributed files. Worg page with more information is at: @uref{http://orgmode.org/worg/org-contrib/}. address@hidden Adding hyperlink types address@hidden Adding hyperlink types, Adding export back-ends, Add-on packages, Hacking @section Adding hyperlink types @cindex hyperlinks, adding new types @@ -18383,7 +18377,7 @@ To define new link types, define a function that implements completion support with @kbd{C-c C-l}. This function should not accept any arguments but return the appropriate prefix and complete link string. address@hidden Adding export back-ends address@hidden Adding export back-ends, Context-sensitive commands, Adding hyperlink types, Hacking @section Adding export back-ends @cindex Export, writing back-ends @@ -18410,7 +18404,7 @@ For complete documentation, see @url{http://orgmode.org/worg/dev/org-export-reference.html, the Org Export Reference on Worg}. address@hidden Context-sensitive commands address@hidden Context-sensitive commands, Tables in arbitrary syntax, Adding export back-ends, Hacking @section Context-sensitive commands @cindex context-sensitive commands, hooks @cindex add-ons, context-sensitive commands @@ -18427,7 +18421,7 @@ These context sensitive commands work by providing a function that detects special context for that add-on and executes functionality appropriate for that context. address@hidden Tables in arbitrary syntax address@hidden Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking @section Tables and lists in arbitrary syntax @cindex tables, in other modes @cindex lists, in other modes @@ -18460,7 +18454,7 @@ list locally to another format, such as HTML, @LaTeX{} or Texinfo. * Radio lists:: Sending and receiving lists @end menu address@hidden Radio tables address@hidden Radio tables, A @LaTeX{} example, Tables in arbitrary syntax, Tables in arbitrary syntax @subsection Radio tables @cindex radio tables @@ -18522,7 +18516,7 @@ Comment and uncomment each line of the table during edits. The @kbd{M-x orgtbl-toggle-comment RET} command makes toggling easy. @end itemize address@hidden A @LaTeX{} example address@hidden A @LaTeX{} example, Translator functions, Radio tables, Tables in arbitrary syntax @subsection A @LaTeX{} example of radio tables @cindex @LaTeX{}, and Orgtbl mode @@ -18628,7 +18622,7 @@ Functions with two arguments can be supplied instead of strings. By default, no special formatting is applied. @end table address@hidden Translator functions address@hidden Translator functions, Radio lists, A @LaTeX{} example, Tables in arbitrary syntax @subsection Translator functions @cindex HTML, and Orgtbl mode @cindex translator function @@ -18679,7 +18673,7 @@ parameters specified in the @samp{#+ORGTBL: SEND} line. Please share your translator functions by posting them to the Org users mailing list, @email{emacs-orgmode@@gnu.org}. address@hidden Radio lists address@hidden Radio lists, , Translator functions, Tables in arbitrary syntax @subsection Radio lists @cindex radio lists @cindex org-list-insert-radio-list @@ -18720,7 +18714,7 @@ parameters for accurate customizations of lists. Here is a @LaTeX{} example: @kbd{C-c C-c} on @samp{a new house} inserts the translated @LaTeX{} list in-between the BEGIN and END marker lines. address@hidden Dynamic blocks address@hidden Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Hacking @section Dynamic blocks @cindex dynamic blocks @@ -18784,7 +18778,7 @@ Org mode. Dynamic blocks, like any other block, can be narrowed with @code{org-narrow-to-block}. address@hidden Special agenda views address@hidden Special agenda views, Speeding up your agendas, Dynamic blocks, Hacking @section Special agenda views @cindex agenda views, user-defined @@ -18880,7 +18874,7 @@ special function: (org-agenda-overriding-header "Projects waiting for something: ")))) @end lisp address@hidden Speeding up your agendas address@hidden Speeding up your agendas, Extracting agenda information, Special agenda views, Hacking @section Speeding up your agendas @cindex agenda views, optimization @@ -18921,7 +18915,7 @@ about generation of agenda views, see the docstrings for the relevant variables, and this @uref{http://orgmode.org/worg/agenda-optimization.html, dedicated Worg page} for agenda optimization. address@hidden Extracting agenda information address@hidden Extracting agenda information, Using the property API, Speeding up your agendas, Hacking @section Extracting agenda information @cindex agenda, pipe @cindex Scripts, for agenda processing @@ -19023,7 +19017,7 @@ foreach $line (split(/\n/,$agenda)) @{ @} @end example address@hidden Using the property API address@hidden Using the property API, Using the mapping API, Extracting agenda information, Hacking @section Using the property API @cindex API, for properties @cindex properties, API @@ -19103,7 +19097,7 @@ to be entered. The functions must return @code{nil} if they are not responsible for this property. @end defopt address@hidden Using the mapping API address@hidden Using the mapping API, , Using the property API, Hacking @section Using the mapping API @cindex API, for mapping @cindex mapping entries, API @@ -19209,7 +19203,7 @@ The following example counts the number of entries with TODO keyword (length (org-map-entries t "/+WAITING" 'agenda)) @end lisp address@hidden MobileOrg address@hidden MobileOrg, History and acknowledgments, Hacking, Top @appendix MobileOrg @cindex iPhone @cindex MobileOrg @@ -19243,7 +19237,7 @@ them. Though MobileOrg has in-buffer settings, it understands TODO states * Pulling from MobileOrg:: Integrating captured and flagged items @end menu address@hidden Setting up the staging area address@hidden Setting up the staging area, Pushing to MobileOrg, MobileOrg, MobileOrg @section Setting up the staging area MobileOrg needs access to a file directory on a server to interact with @@ -19274,7 +19268,7 @@ follows: Org copies files to the above directory for MobileOrg. Org also uses the same directory for sharing notes between Org and MobileOrg. address@hidden Pushing to MobileOrg address@hidden Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg @section Pushing to MobileOrg Org pushes files listed in @code{org-mobile-files} to @@ -19299,7 +19293,7 @@ to download for agendas. For faster downloads, MobileOrg will read only those files whose address@hidden are stored automatically in the file @file{checksums.dat}.} have changed. address@hidden Pulling from MobileOrg address@hidden Pulling from MobileOrg, , Pushing to MobileOrg, MobileOrg @section Pulling from MobileOrg When MobileOrg synchronizes with the server, it pulls the Org files for @@ -19343,7 +19337,7 @@ entries. Note that these entries may not be the most recent since MobileOrg searches files that were last pulled. To get an updated agenda view with changes since the last pull, pull again. address@hidden History and acknowledgments address@hidden History and acknowledgments, GNU Free Documentation License, MobileOrg, Top @appendix History and acknowledgments @cindex acknowledgments @cindex history @@ -19720,27 +19714,27 @@ and contributed various ideas and code snippets. @end itemize address@hidden GNU Free Documentation License address@hidden GNU Free Documentation License, Main Index, History and acknowledgments, Top @appendix GNU Free Documentation License @include doclicense.texi address@hidden Main Index address@hidden Main Index, Key Index, GNU Free Documentation License, Top @unnumbered Concept index @printindex cp address@hidden Key Index address@hidden Key Index, Command and Function Index, Main Index, Top @unnumbered Key index @printindex ky address@hidden Command and Function Index address@hidden Command and Function Index, Variable Index, Key Index, Top @unnumbered Command and function index @printindex fn address@hidden Variable Index address@hidden Variable Index, , Command and Function Index, Top @unnumbered Variable index This is not a complete index of variables and faces, only the ones that are diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 391ef94ac..97ccf884b 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -149,6 +149,10 @@ you should expect to see something like: #+END_EXAMPLE ** New functions +*** ~org-insert-structure-template~ + +This function can be used to wrap existing text of Org elements in +a #+BEGIN_FOO/#+END_FOO block. Bound to C-c C-x w by default. *** ~org-export-excluded-from-toc-p~ diff --git a/lisp/org.el b/lisp/org.el index 3b26bfd3d..9ad06ac3b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6740,8 +6740,6 @@ Use `\\[org-edit-special]' to edit table.el tables")) ((run-hook-with-args-until-success 'org-tab-after-check-for-cycling-hook)) - ((org-try-structure-completion)) - ((run-hook-with-args-until-success 'org-tab-before-tab-emulation-hook)) @@ -11859,76 +11857,77 @@ keywords relative to each registered export back-end." "TITLE:" "TODO:" "TYP_TODO:" "SELECT_TAGS:" "EXCLUDE_TAGS:")) (defcustom org-structure-template-alist - '(("s" "#+BEGIN_SRC ?\n\n#+END_SRC") - ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") - ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE") - ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") - ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM") - ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") - ("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT") - ("l" "#+BEGIN_EXPORT latex\n?\n#+END_EXPORT") - ("L" "#+LaTeX: ") - ("h" "#+BEGIN_EXPORT html\n?\n#+END_EXPORT") - ("H" "#+HTML: ") - ("a" "#+BEGIN_EXPORT ascii\n?\n#+END_EXPORT") - ("A" "#+ASCII: ") - ("i" "#+INDEX: ?") - ("I" "#+INCLUDE: %file ?")) + '((?s . "src") + (?e . "example") + (?E . "export") + (?q . "quote") + (?v . "verse") + (?c . "center") + (?C . "comment") + (?l . "export latex") + (?h . "export html") + (?a . "export ascii")) "Structure completion elements. -This is a list of abbreviation keys and values. The value gets inserted -if you type `<' followed by the key and then press the completion key, -usually `TAB'. %file will be replaced by a file name after prompting -for the file using completion. The cursor will be placed at the position -of the `?' in the template. -There are two templates for each key, the first uses the original Org syntax, -the second uses Emacs Muse-like syntax tags. These Muse-like tags become -the default when the /org-mtags.el/ module has been loaded. See also the -variable `org-mtags-prefer-muse-templates'." +This is an alist of characters and values. When +`org-insert-structure-template' is called, an additional key is +read. The key is first looked up in this alist, and the +corresponding structure is inserted, with \"#+begin\" and +\"#+end\" added automatically." :group 'org-completion :type '(repeat - (list - (string :tag "Key") + (cons + (character :tag "Key") (string :tag "Template"))) - :version "26.1" :package-version '(Org . "8.3")) -(defun org-try-structure-completion () - "Try to complete a structure template before point. -This looks for strings like \", prompt the +user for a string to use. With an active region, wrap the region +in the block. Otherwise, insert an empty block." + (interactive + (list + (let* ((key (read-key "Key: ")) + (struct-string + (or (cdr (assq key org-structure-template-alist)) + (and (= key ?\t) + (read-string "Structure type: ")) + (error "'%c' has no structure definition" key)))) + struct-string))) + (let ((s (if (use-region-p) + (region-beginning) + (point))) + (e (copy-marker (if (use-region-p) + (region-end) + (point)) + t)) + column) + (when (string-match-p + (concat "\\`" + (regexp-opt '("example" "export" "src"))) + type) + (org-escape-code-in-region s e)) + (goto-char s) + (setq column (current-indentation)) + (beginning-of-line) + (indent-to column) + (insert (format "#+begin_%s\n" type)) + (goto-char e) + (if (bolp) + (progn + (skip-chars-backward " \n\t") + (forward-line)) + (end-of-line) + (insert "\n")) + (indent-to column) + (insert (format "#+end_%s\n" + (car (split-string type)))) + (when (or (string-match-p "src\\|\\`export\\'" type) + (null (use-region-p))) + (goto-char s) + (end-of-line)) + (set-marker e nil))) ;;;; TODO, DEADLINE, Comments @@ -19393,6 +19392,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." (org-defkey org-mode-map "\C-c\C-xE" 'org-inc-effort) (org-defkey org-mode-map "\C-c\C-xo" 'org-toggle-ordered-property) (org-defkey org-mode-map "\C-c\C-xi" 'org-columns-insert-dblock) +(org-defkey org-mode-map "\C-c\C-xw" 'org-insert-structure-template) (org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer) (org-defkey org-mode-map "\C-c\C-x." 'org-timer) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 379ded672..ca1b7f463 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -4000,6 +4000,52 @@ Text. (org-next-block 1 nil "^[ \t]*#\\+BEGIN_QUOTE") (looking-at "#\\+begin_quote"))))) +(ert-deftest test-org/insert-template () + "Test `org-insert-structure-template'." + ;; Test in empty buffer. + (should + (string= "#+begin_foo\n#+end_foo\n" + (org-test-with-temp-text "" + (org-insert-structure-template "foo") + (buffer-string)))) + ;; Test with multiple lines in buffer. + (should + (string= "#+begin_foo\nI'm a paragraph\n#+end_foo\n\nI'm a second paragraph" + (org-test-with-temp-text "I'm a paragraph\n\nI'm a second paragraph" + (org-mark-element) + (org-insert-structure-template "foo") + (buffer-string)))) + ;; Test with text in buffer, no region, no final newline. + (should + (string= "#+begin_foo\nI'm a paragraph.\n#+end_foo\n" + (org-test-with-temp-text "I'm a paragraph." + (org-mark-element) + (org-insert-structure-template "foo") + (buffer-string)))) + ;; Test with text in buffer and region set. + (should + (string= "#+begin_foo\nI'm a paragraph\n\nI'm a second paragrah\n#+end_foo\n" + (org-test-with-temp-text "I'm a paragraph\n\nI'm a second paragrah" + (goto-char (point-min)) + (set-mark (point)) + (goto-char (point-max)) + (org-insert-structure-template "foo") + (buffer-string)))) + ;; Test with example escaping. + (should + (string= "#+begin_example\n,* Heading\n#+end_example\n" + (org-test-with-temp-text "* Heading" + (org-mark-element) + (org-insert-structure-template "example") + (buffer-string)))) + ;; Test with indentation. + (should + (string= " #+begin_foo\n This is a paragraph\n #+end_foo\n" + (org-test-with-temp-text " This is a paragraph" + (org-mark-element) + (org-insert-structure-template "foo") + (buffer-string))))) + (ert-deftest test-org/previous-block () "Test `org-previous-block' specifications." ;; Regular test. -- 2.14.3