|
@@ -836,7 +836,6 @@ ends, for example:
|
|
|
@r{@bullet{} an environment for literate programming}
|
|
|
@end example
|
|
|
|
|
|
-
|
|
|
@cindex FAQ
|
|
|
There is a website for Org which provides links to the newest
|
|
|
version of Org, as well as additional information, frequently asked
|
|
@@ -13237,8 +13236,8 @@ blocks.
|
|
|
|
|
|
@lisp
|
|
|
(setq org-babel-default-header-args
|
|
|
-(cons '(:noweb . "yes")
|
|
|
-(assq-delete-all :noweb org-babel-default-header-args)))
|
|
|
+ (cons '(:noweb . "yes")
|
|
|
+ (assq-delete-all :noweb org-babel-default-header-args)))
|
|
|
@end lisp
|
|
|
|
|
|
@node Language-specific header arguments, Buffer-wide header arguments, System-wide header arguments, Using header arguments
|
|
@@ -13283,9 +13282,9 @@ blocks in the subtree rooted at the following heading:
|
|
|
|
|
|
@example
|
|
|
* outline header
|
|
|
-:PROPERTIES:
|
|
|
-:cache: yes
|
|
|
-:END:
|
|
|
+ :PROPERTIES:
|
|
|
+ :cache: yes
|
|
|
+ :END:
|
|
|
@end example
|
|
|
|
|
|
@kindex C-c C-x p
|
|
@@ -13329,6 +13328,7 @@ Code block header arguments can span multiple lines using @code{#+HEADER:} or
|
|
|
@cindex #+HEADERS:
|
|
|
|
|
|
Multi-line header arguments on an un-named code block:
|
|
|
+
|
|
|
@example
|
|
|
#+HEADERS: :var data1=1
|
|
|
#+BEGIN_SRC emacs-lisp :var data2=2
|
|
@@ -13340,6 +13340,7 @@ Multi-line header arguments on an un-named code block:
|
|
|
@end example
|
|
|
|
|
|
Multi-line header arguments on a named code block:
|
|
|
+
|
|
|
@example
|
|
|
#+NAME: named-block
|
|
|
#+HEADER: :var data=2
|
|
@@ -13362,12 +13363,14 @@ blocks}.
|
|
|
|
|
|
The following will apply the @code{:exports results} header argument to the
|
|
|
evaluation of the @code{#+CALL:} line.
|
|
|
+
|
|
|
@example
|
|
|
#+CALL: factorial(n=5) :exports results
|
|
|
@end example
|
|
|
|
|
|
The following will apply the @code{:session special} header argument to the
|
|
|
evaluation of the @code{factorial} code block.
|
|
|
+
|
|
|
@example
|
|
|
#+CALL: factorial[:session special](n=5)
|
|
|
@end example
|
|
@@ -13448,6 +13451,7 @@ Here are examples of passing values by reference:
|
|
|
|
|
|
@item table
|
|
|
an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line
|
|
|
+
|
|
|
@example
|
|
|
#+TBLNAME: example-table
|
|
|
| 1 |
|
|
@@ -14030,7 +14034,6 @@ This code block:
|
|
|
-- <<example>>
|
|
|
@end example
|
|
|
|
|
|
-
|
|
|
expands to:
|
|
|
|
|
|
@example
|
|
@@ -14413,6 +14416,7 @@ process. For example, compare the following two blocks:
|
|
|
@end example
|
|
|
|
|
|
In non-session mode, the `2' is not printed and does not appear.
|
|
|
+
|
|
|
@example
|
|
|
#+BEGIN_SRC python :results output :session
|
|
|
print "hello"
|
|
@@ -14787,6 +14791,7 @@ ask and nil not to ask.
|
|
|
|
|
|
For example, here is how to execute "ditaa" code (which is considered safe)
|
|
|
without asking:
|
|
|
+
|
|
|
@example
|
|
|
(defun my-org-confirm-babel-evaluate (lang body)
|
|
|
(not (string= lang "ditaa"))) ; don't ask for ditaa
|
|
@@ -15483,7 +15488,7 @@ function:
|
|
|
|
|
|
@lisp
|
|
|
(defun yas/org-very-safe-expand ()
|
|
|
- (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
|
|
|
+ (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
|
|
|
@end lisp
|
|
|
|
|
|
Then, tell Org mode what to do with the new function:
|
|
@@ -15491,10 +15496,10 @@ Then, tell Org mode what to do with the new function:
|
|
|
@lisp
|
|
|
(add-hook 'org-mode-hook
|
|
|
(lambda ()
|
|
|
- (make-variable-buffer-local 'yas/trigger-key)
|
|
|
- (setq yas/trigger-key [tab])
|
|
|
- (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
|
|
|
- (define-key yas/keymap [tab] 'yas/next-field)))
|
|
|
+ (make-variable-buffer-local 'yas/trigger-key)
|
|
|
+ (setq yas/trigger-key [tab])
|
|
|
+ (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
|
|
|
+ (define-key yas/keymap [tab] 'yas/next-field)))
|
|
|
@end lisp
|
|
|
|
|
|
@item @file{windmove.el} by Hovav Shacham
|
|
@@ -16135,9 +16140,9 @@ The corresponding block writer function could look like this:
|
|
|
|
|
|
@lisp
|
|
|
(defun org-dblock-write:block-update-time (params)
|
|
|
- (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
|
|
|
- (insert "Last block update at: "
|
|
|
- (format-time-string fmt (current-time)))))
|
|
|
+ (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
|
|
|
+ (insert "Last block update at: "
|
|
|
+ (format-time-string fmt (current-time)))))
|
|
|
@end lisp
|
|
|
|
|
|
If you want to make sure that all dynamic blocks are always up-to-date,
|
|
@@ -16532,8 +16537,8 @@ Entries in comment trees and in archive trees will be ignored.
|
|
|
|
|
|
@lisp
|
|
|
(org-map-entries
|
|
|
- '(org-todo "UPCOMING")
|
|
|
- "+TOMORROW" 'file 'archive 'comment)
|
|
|
+ '(org-todo "UPCOMING")
|
|
|
+ "+TOMORROW" 'file 'archive 'comment)
|
|
|
@end lisp
|
|
|
|
|
|
The following example counts the number of entries with TODO keyword
|