Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2012-03-17 14:43:38 +01:00
commit 5ed0384e51
126 changed files with 3931 additions and 6556 deletions

File diff suppressed because it is too large Load Diff

View File

@ -170,9 +170,7 @@ LISPF = org.el \
ob-shen.el \ ob-shen.el \
ob-fortran.el \ ob-fortran.el \
ob-picolisp.el \ ob-picolisp.el \
ob-maxima.el \ ob-maxima.el
ob-io.el \
ob-scala.el
LISPFILES0 = $(LISPF:%=lisp/%) LISPFILES0 = $(LISPF:%=lisp/%)
LISPFILES = $(LISPFILES0) lisp/org-install.el LISPFILES = $(LISPFILES0) lisp/org-install.el

View File

@ -1,11 +1,10 @@
;;; ob-fomus.el --- org-babel functions for fomus evaluation ;;; ob-fomus.el --- org-babel functions for fomus evaluation
;; Copyright (C) 2011-2012 Torsten Anders ;; Copyright (C) 2011, 2012 Torsten Anders
;; Author: Torsten Anders ;; Author: Torsten Anders
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; Version:
;;; License: ;;; License:

View File

@ -1,11 +1,10 @@
;;; ob-oz.el --- org-babel functions for Oz evaluation ;;; ob-oz.el --- org-babel functions for Oz evaluation
;; Copyright (C) 2009-2012 Torsten Anders and Eric Schulte ;; Copyright (C) 2009, 2012 Torsten Anders and Eric Schulte
;; Author: Torsten Anders and Eric Schulte ;; Author: Torsten Anders and Eric Schulte
;; Keywords: literate programming, reproducible research ;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; Version: 0.02
;;; License: ;;; License:

View File

@ -1,7 +1,7 @@
% Reference Card for Org Mode % Reference Card for Org Mode
\def\orgversionnumber{7.5} \def\orgversionnumber{7.5}
\def\versionyear{2011} % latest update \def\versionyear{2012} % latest update
\def\year{2011} % latest copyright year \def\year{2012} % latest copyright year
%**start of header %**start of header
\newcount\columnsperpage \newcount\columnsperpage

View File

@ -138,3 +138,6 @@ of checkbox items"
(provide 'org-checklist) (provide 'org-checklist)
;;; org-checklist.el ends here ;;; org-checklist.el ends here

View File

@ -2915,3 +2915,4 @@ returns its return value."
(provide 'org-drill) (provide 'org-drill)

File diff suppressed because it is too large Load Diff

View File

