summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-06-17 20:57:37 +0000
committerMiles Bader <miles@gnu.org>2006-06-17 20:57:37 +0000
commit10c1758c0b2d29b3e1fb8e3ffe5c5dc262f25217 (patch)
tree78d2db4ab91026e7d5373086d022a2bce083200b /lisp
parent2090e2a3897bd0e36fd0e8ba13d861668a0a887f (diff)
parentf362b76002bfd0f43af76a7772a808c042302f07 (diff)
downloademacs-10c1758c0b2d29b3e1fb8e3ffe5c5dc262f25217.tar.gz
emacs-10c1758c0b2d29b3e1fb8e3ffe5c5dc262f25217.tar.bz2
emacs-10c1758c0b2d29b3e1fb8e3ffe5c5dc262f25217.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 300-313) - Update from CVS - Update from CVS: lispref/display.texi (Forcing Redisplay): Fix typo. - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 105-106) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-74
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog146
-rw-r--r--lisp/cus-edit.el1
-rw-r--r--lisp/cus-start.el7
-rw-r--r--lisp/facemenu.el3
-rw-r--r--lisp/files.el11
-rw-r--r--lisp/gnus/ChangeLog11
-rw-r--r--lisp/gnus/gnus-art.el6
-rw-r--r--lisp/gnus/message.el33
-rw-r--r--lisp/help.el43
-rw-r--r--lisp/ido.el27
-rw-r--r--lisp/language/ethio-util.el2
-rw-r--r--lisp/mail/sendmail.el13
-rw-r--r--lisp/mh-e/ChangeLog19
-rw-r--r--lisp/mh-e/mh-comp.el31
-rw-r--r--lisp/mh-e/mh-search.el4
-rw-r--r--lisp/net/ldap.el6
-rw-r--r--lisp/net/tramp.el7
-rw-r--r--lisp/obsolete/options.el2
-rw-r--r--lisp/pcvs.el22
-rw-r--r--lisp/play/pong.el2
-rw-r--r--lisp/progmodes/cperl-mode.el10
-rw-r--r--lisp/progmodes/gdb-ui.el47
-rw-r--r--lisp/progmodes/make-mode.el2
-rw-r--r--lisp/server.el12
-rw-r--r--lisp/term.el15
-rw-r--r--lisp/term/mac-win.el20
-rw-r--r--lisp/textmodes/ispell.el12
-rw-r--r--lisp/textmodes/org.el663
-rw-r--r--lisp/textmodes/page-ext.el4
29 files changed, 901 insertions, 280 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 24e371c2240..9666bfa58aa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,136 @@
+2006-06-16 Richard Stallman <rms@gnu.org>
+
+ * obsolete/options.el (list-options): Put "obsolete" msg in buffer.
+
+ * files.el (basic-save-buffer-2): For a new precious file,
+ use the default modes in the return value.
+
+ * facemenu.el (facemenu-color-alist): Doc fix.
+
+ * cus-edit.el (custom-guess-name-alist): Recognize `-flag'.
+
+2006-06-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * cus-start.el (all): Add mac-ts-script-language-on-focus.
+
+ * term/mac-win.el (mac-text-encoding-ascii): New constant.
+ (mac-utxt-to-string): Use it.
+ (mac-ts-update-active-input-area): Use mac-ae-number.
+
+2006-06-15 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * term.el (term-handle-scroll, term-delete-lines)
+ (term-insert-lines): Fix off by one errors.
+
+2006-06-15 Katsumi Yamaoka <yamaoka@jpl.org> (tiny change)
+
+ * net/tramp.el (tramp-touch): Use UTC to express time.
+
+2006-06-15 Chong Yidong <cyd@stupidchicken.com>
+
+ * mail/sendmail.el (mail-send): Search explicitly for
+ mail-header-separator when checking for corrupted header lines.
+
+2006-06-15 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-same-frame): New option.
+ (gud-old-arrow, gdb-frame-begin, gdb-printing): New variables.
+ (gdb-init-1): Initialise them.
+ (gdb-starting): Reset gdb-printing
+ (gdb-starting): Save value of gud-overlay-arrow-position.
+ (gdb-frame-begin): Set gdb-frame-begin, gdb-printing.
+ (gdb-stopped): Don't look for source if calling procedure e.g "p a ()".
+ Use gdb-*-gdb-buffer conditionally on gdb-same-frame.
+ (gdb-frame-gdb-buffer): Keep menu bar, tool bar for GUD buffer.
+
+2006-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * pcvs.el (cvs-retrieve-revision): Use decode-coding-inserted-region.
+
+2006-06-13 Martin J. Reed <mjreed@essex.ac.uk> (tiny change)
+
+ * net/ldap.el (ldap-ldapsearch-args): Default to SASL search.
+ (ldap-search-internal): Keep error messages, and a regexp fix.
+
+2006-06-12 Thien-Thi Nguyen <ttn@gnu.org>
+
+ * files.el (hack-local-variables-confirm):
+ Display string value using its printed representation.
+
+2006-06-11 Chong Yidong <cyd@stupidchicken.com>
+
+ * server.el (server-edit): No-op if no server buffers exist.
+
+2006-06-11 Robert J. Chassell <bob@rattlesnake.com>
+
+ * textmodes/page-ext.el (pages-directory-for-addresses):
+ Including `pages-directory-address-mode' in the function results
+ in the message "Buffer in which pages were found is deleted".
+
+2006-06-10 Carsten Dominik <dominik@science.uva.nl>
+
+ * textmodes/org.el: (org-agenda-mode-map): Add bindings for
+ clocking functions.
+
+ (org-agenda-clock-in, org-check-running-clock)
+ (org-clock-out-if-current, org-remove-clock-overlays)
+ (org-put-clock-overlay): New functions.
+ (org-clock-marker, org-clock-file-total-minutes)
+ (org-clock-overlays): New variables.
+ (org-clock-display, org-clock-sum, org-clock-cancel)
+ (org-clock-out, org-clock-in): New commands.
+ (org-export): New function.
+ (org-emph-re): New constant.
+ (org-set-emph-re, org-do-emphasis-faces): New functions.
+ (org-emphasis-regexp-components, org-emphasis-alist): New options.
+ (org-set-font-lock-defaults): Call `org-do-emphasis-faces'.
+ (org-export-html-convert-emphasize): Use the configurable emphasis.
+ (org-cleaned-string-for-export): Make multiline emphasis visible
+ to the exporter. New optional argument PARAMETERS.
+ (org-export-as-html): Specify :emph-multiline parameter to
+ `org-cleaned-string-for-export'.
+
+2006-06-10 Richard Stallman <rms@gnu.org>
+
+ * help.el (help-for-help-internal): Clean up help text.
+
+2006-06-10 Andreas Schwab <schwab@suse.de>
+
+ * language/ethio-util.el (ethio-fidel-to-java-buffer): Fix quoting
+ in doc string.
+
+ * progmodes/cperl-mode.el (cperl-short-docs): Likewise.
+
+2006-06-09 Karl Chen <quarl@cs.berkeley.edu>
+
+ * progmodes/make-mode.el (makefile-fill-paragraph): Don't remove
+ spaces after the comment start.
+
+2006-06-09 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org>
+
+ * play/pong.el (pong-init-buffer):
+ Fill buffer with spaces instead of ^A.
+
+ * textmodes/ispell.el (ispell-kill-ispell): If ispell has been
+ launched asynchronously, delete its process instead of being cool.
+ (ispell-async-processp): Check for `delete-process' existence
+ instead of `kill-process' one for consistency.
+
+2006-06-09 Nick Roberts <nickrob@snap.net.nz>
+
+ * progmodes/gdb-ui.el (gdb-set-gud-minor-mode-existing-buffers-1)
+ (gdb-prompt, gdb-set-gud-minor-mode-existing-buffers): Show status
+ in mode line at startup.
+
+2006-06-08 Kim F. Storm <storm@cua.dk>
+
+ * ido.el (ido-take-first-match, ido-push-dir-first): New commands.
+ (ido-init-completion-maps): Bind them to M-SPC and M-v.
+ (ido-copy-current-file-name): Repeating C-w inserts whole file name.
+ (ido-file-internal): Pass full file name to write-file.
+ (ido-read-internal): Only pop stack elements automatically if they
+ actually match an existing directory or file name.
+
2006-06-07 Kenichi Handa <handa@m17n.org>
* international/mule.el (find-auto-coding): Don't handle the short
@@ -8,8 +141,7 @@
2006-06-06 Jesper Harder <harder@phys.au.dk>
- * ediff-diff.el (ediff-test-utility): Protect against
- file-error.
+ * ediff-diff.el (ediff-test-utility): Protect against file-error.
2006-06-06 Chong Yidong <cyd@stupidchicken.com>
@@ -41,7 +173,7 @@
cookies but no other non-empty fields.
(org-set-tags): Allow groups of mutually exclusive tags.
(org-cmp-time): Sort 24:21 before items without time.
- (org-get-time-of-day): Fixed the interpretation of 12pm and 12am.
+ (org-get-time-of-day): Fix the interpretation of 12pm and 12am.
(org-open-at-point): Require double colon also for numbers.
2006-06-06 Kim F. Storm <storm@cua.dk>
@@ -81,8 +213,8 @@
2006-06-05 Kenichi Handa <handa@m17n.org>
- * international/mule.el (find-auto-coding): Handle
- enable-character-translation in file header.
+ * international/mule.el (find-auto-coding):
+ Handle enable-character-translation in file header.
2006-06-04 Kim F. Storm <storm@cua.dk>
@@ -151,8 +283,8 @@
as well as `coding'.
(hack-local-variables): Likewise.
- * international/mule.el (enable-character-translation): Put
- permanent-local and safe-local-variable properties.
+ * international/mule.el (enable-character-translation):
+ Put permanent-local and safe-local-variable properties.
(find-auto-coding): Handle char-trans: tag.
2006-06-02 Juri Linkov <juri@jurta.org>
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 52f66038ea6..e700cd47d16 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -587,6 +587,7 @@ WIDGET is the widget to apply the filter entries of MENU on."
(defcustom custom-guess-name-alist
'(("-p\\'" boolean)
+ ("-flag\\'" boolean)
("-hook\\'" hook)
("-face\\'" face)
("-file\\'" file)
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 79b142470d1..e35a75da598 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -225,6 +225,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(mac-pass-command-to-system mac boolean "22.1")
(mac-pass-control-to-system mac boolean "22.1")
(mac-allow-anti-aliasing mac boolean "22.1")
+ (mac-ts-script-language-on-focus mac
+ (choice (const :tag "System default behavior" nil)
+ (const :tag "Restore to script/language used in the last focus frame" t)
+ (cons :tag "Specify script/language"
+ (integer :tag "Script code")
+ (integer :tag "Language code")))
+ "22.1")
;; This is not good news because it will use the wrong
;; version-specific directories when you upgrade. We need
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 04f70708359..5478cf12b8c 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -308,9 +308,8 @@ May also be t meaning to use `facemenu-add-face-function'."
;;; Internal Variables
(defvar facemenu-color-alist nil
- ;; Don't initialize here; that doesn't work if preloaded.
"Alist of colors, used for completion.
-If null, `facemenu-read-color' will set it.")
+If this is nil, then the value of (defined-colors) is used.")
(defun facemenu-update ()
"Add or update the \"Face\" menu in the menu bar.
diff --git a/lisp/files.el b/lisp/files.el
index b4bc8f9ffec..3313f003d89 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2406,7 +2406,11 @@ n -- to ignore the local variables list.")
(insert " ")))
(princ (car elt) buf)
(insert " : ")
- (princ (cdr elt) buf)
+ (if (stringp (cdr elt))
+ ;; Make strings with embedded whitespace easier to read.
+ (let ((print-escape-newlines t))
+ (prin1 (cdr elt) buf))
+ (princ (cdr elt) buf))
(insert "\n"))
(setq prompt
(format "Please type %s%s: "
@@ -3626,8 +3630,9 @@ Before and after saving the buffer, this function runs
(set-visited-file-modtime old-modtime)))
;; Since we have created an entirely new file,
;; make sure it gets the right permission bits set.
- (setq setmodes (or setmodes (cons (file-modes buffer-file-name)
- buffer-file-name)))
+ (setq setmodes (or setmodes
+ (cons (or (file-modes buffer-file-name) umask)
+ buffer-file-name)))
;; We succeeded in writing the temp file,
;; so rename it.
(rename-file tempname buffer-file-name t))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 71aa3654da6..1899fd9d845 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,14 @@
+2006-06-16 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-syntax-checks): Doc fix.
+ (message-send-mail): Add check for continuation headers.
+ (message-check-news-header-syntax): Fix regexp used to check for
+ continuation headers.
+
+2006-06-14 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-display-mime): Make sure body ends with newline.
+
2006-06-06 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-util.el (mm-mime-mule-charset-alist): Use unicode-precedence-list
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 4722e98ef19..39292e33a1f 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4927,7 +4927,11 @@ N is the numerical prefix."
(article-goto-body)
(narrow-to-region (point-min) (point))
(gnus-article-save-original-date
- (gnus-treat-article 'head)))))))))
+ (gnus-treat-article 'head)))))))
+ ;; Cope with broken MIME messages.
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))))
(defcustom gnus-mime-display-multipart-as-mixed nil
"Display \"multipart\" parts as \"multipart/mixed\".
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 8bc0f704b5c..91ac018f324 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -190,14 +190,13 @@ To disable checking of long signatures, for instance, add
Don't touch this variable unless you really know what you're doing.
-Checks include `subject-cmsg', `multiple-headers', `sendsys',
-`message-id', `from', `long-lines', `control-chars', `size',
-`new-text', `quoting-style', `redirected-followup', `signature',
-`approved', `sender', `empty', `empty-headers', `message-id', `from',
-`subject', `shorten-followup-to', `existing-newsgroups',
-`buffer-file-name', `unchanged', `newsgroups', `reply-to',
-`continuation-headers', `long-header-lines', `invisible-text' and
-`illegible-text'."
+Checks include `approved', `continuation-headers', `control-chars',
+`empty', `existing-newsgroups', `from', `illegible-text',
+`invisible-text', `long-header-lines', `long-lines', `message-id',
+`multiple-headers', `new-text', `newsgroups', `quoting-style',
+`repeated-newsgroups', `reply-to', `sendsys', `shoot',
+`shorten-followup-to', `signature', `size', `subject', `subject-cmsg'
+and `valid-newsgroups'."
:group 'message-news
:type '(repeat sexp)) ; Fixme: improve this
@@ -3769,6 +3768,16 @@ It should typically alter the sending method in some way or other."
(let ((message-deletable-headers
(if news nil message-deletable-headers)))
(message-generate-headers headers))
+ ;; Check continuation headers.
+ (message-check 'continuation-headers
+ (goto-char (point-min))
+ (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t)
+ (goto-char (match-beginning 0))
+ (if (y-or-n-p "Fix continuation lines? ")
+ (insert " ")
+ (forward-line 1)
+ (unless (y-or-n-p "Send anyway? ")
+ (error "Failed to send the message")))))
;; Let the user do all of the above.
(run-hooks 'message-header-hook))
(unwind-protect
@@ -4326,11 +4335,11 @@ Otherwise, generate and save a value for `canlock-password' first."
(message-check 'continuation-headers
(goto-char (point-min))
(let ((do-posting t))
- (while (re-search-forward "^[^ \t\n][^:\n]*$" nil t)
+ (while (re-search-forward "^[^ \t\n][^ \t\n:]*[ \t\n]" nil t)
+ (goto-char (match-beginning 0))
(if (y-or-n-p "Fix continuation lines? ")
- (progn
- (goto-char (match-beginning 0))
- (insert " "))
+ (insert " ")
+ (forward-line 1)
(unless (y-or-n-p "Send anyway? ")
(setq do-posting nil))))
do-posting))
diff --git a/lisp/help.el b/lisp/help.el
index d9a48a0a4cf..0caf018c2e9 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -182,31 +182,28 @@ specifies what to do when the user exits the help buffer."
"You have typed %THIS-KEY%, the help character. Type a Help option:
\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.)
-a command-apropos. Give a list of words or a regexp, to get a list of
+a command-apropos. Type a list of words or a regexp; it shows a list of
commands whose names match. See also the apropos command.
-b describe-bindings. Display table of all key bindings.
-c describe-key-briefly. Type a command key sequence;
- it prints the function name that sequence runs.
-C describe-coding-system. This describes either a specific coding system
- (if you type its name) or the coding systems currently in use
- (if you type just RET).
-d apropos-documentation. Give a pattern (a list or words or a regexp), and
- see a list of functions, variables, and other items whose built-in
- doucmentation string matches that pattern. See also the apropos command.
-e view-echo-area-messages. Show the buffer where the echo-area messages
- are stored.
-f describe-function. Type a function name and get its documentation.
-F Info-goto-emacs-command-node. Type a function name;
- it takes you to the on-line manual's section that describes
- the command.
+b describe-bindings. Display a table of all key bindings.
+c describe-key-briefly. Type a key sequence;
+ it displays the command name run by that key sequence.
+C describe-coding-system. Type the name of the coding system to describe,
+ or just RET to describe the ones currently in use.
+d apropos-documentation. Type a pattern (a list of words or a regexp), and
+ it shows a list of functions, variables, and other items whose
+ documentation matches that pattern. See also the apropos command.
+e view-echo-area-messages. Go to the buffer that logs echo-area messages.
+f describe-function. Type a function name and you see its documentation.
+F Info-goto-emacs-command-node. Type a command name;
+ it goes to the on-line manual's section that describes the command.
h Display the HELLO file which illustrates various scripts.
-i info. The Info documentation reader: read on-line manuals.
+i info. The Info documentation reader: read on-line manuals.
I describe-input-method. Describe a specific input method (if you type
its name) or the current input method (if you type just RET).
-k describe-key. Type a command key sequence;
+k describe-key. Type a key sequence;
it displays the full documentation for that key sequence.
-K Info-goto-emacs-key-command-node. Type a command key sequence;
- it takes you to the on-line manual's section that describes
+K Info-goto-emacs-key-command-node. Type a key sequence;
+ it goes to the on-line manual's section that describes
the command bound to that key.
l view-lossage. Show last 100 characters you typed.
L describe-language-environment. This describes either a
@@ -218,12 +215,12 @@ n view-emacs-news. Display news of recent Emacs changes.
p finder-by-keyword. Find packages matching a given topic keyword.
r info-emacs-manual. Display the Emacs manual in Info mode.
s describe-syntax. Display contents of syntax table, plus explanations.
-S info-lookup-symbol. Display the definition of a specific symbol
- as found in the manual for the language this buffer is written in.
+S info-lookup-symbol. Type a symbol; it goes to that symbol in the
+ on-line manual for the programming language used in this buffer.
t help-with-tutorial. Select the Emacs learn-by-doing tutorial.
v describe-variable. Type name of a variable;
it displays the variable's documentation and value.
-w where-is. Type command name; it prints which keystrokes
+w where-is. Type a command name; it displays which keystrokes
invoke that command.
. display-local-help. Display any available local help at point
in the echo area.
diff --git a/lisp/ido.el b/lisp/ido.el
index 344f8a667a1..a4c26b52c98 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1538,6 +1538,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
(define-key map "\C-t" 'ido-toggle-regexp)
(define-key map "\C-z" 'ido-undo-merge-work-directory)
(define-key map [(control ?\s)] 'ido-restrict-to-matches)
+ (define-key map [(meta ?\s)] 'ido-take-first-match)
(define-key map [(control ?@)] 'ido-restrict-to-matches)
(define-key map [right] 'ido-next-match)
(define-key map [left] 'ido-prev-match)
@@ -1565,6 +1566,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
(define-key map "\C-l" 'ido-reread-directory)
(define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir)
(define-key map [(meta ?b)] 'ido-push-dir)
+ (define-key map [(meta ?v)] 'ido-push-dir-first)
(define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir)
(define-key map [(meta ?k)] 'ido-forget-work-directory)
(define-key map [(meta ?m)] 'ido-make-directory)
@@ -2092,8 +2094,10 @@ If INITIAL is non-nil, it specifies the initial input string."
(cons (cons ido-current-directory ido-selected) ido-last-directory-list)))))
(ido-set-current-directory ido-current-directory ido-selected)
(if ido-input-stack
- (while ido-input-stack
- (let ((elt (car ido-input-stack)))
+ ; automatically pop stack elements which match existing files or directories
+ (let (elt)
+ (while (and (setq elt (car ido-input-stack))
+ (file-exists-p (concat ido-current-directory (cdr elt))))
(if (setq ido-input-stack (cdr ido-input-stack))
(ido-set-current-directory ido-current-directory (cdr elt))
(setq ido-text-init (cdr elt)))
@@ -2337,7 +2341,7 @@ If INITIAL is non-nil, it specifies the initial input string."
(setq default-directory ido-current-directory)
(ido-record-command 'write-file (concat ido-current-directory filename))
(ido-record-work-directory)
- (write-file filename))
+ (write-file (concat ido-current-directory filename)))
((eq method 'read-only)
(ido-record-work-file filename)
@@ -2805,12 +2809,28 @@ If input stack is non-empty, delete current directory component."
(ido-delete-backward-word-updir 1)
(ido-wide-find-dir)))
+(defun ido-take-first-match ()
+ "Use first matching item as input text."
+ (interactive)
+ (when ido-matches
+ (setq ido-text-init (car ido-matches))
+ (setq ido-exit 'refresh)
+ (exit-minibuffer)))
+
(defun ido-push-dir ()
"Move to previous directory in file name, push current input on stack."
(interactive)
(setq ido-exit 'push)
(exit-minibuffer))
+(defun ido-push-dir-first ()
+ "Move to previous directory in file name, push first match on stack."
+ (interactive)
+ (if ido-matches
+ (setq ido-text (car ido-matches)))
+ (setq ido-exit 'push)
+ (exit-minibuffer))
+
(defun ido-pop-dir (arg)
"Pop directory from input stack back to input.
With \\[universal-argument], pop all element."
@@ -2880,6 +2900,7 @@ If repeated, insert text from buffer instead."
(when name
(setq ido-text-init
(if (or all
+ (eq last-command this-command)
(not (equal (file-name-directory bfname) ido-current-directory))
(not (string-match "\\.[^.]*\\'" name)))
name
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 8a7c0a0ee1e..ba4b22b1153 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -863,7 +863,7 @@ The 2nd and 3rd arguments BEGIN and END specify the region."
(defun ethio-fidel-to-java-buffer nil
"Convert Ethiopic characters into the Java escape sequences.
-Each escape sequence is of the form \uXXXX, where XXXX is the
+Each escape sequence is of the form \\uXXXX, where XXXX is the
character's codepoint (in hex) in Unicode.
If `ethio-java-save-lowercase' is non-nil, use [0-9a-f].
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 3fa7eda968c..0760aa648ec 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -863,11 +863,14 @@ the user from the mailer."
(error "Message contains non-ASCII characters"))))
;; Complain about any invalid line.
(goto-char (point-min))
- (while (< (point) (mail-header-end))
- (unless (looking-at "[ \t]\\|.*:\\|$")
- (push-mark opoint)
- (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
- (forward-line 1))
+ (re-search-forward (regexp-quote mail-header-separator) (point-max) t)
+ (let ((header-end (or (match-beginning 0) (point-max))))
+ (goto-char (point-min))
+ (while (< (point) header-end)
+ (unless (looking-at "[ \t]\\|.*:\\|$")
+ (push-mark opoint)
+ (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
+ (forward-line 1)))
(goto-char opoint)
(run-hooks 'mail-send-hook)
(message "Sending...")
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 94632f8c38d..a679b5d65eb 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,22 @@
+2006-06-15 Bill Wohler <wohler@newt.com>
+
+ * mh-search.el (mh-index-new-folder): Use -2 suffix instead of <2>
+ suffix for folder names, as <> are illegal filenakme characters on
+ Windows (closes SF #1507002).
+
+2006-06-05 Jacob Morzinski <morzinski@MIT.EDU> (tiny change)
+
+ * mh-comp.el (mh-send-uses-spost): New variable.
+ (mh-send-letter): Do not use -msgid and -mime if
+ mh-send-uses-spost is t (closes SF #1486726).
+
+2006-06-02 Bill Wohler <wohler@newt.com>
+
+ (mh-folder-exists-p): Change test from an empty buffer, to one
+ that contains the actual folder, since GNU mailutils' folder
+ command displays output if the folder doesn't exist (closes SF
+ #1499712).
+
2006-05-06 Bill Wohler <wohler@newt.com>
Release MH-E version 8.0.
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index ad80e3be838..7156b0cf318 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -53,6 +53,15 @@
"Name of the MH send program.
Some sites need to change this because of a name conflict.")
+(defvar mh-send-uses-spost-flag nil
+ "Non-nil means \"send\" uses \"spost\" to submit messages.
+
+If the value of \"postproc:\" is \"spost\", you may need to set
+this variable to t to tell MH-E to avoid using features of
+\"post\" that are not supported by \"spost\". You'll know that
+you'll need to do this if sending mail fails with an error of
+\"spost: -msgid unknown\".")
+
(defvar mh-redist-background nil
"If non-nil redist will be done in background like send.
This allows transaction log to be visible if -watch, -verbose or
@@ -267,16 +276,18 @@ use `mh-send-prog' to tell MH-E the name."
(and (boundp 'default-buffer-file-coding-system )
default-buffer-file-coding-system)
'iso-latin-1))))
- ;; Adding a Message-ID field looks good, makes it easier to search for
- ;; message in your +outbox, and best of all doesn't break threading for
- ;; the recipient if you reply to a message in your +outbox.
- (setq mh-send-args (concat "-msgid " mh-send-args))
- ;; The default BCC encapsulation will make a MIME message unreadable.
- ;; With nmh use the -mime arg to prevent this.
- (if (and (mh-variant-p 'nmh)
- (mh-goto-header-field "Bcc:")
- (mh-goto-header-field "Content-Type:"))
- (setq mh-send-args (concat "-mime " mh-send-args)))
+ ;; Older versions of spost do not support -msgid and -mime.
+ (unless mh-send-uses-spost-flag
+ ;; Adding a Message-ID field looks good, makes it easier to search for
+ ;; message in your +outbox, and best of all doesn't break threading for
+ ;; the recipient if you reply to a message in your +outbox.
+ (setq mh-send-args (concat "-msgid " mh-send-args))
+ ;; The default BCC encapsulation will make a MIME message unreadable.
+ ;; With nmh use the -mime arg to prevent this.
+ (if (and (mh-variant-p 'nmh)
+ (mh-goto-header-field "Bcc:")
+ (mh-goto-header-field "Content-Type:"))
+ (setq mh-send-args (concat "-mime " mh-send-args))))
(cond (arg
(pop-to-buffer mh-mail-delivery-buffer)
(erase-buffer)
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index b6f8dd71d9a..62c130bb90f 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1537,7 +1537,7 @@ If folder NAME already exists and was generated for the same
SEARCH-REGEXP then it is reused.
Otherwise if the folder NAME was generated from a different
-search then check if NAME<2> can be used. Otherwise try NAME<3>.
+search then check if NAME-2 can be used. Otherwise try NAME-3.
This is repeated till we find a new folder name.
If the folder returned doesn't exist then it is created."
@@ -1545,7 +1545,7 @@ If the folder returned doesn't exist then it is created."
(error "The argument should be a valid MH folder name"))
(let ((chosen-name
(loop for i from 1
- for candidate = (if (equal i 1) name (format "%s<%s>" name i))
+ for candidate = (if (equal i 1) name (format "%s-%s" name i))
when (or (not (mh-folder-exists-p candidate))
(equal (mh-index-folder-search-regexp candidate)
search-regexp))
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index 180e14fcc20..2a63615a602 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -154,7 +154,7 @@ Valid properties include:
:type '(string :tag "`ldapsearch' Program")
:group 'ldap)
-(defcustom ldap-ldapsearch-args '("-LL" "-tt" "-x")
+(defcustom ldap-ldapsearch-args '("-LL" "-tt")
"*A list of additional arguments to pass to `ldapsearch'."
:type '(repeat :tag "`ldapsearch' Arguments"
(string :tag "Argument"))
@@ -555,7 +555,7 @@ an alist of attribute/value pairs."
(setq arglist (nconc arglist (list (format "-z%s" sizelimit)))))
(eval `(call-process ldap-ldapsearch-prog
nil
- `(,buf nil)
+ buf
nil
,@arglist
,@ldap-ldapsearch-args
@@ -580,7 +580,7 @@ an alist of attribute/value pairs."
(end-of-line)
(point))))
(forward-line 1)
- (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
+ (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)\\(.*\\)$")
(setq name (match-string 1)
value (match-string 4))
;; Need to handle file:///D:/... as generated by OpenLDAP
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 2ebc4d0b45e..c4166bb6d24 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -5017,15 +5017,16 @@ hosts, or files, disagree."
(defun tramp-touch (file time)
"Set the last-modified timestamp of the given file.
TIME is an Emacs internal time value as returned by `current-time'."
- (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
+ (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time t)))
(if (tramp-tramp-file-p file)
(with-parsed-tramp-file-name file nil
(let ((buf (tramp-get-buffer multi-method method user host)))
(unless (zerop (tramp-send-command-and-check
multi-method method user host
- (format "touch -t %s %s"
+ (format "TZ=UTC; export TZ; touch -t %s %s"
touch-time
- localname)))
+ localname)
+ t))
(pop-to-buffer buf)
(error "tramp-touch: touch failed, see buffer `%s' for details"
buf))))
diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el
index 1383666a9b1..968a0bac5f6 100644
--- a/lisp/obsolete/options.el
+++ b/lisp/obsolete/options.el
@@ -41,6 +41,8 @@ It is now better to use Customize instead."
(interactive)
(with-output-to-temp-buffer "*List Options*"
(let (vars)
+ (princ "This facility is obsolete; we recommend using M-x customize instead.")
+
(mapatoms (function (lambda (sym)
(if (user-variable-p sym)
(setq vars (cons sym vars))))))
diff --git a/lisp/pcvs.el b/lisp/pcvs.el
index 5e322b9276a..89aeef53b80 100644
--- a/lisp/pcvs.el
+++ b/lisp/pcvs.el
@@ -1723,16 +1723,22 @@ Signal an error if there is no backup file."
(message "Retrieving revision %s..." rev)
;; Discard stderr output to work around the CVS+SSH+libc
;; problem when stdout and stderr are the same.
- (let ((res (apply 'call-process cvs-program nil '(t nil) nil
- "-q" "update" "-p"
- ;; If `rev' is HEAD, don't pass it at all:
- ;; the default behavior is to get the head
- ;; of the current branch whereas "-r HEAD"
- ;; stupidly gives you the head of the trunk.
- (append (unless (equal rev "HEAD") (list "-r" rev))
- (list file)))))
+ (let ((res
+ (let ((coding-system-for-read 'binary))
+ (apply 'call-process cvs-program nil '(t nil) nil
+ "-q" "update" "-p"
+ ;; If `rev' is HEAD, don't pass it at all:
+ ;; the default behavior is to get the head
+ ;; of the current branch whereas "-r HEAD"
+ ;; stupidly gives you the head of the trunk.
+ (append (unless (equal rev "HEAD") (list "-r" rev))
+ (list file))))))
(when (and res (not (and (equal 0 res))))
(error "Something went wrong retrieving revision %s: %s" rev res))
+ ;; Figure out the encoding used and decode the byte-sequence
+ ;; into a sequence of chars.
+ (decode-coding-inserted-region
+ (point-min) (point-max) file t nil nil t)
(set-buffer-modified-p nil)
(let ((buffer-file-name (expand-file-name file)))
(after-find-file))
diff --git a/lisp/play/pong.el b/lisp/play/pong.el
index d73d789d0d3..4efa8c2a639 100644
--- a/lisp/play/pong.el
+++ b/lisp/play/pong.el
@@ -244,7 +244,7 @@
(gamegrid-init-buffer pong-width
(+ 2 pong-height)
- 1)
+ ?\s)
(let ((buffer-read-only nil))
(loop for y from 0 to (1- pong-height) do
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 36f75b757b5..ad44753f352 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -6298,7 +6298,7 @@ $^E Information about the last system error other than that provided by $!.
$^F The highest system file descriptor, ordinarily 2.
$^H The current set of syntax checks enabled by `use strict'.
$^I The value of the in-place edit extension (perl -i option).
-$^L What formats output to perform a formfeed. Default is \f.
+$^L What formats output to perform a formfeed. Default is \\f.
$^M A buffer for emergency memory allocation when running out of memory.
$^O The operating system name under which this copy of Perl was built.
$^P Internal debugging flag.
@@ -6380,11 +6380,11 @@ $~ The name of the current report format.
@ARGV Command line arguments (not including the command name - see $0).
@INC List of places to look for perl scripts during do/include/use.
@_ Parameter array for subroutines; result of split() unless in list context.
-\\ Creates reference to what follows, like \$var, or quotes non-\w in strings.
+\\ Creates reference to what follows, like \\$var, or quotes non-\\w in strings.
\\0 Octal char, e.g. \\033.
\\E Case modification terminator. See \\Q, \\L, and \\U.
-\\L Lowercase until \\E . See also \l, lc.
-\\U Upcase until \\E . See also \u, uc.
+\\L Lowercase until \\E . See also \\l, lc.
+\\U Upcase until \\E . See also \\u, uc.
\\Q Quote metacharacters until \\E . See also quotemeta.
\\a Alarm character (octal 007).
\\b Backspace character (octal 010).
@@ -6655,7 +6655,7 @@ ucfirst [ EXPR ] Returns EXPR with upcased first letter.
untie VAR Unlink an object from a simple Perl variable.
use PACKAGE [SYMBOL1, ...] Compile-time `require' with consequent `import'.
... xor ... Low-precedence synonym for exclusive or.
-prototype \&SUB Returns prototype of the function given a reference.
+prototype \\&SUB Returns prototype of the function given a reference.
=head1 Top-level heading.
=head2 Second-level heading.
=head3 Third-level heading (is there such?).
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 0f92523e306..f3144cbb84a 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -76,6 +76,9 @@
;; 3) M-x gdb doesn't work with "run" command in .gdbinit, use M-x gdba instead.
;; 4) M-x gdb doesn't work if the corefile is specified in the command in the
;; minibuffer, use M-x gdba instead (or specify the core in the GUD buffer).
+;; 5) If you wish to call procedures from your program in GDB
+;; e.g "call myproc ()", "p mysquare (5)" then use level 2 annotations
+;; "gdb --annotate=2 myprog" to keep source buffer/selected frame fixed.
;;; Problems with watch expressions, GDB/MI:
;; 1) They go out of scope when the inferior is re-run.
@@ -110,6 +113,7 @@ Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
where STATUS is nil (unchanged), `changed' or `out-of-scope', FP the frame
address for root variables.")
(defvar gdb-main-file nil "Source file from which program execution begins.")
+(defvar gud-old-arrow nil)
(defvar gdb-overlay-arrow-position nil)
(defvar gdb-server-prefix nil)
(defvar gdb-flush-pending-output nil)
@@ -126,6 +130,9 @@ and #define directives otherwise.")
(defvar gdb-inferior-status nil)
(defvar gdb-continuation nil)
(defvar gdb-look-up-stack nil)
+(defvar gdb-frame-begin nil
+ "Non-nil when GDB generates frame-begin annotation.")
+(defvar gdb-printing t)
(defvar gdb-buffer-type nil
"One of the symbols bound in `gdb-buffer-rules'.")
@@ -426,7 +433,8 @@ With arg, use separate IO iff arg is positive."
(when gud-tooltip-mode
(make-local-variable 'gdb-define-alist)
(gdb-create-define-alist)
- (add-hook 'after-save-hook 'gdb-create-define-alist nil t)))))))
+ (add-hook 'after-save-hook 'gdb-create-define-alist nil t))))))
+ (gdb-force-mode-line-update "ready"))
(defun gdb-find-watch-expression ()
(let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
@@ -542,7 +550,10 @@ With arg, use separate IO iff arg is positive."
gdb-source-window nil
gdb-inferior-status nil
gdb-continuation nil
- gdb-look-up-stack nil)
+ gdb-look-up-stack nil
+ gdb-frame-begin nil
+ gdb-printing t
+ gud-old-arrow nil)
(setq gdb-buffer-type 'gdba)
@@ -1238,6 +1249,7 @@ happens to be in effect."
"An annotation handler for `prompt'.
This sends the next command (if any) to gdb."
(when gdb-first-prompt
+ (gdb-force-mode-line-update "initializing...")
(gdb-init-1)
(setq gdb-first-prompt nil))
(let ((sink gdb-output-sink))
@@ -1268,6 +1280,7 @@ This sends the next command (if any) to gdb."
This says that I/O for the subprocess is now the program being debugged,
not GDB."
(setq gdb-active-process t)
+ (setq gdb-printing t)
(let ((sink gdb-output-sink))
(cond
((eq sink 'user)
@@ -1276,6 +1289,7 @@ not GDB."
(setq gdb-inferior-status "running")
(gdb-force-mode-line-update gdb-inferior-status)
(gdb-remove-text-properties)
+ (setq gud-old-arrow gud-overlay-arrow-position)
(setq gud-overlay-arrow-position nil)
(setq gdb-overlay-arrow-position nil)
(if gdb-use-separate-io-buffer
@@ -1319,6 +1333,8 @@ directives."
(setq gdb-signalled t))
(defun gdb-frame-begin (ignored)
+ (setq gdb-frame-begin t)
+ (setq gdb-printing nil)
(let ((sink gdb-output-sink))
(cond
((eq sink 'inferior)
@@ -1329,25 +1345,33 @@ directives."
(gdb-resync)
(error "Unexpected frame-begin annotation (%S)" sink)))))
+(defcustom gdb-same-frame focus-follows-mouse
+ "Non-nil means pop up GUD buffer in same frame."
+ :group 'gud
+ :type 'boolean
+ :version "22.1")
+
(defun gdb-stopped (ignored)
"An annotation handler for `stopped'.
It is just like `gdb-stopping', except that if we already set the output
sink to `user' in `gdb-stopping', that is fine."
(setq gud-running nil)
(unless (or gud-overlay-arrow-position gud-last-frame)
+ (if (and gdb-frame-begin gdb-printing)
+ (setq gud-overlay-arrow-position gud-old-arrow)
;;Pop up GUD buffer to display current frame when it doesn't have source
;;information i.e id not compiled with -g as with libc routines generally.
- (let ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist gdb-frame-parameters)
- (same-window-regexps nil))
- (display-buffer gud-comint-buffer))
+ (if gdb-same-frame
+ (gdb-display-gdb-buffer)
+ (gdb-frame-gdb-buffer))
;;Try to find source further up stack e.g after signal.
(setq gdb-look-up-stack
- (if (gdb-get-buffer 'gdb-stack-buffer) 'keep
+ (if (gdb-get-buffer 'gdb-stack-buffer)
+ 'keep
(progn
(gdb-get-buffer-create 'gdb-stack-buffer)
(gdb-invalidate-frames)
- 'delete))))
+ 'delete)))))
(unless (member gdb-inferior-status '("exited" "signal"))
(setq gdb-inferior-status "stopped")
(gdb-force-mode-line-update gdb-inferior-status))
@@ -2755,7 +2779,9 @@ corresponding to the mode line clicked."
"Display GUD buffer in a new frame."
(interactive)
(let ((special-display-regexps (append special-display-regexps '(".*")))
- (special-display-frame-alist gdb-frame-parameters)
+ (special-display-frame-alist
+ (remove '(menu-bar-lines) (remove '(tool-bar-lines)
+ gdb-frame-parameters)))
(same-window-regexps nil))
(display-buffer gud-comint-buffer)))
@@ -3239,7 +3265,8 @@ is set in them."
(when gud-tooltip-mode
(make-local-variable 'gdb-define-alist)
(gdb-create-define-alist)
- (add-hook 'after-save-hook 'gdb-create-define-alist nil t))))))
+ (add-hook 'after-save-hook 'gdb-create-define-alist nil t)))))
+ (gdb-force-mode-line-update "ready"))
; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
(defun gdb-var-list-children-1 (varnum)
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index d22aedb6058..a3146df3e45 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1304,7 +1304,7 @@ definition and conveniently use this command."
(save-excursion
(beginning-of-line)
(cond
- ((looking-at "^#+")
+ ((looking-at "^#+\\s-*")
;; Found a comment. Return nil to let normal filling take place.
nil)
diff --git a/lisp/server.el b/lisp/server.el
index d20caf34f79..266d9d7824f 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -576,11 +576,13 @@ which filenames are considered temporary.
If invoked with a prefix argument, or if there is no server process running,
starts server process and that is all. Invoked by \\[server-edit]."
(interactive "P")
- (if (or arg
- (not server-process)
- (memq (process-status server-process) '(signal exit)))
- (server-mode 1)
- (apply 'server-switch-buffer (server-done))))
+ (cond
+ ((or arg
+ (not server-process)
+ (memq (process-status server-process) '(signal exit)))
+ (server-mode 1))
+ (server-clients (apply 'server-switch-buffer (server-done)))
+ (t (message "No server editing buffers exist"))))
(defun server-switch-buffer (&optional next-buffer killed-one)
"Switch to another buffer, preferably one that has a client.
diff --git a/lisp/term.el b/lisp/term.el
index 9ecb1efa948..cdaa72b7d94 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -3611,7 +3611,7 @@ all pending output has been dealt with."))
(progn
;; Delete scroll-needed lines at term-scroll-end,
;; then insert scroll-needed lines.
- (term-vertical-motion (1- term-scroll-end))
+ (term-vertical-motion term-scroll-end)
(end-of-line)
(setq save-top (point))
(term-vertical-motion scroll-needed)
@@ -3765,11 +3765,12 @@ Should only be called when point is at the start of a screen line."
(save-current-column term-current-column)
(save-start-line-column term-start-line-column)
(save-current-row (term-current-row)))
- (when (>= (+ save-current-row lines) term-scroll-end)
- (setq lines (- lines (- (+ save-current-row lines) term-scroll-end))))
+ ;; The number of inserted lines shouldn't exceed the scroll region end.
+ (when (> (+ save-current-row lines) (1+ term-scroll-end))
+ (setq lines (- lines (- (+ save-current-row lines) (1+ term-scroll-end)))))
(term-down lines)
(delete-region start (point))
- (term-down (- term-scroll-end save-current-row lines))
+ (term-down (- (1+ term-scroll-end) save-current-row lines))
(term-insert-char ?\n lines)
(setq term-current-column save-current-column)
(setq term-start-line-column save-start-line-column)
@@ -3790,9 +3791,9 @@ Should only be called when point is at the start of a screen line."
(term-down (- term-scroll-start save-current-row))
(setq start (point)))
;; The number of inserted lines shouldn't exceed the scroll region end.
- (when (>= (+ save-current-row lines) term-scroll-end)
- (setq lines (- lines (- (+ save-current-row lines) term-scroll-end))))
- (term-down (- term-scroll-end save-current-row lines)))
+ (when (> (+ save-current-row lines) (1+ term-scroll-end))
+ (setq lines (- lines (- (+ save-current-row lines)(1+ term-scroll-end)))))
+ (term-down (- (1+ term-scroll-end) save-current-row lines)))
(setq start-deleted (point))
(term-down lines)
(delete-region start-deleted (point))
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index b5dc01ff9bf..9843d984e34 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1299,6 +1299,9 @@ correspoinding TextEncodingBase value."
;;;; Conversion between common flavors and Lisp string.
+(defconst mac-text-encoding-ascii #x600
+ "ASCII text encoding.")
+
(defconst mac-text-encoding-mac-japanese-basic-variant #x20001
"MacJapanese text encoding without Apple double-byte extensions.")
@@ -1319,7 +1322,7 @@ correspoinding TextEncodingBase value."
(if (string-match "[\xa0\xfd-\xff]" str)
(setq str nil)
;; ASCII-only?
- (unless (string-match "\\`[[:ascii:]]*\\'" str)
+ (unless (mac-code-convert-string data nil mac-text-encoding-ascii)
(subst-char-in-string ?\x5c ?\Â¥ str t)
(subst-char-in-string ?\x80 ?\\ str t)))))
(or str
@@ -2015,8 +2018,7 @@ either in the current buffer or in the echo area."
(coding (or (cdr (assq (car script-language)
mac-script-code-coding-systems))
'mac-roman))
- (fix-len (mac-bytes-to-integer
- (cdr (mac-ae-parameter ae "tsfx" "long"))))
+ (fix-len (mac-ae-number ae "tsfx"))
;; Optional parameters
(hilite-rng (mac-ae-text-range-array ae "tshi"))
(update-rng (mac-ae-text-range-array ae "tsup"))
@@ -2058,15 +2060,15 @@ either in the current buffer or in the echo area."
(put-text-property 0 (length active-input-string)
'mac-ts-active-input-string t active-input-string)
(if use-echo-area
- (let (msg message-log-max)
- (if (and (current-message)
+ (let ((msg (current-message))
+ message-log-max)
+ (if (and msg
;; Don't get confused by previously displayed
;; `active-input-string'.
(null (get-text-property 0 'mac-ts-active-input-string
- (current-message))))
- (setq msg (propertize (current-message) 'display
- (concat (current-message)
- active-input-string)))
+ msg)))
+ (setq msg (propertize msg 'display
+ (concat msg active-input-string)))
(setq msg active-input-string))
(message "%s" msg)
(overlay-put mac-ts-active-input-overlay 'before-string nil))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 00a757d68bd..2efae381418 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -865,7 +865,7 @@ and added as a submenu of the \"Edit\" menu.")
(defvar ispell-process nil
"The process object for Ispell.")
-(defvar ispell-async-processp (and (fboundp 'kill-process)
+(defvar ispell-async-processp (and (fboundp 'delete-process)
(fboundp 'process-send-string)
(fboundp 'accept-process-output)
;;(fboundp 'start-process)
@@ -2542,15 +2542,7 @@ With NO-ERROR, just return non-nil if there was no Ispell running."
(or no-error
(error "There is no ispell process running!"))
(if ispell-async-processp
- (progn
- (process-send-eof ispell-process)
- (if (eq (ispell-process-status) 'run)
- (ispell-accept-output 1))
- (if (eq (ispell-process-status) 'run)
- (kill-process ispell-process))
- (while (not (or (eq (ispell-process-status) 'exit)
- (eq (ispell-process-status) 'signal)))
- (sleep-for 0.25)))
+ (delete-process ispell-process)
;; synchronous processes
(ispell-send-string "\n") ; make sure side effects occurred.
(kill-buffer ispell-output-buffer)
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 853c28f5565..dd4dfc1a857 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
;; Author: Carsten Dominik <dominik at science dot uva dot nl>
;; Keywords: outlines, hypermedia, calendar, wp
;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.36
+;; Version: 4.36b
;;
;; This file is part of GNU Emacs.
;;
@@ -90,6 +90,10 @@
;;
;; Recent changes
;; --------------
+;; Version 4.37
+;; - Clock-feature for measuring time spent on specific items.
+;; - Improved emphasizing allows configuration and stacking.
+;;
;; Version 4.36
;; - Improved indentation of ASCII export, when headlines become items.
;; - Handling of 12am and 12pm fixed. Times beyond 24:00 can be used
@@ -122,7 +126,7 @@
;; - All context-sensitive commands use `call-interactively' to dispatch.
;; - `org-confirm-shell-links' renamed to `org-confirm-shell-link-function'.
;; - Bug fixes.
-;;
+;;
;; Version 4.31
;; - Bug fixes.
;;
@@ -163,7 +167,7 @@
;;
;;; Code:
-(eval-when-compile
+(eval-when-compile
(require 'cl)
(require 'calendar))
(require 'outline)
@@ -172,7 +176,7 @@
;;; Customization variables
-(defvar org-version "4.36"
+(defvar org-version "4.36b"
"The version number of the file org.el.")
(defun org-version ()
(interactive)
@@ -333,6 +337,11 @@ Changes become only effective after restarting Emacs."
:group 'org-keywords
:type 'string)
+(defcustom org-clock-string "CLOCK:"
+ "String used as prefix for timestamps clocking work hours on an item."
+ :group 'org-keywords
+ :type 'string)
+
(defcustom org-comment-string "COMMENT"
"Entries starting with this keyword will never be exported.
An entry can be toggled between COMMENT and normal with
@@ -2134,6 +2143,95 @@ Changing this variable requires a restart of Emacs to take effect."
:group 'org-font-lock
:type 'boolean)
+(defvar org-emph-re nil
+ "Regular expression for matching emphasis.")
+(defvar org-emphasis-regexp-components) ; defined just below
+(defvar org-emphasis-alist) ; defined just below
+(defun org-set-emph-re (var val)
+ "Set variable and compute the emphasis regular expression."
+ (set var val)
+ (when (and (boundp 'org-emphasis-alist)
+ (boundp 'org-emphasis-regexp-components)
+ org-emphasis-alist org-emphasis-regexp-components)
+ (let* ((e org-emphasis-regexp-components)
+ (pre (car e))
+ (post (nth 1 e))
+ (border (nth 2 e))
+ (body (nth 3 e))
+ (nl (nth 4 e))
+ (stacked (nth 5 e))
+ (body1 (concat body "*?"))
+ (markers (mapconcat 'car org-emphasis-alist "")))
+ ;; make sure special characters appear at the right position in the class
+ (if (string-match "\\^" markers)
+ (setq markers (concat (replace-match "" t t markers) "^")))
+ (if (string-match "-" markers)
+ (setq markers (concat (replace-match "" t t markers) "-")))
+ (while (>= (setq nl (1- nl)) 0) (setq body1 (concat body1 "\n?" body "*?")))
+ ;; Make the regexp
+ (setq org-emph-re
+ (concat "\\([" pre (if stacked markers) "]\\|^\\)"
+ "\\("
+ "\\([" markers "]\\)"
+ "\\("
+ "[^" border markers "]"
+ body1
+ "[^" border markers "]"
+ "\\)"
+ "\\3\\)"
+ "\\([" post (if stacked markers) "]\\|$\\)")))))
+
+(defcustom org-emphasis-regexp-components
+ '(" \t(" " \t.,?;:'\")" " \t\r\n,." "." 1 nil)
+ "Components used to build the reqular expression for emphasis.
+This is a list with 6 entries. Terminology: In an emphasis string
+like \" *strong word* \", we call the initial space PREMATCH, the final
+space POSTMATCH, the stars MARKERS, \"s\" and \"d\" are BORDER characters
+and \"trong wor\" is the body. The different components in this variable
+specify what is allowed/forbidden in each part:
+
+pre Chars allowed as prematch. Beginning of line will be allowed too.
+post Chars allowed as postmatch. End of line will be allowed too.
+border The chars *forbidden* as border characters. In addition to the
+ characters given here, all marker characters are forbidden too.
+body-regexp A regexp like \".\" to match a body character. Don't use
+ non-shy groups here, and don't allow newline here.
+newline The maximum number of newlines allowed in an emphasis exp.
+stacked Non-nil means, allow stacked styles. This works only in HTML
+ export. When this is set, all marker characters (as given in
+ `org-emphasis-alist') will be allowed as pre/post, aiding
+ inside-out matching.
+Use customize to modify this, or restart emacs after changing it."
+ :group 'org-fixme
+ :set 'org-set-emph-re
+ :type '(list
+ (sexp :tag "Allowed chars in pre ")
+ (sexp :tag "Allowed chars in post ")
+ (sexp :tag "Forbidden chars in border ")
+ (sexp :tag "Regexp for body ")
+ (integer :tag "number of newlines allowed")
+ (boolean :tag "Stacking allowed ")))
+
+(defcustom org-emphasis-alist
+ '(("*" bold "<b>" "</b>")
+ ("/" italic "<i>" "</i>")
+ ("_" underline "<u>" "</u>")
+ ("=" shadow "<code>" "</code>"))
+"Special syntax for emphasised text.
+Text starting and ending with a special character will be emphasized, for
+example *bold*, _underlined_ and /italic/. This variable sets the marker
+characters, the face to bbe used by font-lock for highlighting in Org-mode
+emacs buffers, and the HTML tags to be used for this.
+Use customize to modify this, or restart emacs after changing it."
+ :group 'org-fixme
+ :set 'org-set-emph-re
+ :type '(repeat
+ (list
+ (string :tag "Marker character")
+ (face :tag "Font-lock-face")
+ (string :tag "HTML start tag")
+ (string :tag "HTML end tag"))))
+
(defgroup org-faces nil
"Faces in Org-mode."
:tag "Org Faces"
@@ -2374,21 +2472,6 @@ This face is only used if `org-fontify-done-headline' is set."
))
(defconst org-n-levels (length org-level-faces))
-(defconst org-bold-re
- (if (featurep 'xemacs)
- "\\([ ]\\|^\\)\\(\\*\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)\\*\\)\\([ ,.]\\|$\\)"
- "\\([ ]\\|^\\)\\(\\*\\(\\w[[:word:] -_]*?\\w\\)\\*\\)\\([ ,.]\\|$\\)")
- "Regular expression for bold emphasis.")
-(defconst org-italic-re
- (if (featurep 'xemacs)
- "\\([ ]\\|^\\)\\(/\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)/\\)\\([ ,.]\\|$\\)"
- "\\([ ]\\|^\\)\\(/\\(\\w[[:word:] -_]*?\\w\\)/\\)\\([ ,.]\\|$\\)")
- "Regular expression for italic emphasis.")
-(defconst org-underline-re
- (if (featurep 'xemacs)
- "\\([ ]\\|^\\)\\(_\\(\\w[a-zA-Z0-9-_ ]*?\\w\\)_\\)\\([ ,.]\\|$\\)"
- "\\([ ]\\|^\\)\\(_\\(\\w[[:word:] -_]*?\\w\\)_\\)\\([ ,.]\\|$\\)")
- "Regular expression for underline emphasis.")
;; Variables for pre-computed regular expressions, all buffer local
(defvar org-done-string nil
@@ -2582,12 +2665,14 @@ Also put tags into group 4 if tags are present.")
org-keyword-time-regexp
(concat "\\<\\(" org-scheduled-string
"\\|" org-deadline-string
- "\\|" org-closed-string "\\)"
+ "\\|" org-closed-string
+ "\\|" org-clock-string "\\)"
" *[[<]\\([^]>]+\\)[]>]")
org-maybe-keyword-time-regexp
(concat "\\(\\<\\(" org-scheduled-string
"\\|" org-deadline-string
- "\\|" org-closed-string "\\)\\)?"
+ "\\|" org-closed-string
+ "\\|" org-clock-string "\\)\\)?"
" *\\([[<][0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}[^]\r\n>]*?[]>]\\)"))
(org-set-font-lock-defaults)))
@@ -2609,6 +2694,7 @@ Also put tags into group 4 if tags are present.")
(defvar timecnt) ; dynamically scoped parameter
(defvar levels-open) ; dynamically scoped parameter
(defvar entry) ; dynamically scoped parameter
+(defvar state) ; dynamically scoped into `org-after-todo-state-change-hook'
(defvar date) ; dynamically scoped parameter
(defvar description) ; dynamically scoped parameter
(defvar ans1) ; dynamically scoped parameter
@@ -2640,7 +2726,7 @@ Also put tags into group 4 if tags are present.")
;;; Define the mode
-(defvar org-mode-map
+(defvar org-mode-map
(if (and (not (keymapp outline-mode-map)) (featurep 'allout))
(error "Conflict with outdated version of allout.el. Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22.")
(copy-keymap outline-mode-map))
@@ -2711,10 +2797,11 @@ The following commands are available:
(when (and org-ellipsis (stringp org-ellipsis))
(unless org-display-table
(setq org-display-table (make-display-table)))
- (set-display-table-slot org-display-table
+ (set-display-table-slot org-display-table
4 (string-to-vector org-ellipsis))
(setq buffer-display-table org-display-table))
(org-set-regexps-and-options)
+ (modify-syntax-entry ?# "<")
(if org-startup-truncated (setq truncate-lines t))
(set (make-local-variable 'font-lock-unfontify-region-function)
'org-unfontify-region)
@@ -2722,6 +2809,8 @@ The following commands are available:
(set (make-local-variable 'org-table-may-need-update) t)
(org-add-hook 'before-change-functions 'org-before-change-function nil
'local)
+ ;; Check for running clock before killing a buffer
+ (org-add-hook 'kill-buffer-hook 'org-check-running-clock nil 'local)
;; Paragraphs and auto-filling
(org-set-autofill-regexps)
(org-update-radio-target-regexp)
@@ -2793,7 +2882,7 @@ that will be added to PLIST. Returns the string that was modified."
(defconst org-non-link-chars "]\t\n\r<>")
(defconst org-link-types '("https?" "ftp" "mailto" "file" "news" "bbdb" "vm"
"wl" "mhe" "rmail" "gnus" "shell" "info" "elisp"))
-(defconst org-link-re-with-space
+(defconst org-link-re-with-space
(concat
"<?\\(" (mapconcat 'identity org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
@@ -2809,7 +2898,7 @@ that will be added to PLIST. Returns the string that was modified."
"[^" org-non-link-chars " ]\\)>?")
"Matches a link with spaces, optional angular brackets around it.")
-(defconst org-angle-link-re
+(defconst org-angle-link-re
(concat
"<\\(" (mapconcat 'identity org-link-types "\\|") "\\):"
"\\([^" org-non-link-chars " ]"
@@ -2859,6 +2948,21 @@ that will be added to PLIST. Returns the string that was modified."
org-ts-regexp "\\)?")
"Regular expression matching a time stamp or time stamp range.")
+(defvar org-§emph-face nil)
+
+(defun org-do-emphasis-faces (limit)
+ "Run through the buffer and add overlays to links."
+ (if (re-search-forward org-emph-re limit t)
+ (progn
+ (font-lock-prepend-text-property (match-beginning 2) (match-end 2)
+ 'face
+ (nth 1 (assoc (match-string 3)
+ org-emphasis-alist)))
+ (add-text-properties (match-beginning 2) (match-end 2)
+ '(font-lock-multiline t))
+ (backward-char 1)
+ t)))
+
(defun org-activate-plain-links (limit)
"Run through the buffer and add overlays to links."
(if (re-search-forward org-plain-link-re limit t)
@@ -3050,10 +3154,9 @@ between words."
(list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
(list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
(list (concat "\\<" org-closed-string) '(0 'org-special-keyword t))
+ (list (concat "\\<" org-clock-string) '(0 'org-special-keyword t))
;; Emphasis
- (if em (list org-bold-re 2 ''bold 'prepend))
- (if em (list org-italic-re 2 ''italic 'prepend))
- (if em (list org-underline-re 2 ''underline 'prepend))
+ (if em '(org-do-emphasis-faces))
;; Checkboxes, similar to Frank Ruell's org-checklet.el
'("^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) +\\(\\[[ X]\\]\\)"
2 'bold prepend)
@@ -3148,7 +3251,7 @@ between words."
(if org-cycle-include-plain-lists
"\\*+\\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) "
outline-regexp))
- (bob-special (and org-cycle-global-at-bob (bobp)
+ (bob-special (and org-cycle-global-at-bob (bobp)
(not (looking-at outline-regexp))))
(org-cycle-hook (if bob-special nil org-cycle-hook))
(pos (point)))
@@ -3268,10 +3371,15 @@ between words."
(org-cycle))))))
;;;###autoload
-(defun org-global-cycle ()
+(defun org-global-cycle (&optional arg)
"Cycle the global visibility. For details see `org-cycle'."
- (interactive)
- (org-cycle '(4)))
+ (interactive "P")
+ (if (integerp arg)
+ (progn
+ (show-all)
+ (hide-sublevels arg)
+ (setq org-cycle-global-status 'contents))
+ (org-cycle '(4))))
(defun org-overview ()
"Switch to overview mode, shoing only top-level headlines.
@@ -3484,11 +3592,13 @@ the current headline."
(match-string 0))
(error "*"))))
pos)
- (cond
- ((and (org-on-heading-p) (bolp)
+ (cond
+ ((and (org-on-heading-p) (bolp)
(save-excursion (backward-char 1) (not (org-invisible-p))))
(open-line 1))
- ((bolp) nil)
+ ((and (bolp) (save-excursion
+ (backward-char 1) (not (org-invisible-p))))
+ nil)
(t (newline)))
(insert head) (just-one-space)
(setq pos (point))
@@ -3657,6 +3767,7 @@ in the region."
(not (eobp)))
(funcall fun)))))
+;; FIXME: this does not work well with Tabulators. This has to be re-written entirely.
(defun org-fixup-indentation (from to prohibit)
"Change the indentation in the current entry by re-replacing FROM with TO.
However, if the regexp PROHIBIT matches at all, don't do anything.
@@ -3999,7 +4110,7 @@ Error if not at a plain list, or if this is the last item in the list."
(setq ind1 (org-get-indentation))
(unless (and (org-at-item-p) (= ind ind1))
(goto-char pos)
- (error "On last item"))))
+ (error "On last item"))))
(defun org-previous-item ()
"Move to the beginning of the previous item in the current plain list.
@@ -4560,7 +4671,8 @@ be removed."
(goto-char (1+ (match-end 0)))
(if (and (not (looking-at outline-regexp))
(looking-at (concat "[^\r\n]*?" org-keyword-time-regexp
- "[^\r\n]*")))
+ "[^\r\n]*"))
+ (not (equal (match-string 1) org-clock-string)))
(narrow-to-region (match-beginning 0) (match-end 0))
(insert "\n")
(backward-char 1)
@@ -4589,7 +4701,7 @@ be removed."
" ")
(insert
(setq ts
- (format-time-string
+ (format-time-string
(if (eq what 'closed)
(concat "[" (substring (cdr org-time-stamp-formats) 1 -1) "]")
(car org-time-stamp-formats))
@@ -5258,6 +5370,193 @@ If there is already a time stamp at the cursor position, update it."
(interactive)
(org-timestamp-change 0 'calendar))
+;;; The clock for measuring work time.
+
+(defvar org-clock-marker (make-marker)
+ "Marker recording the last clock-in.")
+
+(defun org-clock-in ()
+ "Start the clock on the current item.
+If necessary, clock-out of the currently active clock."
+ (interactive)
+ (org-clock-out t)
+ (let (ts)
+ (save-excursion
+ (org-back-to-heading t)
+ (beginning-of-line 2)
+ (if (and (looking-at (concat "[ \t]*" org-keyword-time-regexp))
+ (not (equal (match-string 1) org-clock-string)))
+ (beginning-of-line 1))
+ (insert "\n") (backward-char 1)
+ (indent-relative)
+ (insert org-clock-string " "
+ (setq ts (concat "[" (format-time-string
+ (substring
+ (cdr org-time-stamp-formats) 1 -1)
+ (current-time))
+ "]")))
+ (move-marker org-clock-marker (point))
+ (message "Clock started at %s" ts))))
+
+(defun org-clock-out (&optional fail-quietly)
+ "Stop the currently running clock.
+If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
+ (interactive)
+ (catch 'exit
+ (if (not (marker-buffer org-clock-marker))
+ (if fail-quietly (throw 'exit t) (error "No active clock")))
+ (let (ts te s h m)
+ (save-excursion
+ (set-buffer (marker-buffer org-clock-marker))
+ (goto-char org-clock-marker)
+ (beginning-of-line 1)
+ (if (and (looking-at (concat "[ \t]*" org-keyword-time-regexp))
+ (equal (match-string 1) org-clock-string))
+ (setq ts (match-string 2))
+ (if fail-quietly (throw 'exit nil) (error "Clock start time is gone")))
+ (goto-char org-clock-marker)
+ (setq te (concat "[" (format-time-string
+ (substring
+ (cdr org-time-stamp-formats) 1 -1)
+ (current-time))
+ "]"))
+ (setq s (- (time-to-seconds (apply 'encode-time (org-parse-time-string te)))
+ (time-to-seconds (apply 'encode-time (org-parse-time-string ts))))
+ h (floor (/ s 3600))
+ s (- s (* 3600 h))
+ m (floor (/ s 60))
+ s (- s (* 60 s)))
+ (insert "--" te " => " (format "%2d:%02d" h m))
+ (move-marker org-clock-marker nil)
+ (message "Clock stopped at %s after HH:MM = %d:%02d" te h m)))))
+
+(defun org-clock-cancel ()
+ "Cancel the running clock be removing the start timestamp."
+ (interactive)
+ (if (not (marker-buffer org-clock-marker))
+ (error "No active clock"))
+ (save-excursion
+ (set-buffer (marker-buffer org-clock-marker))
+ (goto-char org-clock-marker)
+ (delete-region (1- (point-at-bol)) (point-at-eol)))
+ (message "Clock canceled"))
+
+(defvar org-clock-file-total-minutes nil
+ "Holds the file total time in minutes, after a call to `org-clock-sum'.")
+ (make-variable-buffer-local 'org-clock-file-total-minutes)
+
+(defun org-clock-sum ()
+ "Sum the times for each subtree.
+Puts the resulting times in minutes as a text property on each headline."
+ (interactive)
+ (remove-text-properties (point-min) (point-max) '(:org-clock-minutes t))
+ (let* ((re (concat "^\\(\\*+\\)[ \t]\\|^[ \t]*"
+ org-clock-string
+ ".*=>[ \t]*\\([0-9]+\\):\\([0-9]+\\)[ \t]*$"))
+ (lmax 30)
+ (ltimes (make-vector lmax 0))
+ (t1 0)
+ (level 0)
+ (lastlevel 0) time)
+ (save-excursion
+ (goto-char (point-max))
+ (while (re-search-backward re nil t)
+ (if (match-end 2)
+ ;; A time
+ (setq t1 (+ t1 (* 60 (string-to-number (match-string 2)))
+ (string-to-number (match-string 3))))
+ ;; A headline
+ (setq level (- (match-end 1) (match-beginning 1)))
+ (when (or (> t1 0) (> (aref ltimes level) 0))
+ (loop for l from 0 to level do
+ (aset ltimes l (+ (aref ltimes l) t1)))
+ (setq t1 0 time (aref ltimes level))
+ (loop for l from level to (1- lmax) do
+ (aset ltimes l 0))
+ (goto-char (match-beginning 0))
+ (put-text-property (point) (point-at-eol) :org-clock-minutes time))))
+ (setq org-clock-file-total-minutes (aref ltimes 0)))))
+
+(defun org-clock-display (&optional total-only)
+ "Show subtree times in the entire buffer.
+If TOTAL-ONLY is non-nil, only show the total time for the entire file
+in the echo area."
+ (interactive)
+ (org-remove-clock-overlays)
+ (let (time h m p)
+ (org-clock-sum)
+ (unless total-only
+ (save-excursion
+ (goto-char (point-min))
+ (while (setq p (next-single-property-change (point) :org-clock-minutes))
+ (goto-char p)
+ (when (setq time (get-text-property p :org-clock-minutes))
+ (org-put-clock-overlay time (funcall outline-level))))
+ (setq h (/ org-clock-file-total-minutes 60)
+ m (- org-clock-file-total-minutes (* 60 h)))
+ ;; Arrange to remove the overlays upon next change.
+ (org-add-hook 'before-change-functions 'org-remove-clock-overlays
+ nil 'local)))
+ (message "Total file time: %d:%02d (%d hours and %d minutes)" h m h m)))
+
+(defvar org-clock-overlays nil)
+(defun org-put-clock-overlay (time &optional level)
+ "Put an overlays on the current line, displaying TIME.
+If LEVEL is given, prefix time with a corresponding number of stars.
+This creates a new overlay and stores it in `org-clock-overlays', so that it
+will be easy to remove."
+ (let* ((c 60) (h (floor (/ time 60))) (m (- time (* 60 h)))
+ (l (if level (org-get-legal-level level 0) 0))
+ (off 0)
+ ov tx)
+ (move-to-column c)
+ (if (eolp) (setq off 1))
+ (unless (eolp) (skip-chars-backward "^ \t"))
+ (skip-chars-backward " \t")
+ (setq ov (org-make-overlay (- (point) off) (point-at-eol))
+ tx (concat (make-string (+ off (max 0 (- c (current-column)))) ?.)
+ (org-add-props (format "%s %2d:%02d%s"
+ (make-string l ?*) h m
+ (make-string (- 10 l) ?\ ))
+ '(face secondary-selection))
+ ""))
+ (org-overlay-put ov 'display tx)
+ (push ov org-clock-overlays)))
+
+(defun org-remove-clock-overlays (&optional beg end noremove)
+ "Remove the occur highlights from the buffer.
+BEG and END are ignored. If NOREMOVE is nil, remove this function
+from the `before-change-functions' in the current buffer."
+ (interactive)
+ (mapc 'org-delete-overlay org-clock-overlays)
+ (setq org-clock-overlays nil)
+ (unless noremove
+ (remove-hook 'before-change-functions
+ 'org-remove-clock-overlays 'local)))
+
+(defun org-clock-out-if-current ()
+ "Clock out if the current entry contains the running clock.
+This is used to stop the clock after a TODO entry is marked DONE."
+ (when (and (equal state org-done-string)
+ (equal (marker-buffer org-clock-marker) (current-buffer))
+ (< (point) org-clock-marker)
+ (> (save-excursion (outline-next-heading) (point))
+ org-clock-marker))
+ (org-clock-out)))
+
+(add-hook 'org-after-todo-state-change-hook
+ 'org-clock-out-if-current)
+
+(defun org-check-running-clock ()
+ "Check if the current buffer contains the running clock.
+If yes, offer to stop it and to save the buffer with the changes."
+ (when (and (equal (marker-buffer org-clock-marker) (current-buffer))
+ (y-or-n-p (format "Clock-out in buffer %s before killing it? "
+ (buffer-name))))
+ (org-clock-out)
+ (when (y-or-n-p "Save changed buffer?")
+ (save-buffer))))
+
;;; Agenda, and Diary Integration
;;; Define the mode
@@ -5361,6 +5660,9 @@ The following commands are available:
(define-key org-agenda-mode-map "h" 'org-agenda-holidays)
(define-key org-agenda-mode-map "H" 'org-agenda-holidays)
(define-key org-agenda-mode-map "+" 'org-agenda-priority-up)
+(define-key org-agenda-mode-map "I" 'org-agenda-clock-in)
+(define-key org-agenda-mode-map "O" 'org-clock-out)
+(define-key org-agenda-mode-map "X" 'org-clock-cancel)
(define-key org-agenda-mode-map "-" 'org-agenda-priority-down)
(define-key org-agenda-mode-map (org-key 'S-up) 'org-agenda-priority-up)
(define-key org-agenda-mode-map (org-key 'S-down) 'org-agenda-priority-down)
@@ -6619,7 +6921,7 @@ the documentation of `org-diary'."
(format "mouse-2 or RET jump to org file %s"
(abbreviate-file-name buffer-file-name))))
(regexp (concat
- "\\<" org-closed-string " *\\["
+ "\\<\\(" org-closed-string "\\|" org-clock-string "\\) *\\["
(regexp-quote
(substring
(format-time-string
@@ -6627,13 +6929,14 @@ the documentation of `org-diary'."
(apply 'encode-time ; DATE bound by calendar
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
1 11))))
- marker hdmarker priority category tags
+ marker hdmarker priority category tags closedp
ee txt timestr)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(if (not (save-match-data (org-at-date-range-p)))
(progn
(setq marker (org-agenda-new-marker (match-beginning 0))
+ closedp (equal (match-string 1) org-closed-string)
category (org-get-category (match-beginning 0))
timestr (buffer-substring (match-beginning 0) (point-at-eol))
;; donep (org-entry-is-done-p)
@@ -6649,7 +6952,7 @@ the documentation of `org-diary'."
tags (org-get-tags-at))
(looking-at "\\*+[ \t]*\\([^\r\n]+\\)")
(setq txt (org-format-agenda-item
- "Closed: "
+ (if closedp "Closed: " "Clocked: ")
(match-string 1) category tags timestr)))
(setq txt org-agenda-no-heading-message))
(setq priority 100000)
@@ -6701,7 +7004,7 @@ the documentation of `org-diary'."
(setq txt (org-format-agenda-item
(format "In %3d d.: " diff) head category tags))))
(setq txt org-agenda-no-heading-message))
- (when txt
+ (when txt
(setq face (cond ((<= diff 0) 'org-warning)
((<= diff 5) 'org-upcoming-deadline)
(t nil)))
@@ -6897,7 +7200,7 @@ only the correctly processes TXT should be returned - this is used by
(and org-agenda-remove-tags-when-in-prefix
org-prefix-has-tag))
(setq txt (replace-match "" t t txt))
- (setq txt (replace-match
+ (setq txt (replace-match
(concat (make-string (max (- 50 (length txt)) 1) ?\ )
(match-string 2 txt))
t t txt))))
@@ -7083,7 +7386,7 @@ and by additional input from the age of a schedules or deadline entry."
(interactive)
(let* ((tags (get-text-property (point-at-bol) 'tags)))
(if tags
- (message "Tags are :%s:"
+ (message "Tags are :%s:"
(org-no-properties (mapconcat 'identity tags ":")))
(message "No tags associated with this line"))))
@@ -7283,7 +7586,7 @@ the tags of the current headline come last."
(condition-case nil
(while t
(if (looking-at "[^\r\n]+?:\\([a-zA-Z_@0-9:]+\\):[ \t]*\\([\n\r]\\|\\'\\)")
- (setq tags (append (org-split-string
+ (setq tags (append (org-split-string
(org-match-string-no-properties 1) ":")
tags)))
(or org-use-tag-inheritance (error ""))
@@ -7400,6 +7703,20 @@ be used to request time specification in the time stamp."
(match-string 1)
"")))
+(defun org-agenda-clock-in (&optional arg)
+ "Start the clock on the currently selected item."
+ (interactive "P")
+ (org-agenda-check-no-diary)
+ (let* ((marker (or (get-text-property (point) 'org-marker)
+ (org-agenda-error)))
+ (buffer (marker-buffer marker))
+ (pos (marker-position marker))
+ (hdmarker (get-text-property (point) 'org-hd-marker)))
+ (with-current-buffer (marker-buffer marker)
+ (widen)
+ (goto-char pos)
+ (org-clock-in))))
+
(defun org-agenda-diary-entry ()
"Make a diary entry, like the `i' command from the calendar.
All the standard commands work: block, weekly etc."
@@ -7837,7 +8154,7 @@ Returns the new tags string, or nil to not change the current settings."
(setq tbl table char ?a cnt 0)
(while (setq e (pop tbl))
(cond
- ((equal e '(:startgroup))
+ ((equal e '(:startgroup))
(push '() groups) (setq ingroup t)
(when (not (= cnt 0))
(setq cnt 0)
@@ -7852,7 +8169,7 @@ Returns the new tags string, or nil to not change the current settings."
(setq c (cdr e))
;; automatically assign a character.
(setq c1 (string-to-char
- (downcase (substring
+ (downcase (substring
tg (if (= (string-to-char tg) ?@) 1 0)))))
(if (or (rassoc c1 ntable) (rassoc c1 table))
(while (or (rassoc char ntable) (rassoc char table))
@@ -7885,7 +8202,7 @@ Returns the new tags string, or nil to not change the current settings."
(setq c (read-char-exclusive))
(cond
((= c ?\r) (throw 'exit t))
- ((= c ?!)
+ ((= c ?!)
(setq groups nil)
(goto-char (point-min))
(while (re-search-forward "[{}]" nil t) (replace-match " ")))
@@ -8198,7 +8515,7 @@ in all files."
(pre "") (post "")
words re0 re1 re2 re3 re4 re5 re2a reall camel)
(cond
- ;; First check if there are any special
+ ;; First check if there are any special
((run-hook-with-args-until-success 'org-execute-file-search-functions s))
;; Now try the builtin stuff
((save-excursion
@@ -8644,8 +8961,8 @@ for this link."
(interactive (list (y-or-n-p "Would you like to be queried for a description at each link?")))
(save-excursion
(goto-char (point-min))
- (let ((re (concat "\\([^[]\\)<\\("
- "\\(" (mapconcat 'identity org-link-types "\\|")
+ (let ((re (concat "\\([^[]\\)<\\("
+ "\\(" (mapconcat 'identity org-link-types "\\|")
"\\):"
"[^" org-non-link-chars "]+\\)>"))
l1 l2 (cnt 0))
@@ -8763,7 +9080,7 @@ For file links, arg negates `org-context-in-file-links'."
link (org-make-link cpltxt)))
((eq major-mode 'Info-mode)
- (setq link (org-make-link "info:"
+ (setq link (org-make-link "info:"
(file-name-nondirectory Info-current-file)
":" Info-current-node))
(setq cpltxt (concat (file-name-nondirectory Info-current-file)
@@ -9110,8 +9427,8 @@ is in the current directory or below."
;; We do have a link at point, and we are going to edit it.
(setq remove (list (match-beginning 0) (match-end 0)))
(setq desc (if (match-end 3) (org-match-string-no-properties 3)))
- (setq link (read-string "Link: "
- (org-link-unescape
+ (setq link (read-string "Link: "
+ (org-link-unescape
(org-match-string-no-properties 1)))))
(complete-file
;; Completing read for file names.
@@ -9172,7 +9489,7 @@ is in the current directory or below."
(setq path (file-relative-name path)))
(t
(save-match-data
- (if (string-match (concat "^" (regexp-quote
+ (if (string-match (concat "^" (regexp-quote
(file-name-as-directory
(expand-file-name "."))))
(expand-file-name path))
@@ -9187,7 +9504,7 @@ is in the current directory or below."
(insert (org-make-link-string link desc))))
(defun org-completing-read (&rest args)
- (let ((minibuffer-local-completion-map
+ (let ((minibuffer-local-completion-map
(copy-keymap minibuffer-local-completion-map)))
(define-key minibuffer-local-completion-map " " 'self-insert-command)
(apply 'completing-read args)))
@@ -9667,7 +9984,7 @@ This is being used to correctly align a single field after TAB or RET.")
(error "Cannot narrow field starting with wide link \"%s\""
(match-string 0 xx)))
(add-text-properties f1 (length xx) (list 'org-cwidth t) xx)
- (add-text-properties (- f1 2) f1
+ (add-text-properties (- f1 2) f1
(list 'display org-narrow-column-arrow)
xx)))))
;; Get the maximum width for each column
@@ -10229,7 +10546,7 @@ With prefix ARG, insert above the current line."
(buffer-substring (point-at-bol) (point-at-eol))))
(col (current-column)))
(while (string-match "|\\( +\\)|" line)
- (setq line (replace-match
+ (setq line (replace-match
(concat "+" (make-string (- (match-end 1) (match-beginning 1))
?-) "|") t t line)))
(and (string-match "\\+" line) (setq line (replace-match "|" t t line)))
@@ -11776,7 +12093,7 @@ overwritten, and the table is not marked as requiring realignment."
(while (re-search-forward re nil t)
(setq key (org-match-string-no-properties 1)
val (org-match-string-no-properties 2))
- (cond
+ (cond
((string-equal key "TITLE") (setq p (plist-put p :title val)))
((string-equal key "AUTHOR")(setq p (plist-put p :author val)))
((string-equal key "EMAIL") (setq p (plist-put p :email val)))
@@ -11789,7 +12106,7 @@ overwritten, and the table is not marked as requiring realignment."
(let ((op '(("H" . :headline-levels)
("num" . :section-numbers)
("toc" . :table-of-contents)
- ("\\n" . :preserve-breaks)
+ ("\\n" . :preserve-breaks)
("@" . :expand-quoted-html)
(":" . :fixed-width)
("|" . :tables)
@@ -11798,7 +12115,7 @@ overwritten, and the table is not marked as requiring realignment."
("TeX" . :TeX-macros)))
o)
(while (setq o (pop op))
- (if (string-match (concat (regexp-quote (car o))
+ (if (string-match (concat (regexp-quote (car o))
":\\([^ \t\n\r;,.]*\\)")
options)
(setq p (plist-put p (cdr o)
@@ -11863,6 +12180,49 @@ ones and overrule settings in the other lists."
(t (setq rtn (cons line rtn)))))
(nreverse rtn)))
+(defun org-export (&optional arg)
+ (interactive)
+ (let ((help "[t] insert the export option template
+\[v] limit export to visible part of outline tree
+
+\[a] export as ASCII
+\[h] export as HTML
+\[b] export as HTML and browse immediately
+\[x] export as XOXO
+
+\[i] export current file as iCalendar file
+\[I] export all agenda files as iCalendar files
+\[c] export agenda files into combined iCalendar file
+
+\[F] publish current file
+\[P] publish current project
+\[X] publish... (project will be prompted for)
+\[A] publish all projects")
+ (cmds
+ '((?v . org-export-visible)
+ (?a . org-export-as-ascii)
+ (?h . org-export-as-html)
+ (?b . org-export-as-html-and-open)
+ (?x . org-export-as-xoxo)
+ (?i . org-export-icalendar-this-file)
+ (?I . org-export-icalendar-all-agenda-files)
+ (?c . org-export-icalendar-combine-agenda-files)
+ (?F . org-publish-current-file)
+ (?P . org-publish-current-project)
+ (?X . org-publish)
+ (?A . org-publish-all)))
+ r1 r2 ass)
+ (save-window-excursion
+ (delete-other-windows)
+ (with-output-to-temp-buffer "*Org Export/Publishing Help*"
+ (princ help))
+ (message "Select command: ")
+ (setq r1 (read-char-exclusive)))
+ (setq r2 (if (< r1 27) (+ r1 96) r1))
+ (if (setq ass (assq r2 cmds))
+ (call-interactively (cdr ass))
+ (error "No command associated with key %c" r1))))
+
;; ASCII
(defconst org-html-entities
@@ -12163,7 +12523,7 @@ The list contains HTML entities for Latin-1, Greek and other symbols.
It is supplemented by a number of commonly used TeX macros with appropriate
translations. There is currently no way for users to extend this.")
-(defun org-cleaned-string-for-export (string)
+(defun org-cleaned-string-for-export (string &rest parameters)
"Cleanup a buffer substring so that links can be created safely."
(interactive)
(let* ((cb (current-buffer))
@@ -12196,15 +12556,21 @@ translations. There is currently no way for users to extend this.")
(goto-char (point-min))
(while (re-search-forward re-plain-link nil t)
(replace-match
- (concat
+ (concat
(match-string 1) "[[" (match-string 2) ":" (match-string 3) "]]")
t t))
(goto-char (point-min))
(while (re-search-forward re-angle-link nil t)
(replace-match
- (concat
+ (concat
(match-string 1) "[[" (match-string 2) ":" (match-string 3) "]]")
t t))
+ ;; Find multiline emphasis and put them into single line
+ (when (assq :emph-multiline parameters)
+ (goto-char (point-min))
+ (while (re-search-forward org-emph-re nil t)
+ (subst-char-in-region (match-beginning 0) (match-end 0) ?\n ?\ t)
+ (goto-char (1- (match-end 0)))))
;; Remove comments
(goto-char (point-min))
@@ -12293,7 +12659,7 @@ underlined headlines. The default is 3."
(case-fold-search nil)
(filename (concat (file-name-as-directory
(org-export-directory :ascii opt-plist))
- (file-name-sans-extension
+ (file-name-sans-extension
(file-name-nondirectory buffer-file-name))
".txt"))
(buffer (find-file-noselect filename))
@@ -12327,7 +12693,7 @@ underlined headlines. The default is 3."
;; create local variables for all options, to make sure all called
;; functions get the correct information
(mapcar (lambda (x)
- (set (make-local-variable (cdr x))
+ (set (make-local-variable (cdr x))
(plist-get opt-plist (car x))))
org-export-plist-vars)
(set (make-local-variable 'org-odd-levels-only) odd)
@@ -12401,7 +12767,7 @@ underlined headlines. The default is 3."
(setq level (org-tr-level (- (match-end 1) (match-beginning 1)))
txt (match-string 2 line))
(org-ascii-level-start level txt umax lines))
- (t
+ (t
(insert (org-fix-indentation line org-ascii-current-indentation) "\n"))))
(normal-mode)
(save-buffer)
@@ -12459,7 +12825,7 @@ underlined headlines. The default is 3."
(let (char (n (- level umax 1)) (ind 0))
(if (> level umax)
(progn
- (insert (make-string (* 2 n) ?\ )
+ (insert (make-string (* 2 n) ?\ )
(char-to-string (nth (% n (length org-export-ascii-bullets))
org-export-ascii-bullets))
" " title "\n")
@@ -12489,13 +12855,14 @@ key. As a special case, if the you type SPC at the prompt, the temporary
org-mode file will not be removed but presented to you so that you can
continue to use it. The prefix arg ARG is passed through to the exporting
command."
- (interactive
+ (interactive
(list (progn
(message "Export visible: [a]SCII [h]tml [b]rowse HTML [x]OXO [ ]keep buffer")
(char-to-string (read-char-exclusive)))
current-prefix-arg))
(if (not (member type '("a" "\C-a" "b" "\C-b" "h" "x" " ")))
(error "Invalid export key"))
+ ;; FIXME: do this more explicit?
(let* ((binding (key-binding (concat "\C-c\C-x" type)))
(keepp (equal type " "))
(file buffer-file-name)
@@ -12680,7 +13047,7 @@ org-mode's default settings, but still inferior to file-local settings."
(let* ((opt-plist (org-combine-plists (org-default-export-plist)
ext-plist
(org-infile-export-plist)))
-
+
(style (plist-get opt-plist :style))
(odd org-odd-levels-only)
(region-p (org-region-active-p))
@@ -12690,14 +13057,15 @@ org-mode's default settings, but still inferior to file-local settings."
(if region-p (region-end) (point-max))))
(all_lines
(org-skip-comments (org-split-string
- (org-cleaned-string-for-export region)
+ (org-cleaned-string-for-export
+ region :emph-multiline)
"[\r\n]")))
(lines (org-export-find-first-heading-line all_lines))
(level 0) (line "") (origline "") txt todo
(umax nil)
- (filename (concat (file-name-as-directory
+ (filename (concat (file-name-as-directory
(org-export-directory :html opt-plist))
- (file-name-sans-extension
+ (file-name-sans-extension
(file-name-nondirectory buffer-file-name))
".html"))
(buffer (find-file-noselect filename))
@@ -12755,7 +13123,7 @@ org-mode's default settings, but still inferior to file-local settings."
;; create local variables for all options, to make sure all called
;; functions get the correct information
(mapcar (lambda (x)
- (set (make-local-variable (cdr x))
+ (set (make-local-variable (cdr x))
(plist-get opt-plist (car x))))
org-export-plist-vars)
(setq umax (if arg (prefix-numeric-value arg)
@@ -12946,7 +13314,7 @@ lang=\"%s\" xml:lang=\"%s\">
(if (string-match "::\\(.*\\)" filename)
(setq search (match-string 1 filename)
filename (replace-match "" t nil filename)))
- (setq file-is-image-p
+ (setq file-is-image-p
(string-match (org-image-file-name-regexp) filename))
(setq thefile (if abs-p (expand-file-name filename) filename))
(when (and org-export-html-link-org-files-as-html
@@ -12959,7 +13327,7 @@ lang=\"%s\" xml:lang=\"%s\">
(not (string-match "^[0-9]*$" search))
(not (string-match "^\\*" search))
(not (string-match "^/.*/$" search)))
- (setq thefile (concat thefile "#"
+ (setq thefile (concat thefile "#"
(org-solidify-link-text
(org-link-unescape search)))))
(when (string-match "^file:" desc)
@@ -13039,7 +13407,7 @@ lang=\"%s\" xml:lang=\"%s\">
line)
(setq ind (org-get-string-indentation line)
start-is-num (match-beginning 4)
- starter (if (match-beginning 2)
+ starter (if (match-beginning 2)
(substring (match-string 2 line) 0 -1))
line (substring line (match-beginning 5)))
(unless (string-match "[^ \t]" line)
@@ -13068,7 +13436,7 @@ lang=\"%s\" xml:lang=\"%s\">
(org-close-li)
(insert "<li>\n")))
(if (string-match "^[ \t]*\\[\\([X ]\\)\\]" line)
- (setq line
+ (setq line
(replace-match
(if (equal (match-string 1 line) "X")
"<b>[X]</b>"
@@ -13088,7 +13456,7 @@ lang=\"%s\" xml:lang=\"%s\">
(setq line (concat line "<br/>"))))
(insert line "\n")))))
-
+
;; Properly close all local lists and other lists
(when inquote (insert "</pre>\n"))
(when in-local-list
@@ -13115,7 +13483,7 @@ lang=\"%s\" xml:lang=\"%s\">
(insert "<p class=\"date\"> "
(nth 2 lang-words) ": "
date " " time "</p>\n")))
-
+
(if org-export-html-with-timestamp
(insert org-export-html-html-helper-timestamp))
(insert (or (plist-get opt-plist :postamble) ""))
@@ -13288,9 +13656,9 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used."
(if (not org-export-with-timestamps)
(setq r (concat r (substring s 0 (match-beginning 0)))
s (substring s (match-end 0)))
- (setq r (concat
+ (setq r (concat
r (substring s 0 (match-beginning 0))
- (if (match-end 1)
+ (if (match-end 1)
(format "@<span class=\"timestamp-kwd\">%s @</span>"
(match-string 1 s)))
(format " @<span class=\"timestamp\">%s@</span>"
@@ -13403,12 +13771,9 @@ stacked delimiters is N. Escaping delimiters is not possible."
string)
(defun org-export-html-convert-emphasize (string)
- (while (string-match org-italic-re string)
- (setq string (replace-match "\\1<i>\\3</i>\\4" t nil string)))
- (while (string-match org-bold-re string)
- (setq string (replace-match "\\1<b>\\3</b>\\4" t nil string)))
- (while (string-match org-underline-re string)
- (setq string (replace-match "\\1<u>\\3</u>\\4" t nil string)))
+ "Apply emphasis."
+ (while (string-match org-emph-re string)
+ (setq string (replace-match (concat "\\1" (nth 2 (assoc (match-string 3 string) org-emphasis-alist)) "\\4" (nth 3 (assoc (match-string 3 string) org-emphasis-alist)) "\\5") t nil string)))
string)
(defvar org-par-open nil)
@@ -13446,12 +13811,12 @@ When TITLE is nil, just close all open levels."
;; If title is nil, this means this function is called to close
;; all levels, so the rest is done only if title is given
(when (string-match "\\(:[a-zA-Z0-9_@:]+:\\)[ \t]*$" title)
- (setq title (replace-match
+ (setq title (replace-match
(if org-export-with-tags
(save-match-data
(concat
"&nbsp;&nbsp;&nbsp;<span class=\"tag\">"
- (mapconcat 'identity (org-split-string
+ (mapconcat 'identity (org-split-string
(match-string 1 title) ":")
"&nbsp;")
"</span>"))
@@ -13527,6 +13892,7 @@ When LEVEL is non-nil, increase section numbers on that level."
string))
+;;;###autoload
(defun org-export-icalendar-this-file ()
"Export current file as an iCalendar file.
The iCalendar file will be located in the same directory as the Org-mode
@@ -13551,7 +13917,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*"
(org-infile-export-plist)))
(filename (concat (file-name-as-directory
(org-export-directory :xoxo opt-plist))
- (file-name-sans-extension
+ (file-name-sans-extension
(file-name-nondirectory buffer-file-name))
".html"))
(out (find-file-noselect filename))
@@ -13636,11 +14002,11 @@ The file is stored under the name `org-combined-agenda-icalendar-file'."
If COMBINE is non-nil, combine all calendar entries into a single large
file and store it under the name `org-combined-agenda-icalendar-file'."
(save-excursion
- (let* ((dir (org-export-directory
+ (let* ((dir (org-export-directory
:ical (list :publishing-directory
org-export-publishing-directory)))
file ical-file ical-buffer category started org-agenda-new-buffers)
-
+
(when combine
(setq ical-file
(if (file-name-absolute-p org-combined-agenda-icalendar-file)
@@ -13654,7 +14020,7 @@ file and store it under the name `org-combined-agenda-icalendar-file'."
(set-buffer (org-get-agenda-file-buffer file))
(unless combine
(setq ical-file (concat (file-name-as-directory dir)
- (file-name-sans-extension
+ (file-name-sans-extension
(file-name-nondirectory buffer-file-name))
".ics"))
(setq ical-buffer (org-get-agenda-file-buffer ical-file))
@@ -13793,7 +14159,6 @@ a time), or the day by one (if it does not contain a time)."
;; Make `C-c C-x' a prefix key
(define-key org-mode-map "\C-c\C-x" (make-sparse-keymap))
-(define-key org-mode-map "\C-c\C-e" (make-sparse-keymap))
;; TAB key with modifiers
(define-key org-mode-map "\C-i" 'org-cycle)
@@ -13889,40 +14254,46 @@ a time), or the day by one (if it does not contain a time)."
(define-key org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks)
(define-key org-mode-map "\C-c~" 'org-table-create-with-table.el)
(define-key org-mode-map "\C-c\C-q" 'org-table-wrap-region)
-(define-key org-mode-map "\C-c\C-xa" 'org-export-as-ascii)
-(define-key org-mode-map "\C-c\C-x\C-a" 'org-export-as-ascii)
-(define-key org-mode-map "\C-c\C-xv" 'org-export-visible)
-(define-key org-mode-map "\C-c\C-x\C-v" 'org-export-visible)
+(define-key org-mode-map "\C-c\C-e" 'org-export)
+;(define-key org-mode-map "\C-c\C-xa" 'org-export-as-ascii)
+;(define-key org-mode-map "\C-c\C-x\C-a" 'org-export-as-ascii)
+;(define-key org-mode-map "\C-c\C-xv" 'org-export-visible)
+;(define-key org-mode-map "\C-c\C-x\C-v" 'org-export-visible)
;; OPML support is only an option for the future
;(define-key org-mode-map "\C-c\C-xo" 'org-export-as-opml)
;(define-key org-mode-map "\C-c\C-x\C-o" 'org-export-as-opml)
-(define-key org-mode-map "\C-c\C-xi" 'org-export-icalendar-this-file)
-(define-key org-mode-map "\C-c\C-x\C-i" 'org-export-icalendar-all-agenda-files)
-(define-key org-mode-map "\C-c\C-xc" 'org-export-icalendar-combine-agenda-files)
-(define-key org-mode-map "\C-c\C-x\C-c" 'org-export-icalendar-combine-agenda-files)
-(define-key org-mode-map "\C-c\C-xt" 'org-insert-export-options-template)
+;(define-key org-mode-map "\C-c\C-xi" 'org-export-icalendar-this-file)
+;(define-key org-mode-map "\C-c\C-x\C-i" 'org-export-icalendar-all-agenda-files)
+;(define-key org-mode-map "\C-c\C-xc" 'org-export-icalendar-combine-agenda-files)
+;(define-key org-mode-map "\C-c\C-x\C-c" 'org-export-icalendar-combine-agenda-files)
+;(define-key org-mode-map "\C-c\C-xt" 'org-insert-export-options-template)
(define-key org-mode-map "\C-c:" 'org-toggle-fixed-width-section)
-(define-key org-mode-map "\C-c\C-xh" 'org-export-as-html)
-(define-key org-mode-map "\C-c\C-xx" 'org-export-as-xoxo)
-(define-key org-mode-map "\C-c\C-x\C-x" 'org-export-as-xoxo)
-(define-key org-mode-map "\C-c\C-xb" 'org-export-as-html-and-open)
-(define-key org-mode-map "\C-c\C-x\C-b" 'org-export-as-html-and-open)
+;(define-key org-mode-map "\C-c\C-xh" 'org-export-as-html)
+;(define-key org-mode-map "\C-c\C-xx" 'org-export-as-xoxo)
+;(define-key org-mode-map "\C-c\C-x\C-x" 'org-export-as-xoxo)
+;(define-key org-mode-map "\C-c\C-xb" 'org-export-as-html-and-open)
+;(define-key org-mode-map "\C-c\C-x\C-b" 'org-export-as-html-and-open)
(define-key org-mode-map "\C-c\C-x\C-k" 'org-cut-special)
(define-key org-mode-map "\C-c\C-x\C-w" 'org-cut-special)
(define-key org-mode-map "\C-c\C-x\M-w" 'org-copy-special)
(define-key org-mode-map "\C-c\C-x\C-y" 'org-paste-special)
-(define-key org-mode-map "\C-c\C-ef" 'org-publish-current-file)
-(define-key org-mode-map "\C-c\C-ep" 'org-publish-current-project)
-(define-key org-mode-map "\C-c\C-ec" 'org-publish)
-(define-key org-mode-map "\C-c\C-ea" 'org-publish-all)
-(define-key org-mode-map "\C-c\C-e\C-f" 'org-publish-current-file)
-(define-key org-mode-map "\C-c\C-e\C-p" 'org-publish-current-project)
-(define-key org-mode-map "\C-c\C-e\C-c" 'org-publish)
-(define-key org-mode-map "\C-c\C-e\C-a" 'org-publish-all)
-
-(when (featurep 'xemacs)
+(define-key org-mode-map "\C-c\C-x\C-i" 'org-clock-in)
+(define-key org-mode-map "\C-c\C-x\C-o" 'org-clock-out)
+(define-key org-mode-map "\C-c\C-x\C-x" 'org-clock-cancel)
+(define-key org-mode-map "\C-c\C-x\C-d" 'org-clock-display)
+
+;(define-key org-mode-map "\C-c\C-ef" 'org-publish-current-file)
+;(define-key org-mode-map "\C-c\C-ep" 'org-publish-current-project)
+;(define-key org-mode-map "\C-c\C-ec" 'org-publish)
+;(define-key org-mode-map "\C-c\C-ea" 'org-publish-all)
+;(define-key org-mode-map "\C-c\C-e\C-f" 'org-publish-current-file)
+;(define-key org-mode-map "\C-c\C-e\C-p" 'org-publish-current-project)
+;(define-key org-mode-map "\C-c\C-e\C-c" 'org-publish)
+;(define-key org-mode-map "\C-c\C-e\C-a" 'org-publish-all)
+
+(when (featurep 'xemacs)
(define-key org-mode-map 'button3 'popup-mode-menu))
(defsubst org-table-p () (org-at-table-p))
@@ -13965,7 +14336,7 @@ because, in this case the deletion might narrow the column."
(eq N 1)
(string-match "|" (buffer-substring (point-at-bol) (point)))
(looking-at ".*?|"))
- (let ((pos (point))
+ (let ((pos (point))
(noalign (looking-at "[^|\n\r]* |"))
(c org-table-may-need-update))
(backward-delete-char N)
@@ -14028,12 +14399,12 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
"Throw an error because Shift-Cursor command was applied in wrong context."
(error "This command is active in special context like tables, headlines or timestamps"))
-(defun org-shifttab ()
+(defun org-shifttab (&optional arg)
"Global visibility cycling or move to previous table field.
Calls `org-cycle' with argument t, or `org-table-previous-field', depending
on context.
See the individual commands for more information."
- (interactive)
+ (interactive "P")
(cond
((org-at-table-p) (call-interactively 'org-table-previous-field))
(t (call-interactively 'org-global-cycle))))
@@ -14204,7 +14575,7 @@ This command does many different things, depending on context:
- If the cursor is in one of the special #+KEYWORD lines, this
triggers scanning the buffer for these lines and updating the
- information.
+ information.
- If the cursor is inside a table, realign the table. This command
works even if the automatic table editor has been turned off.
@@ -14227,6 +14598,12 @@ This command does many different things, depending on context:
(interactive "P")
(let ((org-enable-table-editor t))
(cond
+ (org-clock-overlays
+ (org-remove-clock-overlays)
+ (message "Clock overlays removed"))
+ (org-occur-highlights
+ (org-remove-occur-highlights)
+ (message "occur highlights removed"))
((and (local-variable-p 'org-finish-function (current-buffer))
(fboundp org-finish-function))
(funcall org-finish-function))
@@ -14403,6 +14780,18 @@ See the individual commands for more information."
"--"
["Goto Calendar" org-goto-calendar t]
["Date from Calendar" org-date-from-calendar t])
+ ("Logging work"
+ ["Clock in" org-clock-in t]
+ ["Clock out" org-clock-out t]
+ ["Clock cancel" org-clock-cancel t]
+ ["Display times" org-clock-display t]
+ "--"
+ ["Record DONE time"
+ (progn (setq org-log-done (not org-log-done))
+ (message "Switching to %s will %s record a timestamp"
+ org-done-string
+ (if org-log-done "automatically" "not")))
+ :style toggle :selected org-log-done])
"--"
["Agenda Command" org-agenda t]
("File List for Agenda")
@@ -14426,28 +14815,10 @@ See the individual commands for more information."
:style radio :selected (not (member '(org-link) buffer-invisibility-spec))]
"--"
["Upgrade all <link> to [[link][desc]]" org-upgrade-old-links
- (save-excursion (goto-char (point-min))
+ (save-excursion (goto-char (point-min))
(re-search-forward "<[a-z]+:" nil t))])
"--"
- ("Export"
- ["ASCII" org-export-as-ascii t]
- ["Export visible part..." org-export-visible t]
- ["HTML" org-export-as-html t]
- ["HTML and Open" org-export-as-html-and-open t]
- ["XOXO" org-export-as-xoxo t]
- "--"
- ["iCalendar this file" org-export-icalendar-this-file t]
- ["iCalendar all agenda files" org-export-icalendar-all-agenda-files
- :active t :keys "C-c C-x C-i"]
- ["iCalendar combined" org-export-icalendar-combine-agenda-files t]
- "--"
- ["Option Template" org-insert-export-options-template t]
- ["Toggle Fixed Width" org-toggle-fixed-width-section t])
- ("Publish"
- ["Current File" org-publish-current-file t]
- ["Current Project" org-publish-current-project t]
- ["Project..." org-publish t]
- ["All Projects" org-publish-all t])
+ ["Export/Publish" org-export t]
"--"
("Documentation"
["Show Version" org-version t]
@@ -14649,6 +15020,7 @@ return nil."
;; But only if the user has not turned off tables or fixed-width regions
(set (make-local-variable 'auto-fill-inhibit-regexp)
(concat "\\*\\|#"
+ "\\|[ \t]*" org-keyword-time-regexp
(if (or org-enable-table-editor org-enable-fixed-width-editor)
(concat
"\\|[ \t]*["
@@ -14968,10 +15340,5 @@ Show the heading too, if it is currently invisible."
(run-hooks 'org-load-hook)
-
;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
;;; org.el ends here
-
-
-
-
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index 280a8d28020..24282872f67 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -777,7 +777,9 @@ directory."
(or filename pages-addresses-file-name))))
(widen)
(pages-directory t nil nil)
- (pages-directory-address-mode)
+ ;; by RJC, 2006 Jun 11: including this causes failure; it results in
+ ;; the message "Buffer in which pages were found is deleted"
+ ;; (pages-directory-address-mode)
(setq pages-directory-buffer-narrowing-p
pages-directory-for-addresses-goto-narrowing-p)
(or pages-directory-for-addresses-buffer-keep-windows-p