diff options
| author | Paul Eggert | 2017-08-25 21:12:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-08-25 21:14:06 -0700 |
| commit | 05f9ffd53c65699e8de6cca4817b1f2dc2f63a79 (patch) | |
| tree | 84cb18218bf10ba8d614c28ecdcf3cd9e56b69e9 /doc/misc | |
| parent | feecb66b6fe41c977b8e11b5f2d419c9544f42de (diff) | |
| download | emacs-05f9ffd53c65699e8de6cca4817b1f2dc2f63a79.tar.gz emacs-05f9ffd53c65699e8de6cca4817b1f2dc2f63a79.zip | |
Improve expand-file-name doc
* doc/lispref/files.texi (Relative File Names, Directory Names)
(File Name Expansion):
* doc/lispref/minibuf.texi (Reading File Names):
Document expand-file-name behavior with ~ more clearly
and accurately.
* doc/misc/org.texi (Batch execution): Simplify example
script so that it does not need expand-file-name and thus
will not mishandle file names with leading ~.
Diffstat (limited to 'doc/misc')
| -rw-r--r-- | doc/misc/org.texi | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index e1de3087311..2d537946be0 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -1040,8 +1040,8 @@ shown below. | |||
| 1040 | debug-on-quit nil) | 1040 | debug-on-quit nil) |
| 1041 | 1041 | ||
| 1042 | ;; add latest org-mode to load path | 1042 | ;; add latest org-mode to load path |
| 1043 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) | 1043 | (add-to-list 'load-path "/path/to/org-mode/lisp") |
| 1044 | (add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) | 1044 | (add-to-list 'load-path "/path/to/org-mode/contrib/lisp" t) |
| 1045 | @end lisp | 1045 | @end lisp |
| 1046 | 1046 | ||
| 1047 | If an error occurs, a backtrace can be very useful (see below on how to | 1047 | If an error occurs, a backtrace can be very useful (see below on how to |
| @@ -16900,25 +16900,18 @@ The sample script shows batch processing of multiple files using | |||
| 16900 | 16900 | ||
| 16901 | @example | 16901 | @example |
| 16902 | #!/bin/sh | 16902 | #!/bin/sh |
| 16903 | # -*- mode: shell-script -*- | ||
| 16904 | # | ||
| 16905 | # tangle files with org-mode | 16903 | # tangle files with org-mode |
| 16906 | # | 16904 | # |
| 16907 | DIR=`pwd` | 16905 | emacs -Q --batch --eval " |
| 16908 | FILES="" | 16906 | (progn |
| 16909 | 16907 | (require 'ob-tangle) | |
| 16910 | # wrap each argument in the code required to call tangle on it | 16908 | (mapc (lambda (file) |
| 16911 | for i in $@@; do | 16909 | (save-current-buffer |
| 16912 | FILES="$FILES \"$i\"" | 16910 | (find-file file) |
| 16913 | done | 16911 | (org-babel-tangle) |
| 16914 | 16912 | (kill-buffer))) | |
| 16915 | emacs -Q --batch \ | 16913 | command-line-args-left)) |
| 16916 | --eval "(progn | 16914 | " "$@@" |
| 16917 | (require 'org)(require 'ob)(require 'ob-tangle) | ||
| 16918 | (mapc (lambda (file) | ||
| 16919 | (find-file (expand-file-name file \"$DIR\")) | ||
| 16920 | (org-babel-tangle) | ||
| 16921 | (kill-buffer)) '($FILES)))" 2>&1 |grep -i tangled | ||
| 16922 | @end example | 16915 | @end example |
| 16923 | 16916 | ||
| 16924 | @node Miscellaneous | 16917 | @node Miscellaneous |