@ -217,3 +217,4 @@ This should go into the `org-export-preprocess-hook'."
(provide 'org-eval) (provide 'org-eval)
;;; org-eval.el ends here ;;; org-eval.el ends here

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
;;; org-mtags.el --- Muse-like tags in Org-mode ;;; org-mtags.el --- Muse-like tags in Org-mode
;; Copyright (C) 2008-2012 Free Software Foundation, Inc. ;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
;; ;;
;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Author: Carsten Dominik <carsten at orgmode dot org>
@ -255,3 +254,4 @@ with string values. In addition, it reutnrs the following properties:
(provide 'org-mtags) (provide 'org-mtags)
;;; org-mtags.el ends here ;;; org-mtags.el ends here

View File

@ -639,3 +639,5 @@ button changes the binding of the arrow keys."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; org-panel.el ends here ;;; org-panel.el ends here

View File

@ -1,6 +1,5 @@
;;; org-sudoku.el --- Greate and solve SUDOKU games in Org tables ;;; org-sudoku.el --- Greate and solve SUDOKU games in Org tables
;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
;; Copyright (C) 2012 Free Software Foundation, Inc.
;; ;;
;; Author: Carsten Dominik <carsten at orgmode dot org> ;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp, games ;; Keywords: outlines, hypermedia, calendar, wp, games

View File

@ -36,3 +36,4 @@
(org-pop-to-buffer-same-window "*preproc-temp*") (org-pop-to-buffer-same-window "*preproc-temp*")
(point-max) (point-max)
(insert string)))) (insert string))))

View File

@ -265,7 +265,7 @@
@copying @copying
This manual is for Org version @value{VERSION}. This manual is for Org version @value{VERSION}.
Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. Copyright @copyright{} 2004-2011 Free Software Foundation, Inc.
@quotation @quotation
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
@ -717,7 +717,6 @@ Specific header arguments
* rownames:: Handle row names in tables * rownames:: Handle row names in tables
* shebang:: Make tangled files executable * shebang:: Make tangled files executable
* eval:: Limit evaluation of specific code blocks * eval:: Limit evaluation of specific code blocks
* wrap:: Mark source block evaluation results
Miscellaneous Miscellaneous
@ -1081,7 +1080,7 @@ attach it to your bug report.
@node Conventions, , Feedback, Introduction @node Conventions, , Feedback, Introduction
@section Typesetting conventions used in this manual @section Typesetting conventions used in this manual
Org uses three types of keywords: TODO keywords, tags and property Org uses three types of keywords: TODO keywords, tags, and property
names. In this manual we use the following conventions: names. In this manual we use the following conventions:
@table @code @table @code
@ -1099,14 +1098,7 @@ User-defined properties are capitalized; built-in properties with
special meaning are written with all capitals. special meaning are written with all capitals.
@end table @end table
Moreover, Org uses @i{option keywords} (like @code{#+TITLE} to set the title) The manual lists both the keys and the corresponding commands for accessing
and @i{environment keywords} (like @code{#+BEGIN_HTML} to start a @code{HTML}
environment). They are written in uppercase in the manual to enhance its
readability, but you can use lowercase in your Org files@footnote{Easy
templates insert lowercase keywords and Babel dynamically inserts
@code{#+results}.}
The manual lists both the keys and the corresponding commands for accessing a
functionality. Org mode often uses the same key for different functions, functionality. Org mode often uses the same key for different functions,
depending on context. The command that is bound to such keys has a generic depending on context. The command that is bound to such keys has a generic
name, like @code{org-metaright}. In the manual we will, wherever possible, name, like @code{org-metaright}. In the manual we will, wherever possible,
@ -1166,8 +1158,7 @@ Headlines define the structure of an outline tree. The headlines in Org
start with one or more stars, on the left margin@footnote{See the variables start with one or more stars, on the left margin@footnote{See the variables
@code{org-special-ctrl-a/e}, @code{org-special-ctrl-k}, and @code{org-special-ctrl-a/e}, @code{org-special-ctrl-k}, and
@code{org-ctrl-k-protect-subtree} to configure special behavior of @kbd{C-a}, @code{org-ctrl-k-protect-subtree} to configure special behavior of @kbd{C-a},
@kbd{C-e}, and @kbd{C-k} in headlines.} @footnote{Clocking only works with @kbd{C-e}, and @kbd{C-k} in headlines.}. For example:
headings indented less then 30 stars.}. For example:
@example @example
* Top level headline * Top level headline
@ -1437,7 +1428,7 @@ more details, see the docstring of the command
@code{org-clone-subtree-with-time-shift}. @code{org-clone-subtree-with-time-shift}.
@orgcmd{C-c C-w,org-refile} @orgcmd{C-c C-w,org-refile}
Refile entry or region to a different location. @xref{Refiling notes}. Refile entry or region to a different location. @xref{Refiling notes}.
@orgcmd{C-c ^,org-sort} @orgcmd{C-c ^,org-sort-entries-or-items}
Sort same-level entries. When there is an active region, all entries in the Sort same-level entries. When there is an active region, all entries in the
region will be sorted. Otherwise the children of the current headline are region will be sorted. Otherwise the children of the current headline are
sorted. The command prompts for the sorting method, which can be sorted. The command prompts for the sorting method, which can be
@ -1764,13 +1755,11 @@ numerically, alphabetically, by time, or by custom function.
@cindex visibility cycling, drawers @cindex visibility cycling, drawers
@vindex org-drawers @vindex org-drawers
@cindex org-insert-drawer
@kindex C-c C-x d
Sometimes you want to keep information associated with an entry, but you Sometimes you want to keep information associated with an entry, but you
normally don't want to see it. For this, Org mode has @emph{drawers}. normally don't want to see it. For this, Org mode has @emph{drawers}.
Drawers need to be configured with the variable Drawers need to be configured with the variable
@code{org-drawers}@footnote{You can define additional drawers on a @code{org-drawers}@footnote{You can define drawers on a per-file basis
per-file basis with a line like @code{#+DRAWERS: HIDDEN STATE}}. Drawers with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers
look like this: look like this:
@example @example
@ -1782,13 +1771,6 @@ look like this:
After the drawer. After the drawer.
@end example @end example
You can interactively insert drawers at point by calling
@code{org-insert-drawer}, which is bound to @key{C-c C-x d}. With an active
region, this command will put the region inside the drawer. With a prefix
argument, this command calls @code{org-insert-property-drawer} and add a
property drawer right below the current headline. Completion over drawer
keywords is also possible using @key{M-TAB}.
Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and
show the entry, but keep the drawer collapsed to a single line. In order to show the entry, but keep the drawer collapsed to a single line. In order to
look inside the drawer, you need to move the cursor to the drawer line and look inside the drawer, you need to move the cursor to the drawer line and
@ -3243,8 +3225,6 @@ mailto:adent@@galaxy.net @r{Mail link}
vm:folder @r{VM folder link} vm:folder @r{VM folder link}
vm:folder#id @r{VM message link} vm:folder#id @r{VM message link}
vm://myself@@some.where.org/folder#id @r{VM on remote machine} vm://myself@@some.where.org/folder#id @r{VM on remote machine}
vm-imap:account:folder @r{VM IMAP folder link}
vm-imap:account:folder#id @r{VM IMAP message link}
wl:folder @r{WANDERLUST folder link} wl:folder @r{WANDERLUST folder link}
wl:folder#id @r{WANDERLUST message link} wl:folder#id @r{WANDERLUST message link}
mhe:folder @r{MH-E folder link} mhe:folder @r{MH-E folder link}
@ -4083,11 +4063,9 @@ time-stamped note for a change. These records will be inserted after the
headline as an itemized list, newest first@footnote{See the variable headline as an itemized list, newest first@footnote{See the variable
@code{org-log-states-order-reversed}}. When taking a lot of notes, you might @code{org-log-states-order-reversed}}. When taking a lot of notes, you might
want to get the notes out of the way into a drawer (@pxref{Drawers}). want to get the notes out of the way into a drawer (@pxref{Drawers}).
Customize the variable @code{org-log-into-drawer} to get this behavior---the Customize the variable @code{org-log-into-drawer} to get this
recommended drawer for this is called @code{LOGBOOK}@footnote{Note that the behavior---the recommended drawer for this is called @code{LOGBOOK}. You can
@code{LOGBOOK} drawer is unfolded when pressing @key{SPC} in the agenda to also overrule the setting of this variable for a subtree by setting a
show an entry---use @key{C-u SPC} to keep it folded here}. You can also
overrule the setting of this variable for a subtree by setting a
@code{LOG_INTO_DRAWER} property. @code{LOG_INTO_DRAWER} property.
Since it is normally too much to record a note for every state, Org mode Since it is normally too much to record a note for every state, Org mode
@ -4892,8 +4870,8 @@ in the current file will be offered as possible completions.
@orgcmd{C-c C-x p,org-set-property} @orgcmd{C-c C-x p,org-set-property}
Set a property. This prompts for a property name and a value. If Set a property. This prompts for a property name and a value. If
necessary, the property drawer is created as well. necessary, the property drawer is created as well.
@item C-u M-x org-insert-drawer @item M-x org-insert-property-drawer
@cindex org-insert-drawer @findex org-insert-property-drawer
Insert a property drawer into the current entry. The drawer will be Insert a property drawer into the current entry. The drawer will be
inserted early in the entry, but after the lines with planning inserted early in the entry, but after the lines with planning
information like deadlines. information like deadlines.
@ -5918,14 +5896,12 @@ created for this purpose, it is described in @ref{Structure editing}.
@cindex time clocking @cindex time clocking
Org mode allows you to clock the time you spend on specific tasks in a Org mode allows you to clock the time you spend on specific tasks in a
project. When you start working on an item, you can start the clock. When project. When you start working on an item, you can start the clock.
you stop working on that task, or when you mark the task done, the clock is When you stop working on that task, or when you mark the task done, the
stopped and the corresponding time interval is recorded. It also computes clock is stopped and the corresponding time interval is recorded. It
the total time spent on each subtree@footnote{Clocking only works if all also computes the total time spent on each subtree of a project. And it
headings are indented with less than 30 stars. This is a hardcoded remembers a history or tasks recently clocked, to that you can jump quickly
limitation of `lmax' in `org-clock-sum'.} of a project. And it remembers a between a number of tasks absorbing your time.
history or tasks recently clocked, to that you can jump quickly between a
number of tasks absorbing your time.
To save the clock history across Emacs sessions, use To save the clock history across Emacs sessions, use
@lisp @lisp
@ -6704,21 +6680,21 @@ similar way.}:
@vindex org-from-is-user-regexp @vindex org-from-is-user-regexp
@smallexample @smallexample
Link type | Available keywords Link type | Available keywords
---------------------------------+---------------------------------------------- ------------------------+----------------------------------------------
bbdb | %:name %:company bbdb | %:name %:company
irc | %:server %:port %:nick irc | %:server %:port %:nick
vm, vm-imap, wl, mh, mew, rmail | %:type %:subject %:message-id vm, wl, mh, mew, rmail | %:type %:subject %:message-id
| %:from %:fromname %:fromaddress | %:from %:fromname %:fromaddress
| %:to %:toname %:toaddress | %:to %:toname %:toaddress
| %:date @r{(message date header field)} | %:date @r{(message date header field)}
| %:date-timestamp @r{(date as active timestamp)} | %:date-timestamp @r{(date as active timestamp)}
| %:date-timestamp-inactive @r{(date as inactive timestamp)} | %:date-timestamp-inactive @r{(date as inactive timestamp)}
| %:fromto @r{(either "to NAME" or "from NAME")@footnote{This will always be the other, not the user. See the variable @code{org-from-is-user-regexp}.}} | %:fromto @r{(either "to NAME" or "from NAME")@footnote{This will always be the other, not the user. See the variable @code{org-from-is-user-regexp}.}}
gnus | %:group, @r{for messages also all email fields} gnus | %:group, @r{for messages also all email fields}
w3, w3m | %:url w3, w3m | %:url
info | %:file %:node info | %:file %:node
calendar | %:date calendar | %:date
@end smallexample @end smallexample
@noindent @noindent
@ -9041,7 +9017,7 @@ the object with @code{\ref@{tab:basic-data@}}:
@example @example
#+CAPTION: This is the caption for the next table (or link) #+CAPTION: This is the caption for the next table (or link)
#+LABEL: tab:basic-data #+LABEL: tbl:basic-data
| ... | ...| | ... | ...|
|-----|----| |-----|----|
@end example @end example
@ -9655,7 +9631,7 @@ Insert template with export options, see example below.
@cindex #+EXPORT_SELECT_TAGS @cindex #+EXPORT_SELECT_TAGS
@cindex #+EXPORT_EXCLUDE_TAGS @cindex #+EXPORT_EXCLUDE_TAGS
@cindex #+XSLT @cindex #+XSLT
@cindex #+LaTeX_HEADER @cindex #+LATEX_HEADER
@vindex user-full-name @vindex user-full-name
@vindex user-mail-address @vindex user-mail-address
@vindex org-export-default-language @vindex org-export-default-language
@ -9675,7 +9651,7 @@ Insert template with export options, see example below.
@r{You need to confirm using these, or configure @code{org-export-allow-BIND}} @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
#+LINK_UP: the ``up'' link of an exported page #+LINK_UP: the ``up'' link of an exported page
#+LINK_HOME: the ``home'' link of an exported page #+LINK_HOME: the ``home'' link of an exported page
#+LaTeX_HEADER: extra line(s) for the @LaTeX{} header, like \usepackage@{xyz@} #+LATEX_HEADER: extra line(s) for the @LaTeX{} header, like \usepackage@{xyz@}
#+EXPORT_SELECT_TAGS: Tags that select a tree for export #+EXPORT_SELECT_TAGS: Tags that select a tree for export
#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
#+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file #+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file
@ -10347,11 +10323,11 @@ By default, the @LaTeX{} output uses the class @code{article}.
@vindex org-export-latex-classes @vindex org-export-latex-classes
@vindex org-export-latex-default-packages-alist @vindex org-export-latex-default-packages-alist
@vindex org-export-latex-packages-alist @vindex org-export-latex-packages-alist
@cindex #+LaTeX_HEADER @cindex #+LATEX_HEADER
@cindex #+LaTeX_CLASS @cindex #+LATEX_CLASS
@cindex #+LaTeX_CLASS_OPTIONS @cindex #+LATEX_CLASS_OPTIONS
@cindex property, LaTeX_CLASS @cindex property, LATEX_CLASS
@cindex property, LaTeX_CLASS_OPTIONS @cindex property, LATEX_CLASS_OPTIONS
You can change this globally by setting a different value for You can change this globally by setting a different value for
@code{org-export-latex-default-class} or locally by adding an option like @code{org-export-latex-default-class} or locally by adding an option like
@code{#+LaTeX_CLASS: myclass} in your file, or with a @code{:LaTeX_CLASS:} @code{#+LaTeX_CLASS: myclass} in your file, or with a @code{:LaTeX_CLASS:}
@ -10361,22 +10337,11 @@ defines a header template for each class@footnote{Into which the values of
@code{org-export-latex-default-packages-alist} and @code{org-export-latex-default-packages-alist} and
@code{org-export-latex-packages-alist} are spliced.}, and allows you to @code{org-export-latex-packages-alist} are spliced.}, and allows you to
define the sectioning structure for each class. You can also define your own define the sectioning structure for each class. You can also define your own
classes there. @code{#+LaTeX_CLASS_OPTIONS} or a @code{:LaTeX_CLASS_OPTIONS:} classes there. @code{#+LaTeX_CLASS_OPTIONS} or a @code{LaTeX_CLASS_OPTIONS}
property can specify the options for the @code{\documentclass} macro. The property can specify the options for the @code{\documentclass} macro. You
options to documentclass have to be provided, as expected by @LaTeX{}, within can also use @code{#+LATEX_HEADER: \usepackage@{xyz@}} to add lines to the
square brackets. You can also use @code{#+LaTeX_HEADER: \usepackage@{xyz@}} header. See the docstring of @code{org-export-latex-classes} for more
to add lines to the header. See the docstring of information.
@code{org-export-latex-classes} for more information. An example is shown
below.
@example
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper]
#+LaTeX_HEADER: \usepackage@{xyz@}
* Headline 1
some text
@end example
@node Quoting @LaTeX{} code, Tables in @LaTeX{} export, Header and sectioning, @LaTeX{} and PDF export @node Quoting @LaTeX{} code, Tables in @LaTeX{} export, Header and sectioning, @LaTeX{} and PDF export
@subsection Quoting @LaTeX{} code @subsection Quoting @LaTeX{} code
@ -10460,7 +10425,9 @@ add something like @samp{placement=[h!]} to the attributes. It is to be noted
this option can be used with tables as well@footnote{One can also take this option can be used with tables as well@footnote{One can also take
advantage of this option to pass other, unrelated options into the figure or advantage of this option to pass other, unrelated options into the figure or
table environment. For an example see the section ``Exporting org files'' in table environment. For an example see the section ``Exporting org files'' in
@url{http://orgmode.org/worg/org-hacks.html}}. @url{http://orgmode.org/worg/org-hacks.html}}. For example the
@code{#+ATTR_LaTeX:} line below is exported as the @code{figure} environment
below it.
If you would like to let text flow around the image, add the word @samp{wrap} If you would like to let text flow around the image, add the word @samp{wrap}
to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
@ -10547,7 +10514,7 @@ transitions.
Frames will automatically receive a @code{fragile} option if they contain Frames will automatically receive a @code{fragile} option if they contain
source code that uses the verbatim environment. Special @file{beamer} source code that uses the verbatim environment. Special @file{beamer}
specific code can be inserted using @code{#+BEAMER:} and specific code can be inserted using @code{#+BEAMER:} and
@code{#+BEGIN_BEAMER...#+END_BEAMER} constructs, similar to other export @code{#+BEGIN_beamer...#+end_beamer} constructs, similar to other export
backends, but with the difference that @code{#+LaTeX:} stuff will be included backends, but with the difference that @code{#+LaTeX:} stuff will be included
in the presentation as well. in the presentation as well.
@ -12310,7 +12277,7 @@ publish it as @file{theindex.html}.
@end multitable @end multitable
The file will be created when first publishing a project with the The file will be created when first publishing a project with the
@code{:makeindex} set. The file only contains a statement @code{#+INCLUDE: @code{:makeindex} set. The file only contains a statement @code{#+include:
"theindex.inc"}. You can then build around this include statement by adding "theindex.inc"}. You can then build around this include statement by adding
a title, style information, etc. a title, style information, etc.
@ -12701,7 +12668,7 @@ and/or the name of the evaluated code block. The default value of
@code{org-babel-results-keyword}. @code{org-babel-results-keyword}.
By default, the evaluation facility is only enabled for Lisp code blocks By default, the evaluation facility is only enabled for Lisp code blocks
specified as @code{emacs-lisp}. However, source code blocks in many languages specified as @code{emacs-lisp}. However, source code blocks in many languages
can be evaluated within Org mode (see @ref{Languages} for a list of supported can be evaluated within Org mode (see @ref{Languages} for a list of supported
languages and @ref{Structure of code blocks} for information on the syntax languages and @ref{Structure of code blocks} for information on the syntax
used to define a code block). used to define a code block).
@ -12715,8 +12682,8 @@ evaluation from the @kbd{C-c C-c} key binding.}. This will call the
its results into the Org mode buffer. its results into the Org mode buffer.
@cindex #+CALL @cindex #+CALL
It is also possible to evaluate named code blocks from anywhere in an Org It is also possible to evaluate named code blocks from anywhere in an
mode buffer or an Org mode table. Live code blocks located in the current Org mode buffer or an Org mode table. Live code blocks located in the current
Org mode buffer or in the ``Library of Babel'' (see @ref{Library of Babel}) Org mode buffer or in the ``Library of Babel'' (see @ref{Library of Babel})
can be executed. Named code blocks can be executed with a separate can be executed. Named code blocks can be executed with a separate
@code{#+CALL:} line or inline within a block of text. @code{#+CALL:} line or inline within a block of text.
@ -13010,7 +12977,7 @@ Multi-line header arguments on an un-named code block:
(message "data1:%S, data2:%S" data1 data2) (message "data1:%S, data2:%S" data1 data2)
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: data1:1, data2:2 : data1:1, data2:2
@end example @end example
@ -13022,7 +12989,7 @@ Multi-line header arguments on a named code block:
(message "data:%S" data) (message "data:%S" data)
#+END_SRC #+END_SRC
#+RESULTS: named-block #+results: named-block
: data:2 : data:2
@end example @end example
@ -13080,7 +13047,6 @@ argument in lowercase letters. The following header arguments are defined:
* rownames:: Handle row names in tables * rownames:: Handle row names in tables
* shebang:: Make tangled files executable * shebang:: Make tangled files executable
* eval:: Limit evaluation of specific code blocks * eval:: Limit evaluation of specific code blocks
* wrap:: Mark source block evaluation results
@end menu @end menu
Additional header arguments are defined on a language-specific basis, see Additional header arguments are defined on a language-specific basis, see
@ -13095,7 +13061,7 @@ syntax used to specify arguments is the same across all languages. In every
case, variables require a default value when they are declared. case, variables require a default value when they are declared.
The values passed to arguments can either be literal values, references, or The values passed to arguments can either be literal values, references, or
Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}). References Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}). References
include anything in the Org mode file that takes a @code{#+NAME:}, include anything in the Org mode file that takes a @code{#+NAME:},
@code{#+TBLNAME:}, or @code{#+RESULTS:} line. This includes tables, lists, @code{#+TBLNAME:}, or @code{#+RESULTS:} line. This includes tables, lists,
@code{#+BEGIN_EXAMPLE} blocks, other code blocks, and the results of other @code{#+BEGIN_EXAMPLE} blocks, other code blocks, and the results of other
@ -13134,7 +13100,7 @@ an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line
(length table) (length table)
#+END_SRC #+END_SRC
#+RESULTS: table-length #+results: table-length
: 4 : 4
@end example @end example
@ -13153,7 +13119,7 @@ carried through to the source code block)
(print x) (print x)
#+END_SRC #+END_SRC
#+RESULTS: #+results:
| simple | list | | simple | list |
@end example @end example
@ -13166,7 +13132,7 @@ optionally followed by parentheses
(* 2 length) (* 2 length)
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: 8 : 8
@end example @end example
@ -13181,7 +13147,7 @@ code block name using standard function call syntax
(* 2 input) (* 2 input)
#+END_SRC #+END_SRC
#+RESULTS: double #+results: double
: 16 : 16
#+NAME: squared #+NAME: squared
@ -13189,7 +13155,7 @@ code block name using standard function call syntax
(* input input) (* input input)
#+END_SRC #+END_SRC
#+RESULTS: squared #+results: squared
: 4 : 4
@end example @end example
@ -13208,7 +13174,7 @@ on two lines
(concatenate 'string x " for you.") (concatenate 'string x " for you.")
#+END_SRC #+END_SRC
#+RESULTS: read-literal-example #+results: read-literal-example
: A literal example : A literal example
: on two lines for you. : on two lines for you.
@ -13250,7 +13216,7 @@ following example assigns the last cell of the first row the table
data data
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: a : a
@end example @end example
@ -13271,7 +13237,7 @@ to @code{data}.
data data
#+END_SRC #+END_SRC
#+RESULTS: #+results:
| 2 | b | | 2 | b |
| 3 | c | | 3 | c |
| 4 | d | | 4 | d |
@ -13293,7 +13259,7 @@ column is referenced.
data data
#+END_SRC #+END_SRC
#+RESULTS: #+results:
| 1 | 2 | 3 | 4 | | 1 | 2 | 3 | 4 |
@end example @end example
@ -13313,7 +13279,7 @@ another by commas, as shown in the following example.
data data
#+END_SRC #+END_SRC
#+RESULTS: #+results:
| 11 | 14 | 17 | | 11 | 14 | 17 |
@end example @end example
@ -13346,7 +13312,7 @@ Emacs Lisp, as shown in the following example.
$data $data
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: (a b c) : (a b c)
@end example @end example
@ -13412,10 +13378,10 @@ The results are interpreted as raw Org mode code and are inserted directly
into the buffer. If the results look like a table they will be aligned as into the buffer. If the results look like a table they will be aligned as
such by Org mode. E.g., @code{:results value raw}. such by Org mode. E.g., @code{:results value raw}.
@item @code{html} @item @code{html}
Results are assumed to be HTML and will be enclosed in a @code{BEGIN_HTML} Results are assumed to be HTML and will be enclosed in a @code{begin_html}
block. E.g., @code{:results value html}. block. E.g., @code{:results value html}.
@item @code{latex} @item @code{latex}
Results assumed to be @LaTeX{} and are enclosed in a @code{BEGIN_LaTeX} block. Results assumed to be @LaTeX{} and are enclosed in a @code{begin_latex} block.
E.g., @code{:results value latex}. E.g., @code{:results value latex}.
@item @code{code} @item @code{code}
Result are assumed to be parsable code and are enclosed in a code block. Result are assumed to be parsable code and are enclosed in a code block.
@ -13648,34 +13614,21 @@ interpreted language.
@node noweb, noweb-ref, session, Specific header arguments @node noweb, noweb-ref, session, Specific header arguments
@subsubsection @code{:noweb} @subsubsection @code{:noweb}
The @code{:noweb} header argument controls expansion of ``noweb'' syntax The @code{:noweb} header argument controls expansion of ``noweb'' style (see
references (see @ref{Noweb reference syntax}) when the code block is @ref{Noweb reference syntax}) references in a code block. This header
evaluated, tangled, or exported. The @code{:noweb} header argument can have argument can have one of three values: @code{yes}, @code{no}, or @code{tangle}.
one of the five values: @code{no}, @code{yes}, @code{tangle}, or
@code{no-export} @code{strip-export}.
@itemize @bullet @itemize @bullet
@item @code{no}
The default. ``Noweb'' syntax references in the body of the code block will
not be expanded before the code block is evaluated, tangled or exported.
@item @code{yes} @item @code{yes}
``Noweb'' syntax references in the body of the code block will be All ``noweb'' syntax references in the body of the code block will be
expanded before the code block is evaluated, tangled or exported. expanded before the block is evaluated, tangled or exported.
@item @code{no}
The default. No ``noweb'' syntax specific action is taken when the code
block is evaluated, tangled or exported.
@item @code{tangle} @item @code{tangle}
``Noweb'' syntax references in the body of the code block will be expanded All ``noweb'' syntax references in the body of the code block will be
before the code block is tangled. However, ``noweb'' syntax references will expanded before the block is tangled, however ``noweb'' references will not
not be expanded when the code block is evaluated or exported. be expanded when the block is evaluated or exported.
@item @code{no-export}
``Noweb'' syntax references in the body of the code block will be expanded
before the block is evaluated or tangled. However, ``noweb'' syntax
references will not be expanded when the code block is exported.
@item @code{strip-export}
``Noweb'' syntax references in the body of the code block will be expanded
before the block is evaluated or tangled. However, ``noweb'' syntax
references will not be removed when the code block is exported.
@item @code{eval}
``Noweb'' syntax references in the body of the code block will only be
expanded before the block is evaluated.
@end itemize @end itemize
@subsubheading Noweb prefix lines @subsubheading Noweb prefix lines
@ -13776,7 +13729,7 @@ every time it is called.
@item @code{yes} @item @code{yes}
Every time the code block is run a SHA1 hash of the code and arguments Every time the code block is run a SHA1 hash of the code and arguments
passed to the block will be generated. This hash is packed into the passed to the block will be generated. This hash is packed into the
@code{#+RESULTS:} line and will be checked on subsequent @code{#+results:} line and will be checked on subsequent
executions of the code block. If the code block has not executions of the code block. If the code block has not
changed since the last time it was evaluated, it will not be re-evaluated. changed since the last time it was evaluated, it will not be re-evaluated.
@end itemize @end itemize
@ -13793,7 +13746,7 @@ changed since it was last run.
runif(1) runif(1)
#+END_SRC #+END_SRC
#+RESULTS[a2a72cd647ad44515fab62e144796432793d68e1]: random #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
0.4659510825295 0.4659510825295
#+NAME: caller #+NAME: caller
@ -13801,7 +13754,7 @@ changed since it was last run.
x x
#+END_SRC #+END_SRC
#+RESULTS[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
0.254227238707244 0.254227238707244
@end example @end example
@ -13845,7 +13798,7 @@ default value yields the following results.
return tab return tab
#+END_SRC #+END_SRC
#+RESULTS: echo-table #+results: echo-table
| a | b | c | | a | b | c |
| d | e | f | | d | e | f |
| g | h | i | | g | h | i |
@ -13867,7 +13820,7 @@ Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
return tab return tab
#+END_SRC #+END_SRC
#+RESULTS: echo-table #+results: echo-table
| a | b | c | | a | b | c |
|---+---+---| |---+---+---|
| d | e | f | | d | e | f |
@ -13905,7 +13858,7 @@ processing, then reapplied to the results.
return [[val + '*' for val in row] for row in tab] return [[val + '*' for val in row] for row in tab]
#+END_SRC #+END_SRC
#+RESULTS: echo-table-again #+results: echo-table-again
| a | | a |
|----| |----|
| b* | | b* |
@ -13948,7 +13901,7 @@ and is then reapplied to the results.
return [[val + 10 for val in row] for row in tab] return [[val + 10 for val in row] for row in tab]
#+END_SRC #+END_SRC
#+RESULTS: echo-table-once-again #+results: echo-table-once-again
| one | 11 | 12 | 13 | 14 | 15 | | one | 11 | 12 | 13 | 14 | 15 |
| two | 16 | 17 | 18 | 19 | 20 | | two | 16 | 17 | 18 | 19 | 20 |
@end example @end example
@ -13966,7 +13919,7 @@ Setting the @code{:shebang} header argument to a string value
first line of any tangled file holding the code block, and the file first line of any tangled file holding the code block, and the file
permissions of the tangled file are set to make it executable. permissions of the tangled file are set to make it executable.
@node eval, wrap, shebang, Specific header arguments @node eval, , shebang, Specific header arguments
@subsubsection @code{:eval} @subsubsection @code{:eval}
The @code{:eval} header argument can be used to limit the evaluation of The @code{:eval} header argument can be used to limit the evaluation of
specific code blocks. The @code{:eval} header argument can be useful for specific code blocks. The @code{:eval} header argument can be useful for
@ -13991,14 +13944,6 @@ If this header argument is not set then evaluation is determined by the value
of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation
security}. security}.
@node wrap, , eval, Specific header arguments
@subsubsection @code{:wrap}
The @code{:wrap} header argument is used to mark the results of source block
evaluation. The header argument can be passed a string that will be appended
to @code{#+BEGIN_} and @code{#+END_}, which will then be used to wrap the
results. If not string is specified then the results will be wrapped in a
@code{#+BEGIN/END_RESULTS} block.
@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code @node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code
@section Results of evaluation @section Results of evaluation
@cindex code block, results of evaluation @cindex code block, results of evaluation
@ -14068,7 +14013,7 @@ process. For example, compare the following two blocks:
print "bye" print "bye"
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: hello : hello
: bye : bye
@end example @end example
@ -14081,7 +14026,7 @@ In non-session mode, the `2' is not printed and does not appear.
print "bye" print "bye"
#+END_SRC #+END_SRC
#+RESULTS: #+results:
: hello : hello
: 2 : 2
: bye : bye
@ -14372,19 +14317,19 @@ keystrokes are typed on a line by itself.
The following template selectors are currently supported. The following template selectors are currently supported.
@multitable @columnfractions 0.1 0.9 @multitable @columnfractions 0.1 0.9
@item @kbd{s} @tab @code{#+BEGIN_SRC ... #+END_SRC} @item @kbd{s} @tab @code{#+begin_src ... #+end_src}
@item @kbd{e} @tab @code{#+BEGIN_EXAMPLE ... #+END_EXAMPLE} @item @kbd{e} @tab @code{#+begin_example ... #+end_example}
@item @kbd{q} @tab @code{#+BEGIN_QUOTE ... #+END_QUOTE} @item @kbd{q} @tab @code{#+begin_quote ... #+end_quote}
@item @kbd{v} @tab @code{#+BEGIN_VERSE ... #+END_VERSE} @item @kbd{v} @tab @code{#+begin_verse ... #+end_verse}
@item @kbd{c} @tab @code{#+BEGIN_CENTER ... #+END_CENTER} @item @kbd{c} @tab @code{#+begin_center ... #+end_center}
@item @kbd{l} @tab @code{#+BEGIN_LaTeX ... #+END_LaTeX} @item @kbd{l} @tab @code{#+begin_latex ... #+end_latex}
@item @kbd{L} @tab @code{#+LaTeX:} @item @kbd{L} @tab @code{#+latex:}
@item @kbd{h} @tab @code{#+BEGIN_HTML ... #+END_HTML} @item @kbd{h} @tab @code{#+begin_html ... #+end_html}
@item @kbd{H} @tab @code{#+HTML:} @item @kbd{H} @tab @code{#+html:}
@item @kbd{a} @tab @code{#+BEGIN_ASCII ... #+END_ASCII} @item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii}
@item @kbd{A} @tab @code{#+ASCII:} @item @kbd{A} @tab @code{#+ascii:}
@item @kbd{i} @tab @code{#+INDEX:} line @item @kbd{i} @tab @code{#+index:} line
@item @kbd{I} @tab @code{#+INCLUDE:} line @item @kbd{I} @tab @code{#+include:} line
@end multitable @end multitable
For example, on an empty line, typing "<e" and then pressing TAB, will expand For example, on an empty line, typing "<e" and then pressing TAB, will expand
@ -14478,7 +14423,7 @@ either by the @i{calc} interpreter, or by the @i{Emacs Lisp} interpreter.
@cindex options, for customization @cindex options, for customization
@cindex variables, for customization @cindex variables, for customization
There are more than 500 variables that can be used to customize There are more than 180 variables that can be used to customize
Org. For the sake of compactness of the manual, I am not Org. For the sake of compactness of the manual, I am not
describing the variables here. A structured overview of customization describing the variables here. A structured overview of customization
variables is available with @kbd{M-x org-customize}. Or select variables is available with @kbd{M-x org-customize}. Or select
@ -14529,8 +14474,8 @@ Set tags that can be inherited by any entry in the file, including the
top-level entries. top-level entries.
@item #+DRAWERS: NAME1 ..... @item #+DRAWERS: NAME1 .....
@vindex org-drawers @vindex org-drawers
Set the file-local set of additional drawers. The corresponding global Set the file-local set of drawers. The corresponding global variable is
variable is @code{org-drawers}. @code{org-drawers}.
@item #+LINK: linkword replace @item #+LINK: linkword replace
@vindex org-link-abbrev-alist @vindex org-link-abbrev-alist
These lines (several are allowed) specify link abbreviations. These lines (several are allowed) specify link abbreviations.
@ -14741,7 +14686,7 @@ This line contains the formulas for the table directly above the line.
@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:, @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:,
@itemx #+OPTIONS:, #+BIND:, #+XSLT:, @itemx #+OPTIONS:, #+BIND:, #+XSLT:,
@itemx #+DESCRIPTION:, #+KEYWORDS:, @itemx #+DESCRIPTION:, #+KEYWORDS:,
@itemx #+LaTeX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:, @itemx #+LATEX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:,
@itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS: @itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS:
These lines provide settings for exporting files. For more details see These lines provide settings for exporting files. For more details see
@ref{Export options}. @ref{Export options}.
@ -16017,7 +15962,6 @@ If WHICH is nil or `all', get all properties. If WHICH is
`special' or `standard', only get that subclass. `special' or `standard', only get that subclass.
@end defun @end defun
@vindex org-use-property-inheritance @vindex org-use-property-inheritance
@findex org-insert-property-drawer
@defun org-entry-get pom property &optional inherit @defun org-entry-get pom property &optional inherit
Get value of PROPERTY for entry at point-or-marker POM. By default, Get value of PROPERTY for entry at point-or-marker POM. By default,
this only looks at properties defined locally in the entry. If INHERIT this only looks at properties defined locally in the entry. If INHERIT
@ -16040,7 +15984,7 @@ Get all property keys in the current buffer.
@end defun @end defun
@defun org-insert-property-drawer @defun org-insert-property-drawer
Insert a property drawer for the current entry. Also Insert a property drawer at point.
@end defun @end defun
@defun org-entry-put-multivalued-property pom property &rest values @defun org-entry-put-multivalued-property pom property &rest values
@ -16193,16 +16137,13 @@ The following example counts the number of entries with TODO keyword
@cindex iPhone @cindex iPhone
@cindex MobileOrg @cindex MobileOrg
@i{MobileOrg} is the name of the mobile companion app for Org mode, currently @uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the
available for iOS and for Android. @i{MobileOrg} offers offline viewing and @i{iPhone/iPod Touch} series of devices, developed by Richard Moreland.
capture support for an Org mode system rooted on a ``real'' computer. It @i{MobileOrg} offers offline viewing and capture support for an Org mode
does also allow you to record changes to existing entries. system rooted on a ``real'' computer. It does also allow you to record
The @uref{http://mobileorg.ncogni.to/, iOS implementation} for the changes to existing entries. Android users should check out
@i{iPhone/iPod Touch/iPad} series of devices, was developed by Richard
Moreland. Android users should check out
@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} @uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android}
by Matt Jones. The two implementations are not identical but offer similar by Matt Jones.
features.
This appendix describes the support Org has for creating agenda views in a This appendix describes the support Org has for creating agenda views in a
format that can be displayed by @i{MobileOrg}, and for integrating notes format that can be displayed by @i{MobileOrg}, and for integrating notes
@ -16367,7 +16308,7 @@ Bastien has written a large number of extensions to Org (most of them
integrated into the core by now), including the @LaTeX{} exporter and the plain integrated into the core by now), including the @LaTeX{} exporter and the plain
list parser. His support during the early days, when he basically acted as list parser. His support during the early days, when he basically acted as
co-maintainer, was central to the success of this project. Bastien also co-maintainer, was central to the success of this project. Bastien also
invented Worg, helped establishing the Web presence of Org, and sponsored invented Worg, helped establishing the Web presence of Org, and sponsors
hosting costs for the orgmode.org website. hosting costs for the orgmode.org website.
@item Eric Schulte and Dan Davison @item Eric Schulte and Dan Davison
Eric and Dan are jointly responsible for the Org-babel system, which turns Eric and Dan are jointly responsible for the Org-babel system, which turns

View File

@ -17,7 +17,7 @@
\pdflayout=(0l) \pdflayout=(0l)
% Nothing else needs to be changed below this line. % Nothing else needs to be changed below this line.
% Copyright (C) 1987, 1993, 1996-1997, 2001-2012 % Copyright (C) 1987, 1993, 1996-1997, 2001-2011
% Free Software Foundation, Inc. % Free Software Foundation, Inc.
% This file is part of GNU Emacs. % This file is part of GNU Emacs.

View File

@ -40,7 +40,7 @@
@end macro @end macro
@copying @copying
Copyright @copyright{} 2010-2012 Free Software Foundation Copyright @copyright{} 2010 Free Software Foundation
@quotation @quotation
Permission is granted to copy, distribute and/or modify this document Permission is granted to copy, distribute and/or modify this document
@ -1906,7 +1906,7 @@ outline, not only the heading.
@c @c
@itemx @key{TAB} @itemx @key{TAB}
Go to the original location of the item in another window. Under Emacs Go to the original location of the item in another window. Under Emacs
22, @kbd{mouse-1} will also work for this. 22, @kbd{mouse-1} will also works for this.
@c @c
@itemx @key{RET} @itemx @key{RET}
Go to the original location of the item and delete other windows. Go to the original location of the item and delete other windows.
@ -2409,8 +2409,8 @@ verbatim @LaTeX{} code.
Export as DocBook file. Export as DocBook file.
@end table @end table
Similarly to the HTML exporter, you can use @code{#+DOCBOOK:} and Similarly to the HTML exporter, you can use @code{#+DocBook:} and
@code{#+BEGIN_DOCBOOK ... #+END_DOCBOOK} construct to add verbatim @LaTeX{} @code{#+BEGIN_DocBook ... #+END_DocBook} construct to add verbatim @LaTeX{}
code. code.
@node iCalendar export, , DocBook export, Exporting @node iCalendar export, , DocBook export, Exporting
@ -2492,10 +2492,10 @@ results in several formats.
The structure of code blocks is as follows: The structure of code blocks is as follows:
@example @example
#+NAME: <name> #+srcname: <name>
#+BEGIN_SRC <language> <switches> <header arguments> #+begin_src <language> <switches> <header arguments>
<body> <body>
#+END_SRC #+end_src
@end example @end example
Where @code{<name>} is a string used to name the code block, Where @code{<name>} is a string used to name the code block,
@ -2520,11 +2520,11 @@ in many languages. For a complete list of supported languages see the
manual. The following shows a code block and its results. manual. The following shows a code block and its results.
@example @example
#+BEGIN_SRC emacs-lisp #+begin_src emacs-lisp
(+ 1 2 3 4) (+ 1 2 3 4)
#+END_SRC #+end_src
#+RESULTS: #+results:
: 10 : 10
@end example @end example
@ -2663,17 +2663,10 @@ indentation for each level. To get this support in a file, use
@node MobileOrg, , Clean view, Miscellaneous @node MobileOrg, , Clean view, Miscellaneous
@section MobileOrg @section MobileOrg
@i{MobileOrg} is the name of the mobile companion app for Org mode, currently @i{MobileOrg} is an application originally developed for the @i{iPhone/iPod
available for iOS and for Android. @i{MobileOrg} offers offline viewing and Touch} series of devices, developed by Richard Moreland. There is also an
capture support for an Org mode system rooted on a ``real'' computer. It independent implementation for Android devices, by Matt Jones.
does also allow you to record changes to existing entries. For details, see the Org-mode manual.
The @uref{http://mobileorg.ncogni.to/, iOS implementation} for the
@i{iPhone/iPod Touch/iPad} series of devices, was developed by Richard
Moreland. Android users should check out
@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android}
by Matt Jones. The two implementations are not identical but offer similar
features.
@seealso{ @seealso{
@uref{http://orgmode.org/manual/Miscellaneous.html#Miscellaneous, Chapter 15 @uref{http://orgmode.org/manual/Miscellaneous.html#Miscellaneous, Chapter 15

View File

@ -1,4 +1,4 @@
% Copyright (C) 2007-2012 Free Software Foundation, Inc. % Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
% This file is part of GNU Emacs. % This file is part of GNU Emacs.

View File

@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2012-01-03.18} \def\texinfoversion{2011-08-15.20}
% %
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
% 2007, 2008-2012 Free Software Foundation, Inc. % 2007, 2008 Free Software Foundation, Inc.
% %
% This texinfo.tex file is free software: you can redistribute it and/or % This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as % modify it under the terms of the GNU General Public License as

View File

@ -1,7 +1,7 @@
The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the
following copyright information: following copyright information:
Copyright (C) 2010-2011 Free Software Foundation, Inc. Copyright (C) 2010-2012 Free Software Foundation, Inc.
These files are part of GNU Emacs. These files are part of GNU Emacs.

View File

@ -34,28 +34,15 @@
;; 3) we are adding the "file" and "cmdline" header arguments ;; 3) we are adding the "file" and "cmdline" header arguments
;; ;;
;; 4) there are no variables (at least for now) ;; 4) there are no variables (at least for now)
;;
;; 5) it depends on a variable defined in org-exp-blocks (namely
;; `org-ditaa-jar-path') so be sure you have org-exp-blocks loaded
;;; Code: ;;; Code:
(require 'ob) (require 'ob)
(defvar org-ditaa-jar-path) ;; provided by org-exp-blocks
(defvar org-babel-default-header-args:ditaa (defvar org-babel-default-header-args:ditaa
'((:results . "file") '((:results . "file") (:exports . "results") (:java . "-Dfile.encoding=UTF-8"))
(:exports . "results")
(:java . "-Dfile.encoding=UTF-8"))
"Default arguments for evaluating a ditaa source block.") "Default arguments for evaluating a ditaa source block.")
(defcustom org-ditaa-jar-option "-jar" (defvar org-ditaa-jar-path)
"Option for the ditaa jar file.
Do not leave leading or trailing spaces in this string."
:group 'org-babel
:version "24.1"
:type 'string)
(defun org-babel-execute:ditaa (body params) (defun org-babel-execute:ditaa (body params)
"Execute a block of Ditaa code with org-babel. "Execute a block of Ditaa code with org-babel.
This function is called by `org-babel-execute-src-block'." This function is called by `org-babel-execute-src-block'."
@ -68,7 +55,7 @@ This function is called by `org-babel-execute-src-block'."
(cmdline (cdr (assoc :cmdline params))) (cmdline (cdr (assoc :cmdline params)))
(java (cdr (assoc :java params))) (java (cdr (assoc :java params)))
(in-file (org-babel-temp-file "ditaa-")) (in-file (org-babel-temp-file "ditaa-"))
(cmd (concat "java " java " " org-ditaa-jar-option " " (cmd (concat "java " java " -jar "
(shell-quote-argument (shell-quote-argument
(expand-file-name org-ditaa-jar-path)) (expand-file-name org-ditaa-jar-path))
" " cmdline " " cmdline

View File

@ -43,37 +43,31 @@
When set to nil no code will be evaluated as part of the export When set to nil no code will be evaluated as part of the export
process." process."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'boolean) :type 'boolean)
(put 'org-export-babel-evaluate 'safe-local-variable (lambda (x) (eq x nil))) (put 'org-export-babel-evaluate 'safe-local-variable (lambda (x) (eq x nil)))
(defun org-babel-exp-get-export-buffer ()
"Return the current export buffer if possible."
(cond
((bufferp org-current-export-file) org-current-export-file)
(org-current-export-file (get-file-buffer org-current-export-file))
('otherwise
(error "Requested export buffer when `org-current-export-file' is nil"))))
(defmacro org-babel-exp-in-export-file (lang &rest body) (defmacro org-babel-exp-in-export-file (lang &rest body)
(declare (indent 1)) (declare (indent 1))
`(let* ((lang-headers (intern (concat "org-babel-default-header-args:" ,lang))) `(let* ((lang-headers (intern (concat "org-babel-default-header-args:" ,lang)))
(heading (nth 4 (ignore-errors (org-heading-components)))) (heading (nth 4 (ignore-errors (org-heading-components))))
(export-buffer (current-buffer)) (link (when org-current-export-file
(original-buffer (org-babel-exp-get-export-buffer)) results) (org-make-link-string
(when original-buffer (if heading
(concat org-current-export-file "::" heading)
org-current-export-file))))
(export-buffer (current-buffer)) results)
(when link
;; resolve parameters in the original file so that ;; resolve parameters in the original file so that
;; headline and file-wide parameters are included, attempt ;; headline and file-wide parameters are included, attempt
;; to go to the same heading in the original file ;; to go to the same heading in the original file
(set-buffer original-buffer) (set-buffer (get-file-buffer org-current-export-file))
(save-restriction (save-restriction
(when heading (condition-case nil
(condition-case nil (let ((org-link-search-inhibit-query t))
(let ((org-link-search-inhibit-query t)) (org-open-link-from-string link))
(org-link-search heading)) (error (when heading
(error (when heading (goto-char (point-min))
(goto-char (point-min)) (re-search-forward (regexp-quote heading) nil t))))
(re-search-forward (regexp-quote heading) nil t)))))
(setq results ,@body)) (setq results ,@body))
(set-buffer export-buffer) (set-buffer export-buffer)
results))) results)))
@ -115,32 +109,13 @@ none ----- do not display either code or results upon export"
(setf hash (org-babel-sha1-hash info))) (setf hash (org-babel-sha1-hash info)))
;; expand noweb references in the original file ;; expand noweb references in the original file
(setf (nth 1 info) (setf (nth 1 info)
(if (string= "strip-export" (cdr (assoc :noweb (nth 2 info)))) (if (and (cdr (assoc :noweb (nth 2 info)))
(replace-regexp-in-string (string= "yes" (cdr (assoc :noweb (nth 2 info)))))
(org-babel-noweb-wrap) "" (nth 1 info)) (org-babel-expand-noweb-references
(if (org-babel-noweb-p (nth 2 info) :export) info (get-file-buffer org-current-export-file))
(org-babel-expand-noweb-references (nth 1 info)))
info (org-babel-exp-get-export-buffer))
(nth 1 info))))
(org-babel-exp-do-export info 'block hash))))) (org-babel-exp-do-export info 'block hash)))))
(defcustom org-babel-exp-call-line-template
""
"Template used to export call lines.
This template may be customized to include the call line name
with any export markup. The template is filled out using
`org-fill-template', and the following %keys may be used.
line --- call line
An example value would be \"\\n: call: %line\" to export the call line
wrapped in a verbatim environment.
Note: the results are inserted separately after the contents of
this template."
:group 'org-babel
:type 'string)
(defvar org-babel-default-lob-header-args) (defvar org-babel-default-lob-header-args)
(defun org-babel-exp-non-block-elements (start end) (defun org-babel-exp-non-block-elements (start end)
"Process inline source and call lines between START and END for export." "Process inline source and call lines between START and END for export."
@ -171,7 +146,7 @@ this template."
(if (and (cdr (assoc :noweb params)) (if (and (cdr (assoc :noweb params))
(string= "yes" (cdr (assoc :noweb params)))) (string= "yes" (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references (org-babel-expand-noweb-references
info (org-babel-exp-get-export-buffer)) info (get-file-buffer org-current-export-file))
(nth 1 info))) (nth 1 info)))
(let ((code-replacement (save-match-data (let ((code-replacement (save-match-data
(org-babel-exp-do-export (org-babel-exp-do-export
@ -187,24 +162,22 @@ this template."
(inlinep (match-string 11)) (inlinep (match-string 11))
(inline-start (match-end 11)) (inline-start (match-end 11))
(inline-end (match-end 0)) (inline-end (match-end 0))
(results (save-match-data (rep (let ((lob-info (org-babel-lob-get-info)))
(org-babel-exp-do-export (save-match-data
(list "emacs-lisp" "results" (org-babel-exp-do-export
(org-babel-merge-params (list "emacs-lisp" "results"
org-babel-default-header-args (org-babel-merge-params
org-babel-default-lob-header-args org-babel-default-header-args
(org-babel-params-from-properties) org-babel-default-lob-header-args
(org-babel-parse-header-arguments (org-babel-params-from-properties)
(org-babel-clean-text-properties (org-babel-parse-header-arguments
(concat ":var results=" (org-babel-clean-text-properties
(mapconcat #'identity (concat ":var results="
(butlast lob-info) (mapconcat #'identity
" "))))) (butlast lob-info)
"" nil (car (last lob-info))) " ")))))
'lob))) "" nil (car (last lob-info)))
(rep (org-fill-template 'lob)))))
org-babel-exp-call-line-template
`(("line" . ,(nth 0 lob-info))))))
(if inlinep (if inlinep
(save-excursion (save-excursion
(goto-char inline-start) (goto-char inline-start)
@ -239,37 +212,13 @@ The function respects the value of the :exports header argument."
('both (org-babel-exp-results info type nil hash) ('both (org-babel-exp-results info type nil hash)
(org-babel-exp-code info))))) (org-babel-exp-code info)))))
(defcustom org-babel-exp-code-template
"#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC"
"Template used to export the body of code blocks.
This template may be customized to include additional information
such as the code block name, or the values of particular header
arguments. The template is filled out using `org-fill-template',
and the following %keys may be used.
lang ------ the language of the code block
name ------ the name of the code block
body ------ the body of the code block
flags ----- the flags passed to the code block
In addition to the keys mentioned above, every header argument
defined for the code block may be used as a key and will be
replaced with its value."
:group 'org-babel
:type 'string)
(defun org-babel-exp-code (info) (defun org-babel-exp-code (info)
"Return the original code block formatted for export." "Return the original code block formatted for export."
(org-fill-template (org-fill-template
org-babel-exp-code-template "#+BEGIN_SRC %lang%flags\n%body\n#+END_SRC"
`(("lang" . ,(nth 0 info)) `(("lang" . ,(nth 0 info))
("body" . ,(nth 1 info))
,@(mapcar (lambda (pair)
(cons (substring (symbol-name (car pair)) 1)
(format "%S" (cdr pair))))
(nth 2 info))
("flags" . ,((lambda (f) (when f (concat " " f))) (nth 3 info))) ("flags" . ,((lambda (f) (when f (concat " " f))) (nth 3 info)))
("name" . ,(or (nth 4 info) ""))))) ("body" . ,(nth 1 info)))))
(defun org-babel-exp-results (info type &optional silent hash) (defun org-babel-exp-results (info type &optional silent hash)
"Evaluate and return the results of the current code block for export. "Evaluate and return the results of the current code block for export.
@ -280,8 +229,7 @@ inhibit insertion of results into the buffer."
(when (and org-export-babel-evaluate (when (and org-export-babel-evaluate
(not (and hash (equal hash (org-babel-current-result-hash))))) (not (and hash (equal hash (org-babel-current-result-hash)))))
(let ((lang (nth 0 info)) (let ((lang (nth 0 info))
(body (nth 1 info)) (body (nth 1 info)))
(info (copy-sequence info)))
;; skip code blocks which we can't evaluate ;; skip code blocks which we can't evaluate
(when (fboundp (intern (concat "org-babel-execute:" lang))) (when (fboundp (intern (concat "org-babel-execute:" lang)))
(org-babel-eval-wipe-error-buffer) (org-babel-eval-wipe-error-buffer)

View File

@ -55,7 +55,6 @@
(defcustom org-babel-js-cmd "node" (defcustom org-babel-js-cmd "node"
"Name of command used to evaluate js blocks." "Name of command used to evaluate js blocks."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defvar org-babel-js-function-wrapper (defvar org-babel-js-function-wrapper

View File

@ -3,7 +3,7 @@
;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Copyright (C) 2010-2012 Free Software Foundation, Inc.
;; Author: Martyn Jago ;; Author: Martyn Jago
;; Keywords: babel language, literate programming, music score ;; Keywords: babel language, literate programming
;; Homepage: https://github.com/mjago/ob-lilypond ;; Homepage: https://github.com/mjago/ob-lilypond
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@ -23,14 +23,10 @@
;;; Commentary: ;;; Commentary:
;; Installation, ob-lilypond documentation, and examples are available at ;; Installation / usage info, and examples are available at
;; http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-lilypond.html ;; https://github.com/mjago/ob-lilypond
;;
;; Lilypond documentation can be found at
;; http://lilypond.org/manuals.html
;;; Code: ;;; Code:
(require 'ob) (require 'ob)
(require 'ob-eval) (require 'ob-eval)
(require 'ob-tangle) (require 'ob-tangle)
@ -41,11 +37,9 @@
(add-to-list 'org-babel-tangle-lang-exts '("LilyPond" . "ly")) (add-to-list 'org-babel-tangle-lang-exts '("LilyPond" . "ly"))
(defvar org-babel-default-header-args:lilypond '() (defvar org-babel-default-header-args:lilypond '()
"Default header arguments for lilypond code blocks. "Default header arguments for js code blocks.")
NOTE: The arguments are determined at lilypond compile time.
See (ly-set-header-args)")
(defconst ly-version "7.6" (defconst ly-version "0.3"
"The version number of the file ob-lilypond.el.") "The version number of the file ob-lilypond.el.")
(defvar ly-compile-post-tangle t (defvar ly-compile-post-tangle t
@ -92,10 +86,6 @@ LY-GEN-SVG to t")
"HTML generation can be turned on by default by setting "HTML generation can be turned on by default by setting
LY-GEN-HTML to t") LY-GEN-HTML to t")
(defvar ly-gen-pdf nil
"PDF generation can be turned on by default by setting
LY-GEN-PDF to t")
(defvar ly-use-eps nil (defvar ly-use-eps nil
"You can force the compiler to use the EPS backend by setting "You can force the compiler to use the EPS backend by setting
LY-USE-EPS to t") LY-USE-EPS to t")
@ -213,20 +203,18 @@ FILE-NAME is full path to lilypond (.ly) file"
(arg-2 nil) ;infile (arg-2 nil) ;infile
(arg-3 "*lilypond*") ;buffer (arg-3 "*lilypond*") ;buffer
(arg-4 t) ;display (arg-4 t) ;display
(arg-4 t) ;display (arg-5 (if ly-gen-png "--png" "")) ;&rest...
(arg-5 (if ly-gen-png "--png" "")) ;&rest... (arg-6 (if ly-gen-html "--html" ""))
(arg-6 (if ly-gen-html "--html" "")) (arg-7 (if ly-use-eps "-dbackend=eps" ""))
(arg-7 (if ly-gen-pdf "--pdf" "")) (arg-8 (if ly-gen-svg "-dbackend=svg" ""))
(arg-8 (if ly-use-eps "-dbackend=eps" "")) (arg-9 (concat "--output=" (file-name-sans-extension file-name)))
(arg-9 (if ly-gen-svg "-dbackend=svg" "")) (arg-10 file-name))
(arg-10 (concat "--output=" (file-name-sans-extension file-name)))
(arg-11 file-name))
(if test (if test
`(,arg-1 ,arg-2 ,arg-3 ,arg-4 ,arg-5 ,arg-6 `(,arg-1 ,arg-2 ,arg-3 ,arg-4 ,arg-5
,arg-7 ,arg-8 ,arg-9 ,arg-10 ,arg-11) ,arg-6 ,arg-7 ,arg-8 ,arg-9 ,arg-10)
(call-process (call-process
arg-1 arg-2 arg-3 arg-4 arg-5 arg-6 arg-1 arg-2 arg-3 arg-4 arg-5
arg-7 arg-8 arg-9 arg-10 arg-11)))) arg-6 arg-7 arg-8 arg-9 arg-10))))
(defun ly-check-for-compile-error (file-name &optional test) (defun ly-check-for-compile-error (file-name &optional test)
"Check for compile error. "Check for compile error.
@ -319,12 +307,8 @@ If TEST is non-nil, the shell command is returned and is not run"
(concat (ly-determine-pdf-path) " " pdf-file))) (concat (ly-determine-pdf-path) " " pdf-file)))
(if test (if test
cmd-string cmd-string
(start-process (shell-command cmd-string)))
"\"Audition pdf\"" (message "No pdf file generated so can't display!")))))
"*lilypond*"
(ly-determine-pdf-path)
pdf-file)))
(message "No pdf file generated so can't display!")))))
(defun ly-attempt-to-play-midi (file-name &optional test) (defun ly-attempt-to-play-midi (file-name &optional test)
"Attempt to play the generated MIDI file "Attempt to play the generated MIDI file
@ -338,11 +322,7 @@ If TEST is non-nil, the shell command is returned and is not run"
(concat (ly-determine-midi-path) " " midi-file))) (concat (ly-determine-midi-path) " " midi-file)))
(if test (if test
cmd-string cmd-string
(start-process (shell-command cmd-string)))
"\"Audition midi\""
"*lilypond*"
(ly-determine-midi-path)
midi-file)))
(message "No midi file generated so can't play!"))))) (message "No midi file generated so can't play!")))))
(defun ly-determine-ly-path (&optional test) (defun ly-determine-ly-path (&optional test)
@ -419,15 +399,6 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
(message (concat "HTML generation has been " (message (concat "HTML generation has been "
(if ly-gen-html "ENABLED." "DISABLED.")))) (if ly-gen-html "ENABLED." "DISABLED."))))
(defun ly-toggle-pdf-generation ()
"Toggle whether pdf will be generated by compilation"
(interactive)
(setq ly-gen-pdf
(not ly-gen-pdf))
(message (concat "PDF generation has been "
(if ly-gen-pdf "ENABLED." "DISABLED."))))
(defun ly-toggle-arrange-mode () (defun ly-toggle-arrange-mode ()
"Toggle whether in Arrange mode or Basic mode" "Toggle whether in Arrange mode or Basic mode"
@ -457,7 +428,6 @@ mode i.e. ARRANGE-MODE is t"
'((:tangle . "yes") '((:tangle . "yes")
(:noweb . "yes") (:noweb . "yes")
(:results . "silent") (:results . "silent")
(:cache . "yes")
(:comments . "yes"))) (:comments . "yes")))
(t (t
'((:results . "file") '((:results . "file")
@ -471,4 +441,6 @@ dependent on LY-ARRANGE-MODE"
(provide 'ob-lilypond) (provide 'ob-lilypond)
;;; ob-lilypond.el ends here ;;; ob-lilypond.el ends here

View File

@ -49,7 +49,6 @@
For example a value of \"(progn ;; %s\\n %%s)\" would ignore the For example a value of \"(progn ;; %s\\n %%s)\" would ignore the
current directory string." current directory string."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defun org-babel-expand-body:lisp (body params) (defun org-babel-expand-body:lisp (body params)

View File

@ -39,7 +39,6 @@ files to `org-babel-lob-files'.")
"Files used to populate the `org-babel-library-of-babel'. "Files used to populate the `org-babel-library-of-babel'.
To add files to this list use the `org-babel-lob-ingest' command." To add files to this list use the `org-babel-lob-ingest' command."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'list) :type 'list)
(defvar org-babel-default-lob-header-args '((:exports . "results")) (defvar org-babel-default-lob-header-args '((:exports . "results"))

View File

@ -76,7 +76,6 @@
(defcustom org-babel-picolisp-cmd "pil" (defcustom org-babel-picolisp-cmd "pil"
"Name of command used to evaluate picolisp blocks." "Name of command used to evaluate picolisp blocks."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defun org-babel-expand-body:picolisp (body params &optional processed-params) (defun org-babel-expand-body:picolisp (body params &optional processed-params)

View File

@ -44,7 +44,6 @@
(defcustom org-plantuml-jar-path nil (defcustom org-plantuml-jar-path nil
"Path to the plantuml.jar file." "Path to the plantuml.jar file."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defun org-babel-execute:plantuml (body params) (defun org-babel-execute:plantuml (body params)

View File

@ -54,7 +54,6 @@
(defcustom org-babel-scheme-cmd "guile" (defcustom org-babel-scheme-cmd "guile"
"Name of command used to evaluate scheme blocks." "Name of command used to evaluate scheme blocks."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defun org-babel-expand-body:scheme (body params) (defun org-babel-expand-body:scheme (body params)

View File

@ -56,13 +56,14 @@ This will be passed to `shell-command-on-region'")
This function is called by `org-babel-execute-src-block'." This function is called by `org-babel-execute-src-block'."
(let* ((session (org-babel-sh-initiate-session (let* ((session (org-babel-sh-initiate-session
(cdr (assoc :session params)))) (cdr (assoc :session params))))
(result-params (cdr (assoc :result-params params)))
(stdin ((lambda (stdin) (when stdin (org-babel-sh-var-to-string (stdin ((lambda (stdin) (when stdin (org-babel-sh-var-to-string
(org-babel-ref-resolve stdin)))) (org-babel-ref-resolve stdin))))
(cdr (assoc :stdin params)))) (cdr (assoc :stdin params))))
(full-body (org-babel-expand-body:generic (full-body (org-babel-expand-body:generic
body params (org-babel-variable-assignments:sh params)))) body params (org-babel-variable-assignments:sh params))))
(org-babel-reassemble-table (org-babel-reassemble-table
(org-babel-sh-evaluate session full-body params stdin) (org-babel-sh-evaluate session full-body result-params stdin)
(org-babel-pick-name (org-babel-pick-name
(cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) (cdr (assoc :colname-names params)) (cdr (assoc :colnames params)))
(org-babel-pick-name (org-babel-pick-name
@ -133,38 +134,29 @@ Emacs-lisp table, otherwise return the results as a string."
(defvar org-babel-sh-eoe-output "org_babel_sh_eoe" (defvar org-babel-sh-eoe-output "org_babel_sh_eoe"
"String to indicate that evaluation has completed.") "String to indicate that evaluation has completed.")
(defun org-babel-sh-evaluate (session body &optional params stdin) (defun org-babel-sh-evaluate (session body &optional result-params stdin)
"Pass BODY to the Shell process in BUFFER. "Pass BODY to the Shell process in BUFFER.
If RESULT-TYPE equals 'output then return a list of the outputs If RESULT-TYPE equals 'output then return a list of the outputs
of the statements in BODY, if RESULT-TYPE equals 'value then of the statements in BODY, if RESULT-TYPE equals 'value then
return the value of the last statement in BODY." return the value of the last statement in BODY."
((lambda (results) ((lambda (results)
(when results (when results
(let ((result-params (cdr (assoc :result-params params)))) (if (or (member "scalar" result-params)
(if (or (member "scalar" result-params) (member "verbatim" result-params)
(member "verbatim" result-params) (member "output" result-params))
(member "output" result-params)) results
results (let ((tmp-file (org-babel-temp-file "sh-")))
(let ((tmp-file (org-babel-temp-file "sh-"))) (with-temp-file tmp-file (insert results))
(with-temp-file tmp-file (insert results)) (org-babel-import-elisp-from-file tmp-file)))))
(org-babel-import-elisp-from-file tmp-file))))))
(cond (cond
(stdin ; external shell script w/STDIN (stdin ; external shell script w/STDIN
(let ((script-file (org-babel-temp-file "sh-script-")) (let ((script-file (org-babel-temp-file "sh-script-"))
(stdin-file (org-babel-temp-file "sh-stdin-")) (stdin-file (org-babel-temp-file "sh-stdin-")))
(shebang (cdr (assoc :shebang params))) (with-temp-file script-file (insert body))
(padline (not (string= "no" (cdr (assoc :padline params))))))
(with-temp-file script-file
(when shebang (insert (concat shebang "\n")))
(when padline (insert "\n"))
(insert body))
(set-file-modes script-file #o755)
(with-temp-file stdin-file (insert stdin)) (with-temp-file stdin-file (insert stdin))
(with-temp-buffer (with-temp-buffer
(call-process-shell-command (call-process-shell-command
(if shebang (format "%s %s" org-babel-sh-command script-file)
script-file
(format "%s %s" org-babel-sh-command script-file))
stdin-file stdin-file
(current-buffer)) (current-buffer))
(buffer-string)))) (buffer-string))))
@ -190,17 +182,7 @@ return the value of the last statement in BODY."
(list org-babel-sh-eoe-indicator)))) (list org-babel-sh-eoe-indicator))))
2)) "\n")) 2)) "\n"))
('otherwise ; external shell script ('otherwise ; external shell script
(if (cdr (assoc :shebang params)) (org-babel-eval org-babel-sh-command (org-babel-trim body))))))
(let ((script-file (org-babel-temp-file "sh-script-"))
(shebang (cdr (assoc :shebang params)))
(padline (not (string= "no" (cdr (assoc :padline params))))))
(with-temp-file script-file
(when shebang (insert (concat shebang "\n")))
(when padline (insert "\n"))
(insert body))
(set-file-modes script-file #o755)
(org-babel-eval script-file ""))
(org-babel-eval org-babel-sh-command (org-babel-trim body)))))))
(defun org-babel-sh-strip-weird-long-prompt (string) (defun org-babel-sh-strip-weird-long-prompt (string)
"Remove prompt cruft from a string of shell output." "Remove prompt cruft from a string of shell output."

View File

@ -70,10 +70,6 @@ This function is called by `org-babel-execute-src-block'."
(org-babel-temp-file "sql-out-"))) (org-babel-temp-file "sql-out-")))
(header-delim "") (header-delim "")
(command (case (intern engine) (command (case (intern engine)
('monetdb (format "mclient -f tab %s < %s > %s"
(or cmdline "")
(org-babel-process-file-name in-file)
(org-babel-process-file-name out-file)))
('msosql (format "osql %s -s \"\t\" -i %s -o %s" ('msosql (format "osql %s -s \"\t\" -i %s -o %s"
(or cmdline "") (or cmdline "")
(org-babel-process-file-name in-file) (org-babel-process-file-name in-file)

View File

@ -47,7 +47,6 @@ be inserted as the extension commonly used to identify files
written in this language. If no entry is found in this list, written in this language. If no entry is found in this list,
then the name of the language is used." then the name of the language is used."
:group 'org-babel-tangle :group 'org-babel-tangle
:version "24.1"
:type '(repeat :type '(repeat
(cons (cons
(string "Language name") (string "Language name")
@ -56,19 +55,16 @@ then the name of the language is used."
(defcustom org-babel-post-tangle-hook nil (defcustom org-babel-post-tangle-hook nil
"Hook run in code files tangled by `org-babel-tangle'." "Hook run in code files tangled by `org-babel-tangle'."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'hook) :type 'hook)
(defcustom org-babel-pre-tangle-hook '(save-buffer) (defcustom org-babel-pre-tangle-hook '(save-buffer)
"Hook run at the beginning of `org-babel-tangle'." "Hook run at the beginning of `org-babel-tangle'."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'hook) :type 'hook)
(defcustom org-babel-tangle-body-hook nil (defcustom org-babel-tangle-body-hook nil
"Hook run over the contents of each code block body." "Hook run over the contents of each code block body."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'hook) :type 'hook)
(defcustom org-babel-tangle-comment-format-beg "[[%link][%source-name]]" (defcustom org-babel-tangle-comment-format-beg "[[%link][%source-name]]"
@ -83,7 +79,6 @@ information into the output using `org-fill-template'.
Whether or not comments are inserted during tangling is Whether or not comments are inserted during tangling is
controlled by the :comments header argument." controlled by the :comments header argument."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defcustom org-babel-tangle-comment-format-end "%source-name ends here" (defcustom org-babel-tangle-comment-format-end "%source-name ends here"
@ -98,7 +93,6 @@ information into the output using `org-fill-template'.
Whether or not comments are inserted during tangling is Whether or not comments are inserted during tangling is
controlled by the :comments header argument." controlled by the :comments header argument."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'string) :type 'string)
(defcustom org-babel-process-comment-text #'org-babel-trim (defcustom org-babel-process-comment-text #'org-babel-trim
@ -107,7 +101,6 @@ inserted as comments in tangled source-code files. The function
should take a single string argument and return a string should take a single string argument and return a string
result. The default value is `org-babel-trim'." result. The default value is `org-babel-trim'."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'function) :type 'function)
(defun org-babel-find-file-noselect-refresh (file) (defun org-babel-find-file-noselect-refresh (file)
@ -290,7 +283,7 @@ references."
(interactive) (interactive)
(goto-char (point-min)) (goto-char (point-min))
(while (or (re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t) (while (or (re-search-forward "\\[\\[file:.*\\]\\[.*\\]\\]" nil t)
(re-search-forward (org-babel-noweb-wrap) nil t)) (re-search-forward "<<[^[:space:]]*>>" nil t))
(delete-region (save-excursion (beginning-of-line 1) (point)) (delete-region (save-excursion (beginning-of-line 1) (point))
(save-excursion (end-of-line 1) (forward-char 1) (point))))) (save-excursion (end-of-line 1) (forward-char 1) (point)))))
@ -351,7 +344,11 @@ code blocks by language."
body params body params
(and (fboundp assignments-cmd) (and (fboundp assignments-cmd)
(funcall assignments-cmd params)))))) (funcall assignments-cmd params))))))
(if (org-babel-noweb-p params :tangle) (if (and (cdr (assoc :noweb params)) ;; expand noweb refs
(let ((nowebs (split-string
(cdr (assoc :noweb params)))))
(or (member "yes" nowebs)
(member "tangle" nowebs))))
(org-babel-expand-noweb-references info) (org-babel-expand-noweb-references info)
(nth 1 info))))) (nth 1 info)))))
(comment (comment

View File

@ -33,8 +33,6 @@
(defvar org-babel-library-of-babel) (defvar org-babel-library-of-babel)
(declare-function show-all "outline" ()) (declare-function show-all "outline" ())
(declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS)) (declare-function org-reduce "org" (CL-FUNC CL-SEQ &rest CL-KEYS))
(declare-function org-mark-ring-push "org" (&optional pos buffer))
(declare-function org-strip-protective-commas "org" (beg end))
(declare-function tramp-compat-make-temp-file "tramp-compat" (declare-function tramp-compat-make-temp-file "tramp-compat"
(filename &optional dir-flag)) (filename &optional dir-flag))
(declare-function tramp-dissect-file-name "tramp" (name &optional nodefault)) (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
@ -59,7 +57,6 @@
(declare-function org-cycle "org" (&optional arg)) (declare-function org-cycle "org" (&optional arg))
(declare-function org-uniquify "org" (list)) (declare-function org-uniquify "org" (list))
(declare-function org-current-level "org" ()) (declare-function org-current-level "org" ())
(declare-function org-strip-protective-commas "org" (beg end))
(declare-function org-table-import "org-table" (file arg)) (declare-function org-table-import "org-table" (file arg))
(declare-function org-add-hook "org-compat" (declare-function org-add-hook "org-compat"
(hook function &optional append local)) (hook function &optional append local))
@ -107,7 +104,6 @@ against accidental code block evaluation. The
`org-babel-no-eval-on-ctrl-c-ctrl-c' variable can be used to `org-babel-no-eval-on-ctrl-c-ctrl-c' variable can be used to
remove code block execution from the C-c C-c keybinding." remove code block execution from the C-c C-c keybinding."
:group 'org-babel :group 'org-babel
:version "24.1"
:type '(choice boolean function)) :type '(choice boolean function))
;; don't allow this variable to be changed through file settings ;; don't allow this variable to be changed through file settings
(put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t))) (put 'org-confirm-babel-evaluate 'safe-local-variable (lambda (x) (eq x t)))
@ -115,7 +111,6 @@ remove code block execution from the C-c C-c keybinding."
(defcustom org-babel-no-eval-on-ctrl-c-ctrl-c nil (defcustom org-babel-no-eval-on-ctrl-c-ctrl-c nil
"Remove code block evaluation from the C-c C-c key binding." "Remove code block evaluation from the C-c C-c key binding."
:group 'org-babel :group 'org-babel
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-babel-results-keyword "RESULTS" (defcustom org-babel-results-keyword "RESULTS"
@ -125,23 +120,6 @@ be used."
:group 'org-babel :group 'org-babel
:type 'string) :type 'string)
(defcustom org-babel-noweb-wrap-start "<<"
"String used to begin a noweb reference in a code block.
See also `org-babel-noweb-wrap-end'."
:group 'org-babel
:type 'string)
(defcustom org-babel-noweb-wrap-end ">>"
"String used to end a noweb reference in a code block.
See also `org-babel-noweb-wrap-start'."
:group 'org-babel
:type 'string)
(defun org-babel-noweb-wrap (&optional regexp)
(concat org-babel-noweb-wrap-start
(or regexp "\\([^ \t\n].+?[^ \t]\\|[^ \t\n]\\)")
org-babel-noweb-wrap-end))
(defvar org-babel-src-name-regexp (defvar org-babel-src-name-regexp
"^[ \t]*#\\+name:[ \t]*" "^[ \t]*#\\+name:[ \t]*"
"Regular expression used to match a source name line.") "Regular expression used to match a source name line.")
@ -403,7 +381,7 @@ then run `org-babel-pop-to-session'."
(mkdirp . ((yes no))) (mkdirp . ((yes no)))
(no-expand) (no-expand)
(noeval) (noeval)
(noweb . ((yes no tangle no-export strip-export))) (noweb . ((yes no tangle)))
(noweb-ref . :any) (noweb-ref . :any)
(noweb-sep . :any) (noweb-sep . :any)
(padline . ((yes no))) (padline . ((yes no)))
@ -416,8 +394,7 @@ then run `org-babel-pop-to-session'."
(session . :any) (session . :any)
(shebang . :any) (shebang . :any)
(tangle . ((tangle yes no :any))) (tangle . ((tangle yes no :any)))
(var . :any) (var . :any)))
(wrap . :any)))
(defconst org-babel-header-arg-names (defconst org-babel-header-arg-names
(mapcar #'car org-babel-common-header-args-w-values) (mapcar #'car org-babel-common-header-args-w-values)
@ -515,9 +492,12 @@ block."
(new-hash (when cache? (org-babel-sha1-hash info))) (new-hash (when cache? (org-babel-sha1-hash info)))
(old-hash (when cache? (org-babel-current-result-hash))) (old-hash (when cache? (org-babel-current-result-hash)))
(body (setf (nth 1 info) (body (setf (nth 1 info)
(if (org-babel-noweb-p params :eval) (let ((noweb (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references info) (if (and noweb
(nth 1 info)))) (or (string= "yes" noweb)
(string= "tangle" noweb)))
(org-babel-expand-noweb-references info)
(nth 1 info)))))
(dir (cdr (assoc :dir params))) (dir (cdr (assoc :dir params)))
(default-directory (default-directory
(or (and dir (file-name-as-directory dir)) default-directory)) (or (and dir (file-name-as-directory dir)) default-directory))
@ -591,7 +571,8 @@ arguments and pop open the results in a preview buffer."
(lambda (el1 el2) (string< (symbol-name (car el1)) (lambda (el1 el2) (string< (symbol-name (car el1))
(symbol-name (car el2))))))) (symbol-name (car el2)))))))
(body (setf (nth 1 info) (body (setf (nth 1 info)
(if (org-babel-noweb-p params :eval) (if (and (cdr (assoc :noweb params))
(string= "yes" (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references info) (nth 1 info)))) (org-babel-expand-noweb-references info) (nth 1 info))))
(expand-cmd (intern (concat "org-babel-expand-body:" lang))) (expand-cmd (intern (concat "org-babel-expand-body:" lang)))
(assignments-cmd (intern (concat "org-babel-variable-assignments:" (assignments-cmd (intern (concat "org-babel-variable-assignments:"
@ -688,7 +669,8 @@ session."
(lang (nth 0 info)) (lang (nth 0 info))
(params (nth 2 info)) (params (nth 2 info))
(body (setf (nth 1 info) (body (setf (nth 1 info)
(if (org-babel-noweb-p params :eval) (if (and (cdr (assoc :noweb params))
(string= "yes" (cdr (assoc :noweb params))))
(org-babel-expand-noweb-references info) (org-babel-expand-noweb-references info)
(nth 1 info)))) (nth 1 info))))
(session (cdr (assoc :session params))) (session (cdr (assoc :session params)))
@ -1460,35 +1442,13 @@ If the point is not on a source block then return nil."
(defun org-babel-goto-named-src-block (name) (defun org-babel-goto-named-src-block (name)
"Go to a named source-code block." "Go to a named source-code block."
(interactive (interactive
(let ((completion-ignore-case t) (let ((completion-ignore-case t))
(under-point (thing-at-point 'line))) (list (org-icompleting-read "source-block name: "
(list (org-icompleting-read (org-babel-src-block-names) nil t))))
"source-block name: " (org-babel-src-block-names) nil t
(cond
;; noweb
((string-match (org-babel-noweb-wrap) under-point)
(let ((block-name (match-string 1 under-point)))
(string-match "[^(]*" block-name)
(match-string 0 block-name)))
;; #+call:
((string-match org-babel-lob-one-liner-regexp under-point)
(let ((source-info (car (org-babel-lob-get-info))))
(if (string-match "^\\([^\\[]+?\\)\\(\\[.*\\]\\)?(" source-info)
(let ((source-name (match-string 1 source-info)))
source-name))))
;; #+results:
((string-match (concat "#\\+" org-babel-results-keyword
"\\:\s+\\([^\\(]*\\)") under-point)
(match-string 1 under-point))
;; symbol-at-point
((and (thing-at-point 'symbol))
(org-babel-find-named-block (thing-at-point 'symbol))
(thing-at-point 'symbol))
(""))))))
(let ((point (org-babel-find-named-block name))) (let ((point (org-babel-find-named-block name)))
(if point (if point
;; taken from `org-open-at-point' ;; taken from `org-open-at-point'
(progn (org-mark-ring-push) (goto-char point) (org-show-context)) (progn (goto-char point) (org-show-context))
(message "source-code block '%s' not found in this buffer" name)))) (message "source-code block '%s' not found in this buffer" name))))
(defun org-babel-find-named-block (name) (defun org-babel-find-named-block (name)
@ -1914,9 +1874,6 @@ code ---- the results are extracted in the syntax of the source
(setq end (point-marker)) (setq end (point-marker))
;; possibly wrap result ;; possibly wrap result
(cond (cond
((assoc :wrap (nth 2 info))
(let ((name (or (cdr (assoc :wrap (nth 2 info))) "RESULTS")))
(wrap (concat "#+BEGIN_" name) (concat "#+END_" name))))
((member "html" result-params) ((member "html" result-params)
(wrap "#+BEGIN_HTML" "#+END_HTML")) (wrap "#+BEGIN_HTML" "#+END_HTML"))
((member "latex" result-params) ((member "latex" result-params)
@ -1968,10 +1925,11 @@ code ---- the results are extracted in the syntax of the source
(progn (re-search-forward (concat "^" (match-string 1) ":END:")) (progn (re-search-forward (concat "^" (match-string 1) ":END:"))
(forward-char 1) (point))) (forward-char 1) (point)))
(t (t
(let ((case-fold-search t)) (let ((case-fold-search t)
(if (looking-at (concat "[ \t]*#\\+begin_\\([^ \t\n\r]+\\)")) (blocks-re (regexp-opt
(progn (re-search-forward (concat "[ \t]*#\\+end_" (match-string 1)) (list "latex" "html" "example" "src" "result" "org"))))
nil t) (if (looking-at (concat "[ \t]*#\\+begin_" blocks-re))
(progn (re-search-forward (concat "[ \t]*#\\+end_" blocks-re) nil t)
(forward-char 1)) (forward-char 1))
(while (looking-at "[ \t]*\\(: \\|\\[\\[\\)") (while (looking-at "[ \t]*\\(: \\|\\[\\[\\)")
(forward-line 1)))) (forward-line 1))))
@ -2115,11 +2073,8 @@ parameters when merging lists."
(:tangle ;; take the latest -- always overwrite (:tangle ;; take the latest -- always overwrite
(setq tangle (or (list (cdr pair)) tangle))) (setq tangle (or (list (cdr pair)) tangle)))
(:noweb (:noweb
(setq noweb (e-merge (setq noweb (e-merge '(("yes" "no" "tangle")) noweb
'(("yes" "no" "tangle" "no-export" (split-string (or (cdr pair) "")))))
"strip-export" "eval"))
noweb
(split-string (or (cdr pair) "")))))
(:cache (:cache
(setq cache (e-merge '(("yes" "no")) cache (setq cache (e-merge '(("yes" "no")) cache
(split-string (or (cdr pair) ""))))) (split-string (or (cdr pair) "")))))
@ -2151,20 +2106,6 @@ This results in much faster noweb reference expansion but does
not properly allow code blocks to inherit the \":noweb-ref\" not properly allow code blocks to inherit the \":noweb-ref\"
header argument from buffer or subtree wide properties.") header argument from buffer or subtree wide properties.")
(defun org-babel-noweb-p (params context)
"Check if PARAMS require expansion in CONTEXT.
CONTEXT may be one of :tangle, :export or :eval."
(flet ((intersect (as bs)
(when as
(if (member (car as) bs)
(car as)
(intersect (cdr as) bs)))))
(intersect (case context
(:tangle '("yes" "tangle" "no-export" "strip-export"))
(:eval '("yes" "no-export" "strip-export" "eval"))
(:export '("yes")))
(split-string (or (cdr (assoc :noweb params)) "")))))
(defun org-babel-expand-noweb-references (&optional info parent-buffer) (defun org-babel-expand-noweb-references (&optional info parent-buffer)
"Expand Noweb references in the body of the current source code block. "Expand Noweb references in the body of the current source code block.
@ -2212,7 +2153,8 @@ block but are passed literally to the \"example-block\"."
(with-temp-buffer (with-temp-buffer
(insert body) (goto-char (point-min)) (insert body) (goto-char (point-min))
(setq index (point)) (setq index (point))
(while (and (re-search-forward (org-babel-noweb-wrap) nil t)) (while (and (re-search-forward "<<\\([^ \t\n].+?[^ \t\n]\\|[^ \t\n]\\)>>"
nil t))
(save-match-data (setf source-name (match-string 1))) (save-match-data (setf source-name (match-string 1)))
(save-match-data (setq evaluate (string-match "\(.*\)" source-name))) (save-match-data (setq evaluate (string-match "\(.*\)" source-name)))
(save-match-data (save-match-data
@ -2284,7 +2226,7 @@ block but are passed literally to the \"example-block\"."
;; possibly raise an error if named block doesn't exist ;; possibly raise an error if named block doesn't exist
(if (member lang org-babel-noweb-error-langs) (if (member lang org-babel-noweb-error-langs)
(error "%s" (concat (error "%s" (concat
(org-babel-noweb-wrap source-name) "<<" source-name ">> "
"could not be resolved (see " "could not be resolved (see "
"`org-babel-noweb-error-langs')")) "`org-babel-noweb-error-langs')"))
""))) "")))

View File

@ -247,9 +247,7 @@ you can \"misuse\" it to also add other text to the header. However,
;; Keep custom values for `org-agenda-filter-preset' compatible with ;; Keep custom values for `org-agenda-filter-preset' compatible with
;; the new variable `org-agenda-tag-filter-preset'. ;; the new variable `org-agenda-tag-filter-preset'.
(if (fboundp 'defvaralias) (defvaralias 'org-agenda-filter-preset 'org-agenda-tag-filter-preset)
(defvaralias 'org-agenda-filter-preset 'org-agenda-tag-filter-preset)
(defvaralias 'org-agenda-filter 'org-agenda-tag-filter))
(defconst org-agenda-custom-commands-local-options (defconst org-agenda-custom-commands-local-options
`(repeat :tag "Local settings for this command. Remember to quote values" `(repeat :tag "Local settings for this command. Remember to quote values"
@ -649,7 +647,6 @@ See also the variable `org-agenda-tags-todo-honor-ignore-options' if you want
to make his option also apply to the tags-todo list." to make his option also apply to the tags-todo list."
:group 'org-agenda-skip :group 'org-agenda-skip
:group 'org-agenda-todo-list :group 'org-agenda-todo-list
:version "24.1"
:type '(choice :type '(choice
(const :tag "Ignore future timestamp todos" future) (const :tag "Ignore future timestamp todos" future)
(const :tag "Ignore past or present timestamp todos" past) (const :tag "Ignore past or present timestamp todos" past)
@ -797,7 +794,6 @@ trigger you to schedule it, and then you don't want to be reminded of it
because you will take care of it on the day when scheduled." because you will take care of it on the day when scheduled."
:group 'org-agenda-skip :group 'org-agenda-skip
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:version "24.1"
:type '(choice :type '(choice
(const :tag "Alwas show prewarning" nil) (const :tag "Alwas show prewarning" nil)
(const :tag "Remove prewarning if entry is scheduled" t) (const :tag "Remove prewarning if entry is scheduled" t)
@ -862,7 +858,6 @@ property so than moving the mouse over the command shows it.
Setting it to nil is good if matcher strings are very long and/or if Setting it to nil is good if matcher strings are very long and/or if
you want to use two-column display (see `org-agenda-menu-two-column')." you want to use two-column display (see `org-agenda-menu-two-column')."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-menu-two-column nil (defcustom org-agenda-menu-two-column nil
@ -870,7 +865,6 @@ you want to use two-column display (see `org-agenda-menu-two-column')."
If you use this, you probably want to set `org-agenda-menu-show-matcher' If you use this, you probably want to set `org-agenda-menu-show-matcher'
to nil." to nil."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-finalize-agenda-hook nil (defcustom org-finalize-agenda-hook nil
@ -894,7 +888,6 @@ Needs to be set before org.el is loaded."
"Non-nil means `org-agenda-follow-mode' displays only the "Non-nil means `org-agenda-follow-mode' displays only the
current item's tree, in an indirect buffer." current item's tree, in an indirect buffer."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-show-outline-path t (defcustom org-agenda-show-outline-path t
@ -1047,13 +1040,11 @@ This function makes sure that dates are aligned for easy reading."
"Non-nil means use leading zero for military times in agenda. "Non-nil means use leading zero for military times in agenda.
For example, 9:30am would become 09:30 rather than 9:30." For example, 9:30am would become 09:30 rather than 9:30."
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-timegrid-use-ampm nil (defcustom org-agenda-timegrid-use-ampm nil
"When set, show AM/PM style timestamps on the timegrid." "When set, show AM/PM style timestamps on the timegrid."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type 'boolean) :type 'boolean)
(defun org-agenda-time-of-day-to-ampm (time) (defun org-agenda-time-of-day-to-ampm (time)
@ -1101,7 +1092,6 @@ stamp currently points to the past, the first key press will move it
to today. WHen nil, just move one day forward even if the date stays to today. WHen nil, just move one day forward even if the date stays
in the past." in the past."
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-include-diary nil (defcustom org-agenda-include-diary nil
@ -1114,7 +1104,6 @@ Custom commands can set this variable in the options section."
"If non-nil, include entries within their deadline warning period. "If non-nil, include entries within their deadline warning period.
Custom commands can set this variable in the options section." Custom commands can set this variable in the options section."
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-repeating-timestamp-show-all t (defcustom org-agenda-repeating-timestamp-show-all t
@ -1190,7 +1179,6 @@ issue display.
:short-face face for clock intervals that are too short" :short-face face for clock intervals that are too short"
:group 'org-agenda-daily/weekly :group 'org-agenda-daily/weekly
:group 'org-clock :group 'org-clock
:version "24.1"
:type 'plist) :type 'plist)
(defcustom org-agenda-log-mode-add-notes t (defcustom org-agenda-log-mode-add-notes t
@ -1249,7 +1237,6 @@ by preceding the first snippet with \"+\" or \"-\". If the first snippet
is a regexp marked with braces like \"{abc}\", this will also switch to is a regexp marked with braces like \"{abc}\", this will also switch to
boolean search." boolean search."
:group 'org-agenda-search-view :group 'org-agenda-search-view
:version "24.1"
:type 'boolean) :type 'boolean)
(if (fboundp 'defvaralias) (if (fboundp 'defvaralias)
@ -1260,7 +1247,6 @@ boolean search."
"Non-nil means, search words must be matches as complete words. "Non-nil means, search words must be matches as complete words.
When nil, they may also match part of a word." When nil, they may also match part of a word."
:group 'org-agenda-search-view :group 'org-agenda-search-view
:version "24.1"
:type 'boolean) :type 'boolean)
(defgroup org-agenda-time-grid nil (defgroup org-agenda-time-grid nil
@ -1324,14 +1310,12 @@ a grid line."
(defcustom org-agenda-show-current-time-in-grid t (defcustom org-agenda-show-current-time-in-grid t
"Non-nil means show the current time in the time grid." "Non-nil means show the current time in the time grid."
:group 'org-agenda-time-grid :group 'org-agenda-time-grid
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-current-time-string (defcustom org-agenda-current-time-string
"now - - - - - - - - - - - - - - - - - - - - - - - - -" "now - - - - - - - - - - - - - - - - - - - - - - - - -"
"The string for the current time marker in the agenda." "The string for the current time marker in the agenda."
:group 'org-agenda-time-grid :group 'org-agenda-time-grid
:version "24.1"
:type 'string) :type 'string)
(defgroup org-agenda-sorting nil (defgroup org-agenda-sorting nil
@ -1542,7 +1526,6 @@ that passed since this item was scheduled first."
"Text preceding item pulled into the agenda by inactive time stamps. "Text preceding item pulled into the agenda by inactive time stamps.
These entries are added to the agenda when pressing \"[\"." These entries are added to the agenda when pressing \"[\"."
:group 'org-agenda-line-format :group 'org-agenda-line-format
:version "24.1"
:type '(list :type '(list
(string :tag "Scheduled today ") (string :tag "Scheduled today ")
(string :tag "Scheduled previously"))) (string :tag "Scheduled previously")))
@ -1581,7 +1564,6 @@ the headline/diary entry."
"Non-nil means remove time ranges specifications in agenda "Non-nil means remove time ranges specifications in agenda
items that span on several days." items that span on several days."
:group 'org-agenda-line-format :group 'org-agenda-line-format
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-agenda-default-appointment-duration nil (defcustom org-agenda-default-appointment-duration nil
@ -1663,7 +1645,6 @@ The only argument passed to that function is the day. It should
returns a face, or nil if does not want to specify a face and let returns a face, or nil if does not want to specify a face and let
the normal rules apply." the normal rules apply."
:group 'org-agenda-line-format :group 'org-agenda-line-format
:version "24.1"
:type 'function) :type 'function)
(defcustom org-agenda-category-icon-alist nil (defcustom org-agenda-category-icon-alist nil
@ -1696,7 +1677,6 @@ category, you can use:
(\"Emacs\" '(space . (:width (16))))" (\"Emacs\" '(space . (:width (16))))"
:group 'org-agenda-line-format :group 'org-agenda-line-format
:version "24.1"
:type '(alist :key-type (string :tag "Regexp matching category") :type '(alist :key-type (string :tag "Regexp matching category")
:value-type (choice (list :tag "Icon" :value-type (choice (list :tag "Icon"
(string :tag "File or data") (string :tag "File or data")
@ -1759,7 +1739,6 @@ With selected entries in an agenda buffer, `B R' will call
the custom function `set-category' on the selected entries. the custom function `set-category' on the selected entries.
Note that functions in this alist don't need to be quoted." Note that functions in this alist don't need to be quoted."
:type 'alist :type 'alist
:version "24.1"
:group 'org-agenda) :group 'org-agenda)
(eval-when-compile (eval-when-compile
@ -1789,7 +1768,7 @@ works you probably want to add it to `org-agenda-custom-commands' for good."
(setcdr ass (cdr entry)) (setcdr ass (cdr entry))
(push entry org-agenda-custom-commands)))) (push entry org-agenda-custom-commands))))
;;; Define the org-agenda-mode ;;; Define the Org-agenda-mode
(defvar org-agenda-mode-map (make-sparse-keymap) (defvar org-agenda-mode-map (make-sparse-keymap)
"Keymap for `org-agenda-mode'.") "Keymap for `org-agenda-mode'.")
@ -4396,7 +4375,7 @@ of what a project is and how to check if it stuck, customize the variable
;;; Diary integration ;;; Diary integration
(defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param. (defvar org-disable-agenda-to-diary nil) ;Dynamically-scoped param.
(defvar diary-list-entries-hook) (defvar list-diary-entries-hook)
(defvar diary-time-regexp) (defvar diary-time-regexp)
(defun org-get-entries-from-diary (date) (defun org-get-entries-from-diary (date)
"Get the (Emacs Calendar) diary entries for DATE." "Get the (Emacs Calendar) diary entries for DATE."
@ -4405,8 +4384,8 @@ of what a project is and how to check if it stuck, customize the variable
(diary-display-hook '(fancy-diary-display)) (diary-display-hook '(fancy-diary-display))
(diary-display-function 'fancy-diary-display) (diary-display-function 'fancy-diary-display)
(pop-up-frames nil) (pop-up-frames nil)
(diary-list-entries-hook (list-diary-entries-hook
(cons 'org-diary-default-entry diary-list-entries-hook)) (cons 'org-diary-default-entry list-diary-entries-hook))
(diary-file-name-prefix-function nil) ; turn this feature off (diary-file-name-prefix-function nil) ; turn this feature off
(diary-modify-entry-list-string-function 'org-modify-diary-entry-string) (diary-modify-entry-list-string-function 'org-modify-diary-entry-string)
entries entries
@ -6211,9 +6190,8 @@ When this is the global TODO list, a prefix argument will be interpreted."
(recenter window-line))) (recenter window-line)))
(defvar org-global-tags-completion-table nil) (defvar org-global-tags-completion-table nil)
(defvar org-agenda-filtered-by-category nil)
(defvar org-agenda-filter-form nil) (defvar org-agenda-filter-form nil)
(defvar org-agenda-filtered-by-category nil)
(defun org-agenda-filter-by-category (strip) (defun org-agenda-filter-by-category (strip)
"Keep only those lines in the agenda buffer that have a specific category. "Keep only those lines in the agenda buffer that have a specific category.
The category is that of the current line." The category is that of the current line."
@ -6391,9 +6369,10 @@ If the line does not have an effort defined, return nil."
(funcall op (or eff (if org-sort-agenda-noeffort-is-high 32767 0)) (funcall op (or eff (if org-sort-agenda-noeffort-is-high 32767 0))
value)))) value))))
(defvar org-agenda-filtered-by-category nil)
(defun org-agenda-filter-apply (filter type) (defun org-agenda-filter-apply (filter type)
"Set FILTER as the new agenda filter and apply it." "Set FILTER as the new agenda filter and apply it."
(let (tags cat) (let (tags)
(if (eq type 'tag) (if (eq type 'tag)
(setq org-agenda-tag-filter filter) (setq org-agenda-tag-filter filter)
(setq org-agenda-category-filter filter (setq org-agenda-category-filter filter
@ -7171,13 +7150,10 @@ if it was hidden in the outline."
(select-window win))) (select-window win)))
(defvar org-agenda-show-window nil) (defvar org-agenda-show-window nil)
(defun org-agenda-show-and-scroll-up (&optional arg) (defun org-agenda-show-and-scroll-up ()
"Display the Org-mode file which contains the item at point. "Display the Org-mode file which contains the item at point.
When called repeatedly, scroll the window that is displaying the buffer. When called repeatedly, scroll the window that is displaying the buffer."
With a \\[universal-argument] prefix, use `org-show-entry' instead of (interactive)
`show-subtree' to display the item, so that drawers and logbooks stay
folded."
(interactive "P")
(let ((win (selected-window))) (let ((win (selected-window)))
(if (and (window-live-p org-agenda-show-window) (if (and (window-live-p org-agenda-show-window)
(eq this-command last-command)) (eq this-command last-command))
@ -7185,7 +7161,7 @@ folded."
(select-window org-agenda-show-window) (select-window org-agenda-show-window)
(ignore-errors (scroll-up))) (ignore-errors (scroll-up)))
(org-agenda-goto t) (org-agenda-goto t)
(if arg (org-show-entry) (show-subtree)) (show-subtree)
(setq org-agenda-show-window (selected-window))) (setq org-agenda-show-window (selected-window)))
(select-window win))) (select-window win)))
@ -8020,7 +7996,6 @@ top-level as top-level entries at the end of the file."
(defcustom org-agenda-insert-diary-extract-time nil (defcustom org-agenda-insert-diary-extract-time nil
"Non-nil means extract any time specification from the diary entry." "Non-nil means extract any time specification from the diary entry."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type 'boolean) :type 'boolean)
(defun org-agenda-add-entry-to-org-agenda-diary-file (type text &optional d1 d2) (defun org-agenda-add-entry-to-org-agenda-diary-file (type text &optional d1 d2)

View File

@ -43,7 +43,6 @@
(defcustom org-archive-reversed-order nil (defcustom org-archive-reversed-order nil
"Non-nil means make the tree first child under the archive heading, not last." "Non-nil means make the tree first child under the archive heading, not last."
:group 'org-archive :group 'org-archive
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-archive-sibling-heading "Archive" (defcustom org-archive-sibling-heading "Archive"
@ -73,7 +72,6 @@ This variable is obsolete and has no effect anymore, instead add or remove
(defcustom org-archive-subtree-add-inherited-tags 'infile (defcustom org-archive-subtree-add-inherited-tags 'infile
"Non-nil means append inherited tags when archiving a subtree." "Non-nil means append inherited tags when archiving a subtree."
:group 'org-archive :group 'org-archive
:version "24.1"
:type '(choice :type '(choice
(const :tag "Never" nil) (const :tag "Never" nil)
(const :tag "When archiving a subtree to the same file" infile) (const :tag "When archiving a subtree to the same file" infile)

View File

@ -101,7 +101,6 @@ ln create a hard link. Note that this is not supported
(defcustom org-attach-store-link-p nil (defcustom org-attach-store-link-p nil
"Non-nil means store a link to a file when attaching it." "Non-nil means store a link to a file when attaching it."
:group 'org-attach :group 'org-attach
:version "24.1"
:type '(choice :type '(choice
(const :tag "Don't store link" nil) (const :tag "Don't store link" nil)
(const :tag "Link to origin location" t) (const :tag "Link to origin location" t)

View File

@ -120,7 +120,6 @@
(declare-function diary-ordinal-suffix "diary-lib" (n)) (declare-function diary-ordinal-suffix "diary-lib" (n))
(defvar date) ;; dynamically scoped from Org (defvar date) ;; dynamically scoped from Org
(defvar name) ;; dynamically scoped from Org
;; Customization ;; Customization

View File

@ -43,7 +43,6 @@
(defcustom org-beamer-use-parts nil (defcustom org-beamer-use-parts nil
"" ""
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-beamer-frame-level 1 (defcustom org-beamer-frame-level 1
@ -53,7 +52,6 @@ Setting this to 2 will allow sections, 3 will allow subsections as well.
You can set this to 4 as well, if you at the same time set You can set this to 4 as well, if you at the same time set
`org-beamer-use-parts' to make the top levels `\part'." `org-beamer-use-parts' to make the top levels `\part'."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(choice :type '(choice
(const :tag "Frames need a BEAMER_env property" nil) (const :tag "Frames need a BEAMER_env property" nil)
(integer :tag "Specific level makes a frame"))) (integer :tag "Specific level makes a frame")))
@ -62,14 +60,12 @@ You can set this to 4 as well, if you at the same time set
"Default options string to use for frames, should contains the [brackets]. "Default options string to use for frames, should contains the [brackets].
And example for this is \"[allowframebreaks]\"." And example for this is \"[allowframebreaks]\"."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(string :tag "[options]")) :type '(string :tag "[options]"))
(defcustom org-beamer-column-view-format (defcustom org-beamer-column-view-format
"%45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)" "%45ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)"
"Default column view format that should be used to fill the template." "Default column view format that should be used to fill the template."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(choice :type '(choice
(const :tag "Do not insert Beamer column view format" nil) (const :tag "Do not insert Beamer column view format" nil)
(string :tag "Beamer column view format"))) (string :tag "Beamer column view format")))
@ -80,7 +76,6 @@ And example for this is \"[allowframebreaks]\"."
When a beamer template is filled, this will be the default for When a beamer template is filled, this will be the default for
BEAMER_HEADER_EXTRA, which will be inserted just before \\begin{document}." BEAMER_HEADER_EXTRA, which will be inserted just before \\begin{document}."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(choice :type '(choice
(const :tag "Do not insert Beamer themes" nil) (const :tag "Do not insert Beamer themes" nil)
(string :tag "Beamer themes"))) (string :tag "Beamer themes")))
@ -107,7 +102,6 @@ These are just a completion help.")
("theorem" "t" "\\begin{theorem}%a%U%x" "\\end{theorem}") ("theorem" "t" "\\begin{theorem}%a%U%x" "\\end{theorem}")
("definition" "d" "\\begin{definition}%a%U%x" "\\end{definition}") ("definition" "d" "\\begin{definition}%a%U%x" "\\end{definition}")
("example" "e" "\\begin{example}%a%U%x" "\\end{example}") ("example" "e" "\\begin{example}%a%U%x" "\\end{example}")
("exampleblock" "E" "\\begin{exampleblock}%a{%h}%x" "\\end{exampleblock}")
("proof" "p" "\\begin{proof}%a%U%x" "\\end{proof}") ("proof" "p" "\\begin{proof}%a%U%x" "\\end{proof}")
("beamercolorbox" "o" "\\begin{beamercolorbox}%o{%h}%x" "\\end{beamercolorbox}") ("beamercolorbox" "o" "\\begin{beamercolorbox}%o{%h}%x" "\\end{beamercolorbox}")
("normal" "h" "%h" "") ; Emit the heading as normal text ("normal" "h" "%h" "") ; Emit the heading as normal text
@ -148,7 +142,6 @@ open The opening template for the environment, with the following escapes
close The closing string of the environment." close The closing string of the environment."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(repeat :type '(repeat
(list (list
(string :tag "Environment") (string :tag "Environment")
@ -409,7 +402,6 @@ the value will be inserted right after the documentclass statement."
(defcustom org-beamer-fragile-re "\\\\\\(verb\\|lstinline\\)\\|^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}" (defcustom org-beamer-fragile-re "\\\\\\(verb\\|lstinline\\)\\|^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}"
"If this regexp matches in a frame, the frame is marked as fragile." "If this regexp matches in a frame, the frame is marked as fragile."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type 'regexp) :type 'regexp)
(defface org-beamer-tag '((t (:box (:line-width 1 :color grey40)))) (defface org-beamer-tag '((t (:box (:line-width 1 :color grey40))))
@ -519,7 +511,6 @@ This function will run in the final LaTeX document."
(defcustom org-beamer-outline-frame-title "Outline" (defcustom org-beamer-outline-frame-title "Outline"
"Default title of a frame containing an outline." "Default title of a frame containing an outline."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(string :tag "Outline frame title") :type '(string :tag "Outline frame title")
) )
@ -528,7 +519,6 @@ This function will run in the final LaTeX document."
You might want to put e.g. [allowframebreaks=0.9] here. Remember to You might want to put e.g. [allowframebreaks=0.9] here. Remember to
include square brackets." include square brackets."
:group 'org-beamer :group 'org-beamer
:version "24.1"
:type '(string :tag "Outline frame options") :type '(string :tag "Outline frame options")
) )

View File

@ -216,14 +216,12 @@
(defcustom org-bibtex-autogen-keys nil (defcustom org-bibtex-autogen-keys nil
"Set to a truth value to use `bibtex-generate-autokey' to generate keys." "Set to a truth value to use `bibtex-generate-autokey' to generate keys."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-bibtex-prefix nil (defcustom org-bibtex-prefix nil
"Optional prefix for all bibtex property names. "Optional prefix for all bibtex property names.
For example setting to 'BIB_' would allow interoperability with fireforg." For example setting to 'BIB_' would allow interoperability with fireforg."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-bibtex-treat-headline-as-title t (defcustom org-bibtex-treat-headline-as-title t
@ -232,7 +230,6 @@ If an entry is missing a title property, use the headline text as
the property. If this value is t, `org-bibtex-check' will ignore the property. If this value is t, `org-bibtex-check' will ignore
a missing title field." a missing title field."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-bibtex-export-arbitrary-fields nil (defcustom org-bibtex-export-arbitrary-fields nil
@ -241,7 +238,6 @@ This only has effect if `org-bibtex-prefix' is defined, so as to
ensure that other org-properties, such as CATEGORY or LOGGING are ensure that other org-properties, such as CATEGORY or LOGGING are
not placed in the exported bibtex entry." not placed in the exported bibtex entry."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-bibtex-key-property "CUSTOM_ID" (defcustom org-bibtex-key-property "CUSTOM_ID"
@ -251,13 +247,11 @@ bibtex headlines from within an org file. This can be set to ID
to enable global links, but only with great caution, as global to enable global links, but only with great caution, as global
IDs must be unique." IDs must be unique."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-bibtex-tags nil (defcustom org-bibtex-tags nil
"List of tag(s) that should be added to new bib entries." "List of tag(s) that should be added to new bib entries."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type '(repeat :tag "Tag" (string))) :type '(repeat :tag "Tag" (string)))
(defcustom org-bibtex-tags-are-keywords nil (defcustom org-bibtex-tags-are-keywords nil
@ -272,20 +266,17 @@ comma-separated string of keywords when exported to bibtex. Tags
defined in `org-bibtex-tags' or `org-bibtex-no-export-tags' will defined in `org-bibtex-tags' or `org-bibtex-no-export-tags' will
not be exported." not be exported."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-bibtex-no-export-tags nil (defcustom org-bibtex-no-export-tags nil
"List of tag(s) that should not be converted to keywords. "List of tag(s) that should not be converted to keywords.
This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t." This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type '(repeat :tag "Tag" (string))) :type '(repeat :tag "Tag" (string)))
(defcustom org-bibtex-type-property-name "btype" (defcustom org-bibtex-type-property-name "btype"
"Property in which to store bibtex entry type (e.g., article)." "Property in which to store bibtex entry type (e.g., article)."
:group 'org-bibtex :group 'org-bibtex
:version "24.1"
:type 'string) :type 'string)

View File

@ -262,7 +262,6 @@ w3, w3m | %:type %:url
info | %:type %:file %:node info | %:type %:file %:node
calendar | %:type %:date" calendar | %:type %:date"
:group 'org-capture :group 'org-capture
:version "24.1"
:type :type
'(repeat '(repeat
(choice :value ("" "" entry (file "~/org/notes.org") "") (choice :value ("" "" entry (file "~/org/notes.org") "")
@ -337,21 +336,12 @@ calendar | %:type %:date"
The capture buffer is still current when this hook runs and it is The capture buffer is still current when this hook runs and it is
widened to the entire buffer." widened to the entire buffer."
:group 'org-capture :group 'org-capture
:version "24.1"
:type 'hook) :type 'hook)
(defcustom org-capture-after-finalize-hook nil (defcustom org-capture-after-finalize-hook nil
"Hook that is run right after a capture process is finalized. "Hook that is run right after a capture process is finalized.
Suitable for window cleanup" Suitable for window cleanup"
:group 'org-capture :group 'org-capture
:version "24.1"
:type 'hook)
(defcustom org-capture-prepare-finalize-hook nil
"Hook that is run before the finalization starts.
The capture buffer is current and still narrowed."
:group 'org-capture
:version "24.1"
:type 'hook) :type 'hook)
;;; The property list for keeping information about the capture process ;;; The property list for keeping information about the capture process
@ -537,8 +527,6 @@ captured item after finalizing."
(buffer-base-buffer (current-buffer))) (buffer-base-buffer (current-buffer)))
(error "This does not seem to be a capture buffer for Org-mode")) (error "This does not seem to be a capture buffer for Org-mode"))
(run-hooks 'org-capture-prepare-finalize-hook)
;; Did we start the clock in this capture buffer? ;; Did we start the clock in this capture buffer?
(when (and org-capture-clock-was-started (when (and org-capture-clock-was-started
org-clock-marker (marker-buffer org-clock-marker) org-clock-marker (marker-buffer org-clock-marker)

View File

@ -226,7 +226,6 @@ should get a different face (`org-mode-line-clock-overrun').
When this is a string, it is prepended to the clock string as an indication, When this is a string, it is prepended to the clock string as an indication,
also using the face `org-mode-line-clock-overrun'." also using the face `org-mode-line-clock-overrun'."
:group 'org-clock :group 'org-clock
:version "24.1"
:type '(choice :type '(choice
(const :tag "Just mark the time string" nil) (const :tag "Just mark the time string" nil)
(string :tag "Text to prepend"))) (string :tag "Text to prepend")))
@ -268,14 +267,12 @@ string as argument."
:formatter nil) :formatter nil)
"Default properties for clock tables." "Default properties for clock tables."
:group 'org-clock :group 'org-clock
:version "24.1"
:type 'plist) :type 'plist)
(defcustom org-clock-clocktable-formatter 'org-clocktable-write-default (defcustom org-clock-clocktable-formatter 'org-clocktable-write-default
"Function to turn clocking data into a table. "Function to turn clocking data into a table.
For more information, see `org-clocktable-write-default'." For more information, see `org-clocktable-write-default'."
:group 'org-clocktable :group 'org-clocktable
:version "24.1"
:type 'function) :type 'function)
;; FIXME: translate es and nl last string "Clock summary at" ;; FIXME: translate es and nl last string "Clock summary at"
@ -286,7 +283,6 @@ For more information, see `org-clocktable-write-default'."
("nl" "Bestand" "N" "Tijdstip" "Hoofding" "Duur" "ALLES" "Totale duur" "Bestandstijd" "Clock summary at")) ("nl" "Bestand" "N" "Tijdstip" "Hoofding" "Duur" "ALLES" "Totale duur" "Bestandstijd" "Clock summary at"))
"Terms used in clocktable, translated to different languages." "Terms used in clocktable, translated to different languages."
:group 'org-clocktable :group 'org-clocktable
:version "24.1"
:type 'alist) :type 'alist)
(defcustom org-clock-clocktable-default-properties '(:maxlevel 2 :scope file) (defcustom org-clock-clocktable-default-properties '(:maxlevel 2 :scope file)
@ -314,13 +310,11 @@ play with them."
(defcustom org-clock-report-include-clocking-task nil (defcustom org-clock-report-include-clocking-task nil
"When non-nil, include the current clocking task time in clock reports." "When non-nil, include the current clocking task time in clock reports."
:group 'org-clock :group 'org-clock
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-clock-resolve-expert nil (defcustom org-clock-resolve-expert nil
"Non-nil means do not show the splash buffer with the clock resolver." "Non-nil means do not show the splash buffer with the clock resolver."
:group 'org-clock :group 'org-clock
:version "24.1"
:type 'boolean) :type 'boolean)
(defvar org-clock-in-prepare-hook nil (defvar org-clock-in-prepare-hook nil
@ -1393,8 +1387,7 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m (message (concat "Clock stopped at %s after HH:MM = " org-time-clocksum-format "%s") te h m
(if remove " => LINE REMOVED" "")) (if remove " => LINE REMOVED" ""))
(run-hooks 'org-clock-out-hook) (run-hooks 'org-clock-out-hook)
(unless (org-clocking-p) (org-clock-delete-current))))))
(org-clock-delete-current)))))))
(add-hook 'org-clock-out-hook 'org-clock-remove-empty-clock-drawer) (add-hook 'org-clock-out-hook 'org-clock-remove-empty-clock-drawer)
@ -2463,9 +2456,7 @@ TIME: The sum of all time spend in this tree, in minutes. This time
(org-clock-sum ts te (org-clock-sum ts te
(unless (null matcher) (unless (null matcher)
(lambda () (lambda ()
(let* ((tags-list (org-get-tags-at)) (let ((tags-list (org-get-tags-at)))
(org-scanner-tags tags-list)
(org-trust-scanner-tags t))
(eval matcher))))) (eval matcher)))))
(goto-char (point-min)) (goto-char (point-min))
(setq st t) (setq st t)
@ -2640,3 +2631,4 @@ The details of what will be saved are regulated by the variable
(provide 'org-clock) (provide 'org-clock)
;;; org-clock.el ends here ;;; org-clock.el ends here

View File

@ -111,7 +111,6 @@ nil : Leave auto-save-mode enabled.
NOTE: This only works for entries which have a tag NOTE: This only works for entries which have a tag
that matches `org-crypt-tag-matcher'." that matches `org-crypt-tag-matcher'."
:group 'org-crypt :group 'org-crypt
:version "24.1"
:type '(choice (const :tag "Always" t) :type '(choice (const :tag "Always" t)
(const :tag "Never" nil) (const :tag "Never" nil)
(const :tag "Ask" ask) (const :tag "Ask" ask)

View File

@ -162,7 +162,6 @@ See the ctags documentation for more information.")
(t "ctags-exuberant")) (t "ctags-exuberant"))
"Full path to the ctags executable file." "Full path to the ctags executable file."
:group 'org-ctags :group 'org-ctags
:version "24.1"
:type 'file) :type 'file)
(defcustom org-ctags-open-link-functions (defcustom org-ctags-open-link-functions
@ -171,7 +170,6 @@ See the ctags documentation for more information.")
org-ctags-ask-append-topic) org-ctags-ask-append-topic)
"List of functions to be prepended to ORG-OPEN-LINK-FUNCTIONS when ORG-CTAGS is active." "List of functions to be prepended to ORG-OPEN-LINK-FUNCTIONS when ORG-CTAGS is active."
:group 'org-ctags :group 'org-ctags
:version "24.1"
:type 'hook :type 'hook
:options '(org-ctags-find-tag :options '(org-ctags-find-tag
org-ctags-ask-rebuild-tags-file-then-find-tag org-ctags-ask-rebuild-tags-file-then-find-tag
@ -193,7 +191,6 @@ Created as a local variable in each buffer.")
The following patterns are replaced in the string: The following patterns are replaced in the string:
`%t' - replaced with the capitalized title of the hyperlink" `%t' - replaced with the capitalized title of the hyperlink"
:group 'org-ctags :group 'org-ctags
:version "24.1"
:type 'string) :type 'string)

View File

@ -150,7 +150,6 @@ avoid same set of footnote IDs being used multiple times."
(defcustom org-export-docbook-footnote-separator "<superscript>, </superscript>" (defcustom org-export-docbook-footnote-separator "<superscript>, </superscript>"
"Text used to separate footnotes." "Text used to separate footnotes."
:group 'org-export-docbook :group 'org-export-docbook
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-docbook-emphasis-alist (defcustom org-export-docbook-emphasis-alist
@ -196,7 +195,6 @@ This XSLT stylesheet is used by
Object (FO) files. You can use either `fo/docbook.xsl' that Object (FO) files. You can use either `fo/docbook.xsl' that
comes with DocBook, or any customization layer you may have." comes with DocBook, or any customization layer you may have."
:group 'org-export-docbook :group 'org-export-docbook
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-docbook-xslt-proc-command nil (defcustom org-export-docbook-xslt-proc-command nil

View File

@ -44,7 +44,6 @@
For example, this will replace \"\\nsup\" with \"[not a superset of]\" For example, this will replace \"\\nsup\" with \"[not a superset of]\"
in backends where the corresponding character is not available." in backends where the corresponding character is not available."
:group 'org-entities :group 'org-entities
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-entities-user nil (defcustom org-entities-user nil
@ -69,7 +68,6 @@ utf-8 replacement Use the special characters available in utf-8.
If you define new entities here that require specific LaTeX packages to be If you define new entities here that require specific LaTeX packages to be
loaded, add these packages to `org-export-latex-packages-alist'." loaded, add these packages to `org-export-latex-packages-alist'."
:group 'org-entities :group 'org-entities
:version "24.1"
:type '(repeat :type '(repeat
(list (list
(string :tag "name ") (string :tag "name ")

View File

@ -45,7 +45,7 @@
(if (get-buffer eshell-buffer-name) (if (get-buffer eshell-buffer-name)
(org-pop-to-buffer-same-window eshell-buffer-name) (org-pop-to-buffer-same-window eshell-buffer-name)
(eshell)) (eshell))
(goto-char (point-max)) (end-of-buffer)
(eshell-kill-input) (eshell-kill-input)
(insert command) (insert command)
(eshell-send-input))) (eshell-send-input)))

View File

@ -135,7 +135,6 @@ export function should accept three arguments."
(defcustom org-export-blocks-postblock-hook nil (defcustom org-export-blocks-postblock-hook nil
"Run after blocks have been processed with `org-export-blocks-preprocess'." "Run after blocks have been processed with `org-export-blocks-preprocess'."
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type 'hook) :type 'hook)
(defun org-export-blocks-html-quote (body &optional open close) (defun org-export-blocks-html-quote (body &optional open close)
@ -225,7 +224,7 @@ which defaults to the value of `org-export-blocks-witheld'."
;;-------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------
;; ditaa: create images from ASCII art using the ditaa utility ;; ditaa: create images from ASCII art using the ditaa utility
(defcustom org-ditaa-jar-path (expand-file-name (defvar org-ditaa-jar-path (expand-file-name
"ditaa.jar" "ditaa.jar"
(file-name-as-directory (file-name-as-directory
(expand-file-name (expand-file-name
@ -234,9 +233,7 @@ which defaults to the value of `org-export-blocks-witheld'."
(expand-file-name (expand-file-name
"../contrib" "../contrib"
(file-name-directory (or load-file-name buffer-file-name))))))) (file-name-directory (or load-file-name buffer-file-name)))))))
"Path to the ditaa jar executable." "Path to the ditaa jar executable.")
:group 'org-babel
:type 'string)
(defvar org-export-current-backend) ; dynamically bound in org-exp.el (defvar org-export-current-backend) ; dynamically bound in org-exp.el
(defun org-export-blocks-format-ditaa (body &rest headers) (defun org-export-blocks-format-ditaa (body &rest headers)

View File

@ -98,7 +98,6 @@ is nil, the buffer remains buried also in these cases."
This applied to the commands `org-export-as-html-and-open' and This applied to the commands `org-export-as-html-and-open' and
`org-export-as-pdf-and-open'." `org-export-as-pdf-and-open'."
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-run-in-background nil (defcustom org-export-run-in-background nil
@ -121,7 +120,6 @@ force an export command into the current process."
"The initial scope when exporting with `org-export'. "The initial scope when exporting with `org-export'.
This variable can be either set to 'buffer or 'subtree." This variable can be either set to 'buffer or 'subtree."
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type '(choice :type '(choice
(const :tag "Export current buffer" 'buffer) (const :tag "Export current buffer" 'buffer)
(const :tag "Export current subtree" 'subtree))) (const :tag "Export current subtree" 'subtree)))
@ -222,7 +220,6 @@ and in `org-clock-clocktable-language-setup'."
(defcustom org-export-date-timestamp-format "%Y-%m-%d" (defcustom org-export-date-timestamp-format "%Y-%m-%d"
"Time string format for Org timestamps in the #+DATE option." "Time string format for Org timestamps in the #+DATE option."
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type 'string) :type 'string)
(defvar org-export-page-description "" (defvar org-export-page-description ""
@ -320,7 +317,6 @@ done include only tasks that are already done.
nil remove all tasks before export nil remove all tasks before export
list of TODO kwds keep only tasks with these keywords" list of TODO kwds keep only tasks with these keywords"
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type '(choice :type '(choice
(const :tag "All tasks" t) (const :tag "All tasks" t)
(const :tag "No tasks" nil) (const :tag "No tasks" nil)
@ -371,7 +367,6 @@ e.g. \"author:nil\"."
This option can also be set with the +OPTIONS line, This option can also be set with the +OPTIONS line,
e.g. \"email:t\"." e.g. \"email:t\"."
:group 'org-export-general :group 'org-export-general
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-creator-info t (defcustom org-export-creator-info t
@ -599,7 +594,6 @@ the values of constants may be useful to have."
This is the global equivalent of the :remove-nil-lines option This is the global equivalent of the :remove-nil-lines option
when locally sending a table with #+ORGTBL." when locally sending a table with #+ORGTBL."
:group 'org-export-tables :group 'org-export-tables
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-prefer-native-exporter-for-tables nil (defcustom org-export-prefer-native-exporter-for-tables nil

View File

@ -351,7 +351,6 @@ keywords will then be interpreted as either foreground or background
color." color."
:group 'org-faces :group 'org-faces
:group 'org-todo :group 'org-todo
:version "24.1"
:type '(repeat :type '(repeat
(cons (choice (const todo) (const tag) (const priority)) (cons (choice (const todo) (const tag) (const priority))
(choice (const :foreground) (const :background))))) (choice (const :foreground) (const :background)))))
@ -548,7 +547,6 @@ follows a #+DATE:, #+AUTHOR: or #+EMAIL: keyword."
When nil, format these as normal Org. This is the default, because the When nil, format these as normal Org. This is the default, because the
content of these blocks will still be treated as Org syntax." content of these blocks will still be treated as Org syntax."
:group 'org-faces :group 'org-faces
:version "24.1"
:type 'boolean) :type 'boolean)
(defface org-clock-overlay ;; copied from secondary-selection (defface org-clock-overlay ;; copied from secondary-selection
@ -734,7 +732,6 @@ If nil, then all levels >=org-n-level-faces are styled like
level org-n-level-faces" level org-n-level-faces"
:group 'org-appearance :group 'org-appearance
:group 'org-faces :group 'org-faces
:version "24.1"
:type 'boolean) :type 'boolean)
(defface org-latex-and-export-specials (defface org-latex-and-export-specials

View File

@ -80,7 +80,7 @@
;; that received the input of the feed. You should add FEEDSTATUS ;; that received the input of the feed. You should add FEEDSTATUS
;; to your list of drawers in the files that receive feed input: ;; to your list of drawers in the files that receive feed input:
;; ;;
;; #+DRAWERS: PROPERTIES CLOCK LOGBOOK RESULTS FEEDSTATUS ;; #+DRAWERS: PROPERTIES LOGBOOK FEEDSTATUS
;; ;;
;; Acknowledgments ;; Acknowledgments
;; --------------- ;; ---------------

View File

@ -57,7 +57,6 @@
(declare-function org-mark-ring-push "org" (&optional pos buffer)) (declare-function org-mark-ring-push "org" (&optional pos buffer))
(declare-function org-show-context "org" (&optional key)) (declare-function org-show-context "org" (&optional key))
(declare-function org-trim "org" (s)) (declare-function org-trim "org" (s))
(declare-function org-skip-whitespace "org" ())
(declare-function outline-next-heading "outline") (declare-function outline-next-heading "outline")
(defvar org-outline-regexp-bol) ; defined in org.el (defvar org-outline-regexp-bol) ; defined in org.el

View File

@ -414,7 +414,6 @@ MATCHED is the link just matched."
;; with this setting now, but not before??? Was this perhaps a java ;; with this setting now, but not before??? Was this perhaps a java
;; bug or is it a windows xp bug (some resource gets exhausted if you ;; bug or is it a windows xp bug (some resource gets exhausted if you
;; use sticky keys which I do). ;; use sticky keys which I do).
:version "24.1"
:group 'org-freemind) :group 'org-freemind)
(defun org-freemind-org-text-to-freemind-subnode/note (node-name start end drawers-regexp) (defun org-freemind-org-text-to-freemind-subnode/note (node-name start end drawers-regexp)

View File

@ -62,7 +62,6 @@ configured) IMAP servers don't support this operation quickly.
So if following a link to a Gnus article takes ages, try setting So if following a link to a Gnus article takes ages, try setting
this variable to `t'." this variable to `t'."
:group 'org-link-store :group 'org-link-store
:version "24.1"
:type 'boolean) :type 'boolean)

View File

@ -70,13 +70,11 @@ relative to the current effective date."
(defcustom org-habit-today-glyph ?! (defcustom org-habit-today-glyph ?!
"Glyph character used to identify today." "Glyph character used to identify today."
:group 'org-habit :group 'org-habit
:version "24.1"
:type 'character) :type 'character)
(defcustom org-habit-completed-glyph ?* (defcustom org-habit-completed-glyph ?*
"Glyph character used to show completed days on which a task was done." "Glyph character used to show completed days on which a task was done."
:group 'org-habit :group 'org-habit
:version "24.1"
:type 'character) :type 'character)
(defface org-habit-clear-face (defface org-habit-clear-face

View File

@ -64,7 +64,6 @@ by the footnotes themselves."
(defcustom org-export-html-footnote-separator "<sup>, </sup>" (defcustom org-export-html-footnote-separator "<sup>, </sup>"
"Text used to separate footnotes." "Text used to separate footnotes."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-html-coding-system nil (defcustom org-export-html-coding-system nil
@ -253,7 +252,6 @@ You can also customize this for each buffer, using something like
#+MATHJAX: scale:\"133\" align:\"right\" mathml:t path:\"/MathJax/\"" #+MATHJAX: scale:\"133\" align:\"right\" mathml:t path:\"/MathJax/\""
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type '(list :greedy t :type '(list :greedy t
(list :tag "path (the path from where to load MathJax.js)" (list :tag "path (the path from where to load MathJax.js)"
(const :format " " path) (string)) (const :format " " path) (string))
@ -337,7 +335,6 @@ You can also customize this for each buffer, using something like
</script>" </script>"
"The MathJax setup for XHTML files." "The MathJax setup for XHTML files."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-html-tag-class-prefix "" (defcustom org-export-html-tag-class-prefix ""
@ -364,7 +361,6 @@ It requires to %s: both will be replaced by the anchor referring
to the headline (e.g. \"sec-2\"). When set to `nil', don't insert to the headline (e.g. \"sec-2\"). When set to `nil', don't insert
HTML anchors in headlines." HTML anchors in headlines."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-html-preamble t (defcustom org-export-html-preamble t
@ -396,7 +392,6 @@ precedence over this variable."
If you need to use a \"%\" character, you need to escape it If you need to use a \"%\" character, you need to escape it
like that: \"%%\"." like that: \"%%\"."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-html-postamble 'auto (defcustom org-export-html-postamble 'auto
@ -437,7 +432,6 @@ precedence over this variable."
If you need to use a \"%\" character, you need to escape it If you need to use a \"%\" character, you need to escape it
like that: \"%%\"." like that: \"%%\"."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-html-home/up-format (defcustom org-export-html-home/up-format
@ -554,7 +548,6 @@ When nil, alignment will only be specified in the column tags, but this
is ignored by some browsers (like Firefox, Safari). Opera does it right is ignored by some browsers (like Firefox, Safari). Opera does it right
though." though."
:group 'org-export-tables :group 'org-export-tables
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-html-table-use-header-tags-for-first-column nil (defcustom org-export-html-table-use-header-tags-for-first-column nil
@ -585,7 +578,6 @@ When nil, also column one will use data tags."
(">" . "&gt;")) (">" . "&gt;"))
"Alist of characters to be converted by `org-html-protect'." "Alist of characters to be converted by `org-html-protect'."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type '(repeat (cons (string :tag "Character") :type '(repeat (cons (string :tag "Character")
(string :tag "HTML equivalent")))) (string :tag "HTML equivalent"))))
@ -647,7 +639,6 @@ This is a list of three strings, the first one for the preamble
DIV, the second one for the content DIV and the third one for the DIV, the second one for the content DIV and the third one for the
postamble DIV." postamble DIV."
:group 'org-export-html :group 'org-export-html
:version "24.1"
:type '(list :type '(list
(string :tag " Div for the preamble:") (string :tag " Div for the preamble:")
(string :tag " Div for the content:") (string :tag " Div for the content:")

View File

@ -54,7 +54,6 @@ for timed events. If non-zero, alarms are created.
- The alarm will go off N minutes before the event - The alarm will go off N minutes before the event
- only a DISPLAY action is defined." - only a DISPLAY action is defined."
:group 'org-export-icalendar :group 'org-export-icalendar
:version "24.1"
:type 'integer) :type 'integer)
(defcustom org-icalendar-combined-name "OrgMode" (defcustom org-icalendar-combined-name "OrgMode"
@ -65,7 +64,6 @@ for timed events. If non-zero, alarms are created.
(defcustom org-icalendar-combined-description nil (defcustom org-icalendar-combined-description nil
"Calendar description for the combined iCalendar (all agenda files)." "Calendar description for the combined iCalendar (all agenda files)."
:group 'org-export-icalendar :group 'org-export-icalendar
:version "24.1"
:type 'string) :type 'string)
(defcustom org-icalendar-use-plain-timestamp t (defcustom org-icalendar-use-plain-timestamp t
@ -76,7 +74,6 @@ for timed events. If non-zero, alarms are created.
(defcustom org-icalendar-honor-noexport-tag nil (defcustom org-icalendar-honor-noexport-tag nil
"Non-nil means don't export entries with a tag in `org-export-exclude-tags'." "Non-nil means don't export entries with a tag in `org-export-exclude-tags'."
:group 'org-export-icalendar :group 'org-export-icalendar
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-icalendar-use-deadline '(event-if-not-todo todo-due) (defcustom org-icalendar-use-deadline '(event-if-not-todo todo-due)
@ -216,7 +213,6 @@ Interesting value are:
- \":%Y%m%dT%H%M%SZ\" for time expressed in Universal Time" - \":%Y%m%dT%H%M%SZ\" for time expressed in Universal Time"
:group 'org-export-icalendar :group 'org-export-icalendar
:version "24.1"
:type '(choice :type '(choice
(const :tag "Local time" ":%Y%m%dT%H%M%S") (const :tag "Local time" ":%Y%m%dT%H%M%S")
(const :tag "Explicit local time" ";TZID=%Z:%Y%m%dT%H%M%S") (const :tag "Explicit local time" ";TZID=%Z:%Y%m%dT%H%M%S")

View File

@ -641,3 +641,7 @@ optional argument MARKERP, return the position as a new marker."
(provide 'org-id) (provide 'org-id)
;;; org-id.el ends here ;;; org-id.el ends here

View File

@ -45,7 +45,6 @@
(declare-function org-inlinetask-get-task-level "org-inlinetask" ()) (declare-function org-inlinetask-get-task-level "org-inlinetask" ())
(declare-function org-inlinetask-in-task-p "org-inlinetask" ()) (declare-function org-inlinetask-in-task-p "org-inlinetask" ())
(declare-function org-list-item-body-column "org-list" (item)) (declare-function org-list-item-body-column "org-list" (item))
(defvar org-inlinetask-show-first-star)
(defgroup org-indent nil (defgroup org-indent nil
"Options concerning dynamic virtual outline indentation." "Options concerning dynamic virtual outline indentation."
@ -294,10 +293,8 @@ Assume point is at beginning of line."
(let ((stars (aref org-indent-stars (let ((stars (aref org-indent-stars
(min l org-indent-max-levels)))) (min l org-indent-max-levels))))
(and stars (and stars
(if (org-bound-and-true-p org-inlinetask-show-first-star) (concat org-indent-inlinetask-first-star
(concat org-indent-inlinetask-first-star (substring stars 1)))))
(substring stars 1))
stars))))
(h (aref org-indent-stars (h (aref org-indent-stars
(min l org-indent-max-levels))) (min l org-indent-max-levels)))
(t (aref org-indent-strings (t (aref org-indent-strings

View File

@ -90,9 +90,6 @@
(defcustom org-inlinetask-min-level 15 (defcustom org-inlinetask-min-level 15
"Minimum level a headline must have before it is treated as an inline task. "Minimum level a headline must have before it is treated as an inline task.
Don't set it to something higher than `29' or clocking will break since this
is the hardcoded maximum number of stars `org-clock-sum' will work with.
It is strongly recommended that you set `org-cycle-max-level' not at all, It is strongly recommended that you set `org-cycle-max-level' not at all,
or to a number smaller than this one. In fact, when `org-cycle-max-level' is or to a number smaller than this one. In fact, when `org-cycle-max-level' is
not set, it will be assumed to be one less than the value of smaller than not set, it will be assumed to be one less than the value of smaller than
@ -102,12 +99,6 @@ the value of this variable."
(const :tag "Off" nil) (const :tag "Off" nil)
(integer))) (integer)))
(defcustom org-inlinetask-show-first-star nil
"Non-nil means display the first star of an inline task as additional marker.
When nil, the first star is not shown."
:tag "Org Inline Tasks"
:group 'org-structure)
(defcustom org-inlinetask-export t (defcustom org-inlinetask-export t
"Non-nil means export inline tasks. "Non-nil means export inline tasks.
When nil, they will not be exported." When nil, they will not be exported."
@ -182,7 +173,6 @@ or, with the additional package \"todonotes\" for LaTeX,
This should be the state `org-inlinetask-insert-task' should use by This should be the state `org-inlinetask-insert-task' should use by
default, or nil of no state should be assigned." default, or nil of no state should be assigned."
:group 'org-inlinetask :group 'org-inlinetask
:version "24.1"
:type '(choice :type '(choice
(const :tag "No state" nil) (const :tag "No state" nil)
(string :tag "Specific state"))) (string :tag "Specific state")))
@ -441,12 +431,9 @@ Either remove headline and meta data, or do special formatting."
'org-hide 'org-hide
'org-warning))) 'org-warning)))
(while (re-search-forward re limit t) (while (re-search-forward re limit t)
(if org-inlinetask-show-first-star (add-text-properties (match-beginning 1) (match-end 1)
(add-text-properties (match-beginning 1) (match-end 1) `(face ,start-face font-lock-fontified t))
`(face ,start-face font-lock-fontified t))) (add-text-properties (match-beginning 2) (match-end 2)
(add-text-properties (match-beginning
(if org-inlinetask-show-first-star 2 1))
(match-end 2)
'(face org-hide font-lock-fontified t)) '(face org-hide font-lock-fontified t))
(add-text-properties (match-beginning 3) (match-end 3) (add-text-properties (match-beginning 3) (match-end 3)
'(face org-inlinetask font-lock-fontified t))))) '(face org-inlinetask font-lock-fontified t)))))
@ -464,7 +451,7 @@ Either remove headline and meta data, or do special formatting."
((= end start)) ((= end start))
;; Inlinetask was folded: expand it. ;; Inlinetask was folded: expand it.
((get-char-property (1+ start) 'invisible) ((get-char-property (1+ start) 'invisible)
(org-show-entry)) (outline-flag-region start end nil))
(t (outline-flag-region start end t))))) (t (outline-flag-region start end t)))))
(defun org-inlinetask-remove-END-maybe () (defun org-inlinetask-remove-END-maybe ()

View File

@ -218,7 +218,6 @@ For example, adding an entry
will cause \\usepackage[utf8x]{inputenc} to be used for buffers that will cause \\usepackage[utf8x]{inputenc} to be used for buffers that
are written as utf8 files." are written as utf8 files."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type '(repeat :type '(repeat
(cons (cons
(string :tag "Derived from buffer") (string :tag "Derived from buffer")
@ -284,7 +283,6 @@ markup defined, the first one in the association list will be used."
(defcustom org-export-latex-tag-markup "\\textbf{%s}" (defcustom org-export-latex-tag-markup "\\textbf{%s}"
"Markup for tags, as a printf format." "Markup for tags, as a printf format."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-timestamp-markup "\\textit{%s}" (defcustom org-export-latex-timestamp-markup "\\textit{%s}"
@ -295,7 +293,6 @@ markup defined, the first one in the association list will be used."
(defcustom org-export-latex-timestamp-inactive-markup "\\textit{%s}" (defcustom org-export-latex-timestamp-inactive-markup "\\textit{%s}"
"A printf format string to be applied to inactive time stamps." "A printf format string to be applied to inactive time stamps."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-timestamp-keyword-markup "\\texttt{%s}" (defcustom org-export-latex-timestamp-keyword-markup "\\texttt{%s}"
@ -310,7 +307,6 @@ If it contains two %s instances, the first will be filled with
the link, the second with the link description. If it contains the link, the second with the link description. If it contains
only one, the %s will be filled with the link." only one, the %s will be filled with the link."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-hyperref-format "\\hyperref[%s]{%s}" (defcustom org-export-latex-hyperref-format "\\hyperref[%s]{%s}"
@ -318,13 +314,11 @@ only one, the %s will be filled with the link."
The format must contain one or two %s instances. The first one The format must contain one or two %s instances. The first one
will be filled with the link, the second with its description." will be filled with the link, the second with its description."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-footnote-separator "\\textsuperscript{,}\\," (defcustom org-export-latex-footnote-separator "\\textsuperscript{,}\\,"
"Text used to separate footnotes." "Text used to separate footnotes."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-quotes (defcustom org-export-latex-quotes
@ -342,7 +336,6 @@ For each item in a CONS, the first string is a regexp
for allowed characters before/after the quote, the second for allowed characters before/after the quote, the second
string defines the replacement string for this quote." string defines the replacement string for this quote."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type '(list :type '(list
(cons :tag "Opening quote" (cons :tag "Opening quote"
(string :tag "Regexp for char before") (string :tag "Regexp for char before")
@ -368,7 +361,6 @@ string defines the replacement string for this quote."
"When non-nil, the caption is set above the table. When nil, "When non-nil, the caption is set above the table. When nil,
the caption is set below the table." the caption is set below the table."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-latex-tables-column-borders nil (defcustom org-export-latex-tables-column-borders nil
@ -486,7 +478,6 @@ Code blocks exported with the listings package (controlled by the
`org-export-latex-listings' variable) can be named in the style `org-export-latex-listings' variable) can be named in the style
of noweb." of noweb."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-export-latex-minted-langs (defcustom org-export-latex-minted-langs
@ -508,7 +499,6 @@ with:
pygmentize -L lexers pygmentize -L lexers
" "
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type '(repeat :type '(repeat
(list (list
(symbol :tag "Major mode ") (symbol :tag "Major mode ")
@ -532,7 +522,6 @@ black keywords.
Note that the same options will be applied to blocks of all Note that the same options will be applied to blocks of all
languages." languages."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type '(repeat :type '(repeat
(list (list
(string :tag "Listings option name ") (string :tag "Listings option name ")
@ -556,7 +545,6 @@ will result in src blocks being exported with
as the start of the minted environment. Note that the same as the start of the minted environment. Note that the same
options will be applied to blocks of all languages." options will be applied to blocks of all languages."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type '(repeat :type '(repeat
(list (list
(string :tag "Minted option name ") (string :tag "Minted option name ")
@ -598,13 +586,11 @@ and `org-export-with-tags' instead."
(defcustom org-latex-default-figure-position "htb" (defcustom org-latex-default-figure-position "htb"
"Default position for latex figures." "Default position for latex figures."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-tabular-environment "tabular" (defcustom org-export-latex-tabular-environment "tabular"
"Default environment used to build tables." "Default environment used to build tables."
:group 'org-export-latex :group 'org-export-latex
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-latex-inline-image-extensions (defcustom org-export-latex-inline-image-extensions
@ -681,7 +667,6 @@ This function should accept the file name as its single argument."
'("aux" "idx" "log" "out" "toc" "nav" "snm" "vrb") '("aux" "idx" "log" "out" "toc" "nav" "snm" "vrb")
"The list of file extensions to consider as LaTeX logfiles." "The list of file extensions to consider as LaTeX logfiles."
:group 'org-export-pdf :group 'org-export-pdf
:version "24.1"
:type '(repeat (string :tag "Extension"))) :type '(repeat (string :tag "Extension")))
(defcustom org-export-pdf-remove-logfiles t (defcustom org-export-pdf-remove-logfiles t

View File

@ -215,7 +215,6 @@ Both uppercase and lowercase are handled. Lists with more than
26 items will fallback to standard numbering. Alphabetical 26 items will fallback to standard numbering. Alphabetical
counters like \"[@c]\" will be recognized." counters like \"[@c]\" will be recognized."
:group 'org-plain-lists :group 'org-plain-lists
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-list-two-spaces-after-bullet-regexp nil (defcustom org-list-two-spaces-after-bullet-regexp nil
@ -259,7 +258,6 @@ indent when non-nil, indenting or outdenting list top-item
outdenting a list whose bullet is * to column 0 will outdenting a list whose bullet is * to column 0 will
change that bullet to \"-\"." change that bullet to \"-\"."
:group 'org-plain-lists :group 'org-plain-lists
:version "24.1"
:type '(alist :tag "Sets of rules" :type '(alist :tag "Sets of rules"
:key-type :key-type
(choice (choice
@ -279,7 +277,6 @@ This affects the behavior of \\[org-move-item-up],
\\[org-move-item-down], \\[org-next-item] and \\[org-move-item-down], \\[org-next-item] and
\\[org-previous-item]." \\[org-previous-item]."
:group 'org-plain-lists :group 'org-plain-lists
:version "24.1"
:type 'boolean) :type 'boolean)
(defvar org-checkbox-statistics-hook nil (defvar org-checkbox-statistics-hook nil
@ -309,7 +306,6 @@ When the indentation would be larger than this, it will become
By setting this to a small number, usually 1 or 2, one can more By setting this to a small number, usually 1 or 2, one can more
clearly distinguish sub-items in a list." clearly distinguish sub-items in a list."
:group 'org-plain-lists :group 'org-plain-lists
:version "24.1"
:type 'integer) :type 'integer)
(defcustom org-list-radio-list-templates (defcustom org-list-radio-list-templates
@ -714,15 +710,15 @@ Assume point is at an item."
;; equally indented than BEG-CELL's cdr. Also, store ending ;; equally indented than BEG-CELL's cdr. Also, store ending
;; position of items in END-LST-2. ;; position of items in END-LST-2.
(catch 'exit (catch 'exit
(while t (while t
(let ((ind (+ (or (get-text-property (point) 'original-indentation) 0) (let ((ind (+ (or (get-text-property (point) 'original-indentation) 0)
(org-get-indentation)))) (org-get-indentation))))
(cond (cond
((>= (point) lim-down) ((>= (point) lim-down)
;; At downward limit: this is de facto the end of the ;; At downward limit: this is de facto the end of the
;; list. Save point as an ending position, and jump to ;; list. Save point as an ending position, and jump to
;; part 3. ;; part 3.
(throw 'exit (throw 'exit
(push (cons 0 (funcall end-before-blank)) end-lst-2))) (push (cons 0 (funcall end-before-blank)) end-lst-2)))
;; At a verbatim block, move to its end. Point is at bol ;; At a verbatim block, move to its end. Point is at bol
;; and 'org-example property is set by whole lines: ;; and 'org-example property is set by whole lines:
@ -1019,41 +1015,6 @@ type is determined by the first item of the list."
((string-match "[[:alnum:]]" (org-list-get-bullet first struct)) 'ordered) ((string-match "[[:alnum:]]" (org-list-get-bullet first struct)) 'ordered)
(t 'unordered)))) (t 'unordered))))
(defun org-list-get-item-number (item struct prevs parents)
"Return ITEM's sequence number.
STRUCT is the list structure. PREVS is the alist of previous
items, as returned by `org-list-prevs-alist'. PARENTS is the
alist of ancestors, as returned by `org-list-parents-alist'.
Return value is a list of integers. Counters have an impact on
that value."
(let ((get-relative-number
(function
(lambda (item struct prevs)
;; Return relative sequence number of ITEM in the sub-list
;; it belongs. STRUCT is the list structure. PREVS is
;; the alist of previous items.
(let ((seq 0) (pos item) counter)
(while (and (not (setq counter (org-list-get-counter pos struct)))
(setq pos (org-list-get-prev-item pos struct prevs)))
(incf seq))
(if (not counter) (1+ seq)
(cond
((string-match "[A-Za-z]" counter)
(+ (- (string-to-char (upcase (match-string 0 counter))) 64)
seq))
((string-match "[0-9]+" counter)
(+ (string-to-number (match-string 0 counter)) seq))
(t (1+ seq)))))))))
;; Cons each parent relative number into return value (OUT).
(let ((out (list (funcall get-relative-number item struct prevs)))
(parent item))
(while (setq parent (org-list-get-parent parent struct parents))
(push (funcall get-relative-number parent struct prevs) out))
;; Return value.
out)))
;;; Searching ;;; Searching
@ -1278,8 +1239,9 @@ This function modifies STRUCT."
(insert body item-sep) (insert body item-sep)
;; 5. Add new item to STRUCT. ;; 5. Add new item to STRUCT.
(mapc (lambda (e) (mapc (lambda (e)
(let ((p (car e)) (end (nth 6 e))) (let ((p (car e))
(cond (end (nth 6 e)))
(cond
;; Before inserted item, positions don't change but ;; Before inserted item, positions don't change but
;; an item ending after insertion has its end shifted ;; an item ending after insertion has its end shifted
;; by SIZE-OFFSET. ;; by SIZE-OFFSET.
@ -2167,18 +2129,6 @@ item is invisible."
(goto-char (match-end 0)) (goto-char (match-end 0))
t))))) t)))))
(defun org-mark-list ()
"Mark the current list.
If this is a sublist, only mark the sublist."
(interactive)
(let* ((item (org-list-get-item-begin))
(struct (org-list-struct))
(prevs (org-list-prevs-alist struct))
(lbeg (org-list-get-list-begin item struct prevs))
(lend (org-list-get-list-end item struct prevs)))
(push-mark lend nil t)
(goto-char lbeg)))
(defun org-list-repair () (defun org-list-repair ()
"Fix indentation, bullets and checkboxes is the list at point." "Fix indentation, bullets and checkboxes is the list at point."
(interactive) (interactive)

View File

@ -68,7 +68,6 @@ org-agenda-text-search-extra-files
(defcustom org-mobile-files-exclude-regexp "" (defcustom org-mobile-files-exclude-regexp ""
"A regexp to exclude files from `org-mobile-files'." "A regexp to exclude files from `org-mobile-files'."
:group 'org-mobile :group 'org-mobile
:version "24.1"
:type 'regexp) :type 'regexp)
(defcustom org-mobile-directory "" (defcustom org-mobile-directory ""
@ -85,7 +84,6 @@ Turning on encryption requires to set the same password in the MobileOrg
application. Before turning this on, check of MobileOrg does already application. Before turning this on, check of MobileOrg does already
support it - at the time of this writing it did not yet." support it - at the time of this writing it did not yet."
:group 'org-mobile :group 'org-mobile
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-mobile-encryption-tempfile "~/orgtmpcrypt" (defcustom org-mobile-encryption-tempfile "~/orgtmpcrypt"
@ -93,7 +91,6 @@ support it - at the time of this writing it did not yet."
This must be local file on your local machine (not on the WebDAV server). This must be local file on your local machine (not on the WebDAV server).
You might want to put this file into a directory where only you have access." You might want to put this file into a directory where only you have access."
:group 'org-mobile :group 'org-mobile
:version "24.1"
:type 'directory) :type 'directory)
(defcustom org-mobile-encryption-password "" (defcustom org-mobile-encryption-password ""
@ -114,7 +111,6 @@ it, this also limits the security of this approach. You can also leave
this variable empty - Org will then ask for the password once per Emacs this variable empty - Org will then ask for the password once per Emacs
session." session."
:group 'org-mobile :group 'org-mobile
:version "24.1"
:type '(string :tag "Password")) :type '(string :tag "Password"))
(defvar org-mobile-encryption-password-session nil) (defvar org-mobile-encryption-password-session nil)
@ -154,7 +150,6 @@ custom all custom agendas defined by the user
all the custom agendas and the default ones all the custom agendas and the default ones
list a list of selection key(s) as string." list a list of selection key(s) as string."
:group 'org-mobile :group 'org-mobile
:version "24.1"
:type '(choice :type '(choice
(const :tag "Default Agendas" default) (const :tag "Default Agendas" default)
(const :tag "Custom Agendas" custom) (const :tag "Custom Agendas" custom)
@ -300,8 +295,6 @@ Also exclude files matching `org-mobile-files-exclude-regexp'."
(push (cons file link-name) rtn))) (push (cons file link-name) rtn)))
(nreverse rtn))) (nreverse rtn)))
(defvar org-agenda-filter)
;;;###autoload ;;;###autoload
(defun org-mobile-push () (defun org-mobile-push ()
"Push the current state of Org affairs to the WebDAV directory. "Push the current state of Org affairs to the WebDAV directory.
@ -310,7 +303,7 @@ create all custom agenda views, for upload to the mobile phone."
(interactive) (interactive)
(let ((a-buffer (get-buffer org-agenda-buffer-name))) (let ((a-buffer (get-buffer org-agenda-buffer-name)))
(let ((org-agenda-buffer-name "*SUMO*") (let ((org-agenda-buffer-name "*SUMO*")
(org-agenda-tag-filter org-agenda-tag-filter) (org-agenda-filter org-agenda-filter)
(org-agenda-redo-command org-agenda-redo-command)) (org-agenda-redo-command org-agenda-redo-command))
(save-excursion (save-excursion
(save-window-excursion (save-window-excursion
@ -1106,3 +1099,4 @@ A and B must be strings or nil."
(provide 'org-mobile) (provide 'org-mobile)
;;; org-mobile.el ends here ;;; org-mobile.el ends here

View File

@ -50,9 +50,6 @@
:tag "Org" :tag "Org"
:group 'org) :group 'org)
(defvar org-drawer-regexp)
(defvar org-property-re)
(defun org-thing-at-point () (defun org-thing-at-point ()
"Examine the thing at point and let the caller know what it is. "Examine the thing at point and let the caller know what it is.
The return value is a string naming the thing at point." The return value is a string naming the thing at point."
@ -86,17 +83,9 @@ The return value is a string naming the thing at point."
((and (equal (char-before beg1) ?:) ((and (equal (char-before beg1) ?:)
(equal (char-after (point-at-bol)) ?*)) (equal (char-after (point-at-bol)) ?*))
(cons "tag" nil)) (cons "tag" nil))
((and (equal (char-before beg1) ?:)
(not (equal (char-after (point-at-bol)) ?*))
(save-excursion
(move-beginning-of-line 1)
(skip-chars-backward "[ \t\n]")
(or (looking-back org-drawer-regexp)
(looking-back org-property-re))))
(cons "prop" nil))
((and (equal (char-before beg1) ?:) ((and (equal (char-before beg1) ?:)
(not (equal (char-after (point-at-bol)) ?*))) (not (equal (char-after (point-at-bol)) ?*)))
(cons "drawer" nil)) (cons "prop" nil))
(t nil)))) (t nil))))
(defun org-command-at-point () (defun org-command-at-point ()
@ -250,25 +239,6 @@ This needs more work, to handle headings with lots of spaces in them."
lst)) lst))
(substring pcomplete-stub 1))) (substring pcomplete-stub 1)))
(defvar org-drawers)
(defun pcomplete/org-mode/drawer ()
"Complete a drawer name."
(let ((spc (save-excursion
(move-beginning-of-line 1)
(looking-at "^\\([ \t]*\\):")
(match-string 1)))
(cpllist (mapcar (lambda (x) (concat x ": ")) org-drawers)))
(pcomplete-here cpllist
(substring pcomplete-stub 1)
(unless (or (not (delete
nil
(mapcar (lambda(x)
(string-match (substring pcomplete-stub 1) x))
cpllist)))
(looking-at "[ \t]*\n.*:END:"))
(save-excursion (insert "\n" spc ":END:"))))))
(defun pcomplete/org-mode/block-option/src () (defun pcomplete/org-mode/block-option/src ()
"Complete the arguments of a begin_src block. "Complete the arguments of a begin_src block.
Complete a language in the first field, the header arguments and switches." Complete a language in the first field, the header arguments and switches."

View File

@ -248,7 +248,6 @@ nil won't sort files.
You can overwrite this default per project in your You can overwrite this default per project in your
`org-publish-project-alist', using `:sitemap-sort-files'." `org-publish-project-alist', using `:sitemap-sort-files'."
:group 'org-publish :group 'org-publish
:version "24.1"
:type 'symbol) :type 'symbol)
(defcustom org-publish-sitemap-sort-folders 'first (defcustom org-publish-sitemap-sort-folders 'first
@ -261,7 +260,6 @@ Any other value will not mix files and folders.
You can overwrite this default per project in your You can overwrite this default per project in your
`org-publish-project-alist', using `:sitemap-sort-folders'." `org-publish-project-alist', using `:sitemap-sort-folders'."
:group 'org-publish :group 'org-publish
:version "24.1"
:type 'symbol) :type 'symbol)
(defcustom org-publish-sitemap-sort-ignore-case nil (defcustom org-publish-sitemap-sort-ignore-case nil
@ -270,14 +268,12 @@ You can overwrite this default per project in your
You can overwrite this default per project in your You can overwrite this default per project in your
`org-publish-project-alist', using `:sitemap-ignore-case'." `org-publish-project-alist', using `:sitemap-ignore-case'."
:group 'org-publish :group 'org-publish
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-publish-sitemap-date-format "%Y-%m-%d" (defcustom org-publish-sitemap-date-format "%Y-%m-%d"
"Format for `format-time-string' which is used to print a date "Format for `format-time-string' which is used to print a date
in the sitemap." in the sitemap."
:group 'org-publish :group 'org-publish
:version "24.1"
:type 'string) :type 'string)
(defcustom org-publish-sitemap-file-entry-format "%t" (defcustom org-publish-sitemap-file-entry-format "%t"
@ -288,7 +284,6 @@ You could use brackets to delimit on what part the link will be.
%a is the author. %a is the author.
%d is the date formatted using `org-publish-sitemap-date-format'." %d is the date formatted using `org-publish-sitemap-date-format'."
:group 'org-publish :group 'org-publish
:version "24.1"
:type 'string) :type 'string)
@ -1036,7 +1031,7 @@ the project."
(setq ibuffer (find-file-noselect index-file)) (setq ibuffer (find-file-noselect index-file))
(with-current-buffer ibuffer (with-current-buffer ibuffer
(erase-buffer) (erase-buffer)
(insert "\n\n#+INCLUDE: \"theindex.inc\"\n\n") (insert "\n\n#+include: \"theindex.inc\"\n\n")
(save-buffer)) (save-buffer))
(kill-buffer ibuffer))))) (kill-buffer ibuffer)))))

View File

@ -1152,3 +1152,4 @@ See also the variable `org-reverse-note-order'."
(provide 'org-remember) (provide 'org-remember)
;;; org-remember.el ends here ;;; org-remember.el ends here

View File

@ -41,7 +41,6 @@
(declare-function org-at-table.el-p "org" ()) (declare-function org-at-table.el-p "org" ())
(declare-function org-get-indentation "org" (&optional line)) (declare-function org-get-indentation "org" (&optional line))
(declare-function org-switch-to-buffer-other-window "org" (&rest args)) (declare-function org-switch-to-buffer-other-window "org" (&rest args))
(declare-function org-strip-protective-commas "org" (beg end))
(declare-function org-pop-to-buffer-same-window (declare-function org-pop-to-buffer-same-window
"org-compat" (&optional buffer-or-name norecord label)) "org-compat" (&optional buffer-or-name norecord label))
@ -173,7 +172,6 @@ For example, there is no ocaml-mode in Emacs, but the mode to use is
(defvar org-src-mode-map (make-sparse-keymap)) (defvar org-src-mode-map (make-sparse-keymap))
(define-key org-src-mode-map "\C-c'" 'org-edit-src-exit) (define-key org-src-mode-map "\C-c'" 'org-edit-src-exit)
(define-key org-src-mode-map "\C-x\C-s" 'org-edit-src-save)
(defvar org-edit-src-force-single-line nil) (defvar org-edit-src-force-single-line nil)
(defvar org-edit-src-from-org-mode nil) (defvar org-edit-src-from-org-mode nil)
@ -328,7 +326,6 @@ buffer."
(if org-src-preserve-indentation col (max 0 (- col total-nindent)))) (if org-src-preserve-indentation col (max 0 (- col total-nindent))))
(org-src-mode) (org-src-mode)
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(setq buffer-file-name nil)
(and org-edit-src-persistent-message (and org-edit-src-persistent-message
(org-set-local 'header-line-format msg)) (org-set-local 'header-line-format msg))
(let ((edit-prep-func (intern (concat "org-babel-edit-prep:" lang)))) (let ((edit-prep-func (intern (concat "org-babel-edit-prep:" lang))))
@ -674,33 +671,21 @@ the language, a switch telling if the content should be in a single line."
(set-window-configuration org-edit-src-saved-temp-window-config) (set-window-configuration org-edit-src-saved-temp-window-config)
(setq org-edit-src-saved-temp-window-config nil)))) (setq org-edit-src-saved-temp-window-config nil))))
(defmacro org-src-in-org-buffer (&rest body)
`(let ((p (point)) (m (mark)) (ul buffer-undo-list) msg)
(save-window-excursion
(org-edit-src-exit 'save)
,@body
(setq msg (current-message))
(if (eq org-src-window-setup 'other-frame)
(let ((org-src-window-setup 'current-window))
(org-edit-src-code 'save))
(org-edit-src-code 'save)))
(setq buffer-undo-list ul)
(push-mark m 'nomessage)
(goto-char (min p (point-max)))
(message (or msg ""))))
(def-edebug-spec org-src-in-org-buffer (body))
(defun org-edit-src-save () (defun org-edit-src-save ()
"Save parent buffer with current state source-code buffer." "Save parent buffer with current state source-code buffer."
(interactive) (interactive)
(org-src-in-org-buffer (save-buffer))) (let ((p (point)) (m (mark)) msg)
(save-window-excursion
(declare-function org-babel-tangle "ob-tangle" (&optional only-this-block target-file lang)) (org-edit-src-exit 'save)
(save-buffer)
(defun org-src-tangle (arg) (setq msg (current-message))
"Tangle the parent buffer." (if (eq org-src-window-setup 'other-frame)
(interactive) (let ((org-src-window-setup 'current-window))
(org-src-in-org-buffer (org-babel-tangle arg))) (org-edit-src-code 'save))
(org-edit-src-code 'save)))
(push-mark m 'nomessage)
(goto-char (min p (point-max)))
(message (or msg ""))))
(defun org-src-mode-configure-edit-buffer () (defun org-src-mode-configure-edit-buffer ()
(when (org-bound-and-true-p org-edit-src-from-org-mode) (when (org-bound-and-true-p org-edit-src-from-org-mode)
@ -774,7 +759,6 @@ Org-babel commands."
"If non-nil, the effect of TAB in a code block is as if it were "If non-nil, the effect of TAB in a code block is as if it were
issued in the language major mode buffer." issued in the language major mode buffer."
:type 'boolean :type 'boolean
:version "24.1"
:group 'org-babel) :group 'org-babel)
(defun org-src-native-tab-command-maybe () (defun org-src-native-tab-command-maybe ()

View File

@ -169,13 +169,11 @@ window configuration, it is not recommended to set this variable to nil,
except maybe locally in a special file that has mostly tables with long except maybe locally in a special file that has mostly tables with long
fields." fields."
:group 'org-table :group 'org-table
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-table-fix-formulas-confirm nil (defcustom org-table-fix-formulas-confirm nil
"Whether the user should confirm when Org fixes formulas." "Whether the user should confirm when Org fixes formulas."
:group 'org-table-editing :group 'org-table-editing
:version "24.1"
:type '(choice :type '(choice
(const :tag "with yes-or-no" yes-or-no-p) (const :tag "with yes-or-no" yes-or-no-p)
(const :tag "with y-or-n" y-or-n-p) (const :tag "with y-or-n" y-or-n-p)
@ -238,7 +236,6 @@ number of hours. Other allowed values are 'seconds, 'minutes and
'days, and the output will be a fraction of seconds, minutes or 'days, and the output will be a fraction of seconds, minutes or
days." days."
:group 'org-table-calculation :group 'org-table-calculation
:version "24.1"
:type '(choice (symbol :tag "Seconds" 'seconds) :type '(choice (symbol :tag "Seconds" 'seconds)
(symbol :tag "Minutes" 'minutes) (symbol :tag "Minutes" 'minutes)
(symbol :tag "Hours " 'hours) (symbol :tag "Hours " 'hours)
@ -250,7 +247,6 @@ For example, using \"~%s~\" will display the result within tilde
characters. Beware that modifying the display can prevent the characters. Beware that modifying the display can prevent the
field from being used in another formula." field from being used in another formula."
:group 'org-table-settings :group 'org-table-settings
:version "24.1"
:type 'string) :type 'string)
(defcustom org-table-formula-evaluate-inline t (defcustom org-table-formula-evaluate-inline t
@ -4763,3 +4759,4 @@ list of the fields in the rectangle ."
(provide 'org-table) (provide 'org-table)
;;; org-table.el ends here ;;; org-table.el ends here

View File

@ -166,33 +166,28 @@
(defcustom org-export-taskjuggler-extension ".tjp" (defcustom org-export-taskjuggler-extension ".tjp"
"Extension of TaskJuggler files." "Extension of TaskJuggler files."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-taskjuggler-project-tag "taskjuggler_project" (defcustom org-export-taskjuggler-project-tag "taskjuggler_project"
"Tag, property or todo used to find the tree containing all "Tag, property or todo used to find the tree containing all
the tasks for the project." the tasks for the project."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-taskjuggler-resource-tag "taskjuggler_resource" (defcustom org-export-taskjuggler-resource-tag "taskjuggler_resource"
"Tag, property or todo used to find the tree containing all the "Tag, property or todo used to find the tree containing all the
resources for the project." resources for the project."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-taskjuggler-target-version 2.4 (defcustom org-export-taskjuggler-target-version 2.4
"Which version of TaskJuggler the exporter is targeting." "Which version of TaskJuggler the exporter is targeting."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'number) :type 'number)
(defcustom org-export-taskjuggler-default-project-version "1.0" (defcustom org-export-taskjuggler-default-project-version "1.0"
"Default version string for the project." "Default version string for the project."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'string) :type 'string)
(defcustom org-export-taskjuggler-default-project-duration 280 (defcustom org-export-taskjuggler-default-project-duration 280
@ -200,7 +195,6 @@ resources for the project."
in the root node of the task tree, i.e. the tree that has been marked in the root node of the task tree, i.e. the tree that has been marked
with `org-export-taskjuggler-project-tag'" with `org-export-taskjuggler-project-tag'"
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type 'integer) :type 'integer)
(defcustom org-export-taskjuggler-default-reports (defcustom org-export-taskjuggler-default-reports
@ -220,7 +214,6 @@ with `org-export-taskjuggler-project-tag'"
}") }")
"Default reports for the project." "Default reports for the project."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type '(repeat (string :tag "Report"))) :type '(repeat (string :tag "Report")))
(defcustom org-export-taskjuggler-default-global-properties (defcustom org-export-taskjuggler-default-global-properties
@ -237,7 +230,6 @@ include another TaskJuggler file.
The global properties are inserted after the project declaration The global properties are inserted after the project declaration
but before any resource and task declarations." but before any resource and task declarations."
:group 'org-export-taskjuggler :group 'org-export-taskjuggler
:version "24.1"
:type '(string :tag "Preamble")) :type '(string :tag "Preamble"))
;;; Hooks ;;; Hooks

View File

@ -53,7 +53,6 @@ the value of the relative timer."
"The default timer when a timer is set. "The default timer when a timer is set.
When 0, the user is prompted for a value." When 0, the user is prompted for a value."
:group 'org-time :group 'org-time
:version "24.1"
:type 'number) :type 'number)
(defvar org-timer-start-hook nil (defvar org-timer-start-hook nil

View File

@ -6,10 +6,6 @@
;; Keywords: outlines, hypermedia, calendar, wp ;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://orgmode.org ;; Homepage: http://orgmode.org
;; ;;
;; Support for IMAP folders added
;; by Konrad Hinsen <konrad dot hinsen at fastmail dot net>
;; Requires VM 8.2.0a or later.
;;
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
;; ;;
;; GNU Emacs is free software: you can redistribute it and/or modify ;; GNU Emacs is free software: you can redistribute it and/or modify
@ -46,17 +42,11 @@
(declare-function vm-su-message-id "ext:vm-summary" (m)) (declare-function vm-su-message-id "ext:vm-summary" (m))
(declare-function vm-su-subject "ext:vm-summary" (m)) (declare-function vm-su-subject "ext:vm-summary" (m))
(declare-function vm-summarize "ext:vm-summary" (&optional display raise)) (declare-function vm-summarize "ext:vm-summary" (&optional display raise))
(declare-function vm-imap-folder-p "ext:vm-save" ())
(declare-function vm-imap-find-spec-for-buffer "ext:vm-imap" (buffer))
(declare-function vm-imap-folder-for-spec "ext:vm-imap" (spec))
(declare-function vm-imap-parse-spec-to-list "ext:vm-imap" (spec))
(declare-function vm-imap-spec-for-account "ext:vm-imap" (account))
(defvar vm-message-pointer) (defvar vm-message-pointer)
(defvar vm-folder-directory) (defvar vm-folder-directory)
;; Install the link type ;; Install the link type
(org-add-link-type "vm" 'org-vm-open) (org-add-link-type "vm" 'org-vm-open)
(org-add-link-type "vm-imap" 'org-vm-imap-open)
(add-hook 'org-store-link-functions 'org-vm-store-link) (add-hook 'org-store-link-functions 'org-vm-store-link)
;; Implementation ;; Implementation
@ -71,11 +61,11 @@
(save-excursion (save-excursion
(vm-select-folder-buffer) (vm-select-folder-buffer)
(let* ((message (car vm-message-pointer)) (let* ((message (car vm-message-pointer))
(subject (vm-su-subject message)) (folder buffer-file-name)
(subject (vm-su-subject message))
(to (vm-get-header-contents message "To")) (to (vm-get-header-contents message "To"))
(from (vm-get-header-contents message "From")) (from (vm-get-header-contents message "From"))
(message-id (vm-su-message-id message)) (message-id (vm-su-message-id message))
(link-type (if (vm-imap-folder-p) "vm-imap" "vm"))
(date (vm-get-header-contents message "Date")) (date (vm-get-header-contents message "Date"))
(date-ts (and date (format-time-string (date-ts (and date (format-time-string
(org-time-stamp-format t) (org-time-stamp-format t)
@ -83,24 +73,20 @@
(date-ts-ia (and date (format-time-string (date-ts-ia (and date (format-time-string
(org-time-stamp-format t t) (org-time-stamp-format t t)
(date-to-time date)))) (date-to-time date))))
folder desc link) desc link)
(if (vm-imap-folder-p) (org-store-link-props :type "vm" :from from :to to :subject subject
(let ((spec (vm-imap-find-spec-for-buffer (current-buffer))))
(setq folder (vm-imap-folder-for-spec spec)))
(progn
(setq folder (abbreviate-file-name buffer-file-name))
(if (and vm-folder-directory
(string-match (concat "^" (regexp-quote vm-folder-directory))
folder))
(setq folder (replace-match "" t t folder)))))
(setq message-id (org-remove-angle-brackets message-id))
(org-store-link-props :type link-type :from from :to to :subject subject
:message-id message-id) :message-id message-id)
(when date (when date
(org-add-link-props :date date :date-timestamp date-ts (org-add-link-props :date date :date-timestamp date-ts
:date-timestamp-inactive date-ts-ia)) :date-timestamp-inactive date-ts-ia))
(setq message-id (org-remove-angle-brackets message-id))
(setq folder (abbreviate-file-name folder))
(if (and vm-folder-directory
(string-match (concat "^" (regexp-quote vm-folder-directory))
folder))
(setq folder (replace-match "" t t folder)))
(setq desc (org-email-link-description)) (setq desc (org-email-link-description))
(setq link (org-make-link (concat link-type ":") folder "#" message-id)) (setq link (org-make-link "vm:" folder "#" message-id))
(org-add-link-props :link link :description desc) (org-add-link-props :link link :description desc)
link)))) link))))
@ -135,46 +121,21 @@
(setq folder (format "/%s@%s:%s" user host file)))))) (setq folder (format "/%s@%s:%s" user host file))))))
(when folder (when folder
(funcall (cdr (assq 'vm org-link-frame-setup)) folder readonly) (funcall (cdr (assq 'vm org-link-frame-setup)) folder readonly)
(sit-for 0.1)
(when article (when article
(org-vm-select-message (org-add-angle-brackets article))))) (require 'vm-search)
(vm-select-folder-buffer)
(defun org-vm-imap-open (path) (widen)
"Follow a VM link to an IMAP folder" (let ((case-fold-search t))
(require 'vm-imap) (goto-char (point-min))
(when (string-match "\\([^:]+\\):\\([^#]+\\)#?\\(.+\\)?" path) (if (not (re-search-forward
(let* ((account-name (match-string 1 path)) (concat "^" "message-id: *" (regexp-quote article))))
(mailbox-name (match-string 2 path)) (error "Could not find the specified message in this folder"))
(message-id (match-string 3 path)) (vm-isearch-update)
(account-spec (vm-imap-parse-spec-to-list (vm-isearch-narrow)
(vm-imap-spec-for-account account-name))) (vm-preview-current-message)
(mailbox-spec (mapconcat 'identity (vm-summarize)))))
(append (butlast account-spec 4)
(cons mailbox-name
(last account-spec 3)))
":")))
(funcall (cdr (assq 'vm-imap org-link-frame-setup))
mailbox-spec)
(when message-id
(org-vm-select-message (org-add-angle-brackets message-id))))))
(defun org-vm-select-message (message-id)
"Go to the message with message-id in the current folder."
(require 'vm-search)
(sit-for 0.1)
(vm-select-folder-buffer)
(widen)
(let ((case-fold-search t))
(goto-char (point-min))
(if (not (re-search-forward
(concat "^" "message-id: *" (regexp-quote message-id))))
(error "Could not find the specified message in this folder"))
(vm-isearch-update)
(vm-isearch-narrow)
(vm-preview-current-message)
(vm-summarize)))
(provide 'org-vm) (provide 'org-vm)
;;; org-vm.el ends here ;;; org-vm.el ends here

View File

@ -46,13 +46,11 @@
(defcustom org-wl-link-remove-filter nil (defcustom org-wl-link-remove-filter nil
"Remove filter condition if message is filter folder." "Remove filter condition if message is filter folder."
:group 'org-wl :group 'org-wl
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-wl-shimbun-prefer-web-links nil (defcustom org-wl-shimbun-prefer-web-links nil
"If non-nil create web links for shimbun messages." "If non-nil create web links for shimbun messages."
:group 'org-wl :group 'org-wl
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-wl-nntp-prefer-web-links nil (defcustom org-wl-nntp-prefer-web-links nil
@ -60,19 +58,16 @@
When folder name contains string \"gmane\" link to gmane, When folder name contains string \"gmane\" link to gmane,
googlegroups otherwise." googlegroups otherwise."
:type 'boolean :type 'boolean
:version "24.1"
:group 'org-wl) :group 'org-wl)
(defcustom org-wl-disable-folder-check t (defcustom org-wl-disable-folder-check t
"Disable check for new messages when open a link." "Disable check for new messages when open a link."
:type 'boolean :type 'boolean
:version "24.1"
:group 'org-wl) :group 'org-wl)
(defcustom org-wl-namazu-default-index nil (defcustom org-wl-namazu-default-index nil
"Default namazu search index." "Default namazu search index."
:type 'directory :type 'directory
:version "24.1"
:group 'org-wl) :group 'org-wl)
;; Declare external functions and variables ;; Declare external functions and variables

View File

@ -1,5 +1,4 @@
;;; org.el --- Outline-based notes management and organizer ;;; org.el --- Outline-based notes management and organizer
;; Carstens outline-mode for keeping track of everything. ;; Carstens outline-mode for keeping track of everything.
;; Copyright (C) 2004-2012 Free Software Foundation, Inc. ;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
;; ;;
@ -76,7 +75,6 @@
(require 'gnus-sum)) (require 'gnus-sum))
(require 'calendar) (require 'calendar)
(require 'format-spec)
;; Emacs 22 calendar compatibility: Make sure the new variables are available ;; Emacs 22 calendar compatibility: Make sure the new variables are available
(when (fboundp 'defvaralias) (when (fboundp 'defvaralias)
@ -153,7 +151,6 @@ keybinding. By default only Emacs Lisp (which has no
requirements) is loaded." requirements) is loaded."
:group 'org-babel :group 'org-babel
:set 'org-babel-do-load-languages :set 'org-babel-do-load-languages
:version "24.1"
:type '(alist :tag "Babel Languages" :type '(alist :tag "Babel Languages"
:key-type :key-type
(choice (choice
@ -170,10 +167,9 @@ requirements) is loaded."
(const :tag "Fortran" fortran) (const :tag "Fortran" fortran)
(const :tag "Gnuplot" gnuplot) (const :tag "Gnuplot" gnuplot)
(const :tag "Haskell" haskell) (const :tag "Haskell" haskell)
(const :tag "IO" io)
(const :tag "Java" java) (const :tag "Java" java)
(const :tag "Javascript" js) (const :tag "Javascript" js)
(const :tag "LaTeX" latex) (const :tag "Latex" latex)
(const :tag "Ledger" ledger) (const :tag "Ledger" ledger)
(const :tag "Lilypond" lilypond) (const :tag "Lilypond" lilypond)
(const :tag "Maxima" maxima) (const :tag "Maxima" maxima)
@ -188,7 +184,6 @@ requirements) is loaded."
(const :tag "Python" python) (const :tag "Python" python)
(const :tag "Ruby" ruby) (const :tag "Ruby" ruby)
(const :tag "Sass" sass) (const :tag "Sass" sass)
(const :tag "Scala" scala)
(const :tag "Scheme" scheme) (const :tag "Scheme" scheme)
(const :tag "Screen" screen) (const :tag "Screen" screen)
(const :tag "Shell Script" sh) (const :tag "Shell Script" sh)
@ -204,7 +199,6 @@ When non-nil, clones of a subtree don't inherit the ID property.
Otherwise they inherit the ID property with a new unique Otherwise they inherit the ID property with a new unique
identifier." identifier."
:type 'boolean :type 'boolean
:version "24.1"
:group 'org-id) :group 'org-id)
;;; Version ;;; Version
@ -264,7 +258,6 @@ With prefix arg HERE, insert it at point."
(defcustom org-log-buffer-setup-hook nil (defcustom org-log-buffer-setup-hook nil
"Hook that is run after an Org log buffer is created." "Hook that is run after an Org log buffer is created."
:group 'org :group 'org
:version "24.1"
:type 'hook) :type 'hook)
(defvar org-modules) ; defined below (defvar org-modules) ; defined below
@ -434,7 +427,6 @@ already archived entries."
(const :tag "All headlines in active region" t) (const :tag "All headlines in active region" t)
(const :tag "In active region, headlines at the same level than the first one" 'start-level) (const :tag "In active region, headlines at the same level than the first one" 'start-level)
(string :tag "Tags/Property/Todo matcher")) (string :tag "Tags/Property/Todo matcher"))
:version "24.1"
:group 'org-todo :group 'org-todo
:group 'org-archive) :group 'org-archive)
@ -503,7 +495,6 @@ Not all export backends support this, but HTML does.
This option can also be set with the +OPTIONS line, e.g. \"^:nil\"." This option can also be set with the +OPTIONS line, e.g. \"^:nil\"."
:group 'org-startup :group 'org-startup
:group 'org-export-translation :group 'org-export-translation
:version "24.1"
:type '(choice :type '(choice
(const :tag "Always interpret" t) (const :tag "Always interpret" t)
(const :tag "Only with braces" {}) (const :tag "Only with braces" {})
@ -520,7 +511,6 @@ the following lines anywhere in the buffer:
#+STARTUP: beamer" #+STARTUP: beamer"
:group 'org-startup :group 'org-startup
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-startup-align-all-tables nil (defcustom org-startup-align-all-tables nil
@ -541,7 +531,6 @@ the following lines anywhere in the buffer:
#+STARTUP: inlineimages #+STARTUP: inlineimages
#+STARTUP: noinlineimages" #+STARTUP: noinlineimages"
:group 'org-startup :group 'org-startup
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-insert-mode-line-in-empty-file nil (defcustom org-insert-mode-line-in-empty-file nil
@ -1026,25 +1015,23 @@ indentation in a virtual way, i.e. at display time in Emacs."
"Non-nil means `C-a' and `C-e' behave specially in headlines and items. "Non-nil means `C-a' and `C-e' behave specially in headlines and items.
When t, `C-a' will bring back the cursor to the beginning of the When t, `C-a' will bring back the cursor to the beginning of the
headline text, i.e. after the stars and after a possible TODO headline text, i.e. after the stars and after a possible TODO keyword.
keyword. In an item, this will be the position after bullet and In an item, this will be the position after the bullet.
check-box, if any. When the cursor is already at that position, When the cursor is already at that position, another `C-a' will bring
another `C-a' will bring it to the beginning of the line. it to the beginning of the line.
`C-e' will jump to the end of the headline, ignoring the presence `C-e' will jump to the end of the headline, ignoring the presence of tags
of tags in the headline. A second `C-e' will then jump to the in the headline. A second `C-e' will then jump to the true end of the
true end of the line, after any tags. This also means that, when line, after any tags. This also means that, when this variable is
this variable is non-nil, `C-e' also will never jump beyond the non-nil, `C-e' also will never jump beyond the end of the heading of a
end of the heading of a folded section, i.e. not after the folded section, i.e. not after the ellipses.
ellipses.
When set to the symbol `reversed', the first `C-a' or `C-e' works When set to the symbol `reversed', the first `C-a' or `C-e' works normally,
normally, going to the true line boundary first. Only a directly going to the true line boundary first. Only a directly following, identical
following, identical keypress will bring the cursor to the keypress will bring the cursor to the special positions.
special positions.
This may also be a cons cell where the behavior for `C-a' and This may also be a cons cell where the behavior for `C-a' and `C-e' is
`C-e' is set separately." set separately."
:group 'org-edit-structure :group 'org-edit-structure
:type '(choice :type '(choice
(const :tag "off" nil) (const :tag "off" nil)
@ -1081,7 +1068,6 @@ used to kill (part-of) a headline that has hidden text behind it.
Any other non-nil value will result in a query to the user, if it is Any other non-nil value will result in a query to the user, if it is
OK to kill that hidden subtree. When nil, kill without remorse." OK to kill that hidden subtree. When nil, kill without remorse."
:group 'org-edit-structure :group 'org-edit-structure
:version "24.1"
:type '(choice :type '(choice
(const :tag "Do not protect hidden subtrees" nil) (const :tag "Do not protect hidden subtrees" nil)
(const :tag "Protect hidden subtrees with a security query" t) (const :tag "Protect hidden subtrees with a security query" t)
@ -1102,7 +1088,6 @@ smart Make point visible, and do insertion/deletion if it is
allows insertion and backward-delete right before ellipses. allows insertion and backward-delete right before ellipses.
FIXME: maybe in this case we should not even show?" FIXME: maybe in this case we should not even show?"
:group 'org-edit-structure :group 'org-edit-structure
:version "24.1"
:type '(choice :type '(choice
(const :tag "Do not check" nil) (const :tag "Do not check" nil)
(const :tag "Throw error when trying to edit" error) (const :tag "Throw error when trying to edit" error)
@ -1556,7 +1541,6 @@ Changing this requires a restart of Emacs to work correctly."
When nil, the link search tries to match a phrase with all words When nil, the link search tries to match a phrase with all words
in the search text." in the search text."
:group 'org-link-follow :group 'org-link-follow
:version "24.1"
:type '(choice :type '(choice
(const :tag "Use fuzzy text search" nil) (const :tag "Use fuzzy text search" nil)
(const :tag "Match only exact headline" t) (const :tag "Match only exact headline" t)
@ -1565,7 +1549,6 @@ in the search text."
(defcustom org-link-frame-setup (defcustom org-link-frame-setup
'((vm . vm-visit-folder-other-frame) '((vm . vm-visit-folder-other-frame)
(vm-imap . vm-visit-imap-folder-other-frame)
(gnus . org-gnus-no-new-news) (gnus . org-gnus-no-new-news)
(file . find-file-other-window) (file . find-file-other-window)
(wl . wl-other-frame)) (wl . wl-other-frame))
@ -1677,7 +1660,6 @@ single keystroke rather than having to type \"yes\"."
(defcustom org-confirm-shell-link-not-regexp "" (defcustom org-confirm-shell-link-not-regexp ""
"A regexp to skip confirmation for shell links." "A regexp to skip confirmation for shell links."
:group 'org-link-follow :group 'org-link-follow
:version "24.1"
:type 'regexp) :type 'regexp)
(defcustom org-confirm-elisp-link-function 'yes-or-no-p (defcustom org-confirm-elisp-link-function 'yes-or-no-p
@ -1703,7 +1685,6 @@ single keystroke rather than having to type \"yes\"."
(defcustom org-confirm-elisp-link-not-regexp "" (defcustom org-confirm-elisp-link-not-regexp ""
"A regexp to skip confirmation for Elisp links." "A regexp to skip confirmation for Elisp links."
:group 'org-link-follow :group 'org-link-follow
:version "24.1"
:type 'regexp) :type 'regexp)
(defconst org-file-apps-defaults-gnu (defconst org-file-apps-defaults-gnu
@ -1926,7 +1907,6 @@ When bulk-refiling from the agenda, the value `note' is forbidden and
will temporarily be changed to `time'." will temporarily be changed to `time'."
:group 'org-refile :group 'org-refile
:group 'org-progress :group 'org-progress
:version "24.1"
:type '(choice :type '(choice
(const :tag "No logging" nil) (const :tag "No logging" nil)
(const :tag "Record timestamp" time) (const :tag "Record timestamp" time)
@ -2002,7 +1982,6 @@ If you have added new entries to a buffer that might themselves be targets,
you need to clear the cache manually by pressing `C-0 C-c C-w' or, if you you need to clear the cache manually by pressing `C-0 C-c C-w' or, if you
find that easier, `C-u C-u C-u C-c C-w'." find that easier, `C-u C-u C-u C-c C-w'."
:group 'org-refile :group 'org-refile
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-refile-use-outline-path nil (defcustom org-refile-use-outline-path nil
@ -2058,7 +2037,6 @@ don't contain a set of subtrees, but it might be convenient to
do so sometimes: in that case, the first line of the region is do so sometimes: in that case, the first line of the region is
converted to a headline before refiling." converted to a headline before refiling."
:group 'org-refile :group 'org-refile
:version "24.1"
:type 'boolean) :type 'boolean)
(defgroup org-todo nil (defgroup org-todo nil
@ -2535,7 +2513,6 @@ By default this is the first task in a TODO sequence, or the previous state
in a TODO_TYP set. But you can specify another task here. in a TODO_TYP set. But you can specify another task here.
alternatively, set the :REPEAT_TO_STATE: property of the entry." alternatively, set the :REPEAT_TO_STATE: property of the entry."
:group 'org-todo :group 'org-todo
:version "24.1"
:type '(choice (const :tag "Head of sequence" nil) :type '(choice (const :tag "Head of sequence" nil)
(string :tag "Specific state"))) (string :tag "Specific state")))
@ -2620,7 +2597,6 @@ an integer, increasing by 1000 for each priority level.
The user can set a different function here, which should take a string The user can set a different function here, which should take a string
as an argument and return the numeric priority." as an argument and return the numeric priority."
:group 'org-priorities :group 'org-priorities
:version "24.1"
:type 'function) :type 'function)
(defgroup org-time nil (defgroup org-time nil
@ -2762,7 +2738,6 @@ But you can also set a deviating value here.
This may t or nil, or the symbol `org-read-date-prefer-future'." This may t or nil, or the symbol `org-read-date-prefer-future'."
:group 'org-agenda :group 'org-agenda
:group 'org-time :group 'org-time
:version "24.1"
:type '(choice :type '(choice
(const :tag "Use org-read-date-prefer-future" (const :tag "Use org-read-date-prefer-future"
org-read-date-prefer-future) org-read-date-prefer-future)
@ -2797,7 +2772,6 @@ has limited date range is not negligible.
A workaround for this problem is to use diary sexp dates for time A workaround for this problem is to use diary sexp dates for time
stamps outside of this range." stamps outside of this range."
:group 'org-time :group 'org-time
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-read-date-display-live t (defcustom org-read-date-display-live t
@ -2845,7 +2819,6 @@ For example, if `org-extend-today-until' is 8, and it's 4am, then the
\"effective time\" of any timestamps between midnight and 8am will be \"effective time\" of any timestamps between midnight and 8am will be
23:59 of the previous day." 23:59 of the previous day."
:group 'boolean :group 'boolean
:version "24.1"
:type 'integer) :type 'integer)
(defcustom org-edit-timestamp-down-means-later nil (defcustom org-edit-timestamp-down-means-later nil
@ -2919,7 +2892,6 @@ tags in that file can be created dynamically (there are none).
'org-complete-tags-always-offer-all-agenda-tags) 'org-complete-tags-always-offer-all-agenda-tags)
t)))" t)))"
:group 'org-tags :group 'org-tags
:version "24.1"
:type 'boolean) :type 'boolean)
(defvar org-file-tags nil (defvar org-file-tags nil
@ -3088,7 +3060,6 @@ and the clock summary:
(org-entry-get (point) \"Effort\")))) (org-entry-get (point) \"Effort\"))))
(org-minutes-to-hh:mm-string (- effort clocksum))))))" (org-minutes-to-hh:mm-string (- effort clocksum))))))"
:group 'org-properties :group 'org-properties
:version "24.1"
:type 'alist) :type 'alist)
(defcustom org-use-property-inheritance nil (defcustom org-use-property-inheritance nil
@ -3360,9 +3331,7 @@ This is a property list with the following properties:
"Non-nil means signal an error when image creation of LaTeX snippets fails. "Non-nil means signal an error when image creation of LaTeX snippets fails.
When nil, just push out a message." When nil, just push out a message."
:group 'org-latex :group 'org-latex
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-latex-to-mathml-jar-file nil (defcustom org-latex-to-mathml-jar-file nil
"Value of\"%j\" in `org-latex-to-mathml-convert-command'. "Value of\"%j\" in `org-latex-to-mathml-convert-command'.
Use this to specify additional executable file say a jar file. Use this to specify additional executable file say a jar file.
@ -3370,7 +3339,6 @@ Use this to specify additional executable file say a jar file.
When using MathToWeb as the converter, specify the full-path to When using MathToWeb as the converter, specify the full-path to
your mathtoweb.jar file." your mathtoweb.jar file."
:group 'org-latex :group 'org-latex
:version "24.1"
:type '(choice :type '(choice
(const :tag "None" nil) (const :tag "None" nil)
(file :tag "JAR file" :must-match t))) (file :tag "JAR file" :must-match t)))
@ -3388,7 +3356,6 @@ This command is used by `org-create-math-formula'.
When using MathToWeb as the converter, set this to When using MathToWeb as the converter, set this to
\"java -jar %j -unicode -force -df %o %I\"." \"java -jar %j -unicode -force -df %o %I\"."
:group 'org-latex :group 'org-latex
:version "24.1"
:type '(choice :type '(choice
(const :tag "None" nil) (const :tag "None" nil)
(string :tag "\nShell command"))) (string :tag "\nShell command")))
@ -3498,7 +3465,6 @@ compiling LaTeX snippets into images for inclusion into HTML."
:group 'org-export-latex :group 'org-export-latex
:set 'org-set-packages-alist :set 'org-set-packages-alist
:get 'org-get-packages-alist :get 'org-get-packages-alist
:version "24.1"
:type '(repeat :type '(repeat
(choice (choice
(list :tag "options/package pair" (list :tag "options/package pair"
@ -3564,7 +3530,6 @@ lines to the buffer:
For example, a value '(title) for this list will make the document's title For example, a value '(title) for this list will make the document's title
appear in the buffer without the initial #+TITLE: keyword." appear in the buffer without the initial #+TITLE: keyword."
:group 'org-appearance :group 'org-appearance
:version "24.1"
:type '(set (const :tag "#+AUTHOR" author) :type '(set (const :tag "#+AUTHOR" author)
(const :tag "#+DATE" date) (const :tag "#+DATE" date)
(const :tag "#+EMAIL" email) (const :tag "#+EMAIL" email)
@ -3605,13 +3570,11 @@ org-level-* faces."
"Non-nil means show entities as UTF8 characters. "Non-nil means show entities as UTF8 characters.
When nil, the \\name form remains in the buffer." When nil, the \\name form remains in the buffer."
:group 'org-appearance :group 'org-appearance
:version "24.1"
:type 'boolean) :type 'boolean)
(defcustom org-pretty-entities-include-sub-superscripts t (defcustom org-pretty-entities-include-sub-superscripts t
"Non-nil means, pretty entity display includes formatting sub/superscripts." "Non-nil means, pretty entity display includes formatting sub/superscripts."
:group 'org-appearance :group 'org-appearance
:version "24.1"
:type 'boolean) :type 'boolean)
(defvar org-emph-re nil (defvar org-emph-re nil
@ -4581,7 +4544,7 @@ but the stars and the body are.")
(mapcar (lambda (x) (org-split-string x ":")) (mapcar (lambda (x) (org-split-string x ":"))
(org-split-string value))))))) (org-split-string value)))))))
((equal key "DRAWERS") ((equal key "DRAWERS")
(setq drawers (delete-dups (append org-drawers (org-split-string value splitre))))) (setq drawers (org-split-string value splitre)))
((equal key "CONSTANTS") ((equal key "CONSTANTS")
(setq const (append const (org-split-string value splitre)))) (setq const (append const (org-split-string value splitre))))
((equal key "STARTUP") ((equal key "STARTUP")
@ -4931,8 +4894,6 @@ sure that we are at the beginning of the line.")
"Matches an headline, putting stars and text into groups. "Matches an headline, putting stars and text into groups.
Stars are put in group 1 and the trimmed body in group 2.") Stars are put in group 1 and the trimmed body in group 2.")
(defvar bidi-paragraph-direction)
;;;###autoload ;;;###autoload
(define-derived-mode org-mode outline-mode "Org" (define-derived-mode org-mode outline-mode "Org"
"Outline-based notes management and organizer, alias "Outline-based notes management and organizer, alias
@ -5394,7 +5355,6 @@ will be prompted for."
(defcustom org-src-fontify-natively nil (defcustom org-src-fontify-natively nil
"When non-nil, fontify code in code blocks." "When non-nil, fontify code in code blocks."
:type 'boolean :type 'boolean
:version "24.1"
:group 'org-appearance :group 'org-appearance
:group 'org-babel) :group 'org-babel)
@ -6263,36 +6223,34 @@ in special contexts.
(defun org-cycle-internal-global () (defun org-cycle-internal-global ()
"Do the global cycling action." "Do the global cycling action."
;; Hack to avoid display of messages for .org attachments in Gnus (cond
(let ((ga (string-match "\\*fontification" (buffer-name)))) ((and (eq last-command this-command)
(cond (eq org-cycle-global-status 'overview))
((and (eq last-command this-command) ;; We just created the overview - now do table of contents
(eq org-cycle-global-status 'overview)) ;; This can be slow in very large buffers, so indicate action
;; We just created the overview - now do table of contents (run-hook-with-args 'org-pre-cycle-hook 'contents)
;; This can be slow in very large buffers, so indicate action (message "CONTENTS...")
(run-hook-with-args 'org-pre-cycle-hook 'contents) (org-content)
(unless ga (message "CONTENTS...")) (message "CONTENTS...done")
(org-content) (setq org-cycle-global-status 'contents)
(unless ga (message "CONTENTS...done")) (run-hook-with-args 'org-cycle-hook 'contents))
(setq org-cycle-global-status 'contents)
(run-hook-with-args 'org-cycle-hook 'contents))
((and (eq last-command this-command) ((and (eq last-command this-command)
(eq org-cycle-global-status 'contents)) (eq org-cycle-global-status 'contents))
;; We just showed the table of contents - now show everything ;; We just showed the table of contents - now show everything
(run-hook-with-args 'org-pre-cycle-hook 'all) (run-hook-with-args 'org-pre-cycle-hook 'all)
(show-all) (show-all)
(unless ga (message "SHOW ALL")) (message "SHOW ALL")
(setq org-cycle-global-status 'all) (setq org-cycle-global-status 'all)
(run-hook-with-args 'org-cycle-hook 'all)) (run-hook-with-args 'org-cycle-hook 'all))
(t (t
;; Default action: go to overview ;; Default action: go to overview
(run-hook-with-args 'org-pre-cycle-hook 'overview) (run-hook-with-args 'org-pre-cycle-hook 'overview)
(org-overview) (org-overview)
(unless ga (message "OVERVIEW")) (message "OVERVIEW")
(setq org-cycle-global-status 'overview) (setq org-cycle-global-status 'overview)
(run-hook-with-args 'org-cycle-hook 'overview))))) (run-hook-with-args 'org-cycle-hook 'overview))))
(defun org-cycle-internal-local () (defun org-cycle-internal-local ()
"Do the local cycling action." "Do the local cycling action."
@ -9903,22 +9861,6 @@ visibility around point, thus ignoring
pos (match-beginning 0)))) pos (match-beginning 0))))
;; There is an exact target for this ;; There is an exact target for this
(goto-char pos)) (goto-char pos))
((save-excursion
(goto-char (point-min))
(and
(re-search-forward
(format "^[ \t]*#\\+TARGET: %s" (regexp-quote s0)) nil t)
(setq type 'dedicated pos (match-beginning 0))))
;; Found an invisible target.
(goto-char pos))
((save-excursion
(goto-char (point-min))
(and
(re-search-forward
(format "^[ \t]*#\\+NAME: %s" (regexp-quote s0)) nil t)
(setq type 'dedicated pos (match-beginning 0))))
;; Found an element with a matching #+name affiliated keyword.
(goto-char pos))
((and (string-match "^(\\(.*\\))$" s0) ((and (string-match "^(\\(.*\\))$" s0)
(save-excursion (save-excursion
(goto-char (point-min)) (goto-char (point-min))
@ -11100,11 +11042,11 @@ This function can be used in a hook."
(defcustom org-structure-template-alist (defcustom org-structure-template-alist
'( '(
("s" "#+BEGIN_SRC ?\n\n#+END_SRC" ("s" "#+begin_src ?\n\n#+end_src"
"<src lang=\"?\">\n\n</src>") "<src lang=\"?\">\n\n</src>")
("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE" ("e" "#+begin_example\n?\n#+end_example"
"<example>\n?\n</example>") "<example>\n?\n</example>")
("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE" ("q" "#+begin_quote\n?\n#+end_quote"
"<quote>\n?\n</quote>") "<quote>\n?\n</quote>")
("v" "#+BEGIN_VERSE\n?\n#+END_VERSE" ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE"
"<verse>\n?\n</verse>") "<verse>\n?\n</verse>")
@ -11112,17 +11054,17 @@ This function can be used in a hook."
"<center>\n?\n</center>") "<center>\n?\n</center>")
("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX" ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX"
"<literal style=\"latex\">\n?\n</literal>") "<literal style=\"latex\">\n?\n</literal>")
("L" "#+LaTeX: " ("L" "#+latex: "
"<literal style=\"latex\">?</literal>") "<literal style=\"latex\">?</literal>")
("h" "#+BEGIN_HTML\n?\n#+END_HTML" ("h" "#+begin_html\n?\n#+end_html"
"<literal style=\"html\">\n?\n</literal>") "<literal style=\"html\">\n?\n</literal>")
("H" "#+HTML: " ("H" "#+html: "
"<literal style=\"html\">?</literal>") "<literal style=\"html\">?</literal>")
("a" "#+BEGIN_ASCII\n?\n#+END_ASCII") ("a" "#+begin_ascii\n?\n#+end_ascii")
("A" "#+ASCII: ") ("A" "#+ascii: ")
("i" "#+INDEX: ?" ("i" "#+index: ?"
"#+INDEX: ?") "#+index: ?")
("I" "#+INCLUDE %file ?" ("I" "#+include %file ?"
"<include file=%file markup=\"?\">") "<include file=%file markup=\"?\">")
) )
"Structure completion elements. "Structure completion elements.
@ -11134,7 +11076,8 @@ of the `?` in the template.
There are two templates for each key, the first uses the original Org syntax, 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 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 the default when the /org-mtags.el/ module has been loaded. See also the
variable `org-mtags-prefer-muse-templates'." variable `org-mtags-prefer-muse-templates'.
This is an experimental feature, it is undecided if it is going to stay in."
:group 'org-completion :group 'org-completion
:type '(repeat :type '(repeat
(string :tag "Key") (string :tag "Key")
@ -12909,8 +12852,7 @@ headlines matching this string."
;; eval matcher only when the todo condition is OK ;; eval matcher only when the todo condition is OK
(and (or (not todo-only) (member todo org-not-done-keywords)) (and (or (not todo-only) (member todo org-not-done-keywords))
(let ((case-fold-search t) (org-trust-scanner-tags t)) (let ((case-fold-search t)) (eval matcher)))
(eval matcher)))
;; Call the skipper, but return t if it does not skip, ;; Call the skipper, but return t if it does not skip,
;; so that the `and' form continues evaluating ;; so that the `and' form continues evaluating
@ -12949,7 +12891,8 @@ headlines matching this string."
(make-string (1- level) ?.) "") (make-string (1- level) ?.) "")
(org-get-heading)) (org-get-heading))
category category
tags-list) tags-list
)
priority (org-get-priority txt)) priority (org-get-priority txt))
(goto-char lspos) (goto-char lspos)
(setq marker (org-agenda-new-marker)) (setq marker (org-agenda-new-marker))
@ -13349,7 +13292,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
(defun org-set-tags-command (&optional arg just-align) (defun org-set-tags-command (&optional arg just-align)
"Call the set-tags command for the current entry." "Call the set-tags command for the current entry."
(interactive "P") (interactive "P")
(if (or (org-at-heading-p) (and arg (org-before-first-heading-p))) (if (org-at-heading-p)
(org-set-tags arg just-align) (org-set-tags arg just-align)
(save-excursion (save-excursion
(org-back-to-heading t) (org-back-to-heading t)
@ -13403,7 +13346,7 @@ If DATA is nil or the empty string, any tags will be removed."
With prefix ARG, realign all tags in headings in the current buffer." With prefix ARG, realign all tags in headings in the current buffer."
(interactive "P") (interactive "P")
(let* ((re org-outline-regexp-bol) (let* ((re org-outline-regexp-bol)
(current (unless arg (org-get-tags-string))) (current (org-get-tags-string))
(col (current-column)) (col (current-column))
(org-setting-tags t) (org-setting-tags t)
table current-tags inherited-tags ; computed below when needed table current-tags inherited-tags ; computed below when needed
@ -14475,10 +14418,11 @@ formats in the current buffer."
(defun org-insert-property-drawer () (defun org-insert-property-drawer ()
"Insert a property drawer into the current entry." "Insert a property drawer into the current entry."
(interactive)
(org-back-to-heading t) (org-back-to-heading t)
(looking-at org-outline-regexp) (looking-at org-outline-regexp)
(let ((indent (if org-adapt-indentation (let ((indent (if org-adapt-indentation
(- (match-end 0) (match-beginning 0)) (- (match-end 0)(match-beginning 0))
0)) 0))
(beg (point)) (beg (point))
(re (concat "^[ \t]*" org-keyword-time-regexp)) (re (concat "^[ \t]*" org-keyword-time-regexp))
@ -14512,70 +14456,6 @@ formats in the current buffer."
(hide-entry)) (hide-entry))
(org-flag-drawer t)))) (org-flag-drawer t))))
(defun org-insert-drawer (&optional arg drawer)
"Insert a drawer at point.
Optional argument DRAWER, when non-nil, is a string representing
drawer's name. Otherwise, the user is prompted for a name.
If a region is active, insert the drawer around that region
instead.
Point is left between drawer's boundaries."
(interactive "P")
(let* ((logbook (if (stringp org-log-into-drawer) org-log-into-drawer
"LOGBOOK"))
;; SYSTEM-DRAWERS is a list of drawer names that are used
;; internally by Org. They are meant to be inserted
;; automatically.
(system-drawers `("CLOCK" ,logbook "PROPERTIES"))
;; Remove system drawers from list. Note: For some reason,
;; `org-completing-read' ignores the predicate while
;; `completing-read' handles it fine.
(drawer (if arg "PROPERTIES"
(or drawer
(completing-read
"Drawer: " org-drawers
(lambda (d) (not (member d system-drawers))))))))
(cond
;; With C-u, fall back on `org-insert-property-drawer'
(arg (org-insert-property-drawer))
;; With an active region, insert a drawer at point.
((not (org-region-active-p))
(progn
(unless (bolp) (insert "\n"))
(insert (format ":%s:\n\n:END:\n" drawer))
(forward-line -2)))
;; Otherwise, insert the drawer at point
(t
(let ((rbeg (region-beginning))
(rend (copy-marker (region-end))))
(unwind-protect
(progn
(goto-char rbeg)
(beginning-of-line)
(when (save-excursion
(re-search-forward org-outline-regexp-bol rend t))
(error "Drawers cannot contain headlines"))
;; Position point at the beginning of the first
;; non-blank line in region. Insert drawer's opening
;; there, then indent it.
(org-skip-whitespace)
(beginning-of-line)
(insert ":" drawer ":\n")
(forward-line -1)
(indent-for-tab-command)
;; Move point to the beginning of the first blank line
;; after the last non-blank line in region. Insert
;; drawer's closing, then indent it.
(goto-char rend)
(skip-chars-backward " \r\t\n")
(insert "\n:END:")
(indent-for-tab-command)
(unless (eolp) (insert "\n")))
;; Clear marker, whatever the outcome of insertion is.
(set-marker rend nil)))))))
(defvar org-property-set-functions-alist nil (defvar org-property-set-functions-alist nil
"Property set function alist. "Property set function alist.
Each entry should have the following format: Each entry should have the following format:
@ -14924,11 +14804,11 @@ at the cursor, it will be modified."
(insert "--") (insert "--")
(setq time (let ((this-command this-command)) (setq time (let ((this-command this-command))
(org-read-date arg 'totime nil nil (org-read-date arg 'totime nil nil
default-time default-input inactive))) default-time default-input)))
(org-insert-time-stamp time (or org-time-was-given arg) inactive)) (org-insert-time-stamp time (or org-time-was-given arg) inactive))
((org-at-timestamp-p t) ((org-at-timestamp-p t)
(setq time (let ((this-command this-command)) (setq time (let ((this-command this-command))
(org-read-date arg 'totime nil nil default-time default-input inactive))) (org-read-date arg 'totime nil nil default-time default-input)))
(when (org-at-timestamp-p t) ; just to get the match data (when (org-at-timestamp-p t) ; just to get the match data
; (setq inactive (eq (char-after (match-beginning 0)) ?\[)) ; (setq inactive (eq (char-after (match-beginning 0)) ?\[))
(replace-match "") (replace-match "")
@ -14943,7 +14823,7 @@ at the cursor, it will be modified."
(message "Timestamp updated")) (message "Timestamp updated"))
(t (t
(setq time (let ((this-command this-command)) (setq time (let ((this-command this-command))
(org-read-date arg 'totime nil nil default-time default-input inactive))) (org-read-date arg 'totime nil nil default-time default-input)))
(org-insert-time-stamp time (or org-time-was-given arg) inactive (org-insert-time-stamp time (or org-time-was-given arg) inactive
nil nil (list org-end-time-was-given)))))) nil nil (list org-end-time-was-given))))))
@ -14989,10 +14869,9 @@ So these are more for recording a certain time/date."
(defvar org-read-date-final-answer nil) (defvar org-read-date-final-answer nil)
(defvar org-read-date-analyze-futurep nil) (defvar org-read-date-analyze-futurep nil)
(defvar org-read-date-analyze-forced-year nil) (defvar org-read-date-analyze-forced-year nil)
(defvar org-read-date-inactive)
(defun org-read-date (&optional with-time to-time from-string prompt (defun org-read-date (&optional with-time to-time from-string prompt
default-time default-input inactive) default-time default-input)
"Read a date, possibly a time, and make things smooth for the user. "Read a date, possibly a time, and make things smooth for the user.
The prompt will suggest to enter an ISO date, but you can also enter anything The prompt will suggest to enter an ISO date, but you can also enter anything
which will at least partially be understood by `parse-time-string'. which will at least partially be understood by `parse-time-string'.
@ -15141,7 +15020,6 @@ user."
(unwind-protect (unwind-protect
(progn (progn
(use-local-map map) (use-local-map map)
(setq org-read-date-inactive inactive)
(add-hook 'post-command-hook 'org-read-date-display) (add-hook 'post-command-hook 'org-read-date-display)
(setq org-ans0 (read-string prompt default-input (setq org-ans0 (read-string prompt default-input
'org-read-date-history nil)) 'org-read-date-history nil))
@ -15212,9 +15090,7 @@ user."
(and (boundp 'org-time-was-given) org-time-was-given)) (and (boundp 'org-time-was-given) org-time-was-given))
(cdr fmts) (cdr fmts)
(car fmts))) (car fmts)))
(txt (format-time-string fmt (apply 'encode-time f))) (txt (concat "=> " (format-time-string fmt (apply 'encode-time f)))))
(txt (if org-read-date-inactive (concat "[" (substring txt 1 -1) "]") txt))
(txt (concat "=> " txt)))
(when (and org-end-time-was-given (when (and org-end-time-was-given
(string-match org-plain-time-of-day-regexp txt)) (string-match org-plain-time-of-day-regexp txt))
(setq txt (concat (substring txt 0 (match-end 0)) "-" (setq txt (concat (substring txt 0 (match-end 0)) "-"
@ -16300,7 +16176,6 @@ minutes.
For example, if the value of this variable is ((\"hours\" . 60)), then an For example, if the value of this variable is ((\"hours\" . 60)), then an
effort string \"2hours\" is equivalent to 120 minutes." effort string \"2hours\" is equivalent to 120 minutes."
:group 'org-agenda :group 'org-agenda
:version "24.1"
:type '(alist :key-type (string :tag "Modifier") :type '(alist :key-type (string :tag "Modifier")
:value-type (number :tag "Minutes"))) :value-type (number :tag "Minutes")))
@ -17011,8 +16886,6 @@ Some of the options can be changed using the variable
(error "Unknown conversion type %s for latex fragments" (error "Unknown conversion type %s for latex fragments"
processing-type))))))))) processing-type)))))))))
(declare-function format-spec "format-spec" (format specification))
(defun org-create-math-formula (latex-frag &optional mathml-file) (defun org-create-math-formula (latex-frag &optional mathml-file)
"Convert LATEX-FRAG to MathML and store it in MATHML-FILE. "Convert LATEX-FRAG to MathML and store it in MATHML-FILE.
Use `org-latex-to-mathml-convert-command'. If the conversion is Use `org-latex-to-mathml-convert-command'. If the conversion is
@ -17455,7 +17328,6 @@ BEG and END default to the buffer boundaries."
(org-defkey org-mode-map "\C-c$" 'org-archive-subtree) (org-defkey org-mode-map "\C-c$" 'org-archive-subtree)
(org-defkey org-mode-map "\C-c\C-x\C-s" 'org-advertized-archive-subtree) (org-defkey org-mode-map "\C-c\C-x\C-s" 'org-advertized-archive-subtree)
(org-defkey org-mode-map "\C-c\C-x\C-a" 'org-archive-subtree-default) (org-defkey org-mode-map "\C-c\C-x\C-a" 'org-archive-subtree-default)
(org-defkey org-mode-map "\C-c\C-xd" 'org-insert-drawer)
(org-defkey org-mode-map "\C-c\C-xa" 'org-toggle-archive-tag) (org-defkey org-mode-map "\C-c\C-xa" 'org-toggle-archive-tag)
(org-defkey org-mode-map "\C-c\C-xA" 'org-archive-to-archive-sibling) (org-defkey org-mode-map "\C-c\C-xA" 'org-archive-to-archive-sibling)
(org-defkey org-mode-map "\C-c\C-xb" 'org-tree-to-indirect-buffer) (org-defkey org-mode-map "\C-c\C-xb" 'org-tree-to-indirect-buffer)
@ -17520,7 +17392,6 @@ BEG and END default to the buffer boundaries."
(org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull) (org-defkey org-mode-map "\C-c\C-x\C-mg" 'org-mobile-pull)
(org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push) (org-defkey org-mode-map "\C-c\C-x\C-mp" 'org-mobile-push)
(org-defkey org-mode-map "\C-c@" 'org-mark-subtree) (org-defkey org-mode-map "\C-c@" 'org-mark-subtree)
(org-defkey org-mode-map "\C-c\C-@" 'org-mark-list)
(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree) (org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree) ;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)
@ -17692,7 +17563,6 @@ be one of an interactive command, a function, or a form.
Set `org-use-speed-commands' to non-nil value to enable this Set `org-use-speed-commands' to non-nil value to enable this
hook. The default setting is `org-speed-command-default-hook'." hook. The default setting is `org-speed-command-default-hook'."
:group 'org-structure :group 'org-structure
:version "24.1"
:type 'hook) :type 'hook)
(defun org-self-insert-command (N) (defun org-self-insert-command (N)
@ -18126,16 +17996,14 @@ See the individual commands for more information."
(t (call-interactively 'backward-word)))) (t (call-interactively 'backward-word))))
(defun org-metaright (&optional arg) (defun org-metaright (&optional arg)
"Demote a subtree, a list item or move table column to right. "Demote subtree or move table column to right.
In front of a drawer or a block keyword, indent it correctly. Calls `org-do-demote' or `org-table-move-column', depending on context.
With no specific context, calls the Emacs default `forward-word'. With no specific context, calls the Emacs default `forward-word'.
See the individual commands for more information." See the individual commands for more information."
(interactive "P") (interactive "P")
(cond (cond
((run-hook-with-args-until-success 'org-metaright-hook)) ((run-hook-with-args-until-success 'org-metaright-hook))
((org-at-table-p) (call-interactively 'org-table-move-column)) ((org-at-table-p) (call-interactively 'org-table-move-column))
((org-at-drawer-p) (call-interactively 'org-indent-drawer))
((org-at-block-p) (call-interactively 'org-indent-block))
((org-with-limited-levels ((org-with-limited-levels
(or (org-at-heading-p) (or (org-at-heading-p)
(and (org-region-active-p) (and (org-region-active-p)
@ -18658,8 +18526,7 @@ Calls `org-table-next-row' or `newline', depending on context.
See the individual commands for more information." See the individual commands for more information."
(interactive) (interactive)
(cond (cond
((or (bobp) (org-in-src-block-p)) ((bobp) (if indent (newline-and-indent) (newline)))
(if indent (newline-and-indent) (newline)))
((org-at-table-p) ((org-at-table-p)
(org-table-justify-field-maybe) (org-table-justify-field-maybe)
(call-interactively 'org-table-next-row)) (call-interactively 'org-table-next-row))
@ -18954,8 +18821,6 @@ See the individual commands for more information."
(interactive "P") (interactive "P")
(cond (cond
((run-hook-with-args-until-success 'org-metareturn-hook)) ((run-hook-with-args-until-success 'org-metareturn-hook))
((or (org-at-drawer-p) (org-at-property-p))
(newline-and-indent))
((org-at-table-p) ((org-at-table-p)
(call-interactively 'org-table-wrap-region)) (call-interactively 'org-table-wrap-region))
(t (call-interactively 'org-insert-heading)))) (t (call-interactively 'org-insert-heading))))
@ -19682,14 +19547,6 @@ and end of string."
"Is S an ID created by UUIDGEN?" "Is S an ID created by UUIDGEN?"
(string-match "\\`[0-9a-f]\\{8\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{12\\}\\'" (downcase s))) (string-match "\\`[0-9a-f]\\{8\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{4\\}-[0-9a-f]\\{12\\}\\'" (downcase s)))
(defun org-in-src-block-p nil
"Whether point is in a code source block."
(let (ov)
(when (setq ov (overlays-at (point)))
(memq 'org-block-background
(overlay-properties
(car ov))))))
(defun org-context () (defun org-context ()
"Return a list of contexts of the current cursor position. "Return a list of contexts of the current cursor position.
If several contexts apply, all are returned. If several contexts apply, all are returned.
@ -19708,10 +19565,8 @@ contexts are:
:table in an org-mode table :table in an org-mode table
:table-special on a special filed in a table :table-special on a special filed in a table
:table-table in a table.el table :table-table in a table.el table
:clocktable in a clocktable
:src-block in a source block
:link on a hyperlink :link on a hyperlink
:keyword on a keyword: SCHEDULED, DEADLINE, CLOSE, COMMENT, QUOTE. :keyword on a keyword: SCHEDULED, DEADLINE, CLOSE,COMMENT, QUOTE.
:target on a <<target>> :target on a <<target>>
:radio-target on a <<<radio-target>>> :radio-target on a <<<radio-target>>>
:latex-fragment on a LaTeX fragment :latex-fragment on a LaTeX fragment
@ -19722,7 +19577,6 @@ faces as a help to recognize the following contexts: :table-special, :link,
and :keyword." and :keyword."
(let* ((f (get-text-property (point) 'face)) (let* ((f (get-text-property (point) 'face))
(faces (if (listp f) f (list f))) (faces (if (listp f) f (list f)))
(case-fold-search t)
(p (point)) clist o) (p (point)) clist o)
;; First the large context ;; First the large context
(cond (cond
@ -19757,23 +19611,6 @@ and :keyword."
(push (list :table-table) clist))) (push (list :table-table) clist)))
(goto-char p) (goto-char p)
;; New the "medium" contexts: clocktables, source blocks
(cond ((org-in-clocktable-p)
(push (list :clocktable
(and (or (looking-at "#\\+BEGIN: clocktable")
(search-backward "#+BEGIN: clocktable" nil t))
(match-beginning 0))
(and (re-search-forward "#\\+END:?" nil t)
(match-end 0))) clist))
((org-in-src-block-p)
(push (list :src-block
(and (or (looking-at "#\\+BEGIN_SRC")
(search-backward "#+BEGIN_SRC" nil t))
(match-beginning 0))
(and (search-forward "#+END_SRC" nil t)
(match-beginning 0))) clist)))
(goto-char p)
;; Now the small context ;; Now the small context
(cond (cond
((org-at-timestamp-p) ((org-at-timestamp-p)
@ -20310,47 +20147,6 @@ If point is in an inline task, mark that task instead."
t t)) t t))
(org-move-to-column column))) (org-move-to-column column)))
(defun org-indent-drawer ()
"Indent the drawer at point."
(interactive)
(let ((p (point))
(e (and (save-excursion (re-search-forward ":END:" nil t))
(match-end 0)))
(folded
(save-excursion
(end-of-line)
(when (overlays-at (point))
(member 'invisible (overlay-properties
(car (overlays-at (point)))))))))
(when folded (org-cycle))
(indent-for-tab-command)
(while (and (move-beginning-of-line 2) (< (point) e))
(indent-for-tab-command))
(goto-char p)
(when folded (org-cycle)))
(message "Drawer at point indented"))
(defun org-indent-block ()
"Indent the block at point."
(interactive)
(let ((p (point))
(case-fold-search t)
(e (and (save-excursion (re-search-forward "#\\+end_?\\(?:[a-z]+\\)?" nil t))
(match-end 0)))
(folded
(save-excursion
(end-of-line)
(when (overlays-at (point))
(member 'invisible (overlay-properties
(car (overlays-at (point)))))))))
(when folded (org-cycle))
(indent-for-tab-command)
(while (and (move-beginning-of-line 2) (< (point) e))
(indent-for-tab-command))
(goto-char p)
(when folded (org-cycle)))
(message "Block at point indented"))
(defvar org-adaptive-fill-regexp-backup adaptive-fill-regexp (defvar org-adaptive-fill-regexp-backup adaptive-fill-regexp
"Variable to store copy of `adaptive-fill-regexp'. "Variable to store copy of `adaptive-fill-regexp'.
Since `adaptive-fill-regexp' is set to never match, we need to Since `adaptive-fill-regexp' is set to never match, we need to
@ -20395,11 +20191,10 @@ the functionality can be provided as a fall-back.")
(org-set-local 'fill-paragraph-function 'org-fill-paragraph) (org-set-local 'fill-paragraph-function 'org-fill-paragraph)
;; Prevent auto-fill from inserting unwanted new items. ;; Prevent auto-fill from inserting unwanted new items.
(if (boundp 'fill-nobreak-predicate) (if (boundp 'fill-nobreak-predicate)
(org-set-local (org-set-local 'fill-nobreak-predicate
'fill-nobreak-predicate (if (memq 'org-fill-item-nobreak-p fill-nobreak-predicate)
(org-uniquify fill-nobreak-predicate
(append fill-nobreak-predicate (cons 'org-fill-item-nobreak-p fill-nobreak-predicate))))
'(org-fill-item-nobreak-p org-fill-line-break-nobreak-p)))))
;; Adaptive filling: To get full control, first make sure that ;; Adaptive filling: To get full control, first make sure that
;; `adaptive-fill-regexp' never matches. Then install our own matcher. ;; `adaptive-fill-regexp' never matches. Then install our own matcher.
(unless (local-variable-p 'adaptive-fill-regexp (current-buffer)) (unless (local-variable-p 'adaptive-fill-regexp (current-buffer))
@ -20419,13 +20214,6 @@ the functionality can be provided as a fall-back.")
"Non-nil when a line break at point would insert a new item." "Non-nil when a line break at point would insert a new item."
(and (looking-at (org-item-re)) (org-list-in-valid-context-p))) (and (looking-at (org-item-re)) (org-list-in-valid-context-p)))
(defun org-fill-line-break-nobreak-p ()
"Non-nil when a line break at point would create an Org line break."
(save-excursion
(skip-chars-backward "[ \t]")
(skip-chars-backward "\\\\")
(looking-at "\\\\\\\\\\($\\|[^\\\\]\\)")))
(defun org-fill-paragraph (&optional justify) (defun org-fill-paragraph (&optional justify)
"Re-align a table, pass through to fill-paragraph if no table." "Re-align a table, pass through to fill-paragraph if no table."
(let ((table-p (org-at-table-p)) (let ((table-p (org-at-table-p))
@ -20763,8 +20551,7 @@ depending on context."
(if (or (eq org-ctrl-k-protect-subtree 'error) (if (or (eq org-ctrl-k-protect-subtree 'error)
(not (y-or-n-p "Kill hidden subtree along with headline? "))) (not (y-or-n-p "Kill hidden subtree along with headline? ")))
(error "C-k aborted - would kill hidden subtree"))) (error "C-k aborted - would kill hidden subtree")))
(call-interactively (call-interactively 'kill-line))
(if visual-line-mode 'kill-visual-line 'kill-line)))
((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$")) ((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$"))
(kill-region (point) (match-beginning 1)) (kill-region (point) (match-beginning 1))
(org-set-tags nil t)) (org-set-tags nil t))
@ -20919,17 +20706,11 @@ This version does not only check the character property, but also
(defalias 'org-on-heading-p 'org-at-heading-p) (defalias 'org-on-heading-p 'org-at-heading-p)
(defun org-at-drawer-p nil (defun org-at-drawer-p nil
"Is cursor at a drawer keyword?" "Whether point is at a drawer."
(save-excursion (save-excursion
(move-beginning-of-line 1) (move-beginning-of-line 1)
(looking-at org-drawer-regexp))) (looking-at org-drawer-regexp)))
(defun org-at-block-p nil
"Is cursor at a block keyword?"
(save-excursion
(move-beginning-of-line 1)
(looking-at org-block-regexp)))
(defun org-point-at-end-of-empty-headline () (defun org-point-at-end-of-empty-headline ()
"If point is at the end of an empty headline, return t, else nil. "If point is at the end of an empty headline, return t, else nil.
If the heading only contains a TODO keyword, it is still still considered If the heading only contains a TODO keyword, it is still still considered

View File

@ -7,70 +7,40 @@
:END: :END:
#+name: noweb-example #+name: noweb-example
#+begin_src emacs-lisp :results silent :exports code #+begin_src emacs-lisp
(message "expanded1") (message "expanded")
#+end_src #+end_src
#+name: noweb-example2 #+begin_src emacs-lisp :noweb yes
#+begin_src emacs-lisp :results silent ;; noweb-yes-start
(message "expanded2")
#+end_src
#+begin_src emacs-lisp :noweb yes :results silent
;; noweb-1-yes-start
<<noweb-example>> <<noweb-example>>
;; noweb-yes-end
#+end_src #+end_src
#+begin_src emacs-lisp :noweb no :results silent #+begin_src emacs-lisp :noweb no
;; noweb-no-start ;; noweb-no-start
<<noweb-example1>> <<noweb-example>>
;; noweb-no-end
#+end_src #+end_src
#+begin_src emacs-lisp :noweb yes :results silent #+begin_src emacs-lisp :noweb tangle
;; noweb-2-yes-start
<<noweb-example2>>
#+end_src
#+begin_src emacs-lisp :noweb tangle :results silent
;; noweb-tangle-start ;; noweb-tangle-start
<<noweb-example1>> <<noweb-example>>
<<noweb-example2>> ;; noweb-tangle-end
#+end_src #+end_src
* =:noweb= header argument expansion using :exports results * elisp forms in header arguments
:PROPERTIES: :PROPERTIES:
:ID: 8701beb4-13d9-468c-997a-8e63e8b66f8d :ID: 22d67284-bf14-4cdc-8319-f4bd876829d7
:var: prop=(+ 2 2)
:END: :END:
#+name: noweb-example #+begin_src emacs-lisp
#+begin_src emacs-lisp :exports results prop
(message "expanded1")
#+end_src #+end_src
#+name: noweb-example2 #+name:
#+begin_src emacs-lisp :exports results : 4
(message "expanded2")
#+end_src
#+begin_src emacs-lisp :noweb yes :exports results
;; noweb-1-yes-start
<<noweb-example>>
#+end_src
#+begin_src emacs-lisp :noweb no :exports code
;; noweb-no-start
<<noweb-example1>>
#+end_src
#+begin_src emacs-lisp :noweb yes :exports results
;; noweb-2-yes-start
<<noweb-example2>>
#+end_src
#+begin_src emacs-lisp :noweb tangle :exports code
<<noweb-example1>>
<<noweb-example2>>
#+end_src
* excessive id links on tangling * excessive id links on tangling
:PROPERTIES: :PROPERTIES:
@ -89,6 +59,42 @@
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(message "for tangling") (message "for tangling")
#+end_src #+end_src
* simple variable resolution
:PROPERTIES:
:ID: f68821bc-7f49-4389-85b5-914791ee3718
:END:
#+name: four
#+begin_src emacs-lisp
(list 1 2 3 4)
#+end_src
#+begin_src emacs-lisp :var four=four
(length four)
#+end_src
#+name:
: 4
* multi-line header arguments
:PROPERTIES:
:ID: b77c8857-6c76-4ea9-8a61-ddc2648d96c4
:END:
#+headers: :var letters='(a b c d e f g)
#+begin_src emacs-lisp :var numbers='(1 2 3 4 5 6 7)
(map 'list #'list numbers letters)
#+end_src
#+name:
| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |
* simple named code block * simple named code block
:PROPERTIES: :PROPERTIES:
:ID: 0d82b52d-1bb9-4916-816b-2c67c8108dbb :ID: 0d82b52d-1bb9-4916-816b-2c67c8108dbb
@ -105,7 +111,7 @@
#+name: i-have-a-name #+name: i-have-a-name
: 42 : 42
* Pascal's Triangle -- exports both test * Pascal's Triangle -- export test
:PROPERTIES: :PROPERTIES:
:ID: 92518f2a-a46a-4205-a3ab-bcce1008a4bb :ID: 92518f2a-a46a-4205-a3ab-bcce1008a4bb
:END: :END:
@ -196,24 +202,29 @@ Here is one in the middle src_sh{echo 1} of a line.
Here is one at the end of a line. src_sh{echo 2} Here is one at the end of a line. src_sh{echo 2}
src_sh{echo 3} Here is one at the beginning of a line. src_sh{echo 3} Here is one at the beginning of a line.
* mixed blocks with exports both * parsing header arguments
:PROPERTIES:
:ID: 7eb0dc6e-1c53-4275-88b3-b22f3113b9c3
:END:
#+begin_src example-lang :session :results output :var num=9
the body
#+end_src
* conflicting blocks on export
:PROPERTIES: :PROPERTIES:
:ID: 5daa4d03-e3ea-46b7-b093-62c1b7632df3 :ID: 5daa4d03-e3ea-46b7-b093-62c1b7632df3
:END: :END:
#+name: a-list #+name: a-list
- a - a
- b - b
- c - c
#+begin_src emacs-lisp :exports both #+begin_src emacs-lisp :results wrap :exports both
"code block results" "code block results"
#+end_src #+end_src
#+begin_src emacs-lisp :var lst=a-list :results list
#+begin_src emacs-lisp :var lst=a-list :results list :exports both
(reverse lst) (reverse lst)
#+end_src #+end_src
* using the =:noweb-ref= header argument * using the =:noweb-ref= header argument
:PROPERTIES: :PROPERTIES:
:ID: 54d68d4b-1544-4745-85ab-4f03b3cbd8a0 :ID: 54d68d4b-1544-4745-85ab-4f03b3cbd8a0
@ -279,35 +290,24 @@ src_sh{echo "One"} block at start of line
One spaced block in src_sh{ echo "middle" } of line One spaced block in src_sh{ echo "middle" } of line
src_sh{echo 2} blocks on the src_emacs-lisp{"same"} line src_sh{echo 2} blocks on the src_emacs-lisp{"same"} line
Inline block with src_sh[:results silent]{ echo "parameters" }. Inline block with src_sh[:results silent]{ echo "parameters" }.
* exporting a code block with a name * returning file names -- interpreted as lists
:PROPERTIES: :PROPERTIES:
:ID: b02ddd8a-eeb8-42ab-8664-8a759e6f43d9 :ID: a73a2ab6-b8b2-4c0e-ae7f-23ad14eab7bc
:END: :END:
exporting a code block with a name #+begin_src sh :results scalar
#+name: qux echo "[[file:./cv.cls]]"
#+begin_src sh :foo "baz"
echo bar
#+end_src #+end_src
* noweb no-export and exports both
:PROPERTIES:
:ID: 8a820f6c-7980-43db-8a24-0710d33729c9
:END:
Weird interaction.
here is one block #+name:
: [[file:./cv.cls]]
#+name: noweb-no-export-and-exports-both-1 #+begin_src sh :results raw scalar
#+BEGIN_SRC sh :exports none echo "[[file:./cv.cls]]"
echo 1 #+end_src
#+END_SRC
and another #+name:
[[file:./cv.cls]]
#+BEGIN_SRC sh :noweb no-export :exports both
# I am inside the code block
<<noweb-no-export-and-exports-both-1>>
#+END_SRC
* in order evaluation on export * in order evaluation on export
:PROPERTIES: :PROPERTIES:
@ -335,23 +335,3 @@ Fifth
#+begin_src emacs-lisp #+begin_src emacs-lisp
(push 5 *evaluation-collector*) (push 5 *evaluation-collector*)
#+end_src #+end_src
* exporting more than just results from a call line
:PROPERTIES:
:ID: bec63a04-491e-4caa-97f5-108f3020365c
:END:
Here is a call line with more than just the results exported.
#+call: double(8)
* strip noweb references on export
:PROPERTIES:
:ID: 8e7bd234-99b2-4b14-8cd6-53945e409775
:END:
#+name: strip-export-1
#+BEGIN_SRC sh :exports none
i="10"
#+END_SRC
#+BEGIN_SRC sh :noweb strip-export :exports code :results silent
<<strip-export-1>>
echo "1$i"
#+END_SRC

View File

@ -16,13 +16,3 @@ Here are a couple of code blocks.
;; 94839181-184f-4ff4-a72f-94214df6f5ba ;; 94839181-184f-4ff4-a72f-94214df6f5ba
(message "I am code") (message "I am code")
#+end_src #+end_src
* accumulating properties in drawers
:PROPERTIES:
:var+: bar=2
:var: foo=1
:ID: 75282ba2-f77a-4309-a970-e87c149fe125
:END:
#+begin_src emacs-lisp :results silent
(list bar foo)
#+end_src

View File

@ -1,14 +1,4 @@
;;; test-ob-awk.el --- tests for ob-awk.el (require 'ob-C)
;; Copyright (c) 2010-2012 Sergey Litvinov
;; Authors: Sergey Litvinov
;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code:
(unless (featurep 'ob-C)
(signal 'missing-test-dependency "Support for C code blocks"))
(ert-deftest ob-C/assert () (ert-deftest ob-C/assert ()
(should t)) (should t))

View File

@ -1,17 +1,23 @@
;;; test-ob-R.el --- tests for ob-R.el ;;; test-ob-R.el --- tests for ob-R.el
;; Copyright (c) 2011-2012 Eric Schulte ;; Copyright (c) 2011 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code:
(org-test-for-executable "R") (org-test-for-executable "R")
(unless (featurep 'ess) (unless (featurep 'ess)
(signal 'missing-test-dependency "ESS")) (signal 'missing-test-dependency "ESS"))
(unless (featurep 'ob-R)
(signal 'missing-test-dependency "Support for R code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-R)
(ert-deftest test-ob-R/simple-session () (ert-deftest test-ob-R/simple-session ()
(org-test-with-temp-text (org-test-with-temp-text

View File

@ -1,15 +1,21 @@
;;; test-ob-awk.el --- tests for ob-awk.el ;;; test-ob-awk.el --- tests for ob-awk.el
;; Copyright (c) 2010-2012 Sergey Litvinov ;; Copyright (c) 2010 Sergey Litvinov
;; Authors: Sergey Litvinov ;; Authors: Sergey Litvinov
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code:
(org-test-for-executable "awk") (org-test-for-executable "awk")
(unless (featurep 'ob-awk)
(signal 'missing-test-dependency "Support for Awk code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-awk)
(ert-deftest ob-awk/input-none () (ert-deftest ob-awk/input-none ()
"Test with no input file" "Test with no input file"

View File

@ -10,7 +10,19 @@
;; Org-mode tests for ob-emacs-lisp.el live here ;; Org-mode tests for ob-emacs-lisp.el live here
;;; Code: ;;; Code:
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
(ert-deftest ob-emacs-lisp/commented-last-block-line-no-var () (ert-deftest ob-emacs-lisp/commented-last-block-line-no-var ()
(org-test-with-temp-text-in-file " (org-test-with-temp-text-in-file "
#+begin_src emacs-lisp #+begin_src emacs-lisp

View File

@ -1,6 +1,6 @@
;;; test-ob-exp.el ;;; test-ob-exp.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
@ -10,7 +10,17 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
(ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers () (ert-deftest test-ob-exp/org-babel-exp-src-blocks/w-no-headers ()
"Testing export without any headlines in the org-mode file." "Testing export without any headlines in the org-mode file."
(let ((html-file (concat (file-name-sans-extension org-test-no-heading-file) (let ((html-file (concat (file-name-sans-extension org-test-no-heading-file)
@ -55,164 +65,43 @@
(should-not (file-exists-p (concat org-test-link-in-heading-file "::"))) (should-not (file-exists-p (concat org-test-link-in-heading-file "::")))
(when (file-exists-p html-file) (delete-file html-file)))) (when (file-exists-p html-file) (delete-file html-file))))
(ert-deftest ob-exp/noweb-on-export () ;; TODO
"Noweb header arguments export correctly. ;; (ert-deftest ob-exp/noweb-on-export ()
- yes expand on both export and tangle ;; "Noweb header arguments export correctly.
- no expand on neither export or tangle ;; - yes expand on both export and tangle
- tangle expand on only tangle not export" ;; - no expand on neither export or tangle
(org-test-at-id "eb1f6498-5bd9-45e0-9c56-50717053e7b7" ;; - tangle expand on only tangle not export"
(org-narrow-to-subtree) ;; (let (html)
(let ((exported-html ;; (org-test-at-id "eb1f6498-5bd9-45e0-9c56-50717053e7b7"
(org-export-as-html nil nil nil 'string 'body-only)) ;; (org-narrow-to-subtree)
(test-point 0)) ;; (let ((arg nil)
;; )
;; (mapcar (lambda (x)
;; (should (equal ""
;; (org-export-as-html nil
;; nil
;; nil
;; 'string))))
;; '("yes" "no" "tangle"))))))
(org-test-with-temp-text-in-file
exported-html
;; check following ouput exists and in order ;; TODO Test broken (args-out-of-range 1927 3462)
(mapcar (lambda (x) ;; (ert-deftest ob-exp/exports-both ()
(should (< test-point ;; "Test the :exports both header argument.
(re-search-forward ;; The code block should create both <pre></pre> and <table></table>
x ;; elements in the final html."
nil t))) ;; (let (html)
(setq test-point (point))) ;; (org-test-at-id "92518f2a-a46a-4205-a3ab-bcce1008a4bb"
'("<code>:noweb</code> header argument expansion" ;; (org-narrow-to-subtree)
"message" "expanded1" ;; (setq html (org-export-as-html nil nil nil 'string))
"message" "expanded2" ;; (should (string-match "<pre.*>[^\000]*</pre>" html))
"noweb-1-yes-start" ;; (should (string-match "<table.*>[^\000]*</table>" html)))))
"message" "expanded1"
"noweb-no-start"
"&lt;&lt;noweb-example1&gt;&gt;"
"noweb-2-yes-start"
"message" "expanded2"
"noweb-tangle-start"
"&lt;&lt;noweb-example1&gt;&gt;"
"&lt;&lt;noweb-example2&gt;&gt;"))))))
(ert-deftest ob-exp/noweb-on-export-with-exports-results () ;; TODO Test Broken - causes ert to go off into the weeds
"Noweb header arguments export correctly using :exports results. ;; (ert-deftest ob-exp/export-subtree ()
- yes expand on both export and tangle ;; (org-test-at-id "5daa4d03-e3ea-46b7-b093-62c1b7632df3"
- no expand on neither export or tangle ;; (org-mark-subtree)
- tangle expand on only tangle not export" ;; (org-export-as-latex nil)))
(org-test-at-id "8701beb4-13d9-468c-997a-8e63e8b66f8d"
(org-narrow-to-subtree)
(let ((exported-html
(org-export-as-html nil nil nil 'string 'body-only))
(test-point 0))
(org-test-with-temp-text-in-file
exported-html
;; check following ouput exists and in order
(mapcar (lambda (x)
(should (< test-point
(re-search-forward
x
nil t)))
(setq test-point (point)))
'("<code>:noweb</code> header argument expansion using :exports results"
"expanded1"
"expanded2"
"expanded1"
"noweb-no-start"
"&lt;&lt;noweb-example1&gt;&gt;"
"expanded2"
"&lt;&lt;noweb-example1&gt;&gt;"
"&lt;&lt;noweb-example2&gt;&gt;"))))))
(ert-deftest ob-exp/exports-both ()
"Test the :exports both header argument.
The code block should create both <pre></pre> and <table></table>
elements in the final html."
(org-test-at-id "92518f2a-a46a-4205-a3ab-bcce1008a4bb"
(org-narrow-to-subtree)
(let ((exported-html
(org-export-as-html nil nil nil 'string 'body-only))
(test-point 0))
(org-test-with-temp-text-in-file
exported-html
;; check following ouput exists and in order
(mapcar (lambda (x)
(should (< test-point
(re-search-forward
x
nil t)))
(setq test-point (point)))
'( "Pascal's Triangle &ndash; exports both test"
"<pre"
"defun" "pascals-triangle"
"if""list""list""let*""prev-triangle"
"pascals-triangle""prev-row""car""reverse""prev-triangle"
"append""prev-triangle""list""map""list"
"append""prev-row""append""prev-row""pascals-triangle"
"</pre>"
"<table""<tbody>"
"<tr>"">1<""</tr>"
"<tr>"">1<"">1<""</tr>"
"<tr>"">1<"">2<"">1<""</tr>"
"<tr>"">1<"">3<"">3<"">1<""</tr>"
"<tr>"">1<"">4<"">6<"">4<"">1<""</tr>"
"<tr>"">1<"">5<"">10<"">10<"">5<"">1<""</tr>"
"</tbody>""</table>"))))))
(ert-deftest ob-exp/mixed-blocks-with-exports-both ()
(org-test-at-id "5daa4d03-e3ea-46b7-b093-62c1b7632df3"
(org-narrow-to-subtree)
(let ((exported-html
(org-export-as-html nil nil nil 'string 'body-only))
(test-point 0))
(org-test-with-temp-text-in-file
exported-html
;; check following ouput exists and in order
(mapcar (lambda (x)
(should (< test-point
(re-search-forward
x
nil t)))
(setq test-point (point)))
'("mixed blocks with exports both"
"<ul>"
"<li>""a""</li>"
"<li>""b""</li>"
"<li>""c""</li>"
"</ul>"
"<pre"
"\"code block results\""
"</pre>"
"<pre class=\"example\">"
"code block results"
"</pre>"))))))
(ert-deftest ob-exp/export-with-name ()
(let ((org-babel-exp-code-template
"=%name=\n#+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
(org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
(org-narrow-to-subtree)
(let ((ascii (org-export-as-ascii nil nil nil 'string 'body-only)))
(should (string-match "qux" ascii))))))
(ert-deftest ob-exp/export-with-header-argument ()
(let ((org-babel-exp-code-template
"
| header | value |
|---------+----------|
| foo | %foo |
| results | %results |
#+BEGIN_SRC %lang%flags\nbody\n#+END_SRC"))
(org-test-at-id "b02ddd8a-eeb8-42ab-8664-8a759e6f43d9"
(org-narrow-to-subtree)
(let ((ascii (org-export-as-ascii nil nil nil 'string 'body-only)))
(should (string-match "baz" ascii))
(should (string-match "replace" ascii))))))
(ert-deftest ob-exp/noweb-no-export-and-exports-both ()
(org-test-at-id "8a820f6c-7980-43db-8a24-0710d33729c9"
(org-narrow-to-subtree)
(let ((html (org-export-as-html nil nil nil 'string 'body-only)))
(should (string-match (regexp-quote "noweb-no-export-and-exports-both-1")
html)))))
(ert-deftest ob-exp/evaluate-all-executables-in-order () (ert-deftest ob-exp/evaluate-all-executables-in-order ()
(org-test-at-id "96cc7073-97ec-4556-87cf-1f9bffafd317" (org-test-at-id "96cc7073-97ec-4556-87cf-1f9bffafd317"
@ -221,50 +110,6 @@ elements in the final html."
(org-export-as-ascii nil nil nil 'string) (org-export-as-ascii nil nil nil 'string)
(should (equal '(5 4 3 2 1) *evaluation-collector*))))) (should (equal '(5 4 3 2 1) *evaluation-collector*)))))
(ert-deftest ob-exp/export-call-line-information ()
(org-test-at-id "bec63a04-491e-4caa-97f5-108f3020365c"
(org-narrow-to-subtree)
(let* ((org-babel-exp-call-line-template "\n: call: %line special-token")
(html (org-export-as-html nil nil nil 'string t)))
(should (string-match "double" html))
(should (string-match "16" html))
(should (string-match "special-token" html)))))
(ert-deftest ob-exp/noweb-strip-export-ensure-strips ()
(org-test-at-id "8e7bd234-99b2-4b14-8cd6-53945e409775"
(org-narrow-to-subtree)
(org-babel-next-src-block 2)
(should (= 110 (org-babel-execute-src-block)))
(let ((ascii (org-export-as-ascii nil nil nil 'string t)))
(should-not (string-match (regexp-quote "<<strip-export-1>>") ascii))
(should-not (string-match (regexp-quote "i=\"10\"") ascii)))))
(ert-deftest ob-exp/export-from-a-temp-buffer ()
:expected-result :failed
(org-test-with-temp-text
"
#+Title: exporting from a temporary buffer
#+name: foo
#+BEGIN_SRC emacs-lisp
:foo
#+END_SRC
#+name: bar
#+BEGIN_SRC emacs-lisp
:bar
#+END_SRC
#+BEGIN_SRC emacs-lisp :var foo=foo :noweb yes :exports results
(list foo <<bar>>)
#+END_SRC
"
(let* ((org-current-export-file (current-buffer))
(ascii (org-export-as-ascii nil nil nil 'string)))
(should (string-match (regexp-quote (format nil "%S" '(:foo :bar)))
ascii)))))
(provide 'test-ob-exp) (provide 'test-ob-exp)
;;; test-ob-exp.el ends here ;;; test-ob-exp.el ends here

View File

@ -1,15 +1,35 @@
;;; test-ob-fortran.el --- tests for ob-fortran.el ;;; test-ob-fortran.el --- tests for ob-fortran.el
;; Copyright (c) 2010-2012 Sergey Litvinov ;; Copyright (c) 2010 Sergey Litvinov
;; Authors: Sergey Litvinov ;; Authors: Sergey Litvinov
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code:
(org-test-for-executable "gfortran") (org-test-for-executable "gfortran")
(unless (featurep 'ob-fortran)
(signal 'missing-test-dependency "Support for Fortran code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(let ((load-path (cons (expand-file-name
"langs"
(expand-file-name
"babel"
(expand-file-name
"contrib"
(expand-file-name
".."
(expand-file-name
".."
(file-name-directory
(or load-file-name buffer-file-name)))))))
load-path)))
(require 'ob-fortran))
(ert-deftest ob-fortran/assert () (ert-deftest ob-fortran/assert ()
(should t)) (should t))
@ -18,13 +38,15 @@
"Test of hello world program." "Test of hello world program."
(org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc" (org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc"
(org-babel-next-src-block) (org-babel-next-src-block)
(should (equal "Hello world" (org-babel-execute-src-block))))) (should (equal "Hello world" (org-babel-execute-src-block))))
)
(ert-deftest ob-fortran/fortran-var-program () (ert-deftest ob-fortran/fortran-var-program ()
"Test a fortran variable" "Test a fortran variable"
(org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc" (org-test-at-id "459384e8-1797-4f11-867e-dde0473ea7cc"
(org-babel-next-src-block 2) (org-babel-next-src-block 2)
(should (= 10 (org-babel-execute-src-block))))) (should (= 10 (org-babel-execute-src-block))))
)
(ert-deftest ob-fortran/input-var () (ert-deftest ob-fortran/input-var ()
"Test :var" "Test :var"

View File

@ -1,14 +1,19 @@
;;; test-ob-lilypond.el --- tests for ob-lilypond.el ;;; test-ob-lilypond.el --- tests for ob-lilypond.el
;; Copyright (c) 2010-2012 Martyn Jago ;; Copyright (c) 2010 Martyn Jago
;; Authors: Martyn Jago ;; Authors: Martyn Jago
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code: (let ((load-path (cons (expand-file-name
(unless (featurep 'ob-lilypond) ".." (file-name-directory
(signal 'missing-test-dependency "Support for Lilypond code blocks")) (or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-lilypond)
(save-excursion (save-excursion
(set-buffer (get-buffer-create "test-ob-lilypond.el")) (set-buffer (get-buffer-create "test-ob-lilypond.el"))
@ -42,10 +47,10 @@
(should (boundp 'ly-version))) (should (boundp 'ly-version)))
(ert-deftest ob-lilypond/ly-version-command () (ert-deftest ob-lilypond/ly-version-command ()
(should (equal "ob-lilypond version 7.6" (ly-version))) (should (equal "ob-lilypond version 0.3" (ly-version)))
(with-temp-buffer (with-temp-buffer
(ly-version t) (ly-version t)
(should (equal "ob-lilypond version 7.6" (should (equal "ob-lilypond version 0.3"
(buffer-substring (point-min) (point-max)))))) (buffer-substring (point-min) (point-max))))))
(ert-deftest ob-lilypond/ly-compile-lilyfile () (ert-deftest ob-lilypond/ly-compile-lilyfile ()
@ -56,7 +61,6 @@
t ;display t ;display
,(if ly-gen-png "--png" "") ;&rest... ,(if ly-gen-png "--png" "") ;&rest...
,(if ly-gen-html "--html" "") ,(if ly-gen-html "--html" "")
,(if ly-gen-pdf "--pdf" "")
,(if ly-use-eps "-dbackend=eps" "") ,(if ly-use-eps "-dbackend=eps" "")
,(if ly-gen-svg "-dbackend=svg" "") ,(if ly-gen-svg "-dbackend=svg" "")
"--output=test-file" "--output=test-file"
@ -117,9 +121,6 @@
(ert-deftest ob-lilypond/ly-gen-html () (ert-deftest ob-lilypond/ly-gen-html ()
(should (boundp 'ly-gen-html))) (should (boundp 'ly-gen-html)))
(ert-deftest ob-lilypond/ly-gen-html ()
(should (boundp 'ly-gen-pdf)))
(ert-deftest ob-lilypond/use-eps () (ert-deftest ob-lilypond/use-eps ()
(should (boundp 'ly-use-eps))) (should (boundp 'ly-use-eps)))
@ -300,18 +301,6 @@
(ly-toggle-pdf-display) (ly-toggle-pdf-display)
(should (not ly-display-pdf-post-tangle)))) (should (not ly-display-pdf-post-tangle))))
(ert-deftest ob-lilypond/ly-toggle-pdf-generation-toggles-flag ()
(if ly-gen-pdf
(progn
(ly-toggle-pdf-generation)
(should (not ly-gen-pdf))
(ly-toggle-pdf-generation)
(should ly-gen-pdf))
(ly-toggle-pdf-generation)
(should ly-gen-pdf)
(ly-toggle-pdf-generation)
(should (not ly-gen-pdf))))
(ert-deftest ob-lilypond/ly-toggle-arrange-mode () (ert-deftest ob-lilypond/ly-toggle-arrange-mode ()
(if ly-arrange-mode (if ly-arrange-mode
(progn (progn
@ -364,7 +353,6 @@
(should (equal '((:tangle . "yes") (should (equal '((:tangle . "yes")
(:noweb . "yes") (:noweb . "yes")
(:results . "silent") (:results . "silent")
(:cache . "yes")
(:comments . "yes")) (:comments . "yes"))
(ly-set-header-args t))) (ly-set-header-args t)))
(should (equal '((:results . "file") (should (equal '((:results . "file")
@ -376,7 +364,6 @@
(should (equal '((:tangle . "yes") (should (equal '((:tangle . "yes")
(:noweb . "yes") (:noweb . "yes")
(:results . "silent") (:results . "silent")
(:cache . "yes")
(:comments . "yes")) (:comments . "yes"))
org-babel-default-header-args:lilypond)) org-babel-default-header-args:lilypond))
(ly-set-header-args nil) (ly-set-header-args nil)

View File

@ -1,6 +1,6 @@
;;; test-ob-lob.el ;;; test-ob-lob.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3

View File

@ -1,13 +1,35 @@
;;; test-ob-maxima.el --- tests for ob-maxima.el ;;; test-ob-maxima.el --- tests for ob-maxima.el
;; Copyright (c) 2010-2012 Sergey Litvinov ;; Copyright (c) 2010 Sergey Litvinov
;; Authors: Sergey Litvinov ;; Authors: Sergey Litvinov
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
(org-test-for-executable "maxima") (org-test-for-executable "maxima")
(unless (featurep 'ob-maxima)
(signal 'missing-test-dependency "Support for Maxima code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(let ((load-path (cons (expand-file-name
"langs"
(expand-file-name
"babel"
(expand-file-name
"contrib"
(expand-file-name
".."
(expand-file-name
".."
(file-name-directory
(or load-file-name buffer-file-name)))))))
load-path)))
(require 'ob-maxima))
(ert-deftest ob-maxima/assert () (ert-deftest ob-maxima/assert ()
(should t)) (should t))

View File

@ -1,13 +1,21 @@
;;; test-ob-octave.el --- tests for ob-octave.el ;;; test-ob-octave.el --- tests for ob-octave.el
;; Copyright (c) 2010-2012 Sergey Litvinov ;; Copyright (c) 2010 Sergey Litvinov
;; Authors: Sergey Litvinov ;; Authors: Sergey Litvinov
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
(org-test-for-executable "octave") (org-test-for-executable "octave")
(unless (featurep 'ob-octave)
(signal 'missing-test-dependency "Support for Octave code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-octave)
(ert-deftest ob-octave/input-none () (ert-deftest ob-octave/input-none ()
"Number output" "Number output"

View File

@ -1,15 +1,21 @@
;;; test-ob-python.el --- tests for ob-python.el ;;; test-ob-python.el --- tests for ob-python.el
;; Copyright (c) 2011-2012 Eric Schulte ;; Copyright (c) 2011 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code:
(org-test-for-executable "python") (org-test-for-executable "python")
(unless (featurep 'ob-python)
(signal 'missing-test-dependency "Support for Python code blocks")) (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(require 'ob-python)
(ert-deftest test-ob-python/colnames-yes-header-argument () (ert-deftest test-ob-python/colnames-yes-header-argument ()
(org-test-with-temp-text "#+name: eg (org-test-with-temp-text "#+name: eg

View File

@ -1,6 +1,6 @@
;;; test-ob-sh.el ;;; test-ob-sh.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
@ -8,10 +8,17 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(unless (featurep 'ob-sh) (let ((load-path (cons (expand-file-name
(signal 'missing-test-dependency "Support for Sh code blocks")) ".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
(ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies () (ert-deftest test-ob-sh/dont-insert-spaces-on-expanded-bodies ()
"Expanded shell bodies should not start with a blank line "Expanded shell bodies should not start with a blank line
unless the body of the tangled block does." unless the body of the tangled block does."

View File

@ -1,6 +1,6 @@
;;; test-ob-table.el ;;; test-ob-table.el
;; Copyright (c) 2011-2012 Eric Schulte ;; Copyright (c) ߚ Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
@ -10,7 +10,17 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
;; TODO Test Broken (wrong-type-argument number-or-marker-p "2.0") ;; TODO Test Broken (wrong-type-argument number-or-marker-p "2.0")
;; (ert-deftest test-ob-table/sbe () ;; (ert-deftest test-ob-table/sbe ()

View File

@ -1,6 +1,6 @@
;;; test-ob-tangle.el ;;; test-ob-tangle.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
@ -12,6 +12,15 @@
;;; Code: ;;; Code:
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
;; TODO ;; TODO
;; (ert-deftest ob-tangle/noweb-on-tangle () ;; (ert-deftest ob-tangle/noweb-on-tangle ()

View File

@ -1,10 +1,18 @@
;;; test-ob.el --- tests for ob.el ;;; test-ob.el --- tests for ob.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010, 2011 Eric Schulte
;; Authors: Eric Schulte, Martyn Jago ;; Authors: Eric Schulte, Martyn Jago
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(ert-deftest test-org-babel/multi-line-header-regexp () (ert-deftest test-org-babel/multi-line-header-regexp ()
(should(equal "^[ \t]*#\\+headers?:[ \t]*\\([^\n]*\\)$" (should(equal "^[ \t]*#\\+headers?:[ \t]*\\([^\n]*\\)$"
org-babel-multi-line-header-regexp)) org-babel-multi-line-header-regexp))
@ -106,21 +114,11 @@
(ert-deftest test-org-babel/elisp-in-header-arguments () (ert-deftest test-org-babel/elisp-in-header-arguments ()
"Test execution of elisp forms in header arguments." "Test execution of elisp forms in header arguments."
(org-test-with-temp-text-in-file " ;; at the babel.org:elisp-forms-in-header-arguments header
(org-test-at-id "22d67284-bf14-4cdc-8319-f4bd876829d7"
* elisp forms in header arguments (org-babel-next-src-block)
:PROPERTIES: (let ((info (org-babel-get-src-block-info)))
:var: prop = (* 7 6) (should (= 4 (org-babel-execute-src-block))))))
:END:
#+begin_src emacs-lisp
prop
#+end_src"
(progn
(goto-char (point-min))
(org-babel-next-src-block)
(let ((info (org-babel-get-src-block-info)))
(should (= 42 (org-babel-execute-src-block)))))))
(ert-deftest test-org-babel/simple-named-code-block () (ert-deftest test-org-babel/simple-named-code-block ()
"Test that simple named code blocks can be evaluated." "Test that simple named code blocks can be evaluated."
@ -137,84 +135,37 @@
(ert-deftest test-org-babel/simple-variable-resolution () (ert-deftest test-org-babel/simple-variable-resolution ()
"Test that simple variable resolution is working." "Test that simple variable resolution is working."
(org-test-with-temp-text-in-file " (org-test-at-id "f68821bc-7f49-4389-85b5-914791ee3718"
(org-babel-next-src-block 2)
#+name: four (should (= 4 (org-babel-execute-src-block)))))
#+begin_src emacs-lisp
(list 1 2 3 4)
#+end_src
#+begin_src emacs-lisp :var four=four
(length four)
#+end_src"
(progn
(org-babel-next-src-block 2)
(should (= 4 (org-babel-execute-src-block)))
(forward-line 5)
(should (string= ": 4" (buffer-substring
(point-at-bol)
(point-at-eol)))))))
(ert-deftest test-org-babel/multi-line-header-arguments () (ert-deftest test-org-babel/multi-line-header-arguments ()
"Test that multi-line header arguments and can be read." "Test that multi-line header arguments and can be read."
(org-test-with-temp-text-in-file " (org-test-at-id "b77c8857-6c76-4ea9-8a61-ddc2648d96c4"
(org-babel-next-src-block)
#+headers: :var letters='(a b c d e f g) (let ((results (org-babel-execute-src-block)))
#+begin_src emacs-lisp :var numbers='(1 2 3 4 5 6 7) (should(equal 'a (cadr (assoc 1 results))))
(map 'list #'list numbers letters) (should(equal 'd (cadr (assoc 4 results)))))))
#+end_src"
(progn
(org-babel-next-src-block)
(let ((results (org-babel-execute-src-block)))
(should(equal 'a (cadr (assoc 1 results))))
(should(equal 'd (cadr (assoc 4 results))))))))
(ert-deftest test-org-babel/parse-header-args () (ert-deftest test-org-babel/parse-header-args ()
(org-test-with-temp-text-in-file " (org-test-at-id "7eb0dc6e-1c53-4275-88b3-b22f3113b9c3"
(org-babel-next-src-block)
#+begin_src example-lang :session :results output :var num=9 (let* ((info (org-babel-get-src-block-info))
the body (params (nth 2 info)))
#+end_src" (message "%S" params)
(should(equal "example-lang" (nth 0 info)))
(progn (should(string= "the body" (org-babel-trim (nth 1 info))))
(org-babel-next-src-block) (should-not (member '(:session\ \ \ \ ) params))
(let* ((info (org-babel-get-src-block-info)) (should(equal '(:session) (assoc :session params)))
(params (nth 2 info))) (should(equal '(:result-type . output) (assoc :result-type params)))
(message "%S" params) (should(equal '(num . 9) (cdr (assoc :var params)))))))
(should(equal "example-lang" (nth 0 info)))
(should(string= "the body" (org-babel-trim (nth 1 info))))
(should-not (member '(:session\ \ \ \ ) params))
(should(equal '(:session) (assoc :session params)))
(should(equal '(:result-type . output) (assoc :result-type params)))
(should(equal '(num . 9) (cdr (assoc :var params))))))))
(ert-deftest test-org-babel/parse-header-args2 () (ert-deftest test-org-babel/parse-header-args2 ()
(org-test-with-temp-text-in-file " (org-test-at-id "2409e8ba-7b5f-4678-8888-e48aa02d8cb4"
(should (string-match (regexp-quote "this is simple")
* resolving sub-trees as references (org-babel-ref-resolve "simple-subtree")))
(org-babel-next-src-block)
#+begin_src emacs-lisp :var text=d4faa7b3-072b-4dcf-813c-dd7141c633f3 (should (= 14 (org-babel-execute-src-block)))))
(length text)
#+end_src
#+begin_src org :noweb yes
<<simple-subtree>>
<<d4faa7b3-072b-4dcf-813c-dd7141c633f3>>
#+end_src
** simple subtree with custom ID
:PROPERTIES:
:CUSTOM_ID: simple-subtree
:END:
this is simple"
(progn
(should (string-match (regexp-quote "this is simple")
(org-babel-ref-resolve "simple-subtree")))
(org-babel-next-src-block)
(should (= 14 (org-babel-execute-src-block))))))
(ert-deftest test-org-babel/inline-src-blocks () (ert-deftest test-org-babel/inline-src-blocks ()
(org-test-at-id "54cb8dc3-298c-4883-a933-029b3c9d4b18" (org-test-at-id "54cb8dc3-298c-4883-a933-029b3c9d4b18"
@ -248,7 +199,8 @@ this is simple"
(should (re-search-forward ":results" nil t)) ;; 4 (should (re-search-forward ":results" nil t)) ;; 4
(should (org-babel-get-inline-src-block-matches)) (should (org-babel-get-inline-src-block-matches))
(end-of-line) (end-of-line)
(should-not (org-babel-get-inline-src-block-matches))))) (should-not (org-babel-get-inline-src-block-matches))
)))
(ert-deftest test-org-babel/inline-src_blk-default-results-replace-line-1 () (ert-deftest test-org-babel/inline-src_blk-default-results-replace-line-1 ()
(let ((test-line "src_sh{echo 1}")) (let ((test-line "src_sh{echo 1}"))
@ -423,25 +375,12 @@ this is simple"
(point-min) (point-max))))))) (point-min) (point-max)))))))
(ert-deftest test-org-babel/combining-scalar-and-raw-result-types () (ert-deftest test-org-babel/combining-scalar-and-raw-result-types ()
(org-test-with-temp-text-in-file " (flet ((next-result ()
(org-babel-next-src-block)
#+begin_src sh :results scalar (org-babel-execute-src-block)
echo \"[[file:./cv.cls]]\" (goto-char (org-babel-where-is-src-block-result))
#+end_src (forward-line 1)))
(org-test-at-id "a73a2ab6-b8b2-4c0e-ae7f-23ad14eab7bc"
#+name:
: [[file:./cv.cls]]
#+begin_src sh :results raw scalar
echo \"[[file:./cv.cls]]\"
#+end_src
"
(flet ((next-result ()
(org-babel-next-src-block)
(org-babel-execute-src-block)
(goto-char (org-babel-where-is-src-block-result))
(forward-line 1)))
(goto-char (point-min))
(next-result) (next-result)
(should (org-babel-in-example-or-verbatim)) (should (org-babel-in-example-or-verbatim))
(next-result) (next-result)
@ -619,7 +558,7 @@ on two lines
(check-eval "never-export" nil) (check-eval "never-export" nil)
(check-eval "no-export" nil)))) (check-eval "no-export" nil))))
(ert-deftest test-ob/noweb-expansion-1 () (ert-deftest test-ob/noweb-expansion ()
(org-test-with-temp-text "#+begin_src sh :results output :tangle yes (org-test-with-temp-text "#+begin_src sh :results output :tangle yes
<<foo>> <<foo>>
#+end_src #+end_src
@ -628,9 +567,7 @@ on two lines
#+begin_src sh #+begin_src sh
bar bar
#+end_src" #+end_src"
(should (string= (org-babel-expand-noweb-references) "bar")))) (should (string= (org-babel-expand-noweb-references) "bar")))
(ert-deftest test-ob/noweb-expansion-2 ()
(org-test-with-temp-text "#+begin_src sh :results output :tangle yes (org-test-with-temp-text "#+begin_src sh :results output :tangle yes
<<foo>> <<foo>>
#+end_src #+end_src
@ -657,7 +594,6 @@ on two lines
'(":a 1" "b [2 3]" "c (4 :d (5 6))") '(":a 1" "b [2 3]" "c (4 :d (5 6))")
(org-babel-balanced-split ":a 1 :b [2 3] :c (4 :d (5 6))" (org-babel-balanced-split ":a 1 :b [2 3] :c (4 :d (5 6))"
'((32 9) . 58))))) '((32 9) . 58)))))
(ert-deftest test-ob/commented-last-block-line-no-var () (ert-deftest test-ob/commented-last-block-line-no-var ()
(org-test-with-temp-text-in-file " (org-test-with-temp-text-in-file "
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -855,213 +791,6 @@ Line 3\"
* next heading")) * next heading"))
(ert-deftest test-org-babel/inline-src_blk-preceded-punct-preceded-by-point ()
(let ((test-line ".src_emacs-lisp[ :results verbatim ]{ \"x\" }"))
(org-test-with-temp-text
test-line
(forward-char 1)
(org-ctrl-c-ctrl-c)
(should (re-search-forward "=\"x\"=" nil t))
(forward-line))))
(ert-deftest test-ob/commented-last-block-line-with-var ()
(org-test-with-temp-text-in-file "
#+begin_src emacs-lisp :var a=1
;;
#+end_src"
(progn
(org-babel-next-src-block)
(org-ctrl-c-ctrl-c)
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
""
(buffer-substring-no-properties (point-at-bol) (point-at-eol))))))
(org-test-with-temp-text-in-file "
#+begin_src emacs-lisp :var a=2
2;;
#+end_src"
(progn
(org-babel-next-src-block)
(org-ctrl-c-ctrl-c)
(re-search-forward "\\#\\+results:" nil t)
(forward-line)
(should (string=
": 2"
(buffer-substring-no-properties (point-at-bol) (point-at-eol)))))))
(defun test-ob-verify-result-and-removed-result (result buffer-text)
"Test helper function to test `org-babel-remove-result'.
A temp buffer is populated with BUFFER-TEXT, the first block is executed,
and the result of execution is verified against RESULT.
The block is actually executed /twice/ to ensure result
replacement happens correctly."
(org-test-with-temp-text
buffer-text
(progn
(org-babel-next-src-block) (org-ctrl-c-ctrl-c) (org-ctrl-c-ctrl-c)
(should (re-search-forward "\\#\\+results:" nil t))
(forward-line)
(should (string= result
(buffer-substring-no-properties
(point-at-bol)
(- (point-max) 16))))
(org-babel-previous-src-block) (org-babel-remove-result)
(should (string= buffer-text
(buffer-substring-no-properties
(point-min) (point-max)))))))
(ert-deftest test-ob/org-babel-remove-result--results-default ()
"Test `org-babel-remove-result' with default :results."
(mapcar (lambda (language)
(test-ob-verify-result-and-removed-result
"\n"
(concat
"* org-babel-remove-result
#+begin_src " language "
#+end_src
* next heading")))
'("sh" "emacs-lisp")))
(ert-deftest test-ob/org-babel-remove-result--results-list ()
"Test `org-babel-remove-result' with :results list."
(test-ob-verify-result-and-removed-result
"- 1
- 2
- 3
- (quote (4 5))"
"* org-babel-remove-result
#+begin_src emacs-lisp :results list
'(1 2 3 '(4 5))
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-wrap ()
"Test `org-babel-remove-result' with :results wrap."
(test-ob-verify-result-and-removed-result
":RESULTS:
hello there
:END:"
"* org-babel-remove-result
#+begin_src emacs-lisp :results wrap
\"hello there\"
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-org ()
"Test `org-babel-remove-result' with :results org."
(test-ob-verify-result-and-removed-result
"#+BEGIN_ORG
* heading
** subheading
content
#+END_ORG"
"* org-babel-remove-result
#+begin_src emacs-lisp :results org
\"* heading
** subheading
content\"
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-html ()
"Test `org-babel-remove-result' with :results html."
(test-ob-verify-result-and-removed-result
"#+BEGIN_HTML
<head><body></body></head>
#+END_HTML"
"* org-babel-remove-result
#+begin_src emacs-lisp :results html
\"<head><body></body></head>\"
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-latex ()
"Test `org-babel-remove-result' with :results latex."
(test-ob-verify-result-and-removed-result
"#+BEGIN_LaTeX
Line 1
Line 2
Line 3
#+END_LaTeX"
"* org-babel-remove-result
#+begin_src emacs-lisp :results latex
\"Line 1
Line 2
Line 3\"
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-code ()
"Test `org-babel-remove-result' with :results code."
(test-ob-verify-result-and-removed-result
"#+BEGIN_SRC emacs-lisp
\"I am working!\"
#+END_SRC"
"* org-babel-remove-result
#+begin_src emacs-lisp :results code
(message \"I am working!\")
#+end_src
* next heading"))
(ert-deftest test-ob/org-babel-remove-result--results-pp ()
"Test `org-babel-remove-result' with :results pp."
(test-ob-verify-result-and-removed-result
": \"I /am/ working!\""
"* org-babel-remove-result
#+begin_src emacs-lisp :results pp
\"I /am/ working!\")
#+end_src
* next heading"))
(ert-deftest test-ob/results-do-not-replace-code-blocks ()
(org-test-with-temp-text "Block two has a space after the name.
#+name: foo
#+begin_src emacs-lisp
1
#+end_src emacs-lisp
#+name: foo
#+begin_src emacs-lisp
2
#+end_src
#+name: foo
#+begin_src emacs-lisp
3
#+end_src
#+RESULTS: foo
: foo
"
(dolist (num '(1 2 3))
;; execute the block
(goto-char (point-min))
(org-babel-next-src-block num) (org-babel-execute-src-block)
;; check the results
(goto-char (point-max))
(move-beginning-of-line 0)
(should (looking-at (format ": %d" num))))))
(provide 'test-ob) (provide 'test-ob)
;;; test-ob ends here ;;; test-ob ends here

View File

@ -1,12 +1,19 @@
;;; test-org-exp.el --- tests for org-exp.el ;;; test-org-exp.el --- tests for org-exp.el
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code: (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts)
(require 'org-ascii))
(ert-deftest test-org-exp/stripping-commas () (ert-deftest test-org-exp/stripping-commas ()
"Test the stripping of commas from within blocks during export." "Test the stripping of commas from within blocks during export."
(org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5" (org-test-at-id "76d3a083-67fa-4506-a41d-837cc48158b5"

View File

@ -10,9 +10,18 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(unless (featurep 'org-html) (let ((load-path (cons (expand-file-name
(signal 'missing-test-dependency "Support for Org-html")) ".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
(require 'org-html)
(defmacro org-test-html/export-link (name link expected &optional desc opt-plist) (defmacro org-test-html/export-link (name link expected &optional desc opt-plist)
`(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) () `(ert-deftest ,(intern (concat "test-org-html/export-link/" name)) ()

View File

@ -10,7 +10,17 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
;;; Tests
(ert-deftest test-org-table/org-table-convert-refs-to-an/1 () (ert-deftest test-org-table/org-table-convert-refs-to-an/1 ()
"Simple reference @1$1." "Simple reference @1$1."
(should (should
@ -44,28 +54,12 @@
;; (string= "$3 = remote(FOO, @@#$2)" (org-table-convert-refs-to-rc "C& = remote(FOO, @@#B&)")))) ;; (string= "$3 = remote(FOO, @@#$2)" (org-table-convert-refs-to-rc "C& = remote(FOO, @@#B&)"))))
(ert-deftest test-org-table/simple-formula () (ert-deftest test-org-table/simple-formula ()
(org-test-with-temp-text-in-file " (org-test-at-id "563523f7-3f3e-49c9-9622-9216cc9a5d95"
(re-search-forward (regexp-quote "#+tblname: simple-formula") nil t)
* simple formula (forward-line 1)
:PROPERTIES: (should (org-at-table-p))
:ID: 563523f7-3f3e-49c9-9622-9216cc9a5d95 (should (org-table-recalculate 'all))
:END: (should (string= "10" (first (nth 5 (org-table-to-lisp)))))))
#+tblname: simple-formula
| 1 |
| 2 |
| 3 |
| 4 |
|----|
| |
#+TBLFM: $1=vsum(@1..@-1)
"
(progn
(re-search-forward (regexp-quote "#+tblname: simple-formula") nil t)
(forward-line 1)
(should (org-at-table-p))
(should (org-table-recalculate 'all))
(should (string= "10" (first (nth 5 (org-table-to-lisp))))))))
(provide 'test-org-table) (provide 'test-org-table)

View File

@ -10,7 +10,17 @@
;; Template test file for Org-mode tests ;; Template test file for Org-mode tests
;;; Code: ;;; Code:
(let* ((testing-lisp-dir (file-name-directory
(or load-file-name buffer-file-name)))
(load-path (cons testing-lisp-dir load-path)))
(dolist (file (directory-files testing-lisp-dir 'full
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.org$"))
(require (intern (substring file 0 (- (length file) 3))))))
;;; Tests
(ert-deftest test-org/org-link-escape-ascii-character () (ert-deftest test-org/org-link-escape-ascii-character ()
"Escape an ascii character." "Escape an ascii character."
(should (should
@ -82,53 +92,6 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/"
"http://some.host.com/form?&id=blah%2Bblah25" "http://some.host.com/form?&id=blah%2Bblah25"
(org-link-unescape (org-link-escape "http://some.host.com/form?&id=blah%2Bblah25"))))) (org-link-unescape (org-link-escape "http://some.host.com/form?&id=blah%2Bblah25")))))
(ert-deftest test-org/accumulated-properties-in-drawers ()
"Ensure properties accumulate in subtree drawers."
(org-test-at-id "75282ba2-f77a-4309-a970-e87c149fe125"
(org-babel-next-src-block)
(should (equal '(2 1) (org-babel-execute-src-block)))))
;;; Links
;;;; Fuzzy links
;; Fuzzy links [[text]] encompass links to a target (<<text>>), to
;; a target keyword (aka an invisible target: #+TARGET: text), to
;; a named element (#+name: text) and to headlines (* Text).
(ert-deftest test-org-export/fuzzy-links ()
"Test fuzzy links specifications."
;; 1. Fuzzy link goes in priority to a matching target.
(org-test-with-temp-text
"#+TARGET: Test\n#+NAME: Test\n|a|b|\n<<Test>>\n* Test\n[[Test]]"
(goto-line 6)
(org-open-at-point)
(should (looking-at "<<Test>>")))
;; 2. Fuzzy link should then go to a matching target keyword.
(org-test-with-temp-text
"#+NAME: Test\n|a|b|\n#+TARGET: Test\n* Test\n[[Test]]"
(goto-line 5)
(org-open-at-point)
(should (looking-at "#\\+TARGET: Test")))
;; 3. Then fuzzy link points to an element with a given name.
(org-test-with-temp-text "Test\n#+NAME: Test\n|a|b|\n* Test\n[[Test]]"
(goto-line 5)
(org-open-at-point)
(should (looking-at "#\\+NAME: Test")))
;; 4. A target still lead to a matching headline otherwise.
(org-test-with-temp-text "* Head1\n* Head2\n*Head3\n[[Head2]]"
(goto-line 4)
(org-open-at-point)
(should (looking-at "\\* Head2")))
;; 5. With a leading star in link, enforce heading match.
(org-test-with-temp-text "#+TARGET: Test\n* Test\n<<Test>>\n[[*Test]]"
(goto-line 4)
(org-open-at-point)
(should (looking-at "\\* Test"))))
(provide 'test-org) (provide 'test-org)
;;; test-org.el ends here ;;; test-org.el ends here

View File

@ -1,19 +1,24 @@
;;; test-ob-R.el --- tests for ob-R.el ;;; test-ob-R.el --- tests for ob-R.el
;; Copyright (c) 2011-2012 Eric Schulte ;; Copyright (c) 2011 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3
;; see: http://www.gnu.org/licenses/gpl-3.0.html ;; see: http://www.gnu.org/licenses/gpl-3.0.html
;;; Code: (let ((load-path (cons (expand-file-name
".." (file-name-directory
(or load-file-name buffer-file-name)))
load-path)))
(require 'org-test)
(require 'org-test-ob-consts))
(defmacro test-org-in-property-buffer (&rest body) (defmacro test-org-in-property-buffer (&rest body)
`(with-temp-buffer `(with-temp-buffer
(insert-file-contents (expand-file-name "property-inheritance.org" (insert-file-contents (expand-file-name "property-inheritance.org"
org-test-example-dir)) org-test-example-dir))
(org-mode) (org-mode)
,@body)) ,@body))
(def-edebug-spec test-org-in-property-buffer (body))
(ert-deftest test-org-property-accumulation-top-use () (ert-deftest test-org-property-accumulation-top-use ()
(test-org-in-property-buffer (test-org-in-property-buffer

View File

@ -1,6 +1,6 @@
;;; org-test-ob-consts.el --- constants for use in code block tests ;;; org-test-ob-consts.el --- constants for use in code block tests
;; Copyright (c) 2010-2012 Eric Schulte ;; Copyright (c) 2010 Eric Schulte
;; Authors: Eric Schulte ;; Authors: Eric Schulte
;; Released under the GNU General Public License version 3 ;; Released under the GNU General Public License version 3

View File

@ -1,6 +1,6 @@
;;;; org-test.el --- Tests for Org-mode ;;;; org-test.el --- Tests for Org-mode
;; Copyright (c) 2010-2012 Sebastian Rose, Eric Schulte ;; Copyright (c) 2010 Sebastian Rose, Eric Schulte
;; Authors: ;; Authors:
;; Sebastian Rose, Hannover, Germany, sebastian_rose gmx de ;; Sebastian Rose, Hannover, Germany, sebastian_rose gmx de
;; Eric Schulte, Santa Fe, New Mexico, USA, schulte.eric gmail com ;; Eric Schulte, Santa Fe, New Mexico, USA, schulte.eric gmail com
@ -30,8 +30,6 @@
;;;; Code: ;;;; Code:
(require 'org-test-ob-consts)
(let* ((org-test-dir (expand-file-name (let* ((org-test-dir (expand-file-name
(file-name-directory (file-name-directory
(or load-file-name buffer-file-name)))) (or load-file-name buffer-file-name))))
@ -172,7 +170,6 @@ currently executed.")
(save-restriction ,@body))) (save-restriction ,@body)))
(unless visited-p (unless visited-p
(kill-buffer to-be-removed)))) (kill-buffer to-be-removed))))
(def-edebug-spec org-test-in-example-file (form body))
(defmacro org-test-at-marker (file marker &rest body) (defmacro org-test-at-marker (file marker &rest body)
"Run body after placing the point at MARKER in FILE. "Run body after placing the point at MARKER in FILE.
@ -201,7 +198,7 @@ otherwise place the point at the beginning of the inserted text."
(goto-char ,(match-beginning 0))) (goto-char ,(match-beginning 0)))
`(progn (insert ,inside-text) `(progn (insert ,inside-text)
(goto-char (point-min))))) (goto-char (point-min)))))
(prog1 ,@body (kill-buffer))))) ,@body)))
(def-edebug-spec org-test-with-temp-text (form body)) (def-edebug-spec org-test-with-temp-text (form body))
(defmacro org-test-with-temp-text-in-file (text &rest body) (defmacro org-test-with-temp-text-in-file (text &rest body)
@ -226,8 +223,12 @@ otherwise place the point at the beginning of the inserted text."
(defjump org-test-jump (defjump org-test-jump
(("lisp/\\1.el" . "testing/lisp/test-\\1.el") (("lisp/\\1.el" . "testing/lisp/test-\\1.el")
("lisp/\\1.el" . "testing/lisp/\\1.el/test.*.el") ("lisp/\\1.el" . "testing/lisp/\\1.el/test.*.el")
("contrib/lisp/\\1.el" . "testing/contrib/lisp/test-\\1.el")
("contrib/lisp/\\1.el" . "testing/contrib/lisp/\\1.el/test.*.el")
("testing/lisp/test-\\1.el" . "lisp/\\1.el") ("testing/lisp/test-\\1.el" . "lisp/\\1.el")
("testing/lisp/\\1.el" . "lisp/\\1.el/test.*.el")) ("testing/lisp/\\1.el" . "lisp/\\1.el/test.*.el")
("testing/contrib/lisp/test-\\1.el" . "contrib/lisp/\\1.el")
("testing/contrib/lisp/test-\\1.el" . "contrib/lisp/\\1.el/test.*.el"))
(concat org-base-dir "/") (concat org-base-dir "/")
"Jump between org-mode files and their tests." "Jump between org-mode files and their tests."
(lambda (path) (lambda (path)
@ -311,7 +312,8 @@ otherwise place the point at the beginning of the inserted text."
:expected-result :failed (should nil)))))))) :expected-result :failed (should nil))))))))
(directory-files base 'full (directory-files base 'full
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el$")))) "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.el$"))))
(rld (expand-file-name "lisp" org-test-dir)))) (rld (expand-file-name "lisp" org-test-dir))
(rld (expand-file-name "lisp" (expand-file-name "contrib" org-test-dir)))))
(defun org-test-current-defun () (defun org-test-current-defun ()
"Test the current function." "Test the current function."
@ -326,20 +328,11 @@ otherwise place the point at the beginning of the inserted text."
(file-name-nondirectory (buffer-file-name))) (file-name-nondirectory (buffer-file-name)))
"/"))) "/")))
(defvar org-test-buffers nil
"Hold buffers open for running Org-mode tests.")
(defun org-test-touch-all-examples () (defun org-test-touch-all-examples ()
(dolist (file (directory-files (dolist (file (directory-files
org-test-example-dir 'full org-test-example-dir 'full
"^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.org$")) "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*\\.org$"))
(unless (get-file-buffer file) (find-file file)))
(add-to-list 'org-test-buffers (find-file file)))))
(defun org-test-kill-all-examples ()
(while org-test-buffers
(let ((b (pop org-test-buffers)))
(when (buffer-live-p b) (kill-buffer b)))))
(defun org-test-update-id-locations () (defun org-test-update-id-locations ()
(org-id-update-id-locations (org-id-update-id-locations
@ -368,8 +361,7 @@ Load all test files first."
(interactive) (interactive)
(org-test-touch-all-examples) (org-test-touch-all-examples)
(org-test-load) (org-test-load)
(ert "\\(org\\|ob\\)") (ert "\\(org\\|ob\\)"))
(org-test-kill-all-examples))
(provide 'org-test) (provide 'org-test)