diff --git a/ChangeLog b/ChangeLog index 6ea441fc5..636118780 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-04-14 Carsten Dominik + + * lisp/org-exp.el (org-export-run-in-background): New option. + + * lisp/org.el (org-open-file): Allow a batch process to trigger + waiting after executing a system command. + + * lisp/org-exp.el (org-export-icalendar): Allow a batch process to + trigger waiting after executing a system command. + 2008-04-13 Carsten Dominik * lisp/org-table.el (org-table-make-reference): Extra parenthesis diff --git a/Makefile b/Makefile index 24c7c843d..655730347 100644 --- a/Makefile +++ b/Makefile @@ -262,4 +262,35 @@ push: pushtag: git-tag -m "Adding tag" -a $(TAG) - git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG) \ No newline at end of file + git-push git+ssh://repo.or.cz/srv/git/org-mode.git $(TAG) + + + +# Dependencies + +lisp/org.elc: lisp/org-macs.elc lisp/org-compat.elc lisp/org-faces.elc +lisp/org-agenda.elc: lisp/org.elc +lisp/org-archive.elc: lisp/org.elc +lisp/org-bbdb.elc: lisp/org.elc +lisp/org-bibtex.elc: lisp/org.elc +lisp/org-clock.elc: lisp/org.elc +lisp/org-colview.elc: lisp/org.elc +lisp/org-compat.elc: +lisp/org-exp.elc: lisp/org.elc lisp/org-agenda.elc +lisp/org-export-latex.elc: lisp/org.elc lisp/org-exp.elc +lisp/org-faces.elc: lisp/org-macs.elc lisp/org-compat.elc +lisp/org-gnus.elc: lisp/org.elc +lisp/org-info.elc: lisp/org.elc +lisp/org-infojs.elc: lisp/org.elc lisp/org-exp.elc +lisp/org-irc.elc: lisp/org.elc +lisp/org-mac-message.elc: lisp/org.elc +lisp/org-macs.elc: +lisp/org-mew.elc: lisp/org.elc +lisp/org-mhe.elc: lisp/org.elc +lisp/org-mouse.elc: lisp/org.elc +lisp/org-publish.elc: +lisp/org-remember.elc: lisp/org.elc +lisp/org-rmail.elc: lisp/org.elc +lisp/org-table.elc: lisp/org.elc +lisp/org-vm.elc: lisp/org.elc +lisp/org-wl.elc: lisp/org.elc diff --git a/ORGWEBPAGE/index.org b/ORGWEBPAGE/index.org index 65bd64ab6..cb7d6c880 100644 --- a/ORGWEBPAGE/index.org +++ b/ORGWEBPAGE/index.org @@ -22,9 +22,9 @@ messages, BBDB entries, and any files related to the projects. For printing and sharing of notes, an Org-mode file can be exported as a structured ASCII file, HTML, and LaTeX. -* Current Version (6.01) and Compatibility +* Current Version (6.02pre-01) and Compatibility -The current version is 6.01. To see what has changed in recent +The current version is 6.02pre-01. To see what has changed in recent releases, check this [[file:Changes.html][list of user-visible changes]]. These descriptions are extensive, to avoid that people will be printing the manual after each incremental release. If you have an older version of the manual, @@ -40,7 +40,7 @@ but may lag a bit behind the website release. **** Distribution -Download as [[file:org-6.01.zip][zip file]] or [[file:org-6.01.tar.gz][gzipped tar archive]]. These archives contain +Download as [[file:org-6.02pre-01.zip][zip file]] or [[file:org-6.02pre-01.tar.gz][gzipped tar archive]]. These archives contain both the Lisp file org.el and the documentation in PDF and (TeX)Info formats. A shell script to simplify upgrading to the newest release has been posted [[http://www.philfam.co.uk/pete/GTD/org-mode/update-org.sh][here]]. diff --git a/README_DIST b/README_DIST index 9ce96881c..9e0c54549 100644 --- a/README_DIST +++ b/README_DIST @@ -1,7 +1,7 @@ The is a distribution of Org, a plain text notes and project planning tool for Emacs. -The version of this release is: 6.01 +The version of this release is: 6.02pre-01 The homepage of Org is at http://orgmode.org diff --git a/doc/org.texi b/doc/org.texi index 7997d20f0..6989c6723 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3,7 +3,7 @@ @setfilename ../../info/org @settitle The Org Manual -@set VERSION 6.01 +@set VERSION 6.02pre-01 @set DATE April 2008 @dircategory Emacs @@ -6439,11 +6439,15 @@ produced. @xref{Text interpretation}, for more details. @item C-c C-e Dispatcher for export and publishing commands. Displays a help-window listing the additional key(s) needed to launch an export or publishing -command. The prefix arg is passed through to the exporter. +command. The prefix arg is passed through to the exporter. If the option +@code{org-export-run-in-background} is set, Org will run the command in the +background if that seems useful for the specific command (i.e. commands that +write to a file). @kindex C-u C-u C-c C-e @item C-u C-u C-c C-e -Try to execute an export/publishing command in the background. This is only -allowed for commands that do not expect to use the output of the exporter. +Call an the exporter, but reverse the setting of +@code{org-export-run-in-background}, i.e. request background processing if +not set, or force processing in the current Emacs process if st. @end table @menu diff --git a/doc/orgcard.tex b/doc/orgcard.tex index f176c666c..6989c6749 100644 --- a/doc/orgcard.tex +++ b/doc/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{6.01} +\def\orgversionnumber{6.02pre-01} \def\versionyear{2008} % latest update \def\year{2008} % latest copyright year diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b4d1d1c92..3e7af48d6 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-archive.el b/lisp/org-archive.el index eb8457f7e..f2da637df 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index d180745b1..95f8f0ab2 100644 --- a/lisp/org-bbdb.el +++ b/lisp/org-bbdb.el @@ -6,7 +6,7 @@ ;; Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index 38f1d2190..4559b6498 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -5,7 +5,7 @@ ;; Author: Bastien Guerry ;; Carsten Dominik ;; Keywords: org, wp, remember -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 9a93399cd..470705501 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 7630e9c8e..fc54bd05d 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 415ba4b24..bcc5279e1 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 4974dad44..e48f40427 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; @@ -49,6 +49,21 @@ ;; FIXME (defvar org-export-publishing-directory nil) +(defcustom org-export-run-in-background nil + "Non-nil means export and publishing commands will run in background. +This works by starting up a separate Emacs process visiting the same file +and doing the export from there. +Not all export commands are affected by this - only the ones which +actually write to a file, and that do not depend on the buffer state. + +If this option is nil, you can still get background export by calling +`org-export' with a double prefix arg: `C-u C-u C-c C-e'. + +If this option is t, the double prefix can be used to exceptionally +force an export command into the current process." + :group 'org-export-general + :type 'boolean) + (defcustom org-export-with-special-strings t "Non-nil means, interpret \"\-\", \"--\" and \"---\" for export. When this option is turned on, these strings will be exported as: @@ -747,9 +762,17 @@ modified) list.") ;;;###autoload (defun org-export (&optional arg) - "Export dispatcher for Org-mode." + "Export dispatcher for Org-mode. +When `org-export-run-in-background' is non-nil, try to run the command +in the background. This will be done only for commands that write +to a file. For details see the docstring of `org-export-run-in-background'. + +The prefix argument ARG will be passed to the exporter. However, if +ARG is a double universal prefix `C-u C-u', that means to inverse the +value of `org-export-run-in-background'." (interactive "P") - (let ((help "[t] insert the export option template + (let* ((bg (org-xor (equal arg '(16)) org-export-run-in-background)) + (help "[t] insert the export option template \[v] limit export to visible part of outline tree \[a] export as ASCII @@ -771,25 +794,25 @@ modified) list.") \[P] publish current project \[X] publish... (project will be prompted for) \[A] publish all projects") - (cmds - '((?t org-insert-export-options-template nil) - (?v org-export-visible nil) - (?a org-export-as-ascii t) - (?h org-export-as-html t) - (?b org-export-as-html-and-open t) - (?H org-export-as-html-to-buffer nil) - (?R org-export-region-as-html t) - (?x org-export-as-xoxo t) - (?l org-export-as-latex t) - (?L org-export-as-latex-to-buffer nil) - (?i org-export-icalendar-this-file t) - (?I org-export-icalendar-all-agenda-files t) - (?c org-export-icalendar-combine-agenda-files t) - (?F org-publish-current-file t) - (?P org-publish-current-project t) - (?X org-publish t) - (?A org-publish-all t))) - r1 r2 ass) + (cmds + '((?t org-insert-export-options-template nil) + (?v org-export-visible nil) + (?a org-export-as-ascii t) + (?h org-export-as-html t) + (?b org-export-as-html-and-open t) + (?H org-export-as-html-to-buffer nil) + (?R org-export-region-as-html nil) + (?x org-export-as-xoxo t) + (?l org-export-as-latex t) + (?L org-export-as-latex-to-buffer nil) + (?i org-export-icalendar-this-file t) + (?I org-export-icalendar-all-agenda-files t) + (?c org-export-icalendar-combine-agenda-files t) + (?F org-publish-current-file t) + (?P org-publish-current-project t) + (?X org-publish t) + (?A org-publish-all t))) + r1 r2 ass) (save-window-excursion (delete-other-windows) (with-output-to-temp-buffer "*Org Export/Publishing Help*" @@ -799,29 +822,27 @@ modified) list.") (setq r2 (if (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) (error "No command associated with key %c" r1)) - (cond - ((and (equal arg '(16)) (nth 2 ass)) - (let ((p (start-process - (concat "Exporting " (file-name-nondirectory (buffer-file-name))) - "*Org Export Processes*" - "emacs" "-batch" - "-l" user-init-file - "--eval" "(require 'org-exp)" - (buffer-file-name) - (concat "Exporting " (file-name-nondirectory (buffer-file-name))) - "-f" (symbol-name (nth 1 ass))))) - (set-process-sentinel p 'org-export-process-sentinel) - (message "Process \"%s\": started in background" p))) - ((equal arg '(16)) - (error "Background processing for export command `%c' is not allowed" - (car ass))) - (t - (call-interactively (nth 1 ass)))))) + (if (and bg (nth 2 ass)) + ;; execute in background + (let ((p (start-process + (concat "Exporting " (file-name-nondirectory (buffer-file-name))) + "*Org Processes*" + (expand-file-name invocation-name invocation-directory) + "-batch" + "-l" user-init-file + "--eval" "(require 'org-exp)" + "--eval" "(setq org-wait .2)" + (buffer-file-name) + "-f" (symbol-name (nth 1 ass))))) + (set-process-sentinel p 'org-export-process-sentinel) + (message "Background process \"%s\": started" p)) + ;; background processing not requested, or not possible + (call-interactively (nth 1 ass))))) (defun org-export-process-sentinel (process status) (if (string-match "\n+\\'" status) (setq status (substring status 0 -1))) - (message "Process \"%s\": %s" process status)) + (message "Background process \"%s\": %s" process status)) (defconst org-html-entities '(("nbsp") @@ -2089,7 +2110,7 @@ a Lisp program could call this function in the following way: (setq html (org-export-region-as-html beg end t 'string)) When called interactively, the output buffer is selected, and shown -in a window. A non-interactive call will only retunr the buffer." +in a window. A non-interactive call will only return the buffer." (interactive "r\nP") (when (interactive-p) (setq buffer "*Org HTML Export*")) @@ -3398,7 +3419,9 @@ file and store it under the name `org-combined-agenda-icalendar-file'." (org-finish-icalendar-file) (set-buffer ical-buffer) (save-buffer) - (run-hooks 'org-after-save-iCalendar-file-hook))))) + (run-hooks 'org-after-save-iCalendar-file-hook) + (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait)) + )))) (org-release-buffers org-agenda-new-buffers)))) (defvar org-after-save-iCalendar-file-hook nil diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el index 3f2740c0c..1b77cd929 100644 --- a/lisp/org-export-latex.el +++ b/lisp/org-export-latex.el @@ -4,7 +4,7 @@ ;; ;; Emacs Lisp Archive Entry ;; Filename: org-export-latex.el -;; Version: 6.01 +;; Version: 6.02pre-01 ;; Author: Bastien Guerry ;; Maintainer: Bastien Guerry ;; Keywords: org, wp, tex diff --git a/lisp/org-faces.el b/lisp/org-faces.el index b176c15b5..f811bcfcb 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index 3a5536d7c..6623abe3d 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-info.el b/lisp/org-info.el index 5436fd705..c72c2ae23 100644 --- a/lisp/org-info.el +++ b/lisp/org-info.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-infojs.el b/lisp/org-infojs.el index 3dd3fdf87..a8d27d10a 100644 --- a/lisp/org-infojs.el +++ b/lisp/org-infojs.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-irc.el b/lisp/org-irc.el index 96129e5fa..81c21fd2f 100644 --- a/lisp/org-irc.el +++ b/lisp/org-irc.el @@ -4,7 +4,7 @@ ;; ;; Author: Philip Jackson ;; Keywords: erc, irc, link, org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index ad191138b..1cf4d53a1 100644 --- a/lisp/org-mac-message.el +++ b/lisp/org-mac-message.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2008 Free Software Foundation, Inc. ;; Author: John Wiegley -;; Version: 6.01 +;; Version: 6.02pre-01 ;; Keywords: outlines, hypermedia, calendar, wp ;; This file is part of GNU Emacs. diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 80e51d208..1821e6e7a 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mew.el b/lisp/org-mew.el index 8571dc0eb..c6f218ff9 100644 --- a/lisp/org-mew.el +++ b/lisp/org-mew.el @@ -4,7 +4,7 @@ ;; ;; Emacs Lisp Archive Entry ;; Filename: org-mew.el -;; Version: 6.01 +;; Version: 6.02pre-01 ;; Author: Bastien Guerry ;; Maintainer: Bastien Guerry ;; Keywords: org, mail, Mew diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el index c815f27d7..705fffc6b 100644 --- a/lisp/org-mhe.el +++ b/lisp/org-mhe.el @@ -5,7 +5,7 @@ ;; Author: Thomas Baumann ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 8d3288d4e..e273651a8 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -4,7 +4,7 @@ ;; ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-publish.el b/lisp/org-publish.el index ebcfcb8d1..234471c22 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -4,7 +4,7 @@ ;; Author: David O'Toole ;; Maintainer: Bastien Guerry ;; Keywords: hypermedia, outlines, wp -;; Version: 6.01 +;; Version: 6.02pre-01 ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-remember.el b/lisp/org-remember.el index 4416fba30..aef1def67 100644 --- a/lisp/org-remember.el +++ b/lisp/org-remember.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el index 46636660a..43f3aa524 100644 --- a/lisp/org-rmail.el +++ b/lisp/org-rmail.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-table.el b/lisp/org-table.el index fa7ca625e..483adad0c 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-vm.el b/lisp/org-vm.el index 4c3940a39..1df464fb8 100644 --- a/lisp/org-vm.el +++ b/lisp/org-vm.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-wl.el b/lisp/org-wl.el index e82472357..cb8487adc 100644 --- a/lisp/org-wl.el +++ b/lisp/org-wl.el @@ -5,7 +5,7 @@ ;; Author: Tokuya Kameshima ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org.el b/lisp/org.el index fe94effa9..1d5c089cb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.01 +;; Version: 6.02pre-01 ;; ;; This file is part of GNU Emacs. ;; @@ -93,7 +93,7 @@ ;;; Version -(defconst org-version "6.01" +(defconst org-version "6.02pre-01" "The version number of the file org.el.") (defun org-version (&optional here) @@ -7024,7 +7024,7 @@ onto the ring." ;;; Following file links - +(defvar org-wait nil) (defun org-open-file (path &optional in-emacs line search) "Open the file at PATH. First, this expands any special file name abbreviations. Then the @@ -7080,7 +7080,9 @@ If the file does not exist, an error is thrown." (save-match-data (shell-quote-argument file)) t t cmd))) (save-window-excursion - (start-process-shell-command cmd nil cmd))) + (start-process-shell-command cmd nil cmd) + (and (boundp 'org-wait) (numberp org-wait) (sit-for org-wait)) + )) ((or (stringp cmd) (eq cmd 'emacs)) (funcall (cdr (assq 'file org-link-frame-setup)) file)