diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org index 99ef86cd4..fe5f75c81 100644 --- a/ORGWEBPAGE/Changes.org +++ b/ORGWEBPAGE/Changes.org @@ -74,12 +74,9 @@ Org mode examples. You can now use the key "C-c '" (that is C-c followed by the single quote) to edit the example in its native mode. This works by creating an indirect buffer, narrowing it to the example and setting the appropriate mode. You need to exit -editing by killing that indirect buffer, with =C-x k=. This is -important, because lines that have syntactic meaning in Org will -be quoted when the indirect buffer is killed. - -I guess it would be nice to exit with =C-c C-c=, but who knows -what this key is supposed to do in a random mode. +editing by pressing "C-c '" again. This is important, because +lines that have syntactic meaning in Org will be quoted by +calling this command. *** iCalendar now defines proper UIDs for entries diff --git a/ORGWEBPAGE/index.org b/ORGWEBPAGE/index.org index 94b0abd5f..169e68488 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.04) and Compatibility +* Current Version (6.04a) and Compatibility -The current version is 6.04. To see what has changed in recent +The current version is 6.04a. 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, @@ -41,7 +41,7 @@ release. **** Distribution -Download as [[file:org-6.04.zip][zip file]] or [[file:org-6.04.tar.gz][gzipped tar archive]]. These archives contain +Download as [[file:org-6.04a.zip][zip file]] or [[file:org-6.04a.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 66c8d8005..7b8c46085 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.04 +The version of this release is: 6.04a The homepage of Org is at http://orgmode.org diff --git a/doc/org.texi b/doc/org.texi index 8b30ebad1..cbbc362b1 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -3,7 +3,7 @@ @setfilename ../../info/org @settitle The Org Manual -@set VERSION 6.04 +@set VERSION 6.04a @set DATE May 2008 @dircategory Emacs @@ -6838,8 +6838,7 @@ example: @item C-c ' Edit the source code example at point in its native mode. This works by switching to an indirect buffer, narrowing the buffer and switching to the -other mode. You need to exit by killing the indirect buffer using @kbd{C-x -k}. +other mode. You need to exit by pressing @kbd{C-c '} again. @end table diff --git a/doc/orgcard.tex b/doc/orgcard.tex index 6e8cc8194..fbf2c48f8 100644 --- a/doc/orgcard.tex +++ b/doc/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{6.04} +\def\orgversionnumber{6.04a} \def\versionyear{2008} % latest update \def\year{2008} % latest copyright year diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 644482622..c969548fd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2008-05-25 Carsten Dominik + * org.el (org-edit-src-exit): New function. + (org-exit-edit-mode): New minor mode. + + * org-exp.el (org-export-preprocess-string): Fix bug with removing + comment-like lines from protected examples. + * org.el (org-edit-src-example, org-find-src-example-start) (org-protect-source-example, org-edit-special): New functions. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 14446148f..4f370d0ff 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-archive.el b/lisp/org-archive.el index 4ab9ea97b..570110791 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el index 10e1f008e..350a16e77 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index cec7c4b39..68fb17028 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 53afc111a..fafa2e8b0 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-colview-xemacs.el b/lisp/org-colview-xemacs.el index 55c75449c..0ee983975 100644 --- a/lisp/org-colview-xemacs.el +++ b/lisp/org-colview-xemacs.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-colview.el b/lisp/org-colview.el index c38f576c9..aaddde4ee 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 4d8df5a0e..1ab61ae28 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 4abe942b6..801b3ea00 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; @@ -1463,7 +1463,9 @@ on this string to produce the exported version." (progn (add-text-properties (match-beginning 0) (match-end 0) '(org-protected t)) (replace-match (format commentsp (match-string 1)) t t)) - (replace-match ""))) + (goto-char (1+ (match-beginning 0))) + (org-if-unprotected (replace-match "")) + (end-of-line 1))) ;; Find matches for radio targets and turn them into internal links (goto-char (point-min)) diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el index abd5f8eb0..c7dd2be02 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.04 +;; Version: 6.04a ;; Author: Bastien Guerry ;; Maintainer: Bastien Guerry ;; Keywords: org, wp, tex diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 3e879b5bb..5bbaa0be0 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index 2a920caee..260591afc 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-id.el b/lisp/org-id.el index a5b41821f..ae5eae3b5 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-info.el b/lisp/org-info.el index f53e2a422..c25ec9593 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-irc.el b/lisp/org-irc.el index 726b09fa4..608d7619d 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-jsinfo.el b/lisp/org-jsinfo.el index de7098aa4..f5f5f661a 100644 --- a/lisp/org-jsinfo.el +++ b/lisp/org-jsinfo.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mac-message.el b/lisp/org-mac-message.el index 31d6ab980..21eefc433 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.04 +;; Version: 6.04a ;; 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 8dfbd0925..3d08a6123 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mew.el b/lisp/org-mew.el index 04ddcdd86..fc73faff8 100644 --- a/lisp/org-mew.el +++ b/lisp/org-mew.el @@ -5,7 +5,7 @@ ;; Author: Tokuya Kameshima ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 6.04 +;; Version: 6.04a ;; This file is part of GNU Emacs. diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el index 42b6fb765..819352694 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 4bd2659bc..0d4547884 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -4,7 +4,7 @@ ;; ;; Author: Piotr Zielinski ;; Maintainer: Carsten Dominik -;; Version: 6.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 79132b6ef..e18953c0b 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.04 +;; Version: 6.04a ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-remember.el b/lisp/org-remember.el index 0db74bf12..5132b2034 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-rmail.el b/lisp/org-rmail.el index ae67fdee3..bda2f65a8 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-table.el b/lisp/org-table.el index 486ef0d32..2cdfa5a90 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-vm.el b/lisp/org-vm.el index 5876908a8..a784bd8d8 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org-wl.el b/lisp/org-wl.el index 5f7181cb7..647c23bcf 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; diff --git a/lisp/org.el b/lisp/org.el index 651594aa7..646e8b3a6 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.04 +;; Version: 6.04a ;; ;; This file is part of GNU Emacs. ;; @@ -91,7 +91,7 @@ ;;; Version -(defconst org-version "6.04" +(defconst org-version "6.04a" "The version number of the file org.el.") (defun org-version (&optional here) @@ -5333,6 +5333,12 @@ If WITH-CASE is non-nil, the sorting will be case-sensitive." ;;; Editing source examples +(defvar org-exit-edit-mode-map (make-sparse-keymap)) +(define-key org-exit-edit-mode-map "\C-c'" 'org-edit-src-exit) + +(define-minor-mode org-exit-edit-mode + "Minor mode installing a single key binding, \"C-c '\" to exit special edit.") + (defun org-edit-src-example () "Edit the source code example at point. An indirect buffer is created, and that buffer is then narrowed to the @@ -5343,7 +5349,7 @@ in this way because some Org quoting of the example will take place." (let ((line (org-current-line)) (case-fold-search t) (msg (substitute-command-keys - "Edit, then kill this indirect buffer with \\[kill-buffer]")) + "Edit, then kill this indirect buffer with C-c ' (C-c and single quote)")) beg end) (if (not (org-find-src-example-start)) ;; not at an example @@ -5367,13 +5373,14 @@ in this way because some Org quoting of the example will take place." (switch-to-buffer (make-indirect-buffer (current-buffer) "*Org Edit Src Example*")) (narrow-to-region beg end) - (funcall lang-f) + (let ((org-inhibit-startup t)) + (funcall lang-f)) (goto-char (point-min)) (while (re-search-forward "^," nil t) (replace-match "")) (goto-char (point-min)) (goto-line line) - (org-add-hook 'kill-buffer-hook 'org-protect-source-example nil 'loc) + (org-exit-edit-mode) (org-set-local 'header-line-format msg) (message "%s" msg) t))) @@ -5394,13 +5401,18 @@ If not, just return nil." (goto-char pos) nil)))) -(defun org-protect-source-example () - "Protect example lines with Org syntax." +(defun org-edit-src-exit () + "Exit special edit and protect problematic lines." + (interactive) (unless (> (point-min) 1) (error "This buffer is not narrowed, something is wrong...")) (goto-char (point-min)) (while (re-search-forward (if (org-mode-p) "^\\(.\\)" "^\\([*#]\\)") nil t) - (replace-match ",\\1"))) + (replace-match ",\\1")) + (when font-lock-mode + (font-lock-unfontify-region (point-min) (point-max))) + (put-text-property (point-min) (point-max) 'font-lock-fontified t) + (kill-buffer (current-buffer))) ;;;; Plain list items, including checkboxes