From 608c89a921fa0f2bf13a588f110826990446432f Mon Sep 17 00:00:00 2001 From: Michael Kifer Date: Wed, 22 Feb 2006 06:50:17 +0000 Subject: [PATCH 01/41] 2006-02-21 Michael Kifer * ediff-diff.el (ediff-setup-diff-regions, ediff-setup-diff-regions3): fix the regular expressions. --- lisp/ChangeLog | 5 +++++ lisp/ediff-diff.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f5d87562709..c032b424366 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-02-21 Michael Kifer + + * ediff-diff.el (ediff-setup-diff-regions, ediff-setup-diff-regions3): + fix the regular expressions. + 2006-02-21 Richard M. Stallman * progmodes/sh-script.el (sh-mode): Set shell type based on file name diff --git a/lisp/ediff-diff.el b/lisp/ediff-diff.el index 62a6386584e..013ed9073db 100644 --- a/lisp/ediff-diff.el +++ b/lisp/ediff-diff.el @@ -251,7 +251,8 @@ one optional arguments, diff-number to refine.") ;; ediff-setup-diff-regions3, which takes 4 arguments. (defun ediff-setup-diff-regions (file-A file-B file-C) ;; looking for '-c', '-i', or a 'c', 'i' among clustered non-long options - (if (string-match "^-[ci]\\| -[ci]\\|-[^- ]+[ci]" ediff-diff-options) + (if (string-match "^-[ci]\\| -[ci]\\|\\(^\\| \\)-[^- ]+[ci]" + ediff-diff-options) (error "Options `-c' and `-i' are not allowed in `ediff-diff-options'")) ;; create, if it doesn't exist @@ -1215,7 +1216,7 @@ delimiter regions")) ;; or it is the ancestor file. (defun ediff-setup-diff-regions3 (file-A file-B file-C) ;; looking for '-i' or a 'i' among clustered non-long options - (if (string-match "^-i\\| -i\\|-[^- ]+i" ediff-diff-options) + (if (string-match "^-i\\| -i\\|\\(^\\| \\)-[^- ]+i" ediff-diff-options) (error "Option `-i' is not allowed in `ediff-diff3-options'")) (or (ediff-buffer-live-p ediff-diff-buffer) From a96ee7dff6592a3a12aa83d28a013cfa1265713b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:10:21 +0000 Subject: [PATCH 02/41] (org-mark-ring-previous, org-mark-ring-set): New commands. (org-mark-ring): New variable. (org-mark-ring-length): New option. (org-open-at-point, org-goto, org-open-file): Push old position onto the mark ring. (org-add-hook): New function. (org-export-table-remove-special-lines): New option. (org-skip-comments, org-format-org-table-html): Respect new option `org-export-table-remove-special-lines'. (org-open-file): Allow special command configuration for directory link. (org-file-apps): Fixed bugs in customize type, added setting for directories. (org-activate-tags, org-format-agenda-item, org-complete) (org-get-tags-at, org-scan-tags, org-make-tags-matcher) (org-get-tags, org-get-buffer-tags, org-open-at-point) (org-link-search, org-make-org-heading-search-string) (org-make-org-heading-camel): Allow @ and 0-9 as tags characters. (org-radio-targets, org-file-link-context-use-camel-case) (org-activate-camels): New options. (org-update-radio-target-regexp, org-all-targets) (org-make-target-link-regexp, org-activate-target-links): New functions. (org-make-org-heading-search-string): New function. (org-store-link, org-insert-link): Use new option `org-file-link-context-use-camel-case'. (org-activate-camels): Use new option `org-activate-camels'. (org-link-regexp): Added mhe prefix. (org-open-at-point,org-store-link): Support for mhe links. (org-mhe-get-message-id, org-mhe-get-message-folder) (org-mhe-get-header,org-follow-mhe-link): New functions. (org-remove-angle-brackets, org-add-angle-brackets): New functions. (org-bracked-link-regexp): New constant. (org-read-date): Fixed bug that was rejecting all typed dates. (org-link-search): Make hierarchy above visible after a match. (org-follow-bbdb-link): Inhibit electric mode for BBDB. (org-store-link): Fixed bug with link creation when cursor is in an empty line. (org-open-at-point): Fixed bug with matching a link. Fixed buggy argument sequence in call to `org-view-tags'. (org-compile-prefix-format): Set `org-prefix-has-tag'. (org-prefix-has-tag): New variable. (org-format-agenda-item): Remove tags from headline if appropriate. (org-agenda-remove-tags-when-in-prefix): New option. --- lisp/textmodes/org.el | 701 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 577 insertions(+), 124 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 3c70314703b..4b62eeb87a7 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.04 +;; Version: 4.05 ;; ;; This file is part of GNU Emacs. ;; @@ -81,6 +81,17 @@ ;; ;; Changes since version 4.00: ;; --------------------------- +;; Version 4.05 +;; - Changes to internal link system (thanks to David Wainberg for ideas). +;; - in-file links: [[Search String]] instead of +;; - automatic links to "radio targets". +;; - CamelCase not longer active by default, configure org-activate-camels +;; if you want to turn it back on. +;; - After following a link, `C-c &' jumps back to it. +;; - MH-E link support (thanks to Thomas Baumann). +;; - Special table lines are no longer exported. +;; - Bug fixes and minor improvements. +;; ;; Version 4.04 ;; - Cleanup tags display in agenda. ;; - Bug fixes. @@ -115,7 +126,7 @@ ;;; Customization variables -(defvar org-version "4.04" +(defvar org-version "4.05" "The version number of the file org.el.") (defun org-version () (interactive) @@ -775,7 +786,7 @@ as possible." (defcustom org-level-color-stars-only nil "Non-nil means fontify only the stars in each headline. When nil, the entire headline is fontified. -Changing it requires a restart of Emacs to become effective." +Changing it requires restart of Emacs to become effective." :group 'org-structure :type 'boolean) @@ -930,6 +941,12 @@ Needs to be set before org.el is loaded." :group 'org-link :type 'boolean) +(defcustom org-mark-ring-length 4 + "Number of different positions to be recorded in the ring +Changing this requires a restart of Emacs to work correctly." + :group 'org-link + :type 'interger) + (defcustom org-link-format "<%s>" "Default format for linkes in the buffer. This is a format string for printf, %s will be replaced by the link text. @@ -948,13 +965,27 @@ recommend an additional URL: prefix, so the format would be \"\"." When nil, it becomes possible to put several links into a line. Note that in tables, a link never extends accross fields, so in a table it is always possible to put several links into a line. -Changing this variable requires a restart of Emacs to become effective." +Changing this variable requires a restart of Emacs of become effective." + :group 'org-link + :type 'boolean) + +(defcustom org-radio-targets t + "Non-nil means activate text matching a link target. +Radio targets are strings in triple angular brackets, like <<>>. +When this option is set, any occurrence of \"my target\" in normal text +becomes a link." + :group 'org-link + :type 'boolean) + +(defcustom org-activate-camels nil + "Non-nil means, treat words in CamelCase as in-file links. +Changing this requires restart of Emacs to become effective." :group 'org-link :type 'boolean) (defcustom org-context-in-file-links t "Non-nil means, file links from `org-store-link' contain context. -The line number will be added to the file name with :: as separator and +A search string will be added to the file name with :: as separator and used to find the context when the link is activated by the command `org-open-at-point'. Using a prefix arg to the command \\[org-store-link] (`org-store-link') @@ -962,6 +993,12 @@ negates this setting for the duration of the command." :group 'org-link :type 'boolean) +(defcustom org-file-link-context-use-camel-case nil + "Non-nil means, use CamelCase to store a search context in a file link. +When nil, the search string simply consists of the words of the string." + :group 'org-link + :type 'boolean) + (defcustom org-keep-stored-link-after-insertion nil "Non-nil means, keep link in list for entire session. @@ -1082,13 +1119,15 @@ For more examples, see the system specific constants `org-file-apps-defaults-gnu'." :group 'org-link :type '(repeat - (cons (string :tag "Extension") + (cons (choice :value "" + (string :tag "Extension") + (const :tag "Default for unrecognized files" t) + (const :tag "Links to a directory" directory)) (choice :value "" - (const :tag "Visit with Emacs" 'emacs) - (const :tag "Use system default" 'default) - (string :tag "Command") - (sexp :tag "Lisp form"))))) - + (const :tag "Visit with Emacs" emacs) + (const :tag "Use system default" default) + (string :tag "Command") + (sexp :tag "Lisp form"))))) (defgroup org-remember nil "Options concerning interaction with remember.el." @@ -1508,6 +1547,15 @@ This option can also be set with the +OPTIONS line, e.g. \"|:nil\"." :group 'org-export :type 'boolean) +(defcustom org-export-table-remove-special-lines t + "Remove special lines and marking characters in calculating tables. +This removes the special marking character column from tables that are set +up for spreadsheet calculations. It also removes the entire lines +marked with `!', `_', or `^'. The lines with `$' are kept, because +the values of constants may be useful to have." + :group 'org-export + :type 'boolean) + (defcustom org-export-prefer-native-exporter-for-tables nil "Non-nil means, always export tables created with table.el natively. Natively means, use the HTML code generator in table.el. @@ -1923,6 +1971,10 @@ When this is non-nil, the headline after the keyword is set to the (defvar gnus-group-name) (defvar gnus-article-current) (defvar w3m-current-url) + (defvar mh-progs) + (defvar mh-current-folder) + (defvar mh-show-folder-buffer) + (defvar mh-index-folder) (defvar org-selected-point) (defvar calendar-mode-map) (defvar remember-save-after-remembering) @@ -1981,17 +2033,11 @@ The following commands are available: 'org-unfontify-region) ;; Activate before-change-function (set (make-local-variable 'org-table-may-need-update) t) - (make-local-hook 'before-change-functions) ;; needed for XEmacs - (add-hook 'before-change-functions 'org-before-change-function nil - 'local) - ;; FIXME: The following does not work because isearch-mode-end-hook - ;; is called *before* the visibility overlays as removed. - ;; There should be another hook then for me to be used. -;; (make-local-hook 'isearch-mode-end-hook) ;; needed for XEmacs -;; (add-hook 'isearch-mode-end-hook 'org-show-hierarchy-above nil -;; 'local) + (org-add-hook 'before-change-functions 'org-before-change-function nil + 'local) ;; Paragraphs and auto-filling (org-set-autofill-regexps) + (org-update-radio-target-regexp) ;; Settings for Calc embedded mode (set (make-local-variable 'calc-embedded-open-formula) "|\\|\n") (set (make-local-variable 'calc-embedded-close-formula) "|\\|\n") @@ -2053,9 +2099,9 @@ The following commands are available: (defconst org-link-regexp (if org-allow-space-in-links (concat - "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") + "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|mhe\\|rmail\\|gnus\\|shell\\):\\([^" org-non-link-chars "]+[^ " org-non-link-chars "]\\)") (concat - "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") + "\\(https?\\|ftp\\|mailto\\|file\\|news\\|bbdb\\|vm\\|wl\\|mhe\\|rmail\\|gnus\\|shell\\):\\([^ " org-non-link-chars "]+\\)") ) "Regular expression for matching links.") (defconst org-link-maybe-angles-regexp @@ -2065,6 +2111,10 @@ The following commands are available: (concat "\000" org-link-regexp "\000") "Matches a link and optionally surrounding angle brackets.") +(defconst org-bracket-link-regexp + "\\[\\[\\([^]]+\\)\\]\\(\\[\\([^]]+\\)\\]\\)?\\]" + "Matches a link in double brackets.") + (defconst org-ts-lengths (cons (length (format-time-string (car org-time-stamp-formats))) (length (format-time-string (cdr org-time-stamp-formats)))) @@ -2092,6 +2142,15 @@ The following commands are available: 'keymap org-mouse-map)) t))) +(defun org-activate-links2 (limit) + "Run through the buffer and add overlays to links." + (if (re-search-forward org-bracket-link-regexp limit t) + (progn + (add-text-properties (match-beginning 0) (match-end 0) + (list 'mouse-face 'highlight + 'keymap org-mouse-map)) + t))) + (defun org-activate-dates (limit) "Run through the buffer and add overlays to dates." (if (re-search-forward org-tsr-regexp limit t) @@ -2101,19 +2160,75 @@ The following commands are available: 'keymap org-mouse-map)) t))) +(defvar org-target-link-regexp nil + "Regular expression matching radio targets in plain text.") +(defvar org-target-regexp "<<\\([^<>\n\r]+\\)>>" + "Regular expression matching a link target.") +(defvar org-radio-target-regexp "<<<\\([^<>\n\r]+\\)>>>" + "Regular expression matching a link target.") + +(defun org-activate-target-links (limit) + "Run through the buffer and add overlays to target matches." + (when org-radio-targets + (let ((case-fold-search t)) + (if (re-search-forward org-target-link-regexp limit t) + (progn + (add-text-properties (match-beginning 0) (match-end 0) + (list 'mouse-face 'highlight + 'keymap org-mouse-map + 'org-linked-text t)) + t))))) + +(defun org-update-radio-target-regexp () + "Find all radio targets in this file and update the regular expression." + (interactive) + (when org-radio-targets + (setq org-target-link-regexp + (org-make-target-link-regexp (org-all-targets 'radio))) + (font-lock-mode -1) + (font-lock-mode 1))) + +(defun org-all-targets (&optional radio) + "Return a list of all targets in this file. +With optional argument RADIO, only find radio targets." + (let ((re (if radio org-radio-target-regexp org-target-regexp)) + rtn) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward re nil t) + (add-to-list 'rtn (downcase (match-string-no-properties 1)))) + rtn))) + +(defun org-make-target-link-regexp (targets) + "Make regular expression matching all strings in TARGETS. +The regular expression finds the targets also if there is a line break +between words." + (concat + "\\<\\(" + (mapconcat + (lambda (x) + (while (string-match " +" x) + (setq x (replace-match "\\s-+" t t x))) + x) + targets + "\\|") + "\\)\\>")) + (defvar org-camel-regexp "\\*?\\<[A-Z]+[a-z]+[A-Z][a-zA-Z]*\\>" "Matches CamelCase words, possibly with a star before it.") + (defun org-activate-camels (limit) "Run through the buffer and add overlays to dates." - (if (re-search-forward org-camel-regexp limit t) - (progn - (add-text-properties (match-beginning 0) (match-end 0) - (list 'mouse-face 'highlight - 'keymap org-mouse-map)) - t))) + (if org-activate-camels + (if (re-search-forward org-camel-regexp limit t) + (progn + (add-text-properties (match-beginning 0) (match-end 0) + (list 'mouse-face 'highlight + 'keymap org-mouse-map)) + t)))) (defun org-activate-tags (limit) - (if (re-search-forward "[ \t]\\(:[A-Za-z_:]+:\\)[ \r\n]" limit t) + (if (re-search-forward "[ \t]\\(:[A-Za-z_@0-9:]+:\\)[ \r\n]" limit t) (progn (add-text-properties (match-beginning 1) (match-end 1) (list 'mouse-face 'highlight @@ -2138,6 +2253,8 @@ The following commands are available: (let ((org-font-lock-extra-keywords (list '(org-activate-links (0 'org-link t)) + '(org-activate-links2 (0 'org-link t)) + '(org-activate-target-links (0 'org-link t)) '(org-activate-dates (0 'org-link t)) '(org-activate-camels (0 'org-link t)) '(org-activate-tags (1 'org-link t)) @@ -2199,7 +2316,8 @@ The following commands are available: (inhibit-read-only t) (inhibit-point-motion-hooks t) (inhibit-modification-hooks t) deactivate-mark buffer-file-name buffer-file-truename) - (remove-text-properties beg end '(mouse-face nil keymap nil)))) + (remove-text-properties beg end + '(mouse-face nil keymap nil org-linked-text nil)))) ;;; Visibility cycling @@ -2433,8 +2551,10 @@ to the new location, making it and the headline hierarchy above it visible." (org-get-location (current-buffer) org-goto-help))) (if selected-point (progn + (org-mark-ring-push org-goto-start-pos) (goto-char selected-point) - (if (org-invisible-p) (org-show-hierarchy-above))) + (if (or (org-invisible-p) (org-invisible-p2)) + (org-show-hierarchy-above))) (error "Quit")))) (defun org-get-location (buf help) @@ -3213,7 +3333,7 @@ At all other locations, this simply calls `ispell-complete-word'." (let* ((end (point)) (beg1 (save-excursion (if (equal (char-before (point)) ?\ ) (backward-char 1)) - (skip-chars-backward "a-zA-Z_") + (skip-chars-backward "a-zA-Z_@0-9") (point))) (beg (save-excursion (if (equal (char-before (point)) ?\ ) (backward-char 1)) @@ -3247,7 +3367,11 @@ At all other locations, this simply calls `ispell-complete-word'." (save-excursion (goto-char (point-min)) (while (re-search-forward org-todo-line-regexp nil t) - (push (list (org-make-org-heading-camel (match-string 3))) + (push (list + (if org-file-link-context-use-camel-case + (org-make-org-heading-camel (match-string 3) t) + (org-make-org-heading-search-string + (match-string 3) t))) tbl))) tbl) (tag (setq type :tag beg beg1) @@ -3475,9 +3599,8 @@ that the match should indeed be shown." (setq cnt (1+ cnt)) (org-highlight-new-match (match-beginning 0) (match-end 0)) (org-show-hierarchy-above)))) - (make-local-hook 'before-change-functions) ; needed for XEmacs - (add-hook 'before-change-functions 'org-remove-occur-highlights - nil 'local) + (org-add-hook 'before-change-functions 'org-remove-occur-highlights + nil 'local) (run-hooks 'org-occur-hook) (if (interactive-p) (message "%d match(es) for regexp %s" cnt regexp)) @@ -3488,7 +3611,8 @@ that the match should indeed be shown." (catch 'exit (if (org-on-heading-p t) (org-flag-heading nil) ; only show the heading - (and (org-invisible-p) (org-show-hidden-entry))) ; show entire entry + (and (or (org-invisible-p) (org-invisible-p2)) + (org-show-hidden-entry))) ; show entire entry (save-excursion (and org-show-following-heading (outline-next-heading) @@ -3765,7 +3889,8 @@ used to insert the time stamp into the buffer to include the time." (progn (use-local-map map) (setq ans (read-string prompt "" nil nil)) - (setq ans (or ans1 ans2 ans))) + (if (not (string-match "\\S-" ans)) (setq ans nil)) + (setq ans (or ans1 ans ans2))) (use-local-map old-map))))) ;; Naked prompt only (setq ans (read-string prompt "" nil timestr))) @@ -4133,10 +4258,8 @@ The following commands are available: (use-local-map org-agenda-mode-map) (easy-menu-add org-agenda-menu) (if org-startup-truncated (setq truncate-lines t)) - (make-local-hook 'post-command-hook) ; Needed for XEmacs - (add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) - (make-local-hook 'pre-command-hook) ; Needed for XEmacs - (add-hook 'pre-command-hook 'org-unhighlight nil 'local) + (org-add-hook 'post-command-hook 'org-agenda-post-command-hook nil 'local) + (org-add-hook 'pre-command-hook 'org-unhighlight nil 'local) (unless org-agenda-keep-modes (setq org-agenda-follow-mode nil org-agenda-show-log nil)) @@ -5285,27 +5408,6 @@ the documentation of `org-diary'." (throw 'exit t))) nil))) -(defun org-get-tags-at (&optional pos) - "Get a list of all headline targs applicable at POS. -POS defaults to point. If tags are inherited, the list contains -the targets in the same sequence as the headlines appear, i.e. -the tags of the current headline come last." - (interactive) - (let (tags) - (save-excursion - (goto-char (or pos (point))) - (save-match-data - (org-back-to-heading t) - (condition-case nil - (while t - (if (looking-at "[^\r\n]+?:\\([a-zA-Z_:]+\\):[ \t]*\\([\n\r]\\|\\'\\)") - (setq tags (append (org-split-string (match-string 1) ":") tags))) - (or org-use-tag-inheritance (error "")) - (org-up-heading-all 1)) - (error nil)))) - (message "%s" tags) - tags)) - (defun org-agenda-get-todos () "Return the TODO information for agenda display." (let* ((props (list 'face nil @@ -5726,7 +5828,7 @@ only the correctly processes TXT should be returned - this is used by (when (and (or (eq org-agenda-remove-tags-when-in-prefix t) (and org-agenda-remove-tags-when-in-prefix org-prefix-has-tag)) - (string-match ":[a-zA-Z_:]+:[ \t]*$" txt)) + (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" txt)) (setq txt (replace-match "" t t txt))) ;; Create the final string @@ -6076,6 +6178,27 @@ the same tree node, and the headline of the tree node in the Org-mode file." (org-agenda-change-all-lines newhead hdmarker) (beginning-of-line 1))) +(defun org-get-tags-at (&optional pos) + "Get a list of all headline targs applicable at POS. +POS defaults to point. If tags are inherited, the list contains +the targets in the same sequence as the headlines appear, i.e. +the tags of the current headline come last." + (interactive) + (let (tags) + (save-excursion + (goto-char (or pos (point))) + (save-match-data + (org-back-to-heading t) + (condition-case nil + (while t + (if (looking-at "[^\r\n]+?:\\([a-zA-Z_@0-9:]+\\):[ \t]*\\([\n\r]\\|\\'\\)") + (setq tags (append (org-split-string (match-string 1) ":") tags))) + (or org-use-tag-inheritance (error "")) + (org-up-heading-all 1)) + (error nil)))) + (message "%s" tags) + tags)) + (defun org-agenda-set-tags () "Set tags for the current headline." (interactive) @@ -6298,7 +6421,7 @@ are included in the output." (mapconcat 'regexp-quote (nreverse (cdr (reverse org-todo-keywords))) "\\|") - "\\>\\)\\)? *\\(.*?\\)\\(:[A-Za-z_:]+:\\)?[ \t]*[\n\r]")) + "\\>\\)\\)? *\\(.*?\\)\\(:[A-Za-z_@0-9:]+:\\)?[ \t]*[\n\r]")) (props (list 'face nil 'done-face 'org-done 'undone-face nil @@ -6386,7 +6509,7 @@ MATCH can contain positive and negative selection of tags, like (let ((match0 match) minus tag mm matcher orterms term orlist) (setq orterms (org-split-string match "|")) (while (setq term (pop orterms)) - (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_]+\\)" term) + (while (string-match "^&?\\([-+:]\\)?\\([A-Za-z_@0-9]+\\)" term) (setq minus (and (match-end 1) (equal (match-string 1 term) "-")) tag (match-string 2 term) @@ -6481,7 +6604,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (re (concat "^" outline-regexp)) (col (current-column)) (current (org-get-tags)) - tags hd empty) + tags hd empty invis) (if arg (save-excursion (goto-char (point-min)) @@ -6505,19 +6628,23 @@ With prefix ARG, realign all tags in headings in the current buffer." (if (equal current "") (progn (end-of-line 1) - (or empty (insert " "))) + (or empty (insert-before-markers " "))) (beginning-of-line 1) + (setq invis (org-invisible-p)) (looking-at (concat "\\(.*\\)\\(" (regexp-quote current) "\\)[ \t]*")) (setq hd (match-string 1)) (delete-region (match-beginning 0) (match-end 0)) - (insert (org-trim hd) (if empty "" " "))) + (insert-before-markers (org-trim hd) (if empty "" " "))) + ;; FIXME: What happens when adding a new tag??? Seems OK!!! (unless (equal tags "") (move-to-column (max (current-column) (if (> org-tags-column 0) org-tags-column (- (- org-tags-column) (length tags)))) t) - (insert tags)) + (insert-before-markers tags) + (if (and (not invis) (org-invisible-p)) + (outline-flag-region (point-at-bol) (point) nil))) (move-to-column col)))) (defun org-tags-completion-function (string predicate &optional flag) @@ -6551,7 +6678,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (error "Not on a heading")) (save-excursion (beginning-of-line 1) - (if (looking-at ".*[ \t]\\(:[A-Za-z_:]+:\\)[ \t]*\\(\r\\|$\\)") + (if (looking-at ".*[ \t]\\(:[A-Za-z_@0-9:]+:\\)[ \t]*\\(\r\\|$\\)") (match-string 1) ""))) @@ -6560,7 +6687,7 @@ With prefix ARG, realign all tags in headings in the current buffer." (let (tags) (save-excursion (goto-char (point-min)) - (while (re-search-forward "[ \t]:\\([A-Za-z_:]+\\):[ \t\r\n]" nil t) + (while (re-search-forward "[ \t]:\\([A-Za-z_@0-9:]+\\):[ \t\r\n]" nil t) (mapc (lambda (x) (add-to-list 'tags x)) (org-split-string (match-string 1) ":")))) (mapcar 'list tags))) @@ -6591,8 +6718,33 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (org-agenda-list nil (time-to-days (org-time-string-to-time (substring (match-string 1) 0 10))) 1) - (let (type path line search (pos (point))) + (let (type path link line search (pos (point))) (catch 'match + (save-excursion + (skip-chars-forward "^]\n\r") + (when (and (re-search-backward "\\[\\[" nil t) + (looking-at org-bracket-link-regexp) + (<= (match-beginning 0) pos) + (>= (match-end 0) pos)) + (setq link (match-string 1)) + (while (string-match " *\n *" link) + (setq link (replace-match " " t t link))) + (if (string-match org-link-regexp link) + (setq type (match-string 1) + path (match-string 2)) + (setq type "thisfile" + path link)) + (throw 'match t))) + + (when (get-text-property (point) 'org-linked-text) + (setq type "thisfile" + pos (if (get-text-property (1+ (point)) 'org-linked-text) + (1+ (point)) (point)) + path (buffer-substring + (previous-single-property-change pos 'org-linked-text) + (next-single-property-change pos 'org-linked-text))) + (throw 'match t)) + (save-excursion (skip-chars-backward (concat (if org-allow-space-in-links "^" "^ ") @@ -6606,7 +6758,7 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (throw 'match t))) (save-excursion (skip-chars-backward "^ \t\n\r") - (when (looking-at "\\(:[A-Za-z_:]+\\):[ \t\r\n]") + (when (looking-at "\\(:[A-Za-z_@0-9:]+\\):[ \t\r\n]") (setq type "tags" path (match-string 1)) (while (string-match ":" path) @@ -6614,7 +6766,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." (throw 'match t))) (save-excursion (skip-chars-backward "a-zA-Z_") - (when (looking-at org-camel-regexp) + (when (and org-activate-camels + (looking-at org-camel-regexp)) (setq type "camel" path (match-string 0)) (if (equal (char-before) ?*) (setq path (concat "*" path)))) @@ -6639,7 +6792,9 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." ((string= type "tags") (org-tags-view in-emacs path)) - ((string= type "camel") + ((or (string= type "camel") + (string= type "thisfile")) + (org-mark-ring-push) (org-link-search path (cond ((equal in-emacs '(4)) 'occur) @@ -6686,6 +6841,14 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file." article (match-string 3 path)) (org-follow-wl-link folder article))) + ((string= type "mhe") + (let (folder article) + (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) + (error "Error in MHE link")) + (setq folder (match-string 1 path) + article (match-string 3 path)) + (org-follow-mhe-link folder article))) + ((string= type "rmail") (let (folder article) (if (not (string-match "\\`\\([^#]+\\)\\(#\\(.*\\)\\)?" path)) @@ -6717,11 +6880,19 @@ sparse tree. In ordinary files, `occur' will be used to list matches. If the current buffer is in `dired-mode', grep will be used to search in all files." (let ((case-fold-search t) - (s0 s) + (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) (pos (point)) (pre "") (post "") - words re0 re1 re2 re3 re4 re5 reall) - (cond ((string-match "^/\\(.*\\)/$" s) + words re0 re1 re2 re3 re4 re5 reall camel) + (cond ((save-excursion + (goto-char (point-min)) + (and + (re-search-forward + (concat "<<" (regexp-quote s0) ">>") nil t) + (setq pos (match-beginning 0)))) + ;; There is an exact target for this + (goto-char pos)) + ((string-match "^/\\(.*\\)/$" s) ;; A regular expression (cond ((eq major-mode 'org-mode) @@ -6729,17 +6900,22 @@ in all files." ;;((eq major-mode 'dired-mode) ;; (grep (concat "grep -n -e '" (match-string 1 s) "' *"))) (t (org-do-occur (match-string 1 s))))) - ((string-match (concat "^" org-camel-regexp) s) - ;; A camel - (if (equal (string-to-char s) ?*) - (setq pre "^\\*+[ \t]*\\(\\sw+\\)?[ \t]*" - post "[ \t]*$" - s (substring s 1))) + ((or (setq camel (string-match (concat "^" org-camel-regexp "$") s)) + t) + ;; A camel or a normal search string + (when (equal (string-to-char s) ?*) + ;; Anchor on headlines, post may include tags. + (setq pre "^\\*+[ \t]*\\(\\sw+\\)?[ \t]*" + post "[ \t]*\\([ \t]+:[a-zA-Z_@0-9:+]:[ \t]*\\)?$" + s (substring s 1))) (remove-text-properties 0 (length s) '(face nil mouse-face nil keymap nil fontified nil) s) ;; Make a series of regular expressions to find a match - (setq words (org-camel-to-words s) + (setq words + (if camel + (org-camel-to-words s) + (org-split-string s "[ \n\r\t]+")) re0 (concat "<<" (regexp-quote s0) ">>") re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") @@ -6770,7 +6946,8 @@ in all files." (goto-char (point-min)) (if (search-forward s nil t) (goto-char (match-beginning 0)) - (error "No match")))))) + (error "No match")))) + (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) (defun org-do-occur (regexp &optional cleanup) "Call the Emacs command `occur'. @@ -6791,6 +6968,47 @@ to read." (goto-char (point-min)) (select-window cwin)))) +(defvar org-mark-ring nil + "Mark ring for positions before jumps in Org-mode.") +(defvar org-mark-ring-last-goto nil + "Last position in the mark ring used to go back.") +;; Fill and close the ring +(setq org-mark-ring nil org-mark-ring-last-goto nil) ;; in case file is reloaded +(loop for i from 1 to org-mark-ring-length do + (push (make-marker) org-mark-ring)) +(setcdr (nthcdr (1- org-mark-ring-length) org-mark-ring) + org-mark-ring) + +(defun org-mark-ring-push (&optional pos buffer) + "Put the current position or POS into the mark ring and rotate it." + (interactive) + (setq pos (or pos (point))) + (setq org-mark-ring (nthcdr (1- org-mark-ring-length) org-mark-ring)) + (move-marker (car org-mark-ring) + (or pos (point)) + (or buffer (current-buffer))) + (message + (substitute-command-keys + "Position saved to mark ring, go back with \\[org-mark-ring-goto]."))) + +(defun org-mark-ring-goto (&optional n) + "Jump to the previous position in the mark ring. +With prefix arg N, jump back that many stored positions. When +called several times in succession, walk through the entire ring. +Org-mode commands jumping to a different position in the current file, +or to another Org-mode file, automatically push the old position +onto the ring." + (interactive "p") + (let (p m) + (if (eq last-command this-command) + (setq p (nthcdr n (or org-mark-ring-last-goto org-mark-ring))) + (setq p org-mark-ring)) + (setq org-mark-ring-last-goto p) + (setq m (car p)) + (switch-to-buffer (marker-buffer m)) + (goto-char m) + (if (or (org-invisible-p) (org-invisible-p2)) (org-show-hierarchy-above)))) + (defun org-camel-to-words (s) "Split \"CamelCaseWords\" to (\"Camel\" \"Case\" \"Words\")." (let ((case-fold-search nil) @@ -6800,10 +7018,20 @@ to read." (setq s (substring s (1+ (match-beginning 0))))) (nreverse (cons s words)))) +(defun org-remove-angle-brackets (s) + (if (equal (substring s 0 1) "<") (setq s (substring s 1))) + (if (equal (substring s -1) ">") (setq s (substring s 0 -1))) + s) +(defun org-add-angle-brackets (s) + (if (equal (substring s 0 1) "<") nil (setq s (concat "<" s))) + (if (equal (substring s -1) ">") nil (setq s (concat s ">"))) + s) + (defun org-follow-bbdb-link (name) "Follow a BBDB link to NAME." (require 'bbdb) - (let ((inhibit-redisplay t)) + (let ((inhibit-redisplay t) + (bbdb-electric-p nil)) (catch 'exit ;; Exact match on name (bbdb-name (concat "\\`" name "\\'") nil) @@ -6839,6 +7067,7 @@ to read." (defun org-follow-vm-link (&optional folder article readonly) "Follow a VM link to FOLDER and ARTICLE." (require 'vm) + (setq article (org-add-angle-brackets article)) (if (string-match "^//\\([a-zA-Z]+@\\)?\\([^:]+\\):\\(.*\\)" folder) ;; ange-ftp or efs or tramp access (let ((user (or (match-string 1 folder) (user-login-name))) @@ -6872,12 +7101,14 @@ to read." (defun org-follow-wl-link (folder article) "Follow a Wanderlust link to FOLDER and ARTICLE." + (setq article (org-add-angle-brackets article)) (wl-summary-goto-folder-subr folder 'no-sync t nil t) - (if article (wl-summary-jump-to-msg-by-message-id article)) + (if article (wl-summary-jump-to-msg-by-message-id article ">")) (wl-summary-redisplay)) (defun org-follow-rmail-link (folder article) "Follow an RMAIL link to FOLDER and ARTICLE." + (setq article (org-add-angle-brackets article)) (let (message-number) (save-excursion (save-window-excursion @@ -6898,6 +7129,107 @@ to read." message-number) (error "Message not found")))) +;; mh-e integration based on planner-mode +(defun org-mhe-get-message-real-folder () + "Return the name of the current message real folder, so if you use + sequences, it will now work." + (save-excursion + (let* ((folder + (if (equal major-mode 'mh-folder-mode) + mh-current-folder + ;; Refer to the show buffer + mh-show-folder-buffer)) + (end-index + (if (boundp 'mh-index-folder) + (min (length mh-index-folder) (length folder)))) + ) + ;; a simple test on mh-index-data does not work, because + ;; mh-index-data is always nil in a show buffer. + (if (and (boundp 'mh-index-folder) + (string= mh-index-folder (substring folder 0 end-index))) + (if (equal major-mode 'mh-show-mode) + (save-window-excursion + (when (buffer-live-p (get-buffer folder)) + (progn + (pop-to-buffer folder) + (org-mhe-get-message-folder-from-index) + ) + )) + (org-mhe-get-message-folder-from-index) + ) + folder + ) + ))) + +(defun org-mhe-get-message-folder-from-index () + "Returns the name of the message folder in a index folder + buffer." + (save-excursion + (mh-index-previous-folder) + (if (not (re-search-forward "^\\(+.*\\)$" nil t)) + (message "Problem getting folder from index.") + (message (match-string 1))))) + +(defun org-mhe-get-message-folder () + "Return the name of the current message folder. Be careful if you + use sequences." + (save-excursion + (if (equal major-mode 'mh-folder-mode) + mh-current-folder + ;; Refer to the show buffer + mh-show-folder-buffer))) + +(defun org-mhe-get-message-num () + "Return the number of the current message. Be careful if you + use sequences." + (save-excursion + (if (equal major-mode 'mh-folder-mode) + (mh-get-msg-num nil) + ;; Refer to the show buffer + (mh-show-buffer-message-number)))) + +(defun org-mhe-get-header (header) + "Return a header of the message in folder mode. This will create a + show buffer for the corresponding message. If you have a more clever + idea..." + (let* ((folder (org-mhe-get-message-folder)) + (num (org-mhe-get-message-num)) + (buffer (get-buffer-create (concat "show-" folder))) + (header-field)) + (with-current-buffer buffer + (mh-display-msg num folder) + (if (equal major-mode 'mh-folder-mode) + (mh-header-display) + (mh-show-header-display)) + (set-buffer buffer) + (setq header-field (mh-get-header-field header)) + (if (equal major-mode 'mh-folder-mode) + (mh-show) + (mh-show-show)) + header-field))) + +(defun org-follow-mhe-link (folder article) + "Follow an MHE link to FOLDER and ARTICLE." + (setq article (org-add-angle-brackets article)) +;; (require 'mh-e) + (mh-rmail) ;; mh-e is standard with emacs 22 + (let* ((show-buf (concat "show-" folder))) + (get-buffer-create show-buf) + (mh-display-msg + (string-to-number + (car (split-string + (with-temp-buffer + (call-process + (expand-file-name "pick" mh-progs) + nil t nil + folder + "--message-id" + article) + (buffer-string)) + "\n"))) + folder) + (pop-to-buffer show-buf))) + (defun org-open-file (path &optional in-emacs line search) "Open the file at PATH. First, this expands any special file name abbreviations. Then the @@ -6913,7 +7245,11 @@ If the file does not exist, an error is thrown." (let* ((file (if (equal path "") (buffer-file-name) (convert-standard-filename (org-expand-file-name path)))) + (dirp (file-directory-p file)) (dfile (downcase file)) + (old-buffer (current-buffer)) + (old-pos (point)) + (old-mode major-mode) ext cmd apps) (if (and (not (file-exists-p file)) (not org-open-non-existing-files)) @@ -6925,7 +7261,8 @@ If the file does not exist, an error is thrown." (setq apps (append org-file-apps (org-default-apps))) (if in-emacs (setq cmd 'emacs) - (setq cmd (or (cdr (assoc ext apps)) + (setq cmd (or (and dirp (cdr (assoc 'directory apps))) + (cdr (assoc ext apps)) (cdr (assoc t apps))))) (when (eq cmd 'mailcap) (require 'mailcap) @@ -6948,7 +7285,11 @@ If the file does not exist, an error is thrown." (if search (org-link-search search)))) ((consp cmd) (eval cmd)) - (t (funcall (cdr (assq 'file org-link-frame-setup)) file))))) + (t (funcall (cdr (assq 'file org-link-frame-setup)) file))) + (and (eq major-mode 'org-mode) (eq old-mode 'org-mode) + (or (not (equal old-buffer (current-buffer))) + (not (equal old-pos (point)))) + (org-mark-ring-push old-pos old-buffer)))) (defun org-default-apps () "Return the default applications for this operating system." @@ -6979,7 +7320,7 @@ For some link types, a prefix arg is interpreted: For links to usenet articles, arg negates `org-usenet-links-prefer-google'. For file links, arg negates `org-context-in-file-links'." (interactive "P") - (let (link cpltxt) + (let (link cpltxt txt (pos (point))) (cond ((eq major-mode 'bbdb-mode) @@ -7009,6 +7350,7 @@ For file links, arg negates `org-context-in-file-links'." (subject (vm-su-subject message)) (author (vm-su-full-name message)) (message-id (vm-su-message-id message))) + (setq message-id (org-remove-angle-brackets message-id)) (setq folder (abbreviate-file-name folder)) (if (string-match (concat "^" (regexp-quote vm-folder-directory)) folder) @@ -7026,12 +7368,25 @@ For file links, arg negates `org-context-in-file-links'." msgnum (wl-summary-buffer-msgdb))) (author (wl-summary-line-from)) ; FIXME: how to get author name? (subject "???")) ; FIXME: How to get subject of email? + (setq message-id (org-remove-angle-brackets message-id)) (setq cpltxt (concat author " on: " subject)) (setq link (concat cpltxt "\n " (org-make-link "wl:" wl-summary-buffer-folder-name "#" message-id))))) + ((or (equal major-mode 'mh-folder-mode) + (equal major-mode 'mh-show-mode)) + (let ((from-header (org-mhe-get-header "From:")) + (to-header (org-mhe-get-header "To:")) + (subject (org-mhe-get-header "Subject:"))) + (setq cpltxt (concat from-header " on: " subject)) + (setq link (concat cpltxt "\n " + (org-make-link + "mhe:" (org-mhe-get-message-real-folder) "#" + (org-remove-angle-brackets + (org-mhe-get-header "Message-Id:"))))))) + ((eq major-mode 'rmail-mode) (save-excursion (save-restriction @@ -7040,6 +7395,7 @@ For file links, arg negates `org-context-in-file-links'." (message-id (mail-fetch-field "message-id")) (author (mail-fetch-field "from")) (subject (mail-fetch-field "subject"))) + (setq message-id (org-remove-angle-brackets message-id)) (setq cpltxt (concat author " on: " subject)) (setq link (concat cpltxt "\n " (org-make-link @@ -7093,19 +7449,26 @@ For file links, arg negates `org-context-in-file-links'." (abbreviate-file-name (buffer-file-name)))) ;; Add a context search string (when (org-xor org-context-in-file-links arg) + ;; Check if we are on a target (if (save-excursion - (skip-chars-backward "a-zA-Z<") - (looking-at (concat "<<\\(" org-camel-regexp "\\)>>"))) + (skip-chars-forward "^>\n\r") + (and (re-search-backward "<<" nil t) + (looking-at "<<\\(.*?\\)>>") + (<= (match-beginning 0) pos) + (>= (match-end 0) pos))) (setq cpltxt (concat cpltxt "::" (match-string 1))) + (setq txt (cond + ((org-on-heading-p) nil) + ((org-region-active-p) + (buffer-substring (region-beginning) (region-end))) + (t (buffer-substring (point-at-bol) (point-at-eol))))) (setq cpltxt (concat cpltxt "::" - (org-make-org-heading-camel - (cond - ((org-on-heading-p) nil) - ((org-region-active-p) - (buffer-substring (region-beginning) (region-end))) - (t (buffer-substring (point-at-bol) (point-at-eol)))) - ))))) + (if org-file-link-context-use-camel-case + (org-make-org-heading-camel txt) + (org-make-org-heading-search-string txt)))))) + (if (string-match "::\\'" cpltxt) + (setq cpltxt (substring cpltxt 0 -2))) (setq link (org-make-link cpltxt))) ((buffer-file-name) @@ -7114,19 +7477,21 @@ For file links, arg negates `org-context-in-file-links'." (abbreviate-file-name (buffer-file-name)))) ;; Add a context string (when (org-xor org-context-in-file-links arg) + (setq txt (if (org-region-active-p) + (buffer-substring (region-beginning) (region-end)) + (buffer-substring (point-at-bol) (point-at-eol)))) (setq cpltxt (concat cpltxt "::" - (org-make-org-heading-camel - (if (org-region-active-p) - (buffer-substring (region-beginning) (region-end)) - (buffer-substring (point-at-bol) (point-at-eol))))))) + (if org-file-link-context-use-camel-case + (org-make-org-heading-camel txt) + (org-make-org-heading-search-string txt))))) (setq link (org-make-link cpltxt))) ((interactive-p) (error "Cannot link to a buffer which is not visiting a file")) (t (setq link nil))) - + (if (and (interactive-p) link) (progn (setq org-stored-links @@ -7134,14 +7499,37 @@ For file links, arg negates `org-context-in-file-links'." (message "Stored: %s" (or cpltxt link))) link))) -(defun org-make-org-heading-camel (&optional string) +(defun org-make-org-heading-search-string (&optional string heading) + "Make search string for S or current headline." + (interactive) + (let ((s (or string (org-get-heading)))) + (unless (and string (not heading)) + ;; We are using a headline, clean up garbage in there. + (if (string-match org-todo-regexp s) + (setq s (replace-match "" t t s))) + (if (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" s) + (setq s (replace-match "" t t s))) + (setq s (org-trim s)) + (if (string-match (concat "^\\(" org-quote-string "\\|" + org-comment-string "\\)") s) + (setq s (replace-match "" t t s))) + (while (string-match org-ts-regexp s) + (setq s (replace-match "" t t s)))) + (while (string-match "[^a-zA-Z_0-9 \t]+" s) + (setq s (replace-match " " t t s))) + (or string (setq s (concat "*" s))) ; Add * for headlines + (mapconcat 'identity (org-split-string s "[ \t]+") " "))) + +(defun org-make-org-heading-camel (&optional string heading) "Make a CamelCase string for S or the current headline." (interactive) (let ((s (or string (org-get-heading)))) - (unless string + (unless (and string (not heading)) ;; We are using a headline, clean up garbage in there. (if (string-match org-todo-regexp s) (setq s (replace-match "" t t s))) + (if (string-match ":[a-zA-Z_@0-9:]+:[ \t]*$" s) + (setq s (replace-match "" t t s))) (setq s (org-trim s)) (if (string-match (concat "^\\(" org-quote-string "\\|" org-comment-string "\\)") s) @@ -7157,6 +7545,12 @@ For file links, arg negates `org-context-in-file-links'." "Concatenate STRINGS, format resulting string with `org-link-format'." (format org-link-format (apply 'concat strings))) +(defun org-make-link2 (link &optional description) + "Make a link with brackets." + (concat "[[" link "]" + (if description (concat "[" description "]") "") + "]")) + (defun org-xor (a b) "Exclusive or." (if a (not b) b)) @@ -7245,15 +7639,18 @@ is in the current directory or below." (let* ((path (match-string 1 link)) (case-fold-search nil) (search (match-string 2 link))) - (when (save-match-data - (equal (file-truename (buffer-file-name)) - (file-truename path))) - (if (save-match-data - (string-match (concat "^" org-camel-regexp "$") search)) - (setq link (replace-match search t t link) - matched t) - (setq link (replace-match (concat "") - t t link)))))) + (when (save-match-data + (equal (file-truename (buffer-file-name)) + (file-truename path))) + ;; We are linking to this same file + (if (and org-file-link-context-use-camel-case + (save-match-data + (string-match (concat "^" org-camel-regexp "$") search))) + (setq link (replace-match search t t link) + matched t) + (setq link (replace-match (concat "[[" search "]]") + t t link) + matched t))))) (let ((lines (org-split-string link "\n"))) (insert (car lines)) (setq matched (or matched (string-match org-link-regexp (car lines)))) @@ -9467,9 +9864,8 @@ table editor in arbitrary modes.") (and c (setq minor-mode-map-alist (cons c (delq c minor-mode-map-alist))))) (set (make-local-variable (quote org-table-may-need-update)) t) - (make-local-hook (quote before-change-functions)) ; needed for XEmacs - (add-hook 'before-change-functions 'org-before-change-function - nil 'local) + (org-add-hook 'before-change-functions 'org-before-change-function + nil 'local) (set (make-local-variable 'org-old-auto-fill-inhibit-regexp) auto-fill-inhibit-regexp) (set (make-local-variable 'auto-fill-inhibit-regexp) @@ -9734,6 +10130,10 @@ a reduced column width." ((string-match "^#" line) ;; an ordinary comment line ) + ((and org-export-table-remove-special-lines + (string-match "^[ \t]*| *[!_^] *|" line)) + ;; a special table line that should be removed + ) (t (setq rtn (cons line rtn))))) (nreverse rtn))) @@ -10587,7 +10987,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (concat "\\1:\\2")) nil nil line)))) - ((member type '("bbdb" "vm" "wl" "rmail" "gnus" "shell")) + ((member type '("bbdb" "vm" "wl" "mhe" "rmail" "gnus" "shell")) (setq line (replace-match "<\\1:\\2>" nil nil line))))) @@ -10727,6 +11127,29 @@ headlines. The default is 3. Lower levels will become bulleted lists." (setq lines (nreverse lines)) (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) (setq lines (nreverse lines)) + (when org-export-table-remove-special-lines + ;; Check if the table has a marking column. If yes remove the + ;; column and the special lines + (let* ((special + (not + (memq nil + (mapcar + (lambda (x) + (or (string-match "^[ \t]*|-" x) + (string-match "^[ \t]*| *\\([#!$*_^ ]\\) *|" x))) + lines))))) + (if special + (setq lines + (delq nil + (mapcar + (lambda (x) + (if (string-match "^[ \t]*| *[!_^] *|" x) + nil ; ignore this line + (and (or (string-match "^[ \t]*|-+\\+" x) + (string-match "^[ \t]*|[^|]*|" x)) + (replace-match "|" t t x)))) + lines)))))) + (let ((head (and org-export-highlight-first-table-line (delq nil (mapcar (lambda (x) (string-match "^[ \t]*|-" x)) @@ -11210,10 +11633,10 @@ a time), or the day by one (if it does not contain a time)." ;; - Bindings in Org-mode map are currently ;; 0123456789abcdefghijklmnopqrstuvwxyz!?@#$%^&-+*/=()_{}[]:;"|,.<>~`'\t the alphabet -;; abcd fgh j lmnopqrstuvwxyz!? #$ -+*/= [] ; |,.<>~ \t necessary bindings +;; abcd fgh j lmnopqrstuvwxyz!? #$ ^ -+*/= [] ; |,.<>~ '\t necessary bindings ;; e (?) useful from outline-mode ;; i k @ expendable from outline-mode -;; 0123456789 %^& ()_{} " `' free +;; 0123456789 % & ()_{} " ` free ;; Make `C-c C-x' a prefix key (define-key org-mode-map "\C-c\C-x" (make-sparse-keymap)) @@ -11281,6 +11704,8 @@ a time), or the day by one (if it does not contain a time)." (define-key org-mode-map "\M-\C-m" 'org-insert-heading) (define-key org-mode-map "\C-c\C-l" 'org-insert-link) (define-key org-mode-map "\C-c\C-o" 'org-open-at-point) +(define-key org-mode-map "\C-c%" 'org-mark-ring-push) +(define-key org-mode-map "\C-c&" 'org-mark-ring-goto) (define-key org-mode-map "\C-c\C-z" 'org-time-stamp) ; Alternative binding (define-key org-mode-map "\C-c." 'org-time-stamp) ; Minor-mode reserved (define-key org-mode-map "\C-c!" 'org-time-stamp-inactive) ; Minor-mode r. @@ -11594,6 +12019,7 @@ If the cursor is on a #+TBLFM line, re-apply the formulae to the table." (interactive "P") (let ((org-enable-table-editor t)) (cond + ((org-on-target-p) (org-update-radio-target-regexp)) ((org-on-heading-p) (org-set-tags arg)) ((org-at-table.el-p) (require 'table) @@ -11935,6 +12361,11 @@ work correctly." ;; Functions needed for Emacs/XEmacs region compatibility +(defun org-add-hook (hook function &optional append local) + "Add-hook, compatible with both Emacsen." + (if (and local org-xemacs-p) (make-local-hook hook)) ;; Needed for XEmacs + (add-hook hook function append local)) + (defun org-region-active-p () "Is `transient-mark-mode' on and the region active? Works on both Emacs and XEmacs." @@ -12030,6 +12461,19 @@ to a visible line beginning. This makes the function of C-a more intuitive." (skip-chars-backward "^\r\n") (equal (char-before) ?\r)))) +(defun org-invisible-p2 () + "Check if point is at a character currently not visible." + (save-excursion + (if org-noutline-p + (progn + (if (and (eolp) (not (bobp))) (backward-char 1)) + ;; Early versions of noutline don't have `outline-invisible-p'. + (if (fboundp 'outline-invisible-p) + (outline-invisible-p) + (get-char-property (point) 'invisible))) + (skip-chars-backward "^\r\n") + (equal (char-before) ?\r)))) + (defun org-back-to-heading (&optional invisible-ok) "Move to previous heading line, or beg of this line if it's a heading. Only visible heading lines are considered, unless INVISIBLE-OK is non-nil." @@ -12058,6 +12502,16 @@ If INVISIBLE-OK is non-nil, an invisible heading line is ok too." (bobp) (equal (char-before) ?\n)))))) +(defun org-on-target-p () + (let ((pos (point))) + (save-excursion + (skip-chars-forward "<") + (and (re-search-backward "<<" nil t) + (or (looking-at org-target-regexp) + (looking-at org-radio-target-regexp)) + (<= (match-beginning 0) pos) + (>= (match-end 0) pos))))) + (defun org-up-heading-all (arg) "Move to the heading line of which the present line is a subheading. This function considers both visible and invisible heading lines. @@ -12195,4 +12649,3 @@ Show the heading too, if it is currently invisible." ;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd ;;; org.el ends here - From 2e2055128f3c78ad5d4de9ff32b0b3b51e84c792 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:13:30 +0000 Subject: [PATCH 03/41] *** empty log message *** --- lisp/ChangeLog | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ man/ChangeLog | 5 +++++ 2 files changed, 55 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c032b424366..16770a739c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,53 @@ +2006-02-22 Carsten Dominik + + * textmodes/org.el: (org-mark-ring-previous, org-mark-ring-set): + New commands. + (org-mark-ring): New variable. + (org-mark-ring-length): New option. + (org-open-at-point, org-goto, org-open-file): Push old position + onto the mark ring. + (org-add-hook): New function. + (org-export-table-remove-special-lines): New option. + (org-skip-comments, org-format-org-table-html): Respect new option + `org-export-table-remove-special-lines'. + (org-open-file): Allow special command configuration for directory + link. + (org-file-apps): Fixed bugs in customize type, added setting for + directories. + (org-activate-tags, org-format-agenda-item, org-complete) + (org-get-tags-at, org-scan-tags, org-make-tags-matcher) + (org-get-tags, org-get-buffer-tags, org-open-at-point) + (org-link-search, org-make-org-heading-search-string) + (org-make-org-heading-camel): Allow @ and 0-9 as tags characters. + (org-radio-targets, org-file-link-context-use-camel-case) + (org-activate-camels): New options. + (org-update-radio-target-regexp, org-all-targets) + (org-make-target-link-regexp, org-activate-target-links): New + functions. + (org-make-org-heading-search-string): New function. + (org-store-link, org-insert-link): Use new option + `org-file-link-context-use-camel-case'. + (org-activate-camels): Use new option `org-activate-camels'. + (org-link-regexp): Added mhe prefix. + (org-open-at-point,org-store-link): Support for mhe links. + (org-mhe-get-message-id, org-mhe-get-message-folder) + (org-mhe-get-header,org-follow-mhe-link): New functions. + (org-remove-angle-brackets, org-add-angle-brackets): New + functions. + (org-bracked-link-regexp): New constant. + (org-read-date): Fixed bug that was rejecting all typed dates. + (org-link-search): Make hierarchy above visible after a match. + (org-follow-bbdb-link): Inhibit electric mode for BBDB. + (org-store-link): Fixed bug with link creation when cursor is in + an empty line. + (org-open-at-point): Fixed bug with matching a link. Fixed buggy + argument sequence in call to `org-view-tags'. + (org-compile-prefix-format): Set `org-prefix-has-tag'. + (org-prefix-has-tag): New variable. + (org-format-agenda-item): Remove tags from headline if + appropriate. + (org-agenda-remove-tags-when-in-prefix): New option. + 2006-02-21 Michael Kifer * ediff-diff.el (ediff-setup-diff-regions, ediff-setup-diff-regions3): diff --git a/man/ChangeLog b/man/ChangeLog index 764e22eca15..9a9fb581d8f 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,8 @@ +2006-02-22 Carsten Dominik + + * org.texi: (Internal Links): Rewritten to cover the modified + linking system. + 2006-02-21 Nick Roberts * building.texi (Watch Expressions): Update and describe From 6bae0337cc443d3216e947271fccb1ecf7e41ed3 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:14:18 +0000 Subject: [PATCH 04/41] * org.texi (Internal Links): Rewritten to cover the modified linking system. --- man/org.texi | 158 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 52 deletions(-) diff --git a/man/org.texi b/man/org.texi index cf0881ff3ff..a93de06235e 100644 --- a/man/org.texi +++ b/man/org.texi @@ -4,8 +4,8 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 4.04 -@set DATE January 2006 +@set VERSION 4.05 +@set DATE February 2006 @dircategory Emacs @direntry @@ -35,7 +35,7 @@ @copying This manual is for Org-mode (version @value{VERSION}). -Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation @quotation Permission is granted to copy, distribute and/or modify this document @@ -126,12 +126,17 @@ Calculations in tables Hyperlinks -* Internal Links:: CamelCaseWords as internal links +* Internal Links:: Links to other places in the current file * External Links:: URL-like links to the world * Managing links:: Creating, inserting and following * Search Options:: Linking to a specific location * Remember:: Org-trees store quick notes +Internal Links + +* Radio targets:: Make targets trigger links in plain text. +* CamelCase links:: Activating CamelCase words as links + TODO items * TODO basics:: Marking and displaying TODO entries @@ -155,12 +160,12 @@ Agenda Views * Agenda files:: Files being searched for agenda information * Agenda dispatcher:: Keyboard access to agenda views * Weekly/Daily Agenda:: The calendar page with current tasks -* Global TODO list:: All infinished action items +* Global TODO list:: All unfinished action items * Matching headline tags:: Structured information with fine-tuned search * Timeline:: Time-sorted view for single file * Agenda commands:: Remote editing of org trees -Weekly/Daily Agenda +The weekly/daily agenda * Categories:: Not all tasks are equal * Time-of-day specifications:: How the agenda knows the time @@ -1314,7 +1319,8 @@ example in mail mode, use Complex ASCII tables with automatic line wrapping, column- and row-spanning, and alignment can be created using the Emacs table -package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}). +package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}, +and also part of Emacs 22). When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode will call @command{table-recognize-table} and move the cursor into the table. Inside a table, the keymap of Org-mode is inactive. In order @@ -1343,7 +1349,7 @@ Just like HMTL, Org-mode provides links inside a file, and external links to other files, Usenet articles, emails and much more. @menu -* Internal Links:: CamelCaseWords as internal links +* Internal Links:: Links to other places in the current file * External Links:: URL-like links to the world * Managing links:: Creating, inserting and following * Search Options:: Linking to a specific location @@ -1356,44 +1362,73 @@ links to other files, Usenet articles, emails and much more. @cindex links, internal @cindex CamelCase links -Similar to Wiki implementations, Org-mode interprets words spelled in -CamelCase (i.e. mixed case with at least one capital letter following -on a small letter inside the word) as links. While in Wiki these -links usually point to another file, in Org-mode they point to a -target in the current file. Targets are CamelCased words in double -angular brackets, and may be located anywhere, also in a comment line. -For example +Strings inside double brackets like @samp{[[My Target]]} are links +that lead to a text search in the current file. The link can be +followed with @kbd{C-c C-o} or with a mouse click (@pxref{Managing +links}). The preferred match for such a link is a dedicated target: +The same string in double angular brackets. Targets may be located +anywhere, often it is convenient to put them into a comment line, for +example @example -# <> +# <> @end example -Each occurrence of @samp{MyTarget} in the file is an active link that -can be followed with @kbd{C-c C-o} or with a mouse click -(@pxref{Managing links}). If no dedicated target exists, org-mode will -search for the words in the link separated by white space, in the -above example for @samp{my target}. If the link starts with a star -like @samp{*MyTarget}, the search is restricted to headlines. -Org-mode will first try an exact match of a full headline, but then -move on to more and more lenient searches. The link @samp{*MyTargets} -will find any of the following +If no dedicated target exists, Org-mode will search for the words in +the link, in the above example for @samp{my target}. Links starting +with a star like @samp{*My Target} restrict the search to headlines. +When searching, Org-mode will first try an exact match, but then move +on to more and more lenient searches. For example, the link +@samp{[[*My Targets]]} will find any of the following @example ** My targets ** TODO my targets are bright ** my 20 targets are @end example +It is therefore often not necessary to set a dedicated target. To +insert a link targeting a headline, in-buffer completion can be used. +Just type a star followed by a few optional letters into the buffer +and press @kbd{M-@key{TAB}}. All headlines in the current buffer will +be offered as completions. @xref{Managing links}, for more commands +creating links. + +Following a link pushes a mark onto Org-mode's own mark ring. You can +return to the previous position with @kbd{C-c &}. Using this command +several times in direct succession goes back to positions recorded +earlier. + +@menu +* Radio targets:: Make targets trigger links in plain text. +* CamelCase links:: Activating CamelCase words as links +@end menu + +@node Radio targets, CamelCase links, Internal Links, Internal Links +@subsection Radio targets + +You can configure Org-mode to link any occurrences of certain target +names in normal text. So without explicitly creating a link, the text +connects to the target radioing its position. Radio targets are +enclosed by triple angular brackets. For example, a target +@samp{<<>>} causes each occurrence of @samp{my target} in +normal text to become activated as a link. The Org-mode file is +scanned automatically for radio targets only when the file is first +loaded into Emacs. To update the target list during editing, press +@kbd{C-c C-c} with the cursor on or at a target. + +@node CamelCase links, , Radio targets, Internal Links +@subsection CamelCase words as links @cindex completion, of CamelCase links @cindex CamelCase links, completion of -It is therefore often not even necessary to set a dedicated target. -The link will automatically find a target. If you want to see what -lines in the current buffer are matched by a given CamelCase link, -open the link with @kbd{C-u C-c C-o}. Even if there are several -matches, org-mode will usually find the right one since it tries -targets and exact matches first. To insert links targeting a -headline, in-buffer completion can be used. Just type a star followed -by a few optional letters into the buffer and press @kbd{M-@key{TAB}}. -CamelCased versions of all headlines in the current buffer will be -offered as completions. @xref{Managing links}, for more commands -creating links. + +As an alternative to @samp{[[...]]} links, Org-mode also supports +CamelCase words as links. This feature is not turned on by default +because of the occasional inconsistencies this system suffers from. +To activate CamelCase words as links, and to make headline completion +offer CamelCase version of headlines, the following customization is +needed: +@lisp +(setq org-activate-camels t + org-file-link-context-use-camel-case t) +@end lisp @node External Links, Managing links, Internal Links, Hyperlinks @section External Links @@ -1407,6 +1442,7 @@ creating links. @cindex VM links @cindex RMAIL links @cindex WANDERLUST links +@cindex MH-E links @cindex USENET links @cindex SHELL links @@ -1426,6 +1462,8 @@ shows examples for each link type. @r{VM on remote machine} @r{WANDERLUST folder link} @r{WANDERLUST message link} + @r{MH-E folder link} + @r{MH-E message link} @r{RMAIL folder link} @r{RMAIL message link} @r{GNUS group link} @@ -1458,7 +1496,7 @@ VM, RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to the current article/entry. For W3 and W3M buffer, the link goes to the current URL. For Org-mode files, the current headline is targeted. For any other files, the link will point to the file, with -a CamelCase (@pxref{Search Options}) search string pointing to the +a search string (@pxref{Search Options}) pointing to the contents of the current line. If there is an active region, the selected words will form the basis of the search string. The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation and @@ -1510,6 +1548,20 @@ On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would. @kindex mouse-3 @item mouse-3 Like @kbd{mouse-2}, but force file links to be opened with Emacs. + +@cindex mark ring +@kindex C-c % +@item C-c % +Push the current position onto the mark ring, to be able to return +easily. Commands following an internal link do this automatically. + +@cindex links, returning to +@kindex C-c & +@item C-c & +Jump back to a recorded position. A position is recorded by the +commands following internal links, and by @kbd{C-c %}. Using this +command several times in direct succession moves through a ring of +previously recorded positions. @end table @@ -1525,8 +1577,8 @@ compatibility, line numbers can also follow a single colon.} colon. For example: @example - - + + @end example @noindent Here is what these options do. @@ -1534,12 +1586,12 @@ For example: @table @code @item 255 Jump to line 255. -@item MyGoal -Search for a link target with name MyGoal, or do a text search for -@samp{my target}, similar to the CamelCase search in internal links, -see @ref{Internal Links}. -@item find me -Do a normal text search for the text @samp{find me}. +@item My Target +Search for a link target @samp{<>}, or do a text search for +@samp{my target}, similar to the search in internal links, see +@ref{Internal Links}. +@item *My Target +In an Org-mode file, restrict search to headlines. @item /regexp/ Do a regular expression search for @code{regexp}. This uses the Emacs command @code{occur} to list all matches in a separate window. If the @@ -1549,10 +1601,10 @@ sparse tree with the matches. @c @code{grep} will be used to search all files in the directory. @end table -To use the search options also for a search in the current file, a -file link with an empty file name can be used. For example, -@code{} does a search for @samp{find me} in the -current file. +As a degenerate case, a file link with an empty file name can be used +to search the current file. For example, @code{} does +a search for @samp{find me} in the current file, just like +@samp{[[find me]]} would. @node Remember, , Search Options, Hyperlinks @section Remember @@ -3248,6 +3300,8 @@ Org-mode would not be what it is without your input. @itemize @bullet @item +Thomas Baumann contributed the code for links to the MH-E email system. +@item Pavel Chalmoviansky reported bugs and suggested improvements related to the agenda treatment of items with specified time. @item @@ -3267,7 +3321,7 @@ Emacs-Lisp compiler happy. Tim O'Callaghan suggested in-file links, search options for general file links, and TAGS. @item -Oliver Oppitz made useful suggestions. +Oliver Oppitz suggested multi-state TODO items. @item Pete Phillips helped the development of the TAGS feature with beta testing and suggestions. @@ -3289,8 +3343,8 @@ Linking to VM/BBDB/GNUS was inspired by Tom Shannon's Juergen Vollmer contributed code generating the table of contents in HTML output, and other export improvements. @item -David Wainberg suggested to implement an archiving mechanism and helped -testing. +David Wainberg suggested the archiving mechanism and shaped the +internal link system with many suggestions and ideas. @item Scheduling TODO items was inspired by John Wiegley's @file{planner.el}. @item From 616ae0b93a039de7d64d34211b58c07d4ba4d06c Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:15:38 +0000 Subject: [PATCH 05/41] (section{Links}): Rewritten to cover the modified link system. --- etc/orgcard.tex | 74 +++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/etc/orgcard.tex b/etc/orgcard.tex index 064d9decc95..caccb7622eb 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex @@ -1,11 +1,11 @@ -% Reference Card for Org Mode 4.04 +% Reference Card for Org Mode 4.05 % %**start of header \newcount\columnsperpage % This file can be printed with 1, 2, or 3 columns per page (see below). % At the moment this card works quite nicely in 3 column format and -% currently takes 2 full pages. It is thus suited to producing one +% currently takes 2 full pages. It is thus suited to producing one % double-side page when printed. % There are a couple of tweaks in the format of this card which make it work @@ -18,8 +18,7 @@ \columnsperpage=3 -% Copyright (C) 2005, 2006 Free Software Foundation, Inc. -% Copyright (c) 2004 Philip Rooke +% Copyright (c) 2004 Philip Rooke, 2005, 2006 Free Software Foundation % GNU Emacs is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by @@ -59,7 +58,7 @@ % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik % for their many good ideas. -\def\orgversionnumber{4.04} +\def\orgversionnumber{4.05} \def\year{2006} \def\shortcopyrightnotice{\vskip 1ex plus 2 fill @@ -89,7 +88,7 @@ \def\ncolumns{\the\columnsperpage} -\message{[\ncolumns\space +\message{[\ncolumns\space column\if 1\ncolumns\else s\fi\space per page]} \def\scaledmag#1{ scaled \magstep #1} @@ -174,7 +173,7 @@ \def\bye{\par\vfill\supereject \if a\abc \else\null\vfill\eject\fi \if a\abc \else\null\vfill\eject\fi - \end} + \end} \fi % we won't be using math mode much, so redefine some of the characters @@ -356,18 +355,8 @@ \section{TODO Items} \key{raise priority of current item}{S-UP$^4$} \key{lower priority of current item}{S-DOWN$^4$} -\vskip 1mm -per-file TODO workflow states: add line(s) like$^3$: -\vskip -1mm -\beginexample% -\#+SEQ_TODO: TODO PROCRASTINATE BLUFF DONE -\endexample -\vskip -1mm -per-file TODO keywords: add line(s) like$^3$: -\vskip -1mm -\beginexample% -\#+TYP_TODO: Phil home work DONE -\endexample +\key{\kbd{\#+SEQ_TODO: TODO TRY BLUFF DONE}}{\rm todo workflow} +\key{\kbd{\#+TYP_TODO: Phil home work DONE}}{\rm todo types} \section{Timestamps} @@ -398,21 +387,26 @@ \section{Links} \key{insert a link (TAB completes stored links)}{C-c C-l} \key{insert file link with file name completion}{C-u C-c C-l} -\key{open link at point}{C-c C-o} -\key{open file links in emacs}{C-u C-c C-o} -\key{open link at point}{mouse-2} -\key{open file links in emacs}{mouse-3} +\key{open file links in emacs (\kbd{C-u} : in emacs)}{C-c C-o} +\key{open link at point (3: in emacs)}{mouse-2/3} +%\key{open file links in emacs}{mouse-3} +\key{record a position in mark ring}{C-c \%} +\key{jump back to last followed link(s)}{C-c \&} -{\bf Link types} +{\bf Internal Links} + +\key{\kbd{<>}}{\rm target} +\key{\kbd{<<>>}}{\rm radio target$^3$} +\key{\kbd{[[*this text]]}}{\rm find headline} +\metax{\kbd{[[this text]]}}{\rm find target or text in buffer} + +{\bf External Links} -\key{\kbd{*CamelCaseWord}}{\rm search headline} -\key{\kbd{CamelCaseWord}}{\rm search in buffer} \key{\kbd{}}{\rm file, absolute} \key{\kbd{}}{\rm file, relative} -\key{\kbd{}}{\rm file with line nr.} -\key{\kbd{}}{\rm search headline} -\key{\kbd{}}{\rm search string} -\key{\kbd{}}{\rm search regexp} +\key{\kbd{}}{\rm find headline} +\key{\kbd{}}{\rm find tgt/string} +\key{\kbd{}}{\rm regexp search} \key{\kbd{}}{\rm on the web} \key{\kbd{}}{\rm EMail address} \key{\kbd{}}{\rm Usenet group} @@ -420,15 +414,9 @@ \section{Links} \key{\kbd{}}{\rm shell command} \key{\kbd{}}{\rm GNUS group} \key{\kbd{}}{\rm GNUS message} -\key{\kbd{}}{\rm VM folder} -\key{\kbd{}}{\rm VM message} -% FIXME: would like to get this back in. +\key{\kbd{}}{\rm Mail folder} +\key{\kbd{}}{\rm Mail message} %\key{\kbd{}}{\rm VM remote} -Wanderlust \kbd{} and RMAIL \kbd{} like VM -%\key{\kbd{}}{\rm Wanderlust f.} -%\key{\kbd{}}{\rm Wanderlust m.} -%\key{\kbd{}}{\rm RMAIL folder} -%\key{\kbd{}}{\rm RMAIL msg} \section{Tables} @@ -711,7 +699,7 @@ \section{Remember-mode Integration} \key{next heading}{DOWN} \key{previous heading}{UP} -Insert the note with one of the following: +Insert the note with one of the following: \key{as sublevel of heading at cursor}{RET} \key{right here (cursor not on heading)}{RET} @@ -741,8 +729,8 @@ \section{Notes} $^2$ This is only a suggestion for a binding of this command. Choose you own key as shown under INSTALLATION. -$^3$ After changing a \kbd{\#+KEYWORD} line, press \kbd{C-c C-c} with -the cursor still in a line to make Org-mode notice the change. +$^3$ After changing a \kbd{\#+KEYWORD} or \kbd{<<>>} line, +press \kbd{C-c C-c} with the cursor still in the line to update. $^4$ Keybinding affected by {\tt org-CUA-compatibility}. @@ -753,7 +741,7 @@ \section{Notes} % arch-tag: 139f6750-5cfc-49ca-92b5-237fe5795290 -%%% Local Variables: +%%% Local Variables: %%% mode: latex %%% TeX-master: t -%%% End: +%%% End: From ea2a0e35d95d8069b6aa0e8757518736b6896d22 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:20:54 +0000 Subject: [PATCH 06/41] (reftex-try-all-extensions): New option. --- lisp/textmodes/reftex-vars.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index b8eddcd0386..e866b03626f 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. @@ -1555,6 +1555,18 @@ TeX-file-extensions." :type '(repeat (cons (string :tag "File type") (repeat (string :tag "Extension"))))) +(defcustom reftex-try-all-extensions nil + "Non-nil means, try all extensions listed in `reftex-file-extensions'. +When searching for a file, LaTeX uses only the default extension. However, +if you are working with a noweb system that produces the .tex files from +some other file, and you want RefTeX to scan the web file instead of the +tex file, you need to set this option. You also need to make the noweb +extension the default extension, i.e. the first in the list in +`reftex-file-extensions'. +Note that if you are using external file finders, this option has no effect." + :group 'reftex-finding-files + :type 'boolean) + (defcustom reftex-search-unrecursed-path-first t "*Non-nil means, search all specified directories before trying recursion. Thus, in a path \".//:/tex/\", search first \"./\", then \"/tex/\" and then From 4af584809810fa88c6faa26f19a9d07665c30361 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:21:09 +0000 Subject: [PATCH 07/41] (reftex-locate-file): Search all extensions if `reftex-try-all-extensions' is set. --- lisp/textmodes/reftex.el | 48 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index cb2e960225d..b8ed941fcae 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; Keywords: tex ;; This file is part of GNU Emacs. @@ -301,7 +301,7 @@ ;;; Define the formal stuff for a minor mode named RefTeX. ;;; -(defconst reftex-version "RefTeX version VERSIONTAG" +(defconst reftex-version "RefTeX version 4.31" "Version string for RefTeX.") (defvar reftex-mode nil @@ -1466,6 +1466,50 @@ When DIE is non-nil, throw an error if file not found." (die (error "No such file: %s" file) nil) (t (message "No such file: %s (ignored)" file) nil)))) + +;; FIXME: this still needs testing and thinking. +(defun reftex-locate-file (file type master-dir &optional die) + "Find FILE of type TYPE in MASTER-DIR or on the path associcted with TYPE. +If the file does not have any of the valid extensions for TYPE, +try first the default extension and only then the naked file name. +When DIE is non-nil, throw an error if file not found." + (let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t))) + (extensions (cdr (assoc type reftex-file-extensions))) + (def-ext (car extensions)) + (ext-re (concat "\\(" + (mapconcat 'regexp-quote extensions "\\|") + "\\)\\'")) + (files (if (string-match ext-re file) + (cons file nil) + (if reftex-try-all-extensions + (append (mapcar (lambda (x) (concat file x)) + extensions) + (list file)) + (list (concat file def-ext) file)))) + path old-path file1 f fs) + (cond + ((file-name-absolute-p file) + (while (setq f (pop files)) + (if (file-regular-p f) + (setq file1 f files nil)))) + ((and reftex-use-external-file-finders + (assoc type reftex-external-file-finders)) + (setq file1 (reftex-find-file-externally file type master-dir))) + (t + (while (and (null file1) rec-values) + (setq path (reftex-access-search-path + type (pop rec-values) master-dir file)) + (setq fs files) + (while (and (null file1) (setq f (pop fs))) + (when (or (null old-path) + (not (eq old-path path))) + (setq old-path path + path (cons master-dir path)) + (setq file1 (reftex-find-file-on-path f path master-dir))))))) + (cond (file1 file1) + (die (error "No such file: %s" file) nil) + (t (message "No such file: %s (ignored)" file) nil)))) + (defun reftex-find-file-externally (file type &optional master-dir) ;; Use external program to find FILE. ;; The program is taken from `reftex-external-file-finders'. From 5d2a58e00702c1a2cc42ac48dd12dec39f899364 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:21:49 +0000 Subject: [PATCH 08/41] Version number change only --- lisp/textmodes/reftex-auc.el | 2 +- lisp/textmodes/reftex-cite.el | 2 +- lisp/textmodes/reftex-dcr.el | 106 ++++++++++++++++---------------- lisp/textmodes/reftex-global.el | 2 +- lisp/textmodes/reftex-index.el | 2 +- lisp/textmodes/reftex-parse.el | 2 +- lisp/textmodes/reftex-ref.el | 2 +- lisp/textmodes/reftex-sel.el | 2 +- lisp/textmodes/reftex-toc.el | 2 +- 9 files changed, 62 insertions(+), 60 deletions(-) diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el index ff044230803..394a0b52b19 100644 --- a/lisp/textmodes/reftex-auc.el +++ b/lisp/textmodes/reftex-auc.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index c6f43a07d26..ced44757ffd 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el index 7546c654f70..1e60b8e663e 100644 --- a/lisp/textmodes/reftex-dcr.el +++ b/lisp/textmodes/reftex-dcr.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; ;; This file is part of GNU Emacs. @@ -33,7 +33,7 @@ (require 'reftex) ;;; -(defun reftex-view-crossref (&optional arg auto-how) +(defun reftex-view-crossref (&optional arg auto-how fail-quietly) "View cross reference of macro at point. Point must be on the KEY argument. When at at `\\ref' macro, show corresponding `\\label' definition, also in external documents (`xr'). When on a label, show @@ -56,52 +56,53 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'." dw) (if (or (null macro) (reftex-in-comment)) - (error "Not on a crossref macro argument")) + (or fail-quietly + (error "Not on a crossref macro argument")) - (setq reftex-call-back-to-this-buffer (current-buffer)) - - (cond - ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro) - ;; A citation macro: search for bibitems or BibTeX entries - (setq dw (reftex-view-cr-cite arg key auto-how))) - ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro) - ;; A reference macro: search for labels - (setq dw (reftex-view-cr-ref arg key auto-how))) - (auto-how nil) ;; No further action for automatic display (speed) - ((or (equal macro "\\label") - (member macro reftex-macros-with-labels)) - ;; A label macro: search for reference macros - (reftex-access-scan-info arg) - (setq dw (reftex-view-regexp-match - (format reftex-find-reference-format (regexp-quote key)) - 4 nil nil))) - ((equal macro "\\bibitem") - ;; A bibitem macro: search for citations - (reftex-access-scan-info arg) - (setq dw (reftex-view-regexp-match - (format reftex-find-citation-regexp-format (regexp-quote key)) - 4 nil nil))) - ((member macro reftex-macros-with-index) - (reftex-access-scan-info arg) - (setq dw (reftex-view-regexp-match - (format reftex-find-index-entry-regexp-format - (regexp-quote key)) - 3 nil nil))) - (t - (reftex-access-scan-info arg) - (catch 'exit - (let ((list reftex-view-crossref-extra) - entry mre action group) - (while (setq entry (pop list)) - (setq mre (car entry) - action (nth 1 entry) - group (nth 2 entry)) - (when (string-match mre macro) - (setq dw (reftex-view-regexp-match - (format action key) group nil nil)) - (throw 'exit t)))) - (error "Not on a crossref macro argument")))) - (if (and (eq arg 2) (windowp dw)) (select-window dw)))) + (setq reftex-call-back-to-this-buffer (current-buffer)) + + (cond + ((string-match "\\`\\\\cite\\|cite\\*?\\'\\|bibentry" macro) + ;; A citation macro: search for bibitems or BibTeX entries + (setq dw (reftex-view-cr-cite arg key auto-how))) + ((string-match "\\`\\\\ref\\|ref\\(range\\)?\\*?\\'" macro) + ;; A reference macro: search for labels + (setq dw (reftex-view-cr-ref arg key auto-how))) + (auto-how nil) ;; No further action for automatic display (speed) + ((or (equal macro "\\label") + (member macro reftex-macros-with-labels)) + ;; A label macro: search for reference macros + (reftex-access-scan-info arg) + (setq dw (reftex-view-regexp-match + (format reftex-find-reference-format (regexp-quote key)) + 4 nil nil))) + ((equal macro "\\bibitem") + ;; A bibitem macro: search for citations + (reftex-access-scan-info arg) + (setq dw (reftex-view-regexp-match + (format reftex-find-citation-regexp-format (regexp-quote key)) + 4 nil nil))) + ((member macro reftex-macros-with-index) + (reftex-access-scan-info arg) + (setq dw (reftex-view-regexp-match + (format reftex-find-index-entry-regexp-format + (regexp-quote key)) + 3 nil nil))) + (t + (reftex-access-scan-info arg) + (catch 'exit + (let ((list reftex-view-crossref-extra) + entry mre action group) + (while (setq entry (pop list)) + (setq mre (car entry) + action (nth 1 entry) + group (nth 2 entry)) + (when (string-match mre macro) + (setq dw (reftex-view-regexp-match + (format action key) group nil nil)) + (throw 'exit t)))) + (error "Not on a crossref macro argument")))) + (if (and (eq arg 2) (windowp dw)) (select-window dw))))) (defun reftex-view-cr-cite (arg key how) ;; View crossreference of a ref cite. HOW can have the values @@ -243,7 +244,7 @@ With argument, actually select the window showing the cross reference." (not (memq last-command '(reftex-view-crossref reftex-mouse-view-crossref))) ;; Quick precheck if this might be a relevant spot - ;; FIXME: Can fail with backslash in comment + ;; `reftex-view-crossref' will do a more thorough check. (save-excursion (search-backward "\\" nil t) (looking-at "\\\\[a-zA-Z]*\\(cite\\|ref\\|bibentry\\)")) @@ -252,9 +253,9 @@ With argument, actually select the window showing the cross reference." (let ((current-prefix-arg nil)) (cond ((eq reftex-auto-view-crossref t) - (reftex-view-crossref -1 'echo)) + (reftex-view-crossref -1 'echo 'quiet)) ((eq reftex-auto-view-crossref 'window) - (reftex-view-crossref -1 'tmp-window)) + (reftex-view-crossref -1 'tmp-window 'quiet)) (t nil))) (error nil)))) @@ -267,7 +268,8 @@ With argument, actually select the window showing the cross reference." ;; Display crossref info in echo area. (cond ((null docstruct) - (message "%s" (substitute-command-keys (format reftex-no-info-message "ref")))) + (message "%s" + (substitute-command-keys (format reftex-no-info-message "ref")))) ((null entry) (message "ref: unknown label: %s" label)) (t @@ -301,7 +303,7 @@ With argument, actually select the window showing the cross reference." (if (and files (= (length all-files) (length files))) (message "cite: no such database entry: %s" key) (message "%s" (substitute-command-keys - (format reftex-no-info-message "cite")))) + (format reftex-no-info-message "cite")))) nil))) (when entry (if item diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index fafc1a30998..e1ae98a59df 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el index a7e7203a639..f005e7a3b87 100644 --- a/lisp/textmodes/reftex-index.el +++ b/lisp/textmodes/reftex-index.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index ce43840c888..76eb7c31df8 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index f1a8d6d3965..a850da3042e 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 9aa7edbf438..69a893ff177 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index f9eb3cfef82..9b710b92a67 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -3,7 +3,7 @@ ;; 2006 Free Software Foundation, Inc. ;; Author: Carsten Dominik -;; Version: VERSIONTAG +;; Version: 4.31 ;; This file is part of GNU Emacs. From 66090252aeb2eeaec92599e27fd2d6efe4c150b2 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:23:35 +0000 Subject: [PATCH 09/41] Version number and date change only. --- man/reftex.texi | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/man/reftex.texi b/man/reftex.texi index 890d5b5064d..a32a0aff543 100644 --- a/man/reftex.texi +++ b/man/reftex.texi @@ -7,9 +7,9 @@ @syncodeindex fn cp @c Version and Contact Info -@set VERSION 4.30 -@set EDITION 4.30 -@set DATE September 2005 +@set VERSION 4.31 +@set EDITION 4.31 +@set DATE February 2006 @set AUCTEXSITE @uref{http://www.nongnu.org/auctex/,AUCTeX distribution site} @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/,maintainers webpage} @set MAINTAINER Carsten Dominik @@ -25,8 +25,7 @@ citations and indices for LaTeX documents with Emacs. This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for @b{Ref@TeX{}} @value{VERSION} -Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, - 2006 Free Software Foundation, Inc. +Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document From 3bfb811235927a782561a0785ef681750801d4f5 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 07:23:52 +0000 Subject: [PATCH 10/41] *** empty log message *** --- etc/ChangeLog | 5 +++++ lisp/ChangeLog | 6 ++++++ man/ChangeLog | 2 ++ 3 files changed, 13 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 8c1e5782db5..61fec42dbe2 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,8 @@ +2006-02-22 Carsten Dominik + + * orgcard.tex: (section{Links}): Rewritten to cover the modified + link system. + 2006-02-18 Bill Wohler Release MH-E version 7.92. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 16770a739c3..2f862ee0b7a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2006-02-22 Carsten Dominik + * textmodes/reftex-vars.el: (reftex-try-all-extensions): New + option. + + * textmodes/reftex.el: (reftex-locate-file): Search all extensions + if `reftex-try-all-extensions' is set. + * textmodes/org.el: (org-mark-ring-previous, org-mark-ring-set): New commands. (org-mark-ring): New variable. diff --git a/man/ChangeLog b/man/ChangeLog index 9a9fb581d8f..3e7a62c09bf 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,5 +1,7 @@ 2006-02-22 Carsten Dominik + * reftex.texi: Version number and date change only. + * org.texi: (Internal Links): Rewritten to cover the modified linking system. From c6c45177785676155e57a45b3d478cdd003bb9c5 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 22 Feb 2006 07:59:26 +0000 Subject: [PATCH 11/41] (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member n_clip_rects. --- src/macgui.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/macgui.h b/src/macgui.h index cfe35e82945..a84fea1ae91 100644 --- a/src/macgui.h +++ b/src/macgui.h @@ -217,13 +217,13 @@ typedef struct _XGC RGBColor back_color; #define MAX_CLIP_RECTS 2 - /* QuickDraw clipping region. */ + /* Number of clipping rectangles. */ + int n_clip_rects; + + /* QuickDraw clipping region. Ignored if n_clip_rects == 0. */ RgnHandle clip_region; #if defined (MAC_OSX) && USE_ATSUI - /* Number of clipping rectangles used in Quartz 2D drawing. */ - int n_clip_rects; - /* Clipping rectangles used in Quartz 2D drawing. The y-coordinate is in QuickDraw's. */ CGRect clip_rects[MAX_CLIP_RECTS]; From e188aa29a937c53de32fd52c56e6c7fc8ca0c528 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 22 Feb 2006 07:59:34 +0000 Subject: [PATCH 12/41] (digest_single_submenu): Apply 2006-02-19 change for xmenu.c. --- src/macmenu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/macmenu.c b/src/macmenu.c index fccbbe6402c..8cce41114de 100644 --- a/src/macmenu.c +++ b/src/macmenu.c @@ -1257,8 +1257,11 @@ digest_single_submenu (start, end, top_level_items) wv->enabled = 1; wv->button_type = BUTTON_TYPE_NONE; wv->help = Qnil; + save_wv = wv; } - save_wv = wv; + else + save_wv = first_wv; + prev_wv = 0; i += MENU_ITEMS_PANE_LENGTH; } From b6e3efe044c0afb0b0a0c01c1cb846dde058adbc Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 22 Feb 2006 08:00:12 +0000 Subject: [PATCH 13/41] (GC_CLIP_REGION): Remove macro. (mac_begin_clip, mac_end_clip): Take arg GC instead of REGION. All uses changed. Don't do clipping if n_clip_rects is zero. (mac_set_clip_rectangles): Use xassert instead of abort. Set n_clip_rects. Don't make clip_region empty when number of clipping rectangles is zero. (mac_reset_clip_rectangles): Set n_clip_rects directly instead of calling mac_set_clip_rectangles. (x_set_toolkit_scroll_bar_thumb): Temporarily hide scroll bar to avoid multiple redraws. --- src/ChangeLog | 19 ++++++++++++ src/macterm.c | 80 +++++++++++++++++++++++++-------------------------- 2 files changed, 58 insertions(+), 41 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6df63457d77..d6a1ec83313 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2006-02-22 YAMAMOTO Mitsuharu + + * macgui.h (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member + n_clip_rects. + + * macmenu.c (digest_single_submenu): Apply 2006-02-19 change for + xmenu.c. + + * macterm.c (GC_CLIP_REGION): Remove macro. + (mac_begin_clip, mac_end_clip): Take arg GC instead of REGION. + All uses changed. Don't do clipping if n_clip_rects is zero. + (mac_set_clip_rectangles): Use xassert instead of abort. Set + n_clip_rects. Don't make clip_region empty when number of + clipping rectangles is zero. + (mac_reset_clip_rectangles): Set n_clip_rects directly instead of + calling mac_set_clip_rectangles. + (x_set_toolkit_scroll_bar_thumb): Temporarily hide scroll bar to + avoid multiple redraws. + 2006-02-22 Kim F. Storm * fringe.c (draw_fringe_bitmap): Fix overlay-arrow display. diff --git a/src/macterm.c b/src/macterm.c index 40a20026bd2..5fd416be6b8 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -267,14 +267,13 @@ extern void menubar_selection_callback (FRAME_PTR, int); #define GC_FORE_COLOR(gc) (&(gc)->fore_color) #define GC_BACK_COLOR(gc) (&(gc)->back_color) #define GC_FONT(gc) ((gc)->xgcv.font) -#define GC_CLIP_REGION(gc) ((gc)->clip_region) #define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc) static RgnHandle saved_port_clip_region = NULL; static void -mac_begin_clip (region) - RgnHandle region; +mac_begin_clip (gc) + GC gc; { static RgnHandle new_region = NULL; @@ -283,19 +282,19 @@ mac_begin_clip (region) if (new_region == NULL) new_region = NewRgn (); - if (region && !EmptyRgn (region)) + if (gc->n_clip_rects) { GetClip (saved_port_clip_region); - SectRgn (saved_port_clip_region, region, new_region); + SectRgn (saved_port_clip_region, gc->clip_region, new_region); SetClip (new_region); } } static void -mac_end_clip (region) - RgnHandle region; +mac_end_clip (gc) + GC gc; { - if (region && !EmptyRgn (region)) + if (gc->n_clip_rects) SetClip (saved_port_clip_region); } @@ -323,10 +322,10 @@ mac_draw_line (f, gc, x1, y1, x2, y2) RGBForeColor (GC_FORE_COLOR (gc)); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); MoveTo (x1, y1); LineTo (x2, y2); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); } void @@ -367,9 +366,9 @@ mac_erase_rectangle (f, gc, x, y, width, height) RGBBackColor (GC_BACK_COLOR (gc)); SetRect (&r, x, y, x + width, y + height); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); EraseRect (&r); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); } @@ -432,7 +431,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p) RGBBackColor (GC_BACK_COLOR (gc)); SetRect (&r, x, y, x + width, y + height); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); #if TARGET_API_MAC_CARBON { CGrafPtr port; @@ -447,7 +446,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p) CopyBits (&bitmap, &(FRAME_MAC_WINDOW (f)->portBits), &(bitmap.bounds), &r, overlay_p ? srcOr : srcCopy, 0); #endif /* not TARGET_API_MAC_CARBON */ - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); } @@ -579,9 +578,9 @@ mac_fill_rectangle (f, gc, x, y, width, height) RGBForeColor (GC_FORE_COLOR (gc)); SetRect (&r, x, y, x + width, y + height); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); PaintRect (&r); /* using foreground color of gc */ - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); } @@ -601,9 +600,9 @@ mac_draw_rectangle (f, gc, x, y, width, height) RGBForeColor (GC_FORE_COLOR (gc)); SetRect (&r, x, y, x + width + 1, y + height + 1); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); FrameRect (&r); /* using foreground color of gc */ - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); } @@ -718,7 +717,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) if (!mac_use_core_graphics) { #endif - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); RGBForeColor (GC_FORE_COLOR (gc)); if (bg_width) { @@ -734,7 +733,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) ATSUDrawText (text_layout, kATSUFromTextBeginning, kATSUToTextEnd, kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); #ifdef MAC_OSX } else @@ -807,7 +806,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) if (mac_use_core_graphics) savedFlags = SwapQDTextFlags (kQDUseCGTextRendering); #endif - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); RGBForeColor (GC_FORE_COLOR (gc)); #ifdef MAC_OS8 if (bg_width) @@ -843,7 +842,7 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) DrawText (buf, 0, nchars * bytes_per_char); if (bg_width) RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020 if (mac_use_core_graphics) @@ -1185,7 +1184,7 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y) ForeColor (blackColor); BackColor (whiteColor); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); LockPixels (GetGWorldPixMap (src)); #if TARGET_API_MAC_CARBON { @@ -1203,7 +1202,7 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y) &src_r, &dest_r, srcCopy, 0); #endif /* not TARGET_API_MAC_CARBON */ UnlockPixels (GetGWorldPixMap (src)); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); } @@ -1229,7 +1228,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y, ForeColor (blackColor); BackColor (whiteColor); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); LockPixels (GetGWorldPixMap (src)); LockPixels (GetGWorldPixMap (mask)); #if TARGET_API_MAC_CARBON @@ -1249,7 +1248,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y, #endif /* not TARGET_API_MAC_CARBON */ UnlockPixels (GetGWorldPixMap (mask)); UnlockPixels (GetGWorldPixMap (src)); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); } @@ -1287,9 +1286,9 @@ mac_scroll_area (f, gc, src_x, src_y, width, height, dest_x, dest_y) color mapping in CopyBits. Otherwise, it will be slow. */ ForeColor (blackColor); BackColor (whiteColor); - mac_begin_clip (GC_CLIP_REGION (gc)); + mac_begin_clip (gc); CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0); - mac_end_clip (GC_CLIP_REGION (gc)); + mac_end_clip (gc); RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); #endif /* not TARGET_API_MAC_CARBON */ @@ -1425,14 +1424,10 @@ mac_set_clip_rectangles (display, gc, rectangles, n) { int i; - if (n < 0 || n > MAX_CLIP_RECTS) - abort (); - if (n == 0) - { - if (gc->clip_region) - SetEmptyRgn (gc->clip_region); - } - else + xassert (n >= 0 && n <= MAX_CLIP_RECTS); + + gc->n_clip_rects = n; + if (n > 0) { if (gc->clip_region == NULL) gc->clip_region = NewRgn (); @@ -1450,8 +1445,6 @@ mac_set_clip_rectangles (display, gc, rectangles, n) } } #if defined (MAC_OSX) && USE_ATSUI - gc->n_clip_rects = n; - for (i = 0; i < n; i++) { Rect *rect = rectangles + i; @@ -1471,7 +1464,7 @@ mac_reset_clip_rectangles (display, gc) Display *display; GC gc; { - mac_set_clip_rectangles (display, gc, NULL, 0); + gc->n_clip_rects = 0; } @@ -4536,8 +4529,7 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) int portion, position, whole; { ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); - - int value, viewsize, maximum; + int value, viewsize, maximum, visible_p; if (whole == 0 || XINT (bar->track_height) == 0) value = 0, viewsize = 1, maximum = 0; @@ -4550,11 +4542,17 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) BLOCK_INPUT; + /* Temporarily hide the scroll bar to avoid multiple redraws. */ + visible_p = IsControlVisible (ch); + SetControlVisibility (ch, false, false); + SetControl32BitMinimum (ch, 0); SetControl32BitMaximum (ch, maximum); SetControl32BitValue (ch, value); SetControlViewSize (ch, viewsize); + SetControlVisibility (ch, visible_p, true); + UNBLOCK_INPUT; } From c7cf105d97c6e62b36da6f4a990fcefd17e1bbb3 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Wed, 22 Feb 2006 08:56:27 +0000 Subject: [PATCH 14/41] *** empty log message *** --- lisp/ChangeLog | 3 +++ lisp/textmodes/reftex.el | 44 ---------------------------------------- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2f862ee0b7a..d6b3f9ad435 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2006-02-22 Carsten Dominik + * textmodes/reftex.el (reftex-locate-file): Removed duplicate + function. + * textmodes/reftex-vars.el: (reftex-try-all-extensions): New option. diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index b8ed941fcae..d759aff8774 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1424,50 +1424,6 @@ Valid actions are: readable, restore, read, kill, write." ;;; ;;; Finding files -(defun reftex-locate-file (file type master-dir &optional die) - "Find FILE of type TYPE in MASTER-DIR or on the path associcted with TYPE. -If the file does not have any of the valid extensions for TYPE, -try first the default extension and only then the naked file name. -When DIE is non-nil, throw an error if file not found." - (let* ((rec-values (if reftex-search-unrecursed-path-first '(nil t) '(t))) - (extensions (cdr (assoc type reftex-file-extensions))) - (def-ext (car extensions)) - (ext-re (concat "\\(" - (mapconcat 'regexp-quote extensions "\\|") - "\\)\\'")) - (files (if (string-match ext-re file) - (cons file nil) - (cons (concat file def-ext) file))) - path old-path file1) - (cond - ((file-name-absolute-p file) - (setq file1 - (or - (and (car files) (file-regular-p (car files)) (car files)) - (and (cdr files) (file-regular-p (cdr files)) (cdr files))))) - ((and reftex-use-external-file-finders - (assoc type reftex-external-file-finders)) - (setq file1 (reftex-find-file-externally file type master-dir))) - (t - (while (and (null file1) rec-values) - (setq path (reftex-access-search-path - type (pop rec-values) master-dir file)) - (if (or (null old-path) - (not (eq old-path path))) - (setq old-path path - path (cons master-dir path) - file1 (or (and (car files) - (reftex-find-file-on-path - (car files) path master-dir)) - (and (cdr files) - (reftex-find-file-on-path - (cdr files) path master-dir)))))))) - (cond (file1 file1) - (die (error "No such file: %s" file) nil) - (t (message "No such file: %s (ignored)" file) nil)))) - - -;; FIXME: this still needs testing and thinking. (defun reftex-locate-file (file type master-dir &optional die) "Find FILE of type TYPE in MASTER-DIR or on the path associcted with TYPE. If the file does not have any of the valid extensions for TYPE, From c4336e88ccef2304f13862b794e3540e193b1e97 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 22 Feb 2006 20:29:24 +0000 Subject: [PATCH 15/41] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index d6a1ec83313..cb908f37e4a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-02-22 Kim F. Storm + + * indent.c (Fvertical_motion): Only try to move back if we can. + 2006-02-22 YAMAMOTO Mitsuharu * macgui.h (struct _XGC) [!MAC_OSX || !USE_ATSUI]: New member From 78744fc3702626b26d56ab56704d27afdd6ea585 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Wed, 22 Feb 2006 20:29:41 +0000 Subject: [PATCH 16/41] (Fvertical_motion): Only try to move back if we can. --- src/indent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/indent.c b/src/indent.c index fa2acd0bc05..cc928f2171f 100644 --- a/src/indent.c +++ b/src/indent.c @@ -2107,7 +2107,8 @@ whether or not it is currently displayed in some window. */) it.vpos = 0; /* Do this even if LINES is 0, so that we move back to the beginning of the current line as we ought. */ - move_it_by_lines (&it, XINT (lines), 0); + if (XINT (lines) >= 0 || IT_CHARPOS (it) > 0) + move_it_by_lines (&it, XINT (lines), 0); SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); } From acc6289a44db81134e9680dd51597abe2dbbbd92 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 22 Feb 2006 21:01:34 +0000 Subject: [PATCH 17/41] (Fwindow_list): Check `window' before doing XWINDOW. The default `window' should not be "on a different frame". --- src/ChangeLog | 22 ++++++++++++++++------ src/window.c | 3 ++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cb908f37e4a..2630efe73b7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-02-22 Stefan Monnier + + * window.c (Fwindow_list): Check `window' before doing XWINDOW. + The default `window' should not be "on a different frame". + 2006-02-22 Kim F. Storm * indent.c (Fvertical_motion): Only try to move back if we can. @@ -13,8 +18,8 @@ * macterm.c (GC_CLIP_REGION): Remove macro. (mac_begin_clip, mac_end_clip): Take arg GC instead of REGION. All uses changed. Don't do clipping if n_clip_rects is zero. - (mac_set_clip_rectangles): Use xassert instead of abort. Set - n_clip_rects. Don't make clip_region empty when number of + (mac_set_clip_rectangles): Use xassert instead of abort. + Set n_clip_rects. Don't make clip_region empty when number of clipping rectangles is zero. (mac_reset_clip_rectangles): Set n_clip_rects directly instead of calling mac_set_clip_rectangles. @@ -45,8 +50,8 @@ BG_WIDTH. All uses changed. Draw background if BG_WIDTH is not zero. (mac_draw_image_string, mac_draw_image_string_16): New arg BG_WIDTH. [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg): Rename from - mac_draw_string_cg. New arg BG_WIDTH. All uses changed. Draw - background if BG_WIDTH is not zero. Use float constants as + mac_draw_string_cg. New arg BG_WIDTH. All uses changed. + Draw background if BG_WIDTH is not zero. Use float constants as divisors instead of double. Use alloca instead of xmalloc/xfree. (x_draw_glyph_string_background, x_draw_glyph_string_foreground) [!MAC_OS8 || USE_ATSUI]: Background may be drawn using @@ -57,6 +62,11 @@ (mac_set_clip_rectangles): When resetting clip region, make it empty instead of disposing of it. +2006-02-20 Stefan Monnier + + * keymap.c (store_in_keymap): Change `def' arg to not be `register'. + Seems to trigger a bug in gcc-amd64 4.0.2 20051125 (Red Hat 4.0.2-8). + 2006-02-20 Kim F. Storm * Makefile.in: Add fringe.elc to WINDOW_SUPPORT. @@ -82,10 +92,10 @@ (left_curly_arrow_bits): Rename from continuation_bits. (right_curly_arrow_bits): Rename from continued_bits. (left_triangle_bits): Rename from ov_bits. - (right_triangle_bits): Added. + (right_triangle_bits): Add. (filled_rectangle_bits): Rename from filled_box_cursor_bits. (hollow_rectangle_bits): Rename from hollow_box_cursor_bits. - (filled_square_bits): Added. + (filled_square_bits): Add. (vertical_bar_bits): Rename from bar_cursor_bits. (horizontal_bar_bits): Rename from hbar_cursor_bits. (empty_line_bits): Rename from zv_bits. diff --git a/src/window.c b/src/window.c index e7040e3c496..41eaf78bea0 100644 --- a/src/window.c +++ b/src/window.c @@ -1861,7 +1861,8 @@ MINIBUF neither nil nor t means never include the minibuffer window. */) Lisp_Object frame, minibuf, window; { if (NILP (window)) - window = selected_window; + window = FRAMEP (frame) ? XFRAME (frame)->selected_window : selected_window; + CHECK_WINDOW (window); if (NILP (frame)) frame = selected_frame; From 039374381ce86cd931d0b2ee672f613d27b3510b Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 22 Feb 2006 22:00:47 +0000 Subject: [PATCH 18/41] *** empty log message *** --- lisp/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d6b3f9ad435..fd03764b8d0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2006-02-23 Nick Roberts + + * progmodes/gdb-ui.el (gdb-signalled): New variable and function. + (gdb-debug-log-ring): Rename from gdb-debug-log and make a ring. + (gdb-send, gdb-send-item, gud-gdba-marker-filter): Use it. + (gdb-debug-log-length): Customize it's length. + (gud-watch, gdb-var-create-handler): Display function::var format + but don't use to create variable object. + (gdb-var-create-handler): Use message-box in place of message. + (gdb-stopped): Call gdb-exited if signalled. + 2006-02-22 Carsten Dominik * textmodes/reftex.el (reftex-locate-file): Removed duplicate From e75116edb6280346c671aa5a5c022776b0ca1c01 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Wed, 22 Feb 2006 22:01:35 +0000 Subject: [PATCH 19/41] (gdb-signalled): New variable and function. (gdb-debug-log-ring): Rename from gdb-debug-log and make a ring. (gdb-send, gdb-send-item, gud-gdba-marker-filter): Use it. (gdb-debug-log-length): Customize it's length. (gud-watch, gdb-var-create-handler): Display function::var format but don't use to create variable object. (gdb-var-create-handler): Use message-box in place of message. (gdb-stopped): Call gdb-exited if signalled. --- lisp/progmodes/gdb-ui.el | 58 +++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index df603dc0d74..7e0cda786c7 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -123,6 +123,7 @@ and #define directives otherwise.") (defvar gdb-macro-info nil "Non-nil if GDB knows that the inferior includes preprocessor macro info.") (defvar gdb-buffer-fringe-width nil) +(defvar gdb-signalled nil) (defvar gdb-buffer-type nil "One of the symbols bound in `gdb-buffer-rules'.") @@ -258,11 +259,20 @@ detailed description of this mode. (gdb command-line) (gdb-init-1)) -(defvar gdb-debug-log nil) +(defcustom gdb-debug-log-length 128 + "Length of `gdb-debug-log-ring'." + :group 'gud + :type 'integer + :version "22.1") + +(defvar gdb-debug-log-ring (make-ring gdb-debug-log-length) + "Ring of commands sent to and replies received from GDB. +This variable is used to debug GDB-UI. Just need most recent +messages and a ring limits the size.") ;;;###autoload (defcustom gdb-enable-debug-log nil - "Non-nil means record the process input and output in `gdb-debug-log'." + "Non-nil means record the process input and output in `gdb-debug-log-ring'." :type 'boolean :group 'gud :version "22.1") @@ -390,7 +400,6 @@ With arg, use separate IO iff arg is positive." expr)) (defun gdb-init-1 () - (setq gdb-debug-log nil) (set (make-local-variable 'gud-minor-mode) 'gdba) (set (make-local-variable 'gud-marker-filter) 'gud-gdba-marker-filter) ;; @@ -469,14 +478,15 @@ With arg, use separate IO iff arg is positive." gdb-source-file-list nil gdb-error nil gdb-macro-info nil - gdb-buffer-fringe-width (car (window-fringes))) + gdb-buffer-fringe-width (car (window-fringes)) + gdb-debug-log-ring (make-ring gdb-debug-log-length) + gdb-signalled nil) (setq gdb-buffer-type 'gdba) (if gdb-use-separate-io-buffer (gdb-clear-inferior-io)) ;; Hack to see test for GDB 6.4+ (-stack-info-frame was implemented in 6.4) - (setq gdb-version nil) (gdb-enqueue-input (list "server interpreter mi -stack-info-frame\n" 'gdb-get-version))) @@ -573,9 +583,6 @@ With arg, automatically raise speedbar iff arg is positive." (require 'tooltip) (save-selected-window (let ((expr (tooltip-identifier-from-point (point)))) - (if (and (string-equal gdb-current-language "c") - gdb-use-colon-colon-notation gdb-selected-frame) - (setq expr (concat gdb-selected-frame "::" expr))) (catch 'already-watched (dolist (var gdb-var-list) (if (string-equal expr (car var)) (throw 'already-watched nil))) @@ -593,11 +600,15 @@ With arg, automatically raise speedbar iff arg is positive." (defun gdb-var-create-handler (expr) (goto-char (point-min)) (if (re-search-forward gdb-var-create-regexp nil t) - (let ((var (list expr - (match-string 1) - (match-string 2) - (match-string 3) - nil nil))) + (let ((var (list + (if (and (string-equal gdb-current-language "c") + gdb-use-colon-colon-notation gdb-selected-frame) + (setq expr (concat gdb-selected-frame "::" expr)) + expr) + (match-string 1) + (match-string 2) + (match-string 3) + nil nil))) (push var gdb-var-list) (speedbar 1) (unless (string-equal @@ -613,7 +624,7 @@ With arg, automatically raise speedbar iff arg is positive." ,(nth 1 var) nil))))) (if (search-forward "Undefined command" nil t) (message-box "Watching expressions requires gdb 6.0 onwards") - (message "No symbol \"%s\" in current context." expr)))) + (message-box "No symbol \"%s\" in current context." expr)))) (defun gdb-var-evaluate-expression-handler (varnum changed) (goto-char (point-min)) @@ -864,7 +875,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'." "*")) (defun gdb-display-separate-io-buffer () - "Display IO of inferior in a separate window." + "Display IO of debugged program in a separate window." (interactive) (if gdb-use-separate-io-buffer (gdb-display-buffer @@ -963,7 +974,7 @@ This filter may simply queue input for a later time." (let ((item (concat string "\n"))) (if gud-running (progn - (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log)) + (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log-ring)) (process-send-string proc item)) (gdb-enqueue-input item)))) @@ -986,7 +997,8 @@ This filter may simply queue input for a later time." (defun gdb-send-item (item) (setq gdb-flush-pending-output nil) - (if gdb-enable-debug-log (push (cons 'send-item item) gdb-debug-log)) + (if gdb-enable-debug-log + (ring-insert gdb-debug-log-ring (cons 'send-item item))) (setq gdb-current-item item) (let ((process (get-buffer-process gud-comint-buffer))) (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) @@ -1039,7 +1051,7 @@ This filter may simply queue input for a later time." ("source" gdb-source) ("starting" gdb-starting) ("exited" gdb-exited) - ("signalled" gdb-exited) + ("signalled" gdb-signalled) ("signal" gdb-stopping) ("breakpoint" gdb-stopping) ("watchpoint" gdb-stopping) @@ -1156,6 +1168,9 @@ directives." (setq gdb-overlay-arrow-position nil) (gdb-stopping ignored)) +(defun gdb-signalled (ignored) + (setq gdb-signalled t)) + (defun gdb-frame-begin (ignored) (let ((sink gdb-output-sink)) (cond @@ -1172,7 +1187,6 @@ directives." 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) - (setq gdb-active-process t) (let ((sink gdb-output-sink)) (cond ((eq sink 'inferior) @@ -1180,7 +1194,8 @@ sink to `user' in `gdb-stopping', that is fine." ((eq sink 'user) t) (t (gdb-resync) - (error "Unexpected stopped annotation"))))) + (error "Unexpected stopped annotation")))) + (if gdb-signalled (gdb-exited ignored))) (defun gdb-error (ignored) (setq gdb-error (not gdb-error))) @@ -1233,7 +1248,8 @@ happens to be appropriate." "A gud marker filter for gdb. Handle a burst of output from GDB." (if gdb-flush-pending-output nil - (if gdb-enable-debug-log (push (cons 'recv string) gdb-debug-log)) + (if gdb-enable-debug-log + (ring-insert gdb-debug-log-ring (cons 'recv string))) ;; Recall the left over gud-marker-acc from last time. (setq gud-marker-acc (concat gud-marker-acc string)) ;; Start accumulating output for the GUD buffer. From e490594672fa5f269caa57360a13414bb1188354 Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 23 Feb 2006 07:38:01 +0000 Subject: [PATCH 20/41] *** empty log message *** --- lisp/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd03764b8d0..de178d944b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2006-02-23 Nick Roberts + + * progmodes/gud.el (gud-speedbar-buttons): Use shadow face. + properly. + + * progmodes/gdb-ui.el (gdb-debug-ring-max): Rename from + gdb-debug-log-length. + (gdb-debug-ring): Rename from gdb-debug-log-ring. Don't make + it a real ring but... + (gud-gdba-marker-filter): ...make it work like mark-ring. + (gdb-enable-debug): Rename from gdb-enable-debug-log. + (gdb-mouse-jump): New function. Add bindings. + 2006-02-23 Nick Roberts * progmodes/gdb-ui.el (gdb-signalled): New variable and function. From a5de75080d6a10a8c357d183f9ba3da5c33dce2a Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 23 Feb 2006 07:38:57 +0000 Subject: [PATCH 21/41] (gdb-debug-ring-max): Rename from gdb-debug-log-length. (gdb-debug-ring): Rename from gdb-debug-log-ring. Don't make it a real ring but... (gud-gdba-marker-filter): ...make it work like mark-ring. (gdb-enable-debug): Rename from gdb-enable-debug-log. (gdb-mouse-jump): New function. Add bindings. --- lisp/progmodes/gdb-ui.el | 78 +++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 16 deletions(-) diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 7e0cda786c7..db79d43d321 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el @@ -259,20 +259,19 @@ detailed description of this mode. (gdb command-line) (gdb-init-1)) -(defcustom gdb-debug-log-length 128 - "Length of `gdb-debug-log-ring'." +(defcustom gdb-debug-ring-max 128 + "Maximum size of `gdb-debug-ring'." :group 'gud :type 'integer :version "22.1") -(defvar gdb-debug-log-ring (make-ring gdb-debug-log-length) - "Ring of commands sent to and replies received from GDB. -This variable is used to debug GDB-UI. Just need most recent -messages and a ring limits the size.") +(defvar gdb-debug-ring nil + "List of commands, most recent first, sent to and replies received from GDB. +This variable is used to debug GDB-UI.") ;;;###autoload -(defcustom gdb-enable-debug-log nil - "Non-nil means record the process input and output in `gdb-debug-log-ring'." +(defcustom gdb-enable-debug nil + "Non-nil means record the process input and output in `gdb-debug-ring'." :type 'boolean :group 'gud :version "22.1") @@ -445,11 +444,21 @@ With arg, use separate IO iff arg is positive." 'gdb-mouse-set-clear-breakpoint) (define-key gud-minor-mode-map [left-fringe mouse-2] 'gdb-mouse-until) + (define-key gud-minor-mode-map [left-margin drag-mouse-1] + 'gdb-mouse-until) (define-key gud-minor-mode-map [left-fringe drag-mouse-1] 'gdb-mouse-until) (define-key gud-minor-mode-map [left-margin mouse-2] 'gdb-mouse-until) - (define-key gud-minor-mode-map [left-margin mouse-3] + (define-key gud-minor-mode-map [left-margin C-drag-mouse-1] + 'gdb-mouse-jump) + (define-key gud-minor-mode-map [left-fringe C-drag-mouse-1] + 'gdb-mouse-jump) + (define-key gud-minor-mode-map [left-fringe C-mouse-2] + 'gdb-mouse-jump) + (define-key gud-minor-mode-map [left-margin C-mouse-2] + 'gdb-mouse-jump) + (define-key gud-minor-mode-map [left-margin mouse-3] 'gdb-mouse-toggle-breakpoint-margin) (define-key gud-minor-mode-map [left-fringe mouse-3] 'gdb-mouse-toggle-breakpoint-fringe) @@ -479,7 +488,7 @@ With arg, use separate IO iff arg is positive." gdb-error nil gdb-macro-info nil gdb-buffer-fringe-width (car (window-fringes)) - gdb-debug-log-ring (make-ring gdb-debug-log-length) + gdb-debug-ring nil gdb-signalled nil) (setq gdb-buffer-type 'gdba) @@ -526,7 +535,9 @@ With arg, use separate IO iff arg is positive." (gdb-init-2)) (defun gdb-mouse-until (event) - "Execute source lines by dragging the overlay arrow (fringe) with the mouse." + "Continue running until a source line past the current line. +The destination source line can be selected either by clicking with mouse-2 +on the fringe/margin or dragging the arrow with mouse-1 (default bindings)." (interactive "e") (if gud-overlay-arrow-position (let ((start (event-start event)) @@ -552,6 +563,40 @@ With arg, use separate IO iff arg is positive." (forward-char 2) (gud-call (concat "until *%a"))))))))) +(defun gdb-mouse-jump (event) + "Set execution address/line. +The destination source line can be selected either by clicking with mouse-2 +on the fringe/margin or dragging the arrow with mouse-1 (default bindings). +Unlike gdb-mouse-until the destination address can be before the current +line, and no execution takes place." + (interactive "e") + (if gud-overlay-arrow-position + (let ((start (event-start event)) + (end (event-end event)) + (buffer (marker-buffer gud-overlay-arrow-position)) (line)) + (if (not (string-match "Machine" mode-name)) + (if (equal buffer (window-buffer (posn-window end))) + (with-current-buffer buffer + (when (or (equal start end) + (equal (posn-point start) + (marker-position + gud-overlay-arrow-position))) + (setq line (line-number-at-pos (posn-point end))) + (progn (gud-call (concat "tbreak " (number-to-string line))) + (gud-call (concat "jump " (number-to-string line))))))) + (if (equal (marker-buffer gdb-overlay-arrow-position) + (window-buffer (posn-window end))) + (when (or (equal start end) + (equal (posn-point start) + (marker-position + gdb-overlay-arrow-position))) + (save-excursion + (goto-line (line-number-at-pos (posn-point end))) + (forward-char 2) + (progn + (gud-call (concat "tbreak *%a")) + (gud-call (concat "jump *%a")))))))))) + (defcustom gdb-speedbar-auto-raise nil "If non-nil raise speedbar every time display of watch expressions is\ updated." @@ -974,7 +1019,7 @@ This filter may simply queue input for a later time." (let ((item (concat string "\n"))) (if gud-running (progn - (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log-ring)) + (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) (process-send-string proc item)) (gdb-enqueue-input item)))) @@ -997,8 +1042,7 @@ This filter may simply queue input for a later time." (defun gdb-send-item (item) (setq gdb-flush-pending-output nil) - (if gdb-enable-debug-log - (ring-insert gdb-debug-log-ring (cons 'send-item item))) + (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-ring)) (setq gdb-current-item item) (let ((process (get-buffer-process gud-comint-buffer))) (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) @@ -1248,8 +1292,10 @@ happens to be appropriate." "A gud marker filter for gdb. Handle a burst of output from GDB." (if gdb-flush-pending-output nil - (if gdb-enable-debug-log - (ring-insert gdb-debug-log-ring (cons 'recv string))) + (when gdb-enable-debug + (push (cons 'recv string) gdb-debug-ring) + (if (> (length gdb-debug-ring) gdb-debug-ring-max) + (setcdr (nthcdr (1- gdb-debug-ring-max) gdb-debug-ring) nil))) ;; Recall the left over gud-marker-acc from last time. (setq gud-marker-acc (concat gud-marker-acc string)) ;; Start accumulating output for the GUD buffer. From 7efc64d4be1c4529cde72a215ef59ff17c497a7d Mon Sep 17 00:00:00 2001 From: Nick Roberts Date: Thu, 23 Feb 2006 07:40:25 +0000 Subject: [PATCH 22/41] (gud-speedbar-buttons): Use shadow face properly. --- lisp/progmodes/gud.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index ea2586a31d6..5a09d5dd196 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -456,7 +456,8 @@ required by the caller." (while var-list (let* (char (depth 0) (start 0) (var (car var-list)) (expr (car var)) (varnum (nth 1 var)) - (type (nth 3 var)) (status (nth 5 var))) + (type (nth 3 var)) (value (nth 4 var)) + (status (nth 5 var))) (put-text-property 0 (length expr) 'face font-lock-variable-name-face expr) (put-text-property @@ -470,7 +471,7 @@ required by the caller." (string-match "char \\*$" type))) (speedbar-make-tag-line 'bracket ?? nil nil - (concat expr "\t" (nth 4 var)) + (concat expr "\t" value) (if (or parent (eq status 'out-of-scope)) nil 'gdb-edit-value) nil @@ -491,14 +492,12 @@ required by the caller." (speedbar-make-tag-line 'bracket char 'gdb-speedbar-expand-node varnum - (concat expr "\t" - type "\t" - (nth 4 var)) - (if (or parent status 'out-of-scope) + (concat expr "\t" type "\t" value) + (if (or parent status) nil 'gdb-edit-value) nil - (if (and (or parent status) gdb-show-changed-values) - 'shadow t) + (if (and (or parent (eq status 'out-of-scope)) + gdb-show-changed-values) 'shadow t) depth) (speedbar-make-tag-line 'bracket char From 7889775856af24b29d4613231e7d8be0217064c0 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Thu, 23 Feb 2006 09:07:23 +0000 Subject: [PATCH 23/41] (update_text_area): Avoid needless redraw of rightmost glyph whose face is extended to the text area end. --- src/ChangeLog | 5 +++++ src/dispnew.c | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2630efe73b7..df85b407911 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-02-23 YAMAMOTO Mitsuharu + + * dispnew.c (update_text_area): Avoid needless redraw of rightmost + glyph whose face is extended to the text area end. + 2006-02-22 Stefan Monnier * window.c (Fwindow_list): Check `window' before doing XWINDOW. diff --git a/src/dispnew.c b/src/dispnew.c index 52d5b989800..f6ce8eb43f4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4358,10 +4358,14 @@ update_text_area (w, vpos) int overlapping_glyphs_p = current_row->contains_overlapping_glyphs_p; int desired_stop_pos = desired_row->used[TEXT_AREA]; - /* If the desired row extends its face to the text area end, + /* If the desired row extends its face to the text area end, and + unless the current row also does so at the same position, make sure we write at least one glyph, so that the face extension actually takes place. */ - if (MATRIX_ROW_EXTENDS_FACE_P (desired_row)) + if (MATRIX_ROW_EXTENDS_FACE_P (desired_row) + && (desired_stop_pos < current_row->used[TEXT_AREA] + || (desired_stop_pos == current_row->used[TEXT_AREA] + && !MATRIX_ROW_EXTENDS_FACE_P (current_row)))) --desired_stop_pos; stop = min (current_row->used[TEXT_AREA], desired_stop_pos); @@ -4480,7 +4484,10 @@ update_text_area (w, vpos) has to be cleared, if and only if we did a write_glyphs above. This is made sure by setting desired_stop_pos appropriately above. */ - xassert (i < desired_row->used[TEXT_AREA]); + xassert (i < desired_row->used[TEXT_AREA] + || ((desired_row->used[TEXT_AREA] + == current_row->used[TEXT_AREA]) + && MATRIX_ROW_EXTENDS_FACE_P (current_row))); } else if (MATRIX_ROW_EXTENDS_FACE_P (current_row)) { From 92fb55166261b75d61de24742b70e73f627e45d6 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 23 Feb 2006 10:13:23 +0000 Subject: [PATCH 24/41] *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index df85b407911..ea7a5e7d70b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-02-23 Zhang Wei (tiny change) + + * xfns.c (Fx_file_dialog): Return a decoded file name. + 2006-02-23 YAMAMOTO Mitsuharu * dispnew.c (update_text_area): Avoid needless redraw of rightmost From 5b574e69573e5026e25bc383acbb97d59d07ce35 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Thu, 23 Feb 2006 10:43:32 +0000 Subject: [PATCH 25/41] (x_set_toolkit_scroll_bar_thumb): Don't set control values if control is not visible or values are not changed. --- src/ChangeLog | 3 +++ src/macterm.c | 22 +++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ea7a5e7d70b..fe8b13409ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,9 @@ * dispnew.c (update_text_area): Avoid needless redraw of rightmost glyph whose face is extended to the text area end. + * macterm.c (x_set_toolkit_scroll_bar_thumb): Don't set control + values if control is not visible or values are not changed. + 2006-02-22 Stefan Monnier * window.c (Fwindow_list): Check `window' before doing XWINDOW. diff --git a/src/macterm.c b/src/macterm.c index 5fd416be6b8..3bd7d3b2e24 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -4529,7 +4529,7 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) int portion, position, whole; { ControlHandle ch = SCROLL_BAR_CONTROL_HANDLE (bar); - int value, viewsize, maximum, visible_p; + int value, viewsize, maximum; if (whole == 0 || XINT (bar->track_height) == 0) value = 0, viewsize = 1, maximum = 0; @@ -4542,16 +4542,20 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) BLOCK_INPUT; - /* Temporarily hide the scroll bar to avoid multiple redraws. */ - visible_p = IsControlVisible (ch); - SetControlVisibility (ch, false, false); + if (IsControlVisible (ch) + && (GetControlViewSize (ch) != viewsize + || GetControl32BitValue (ch) != value + || GetControl32BitMaximum (ch) != maximum)) + { + /* Temporarily hide the scroll bar to avoid multiple redraws. */ + SetControlVisibility (ch, false, false); - SetControl32BitMinimum (ch, 0); - SetControl32BitMaximum (ch, maximum); - SetControl32BitValue (ch, value); - SetControlViewSize (ch, viewsize); + SetControl32BitMaximum (ch, maximum); + SetControl32BitValue (ch, value); + SetControlViewSize (ch, viewsize); - SetControlVisibility (ch, visible_p, true); + SetControlVisibility (ch, true, true); + } UNBLOCK_INPUT; } From 1caf01c286458e837ce7388b79c7e46223ae7795 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 23 Feb 2006 10:54:15 +0000 Subject: [PATCH 26/41] *** empty log message *** --- lisp/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de178d944b2..b560004ec2b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2006-02-23 Carsten Dominik + + * textmodes/org.el: (org-cleaned-string-for-export, + org-solidify-link-text): New function. + (org-add-hook): Use `add-local-hook' instead of `make-local-hook' + for XEmacs, just to silence the compiler. + (org-export-as-ascii, org-export-as-html-and-open): Use + `org-cleaned-string-for-export' and create internal links. + (org-follow-mhe-link): Require mh-e, use folder. + 2006-02-23 Nick Roberts * progmodes/gud.el (gud-speedbar-buttons): Use shadow face. From 272dfec25a333681630e84a85ce10344fd018fc2 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 23 Feb 2006 10:54:29 +0000 Subject: [PATCH 27/41] (org-cleaned-string-for-export, org-solidify-link-text): New function. (org-add-hook): Use `add-local-hook' instead of `make-local-hook' for XEmacs, just to silence the compiler. (org-export-as-ascii, org-export-as-html-and-open): Use `org-cleaned-string-for-export' and create internal links. (org-follow-mhe-link): Require mh-e, use folder. --- lisp/textmodes/org.el | 100 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 88 insertions(+), 12 deletions(-) diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index 4b62eeb87a7..ab06318e0e5 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.05 +;; Version: 4.06 ;; ;; This file is part of GNU Emacs. ;; @@ -81,6 +81,10 @@ ;; ;; Changes since version 4.00: ;; --------------------------- +;; Version 4.06 +;; - HTML exporter treats targeted internal links. +;; - Bug fixes. +;; ;; Version 4.05 ;; - Changes to internal link system (thanks to David Wainberg for ideas). ;; - in-file links: [[Search String]] instead of @@ -126,7 +130,7 @@ ;;; Customization variables -(defvar org-version "4.05" +(defvar org-version "4.06" "The version number of the file org.el.") (defun org-version () (interactive) @@ -7211,11 +7215,12 @@ onto the ring." (defun org-follow-mhe-link (folder article) "Follow an MHE link to FOLDER and ARTICLE." (setq article (org-add-angle-brackets article)) -;; (require 'mh-e) - (mh-rmail) ;; mh-e is standard with emacs 22 + (require 'mh-e) + (mh-find-path) (let* ((show-buf (concat "show-" folder))) + (mh-visit-folder folder) (get-buffer-create show-buf) - (mh-display-msg + (mh-show-msg (string-to-number (car (split-string (with-temp-buffer @@ -7226,8 +7231,7 @@ onto the ring." "--message-id" article) (buffer-string)) - "\n"))) - folder) + "\n")))) (pop-to-buffer show-buf))) (defun org-open-file (path &optional in-emacs line search) @@ -10440,6 +10444,45 @@ 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) + "Cleanup a buffer substring so that links can be created safely." + (interactive) + (let* ((cb (current-buffer)) + (re-radio (concat "\\([^<]\\)\\(" org-target-link-regexp "\\)")) + rtn) + (save-excursion + (set-buffer (get-buffer-create " org-mode-tmp")) + (erase-buffer) + (insert string) + (org-mode) + ;; Find targets in comments and move them out of comments + (goto-char (point-min)) + (while (re-search-forward "^#.*?\\(<<\r\n]+>>>?\\).*" nil t) + (replace-match "\\1")) + ;; Find matches for radio targets and turn them into links + (goto-char (point-min)) + (while (re-search-forward re-radio nil t) + (replace-match "\\1[[\\2]]")) + ;; Find all links that contain a newline and put them into a single line + (goto-char (point-min)) + (while (re-search-forward "\\(\\[\\[[^]]*?\\)[ \t]*\n[ \t]*\\([^]]*\\]\\]\\)" nil t) + (replace-match "\\1 \\2") + (goto-char (match-beginning 0))) + ;; Remove comments + (goto-char (point-min)) + (while (re-search-forward "^#.*\n?" nil t) + (replace-match "")) + (setq rtn (buffer-string))) + (kill-buffer " org-mode-tmp") + rtn)) + +(defun org-solidify-link-text (s) + "Take link text and make a safe target out of it." + (save-match-data + (mapconcat + 'identity + (org-split-string s "[ \t\r\n]+") "--"))) + (defvar org-last-level nil) ; dynamically scoped variable (defun org-export-as-ascii (arg) @@ -10454,7 +10497,10 @@ underlined headlines. The default is 3." (if (org-region-active-p) (region-beginning) (point-min)) (if (org-region-active-p) (region-end) (point-max)))) (lines (org-export-find-first-heading-line - (org-skip-comments (org-split-string region "[\r\n]")))) + (org-skip-comments + (org-split-string + (org-cleaned-string-for-export region) + "[\r\n]")))) (org-startup-with-deadline-check nil) (level 0) line txt (umax nil) @@ -10543,6 +10589,14 @@ underlined headlines. The default is 3." (while (setq line (pop lines)) ;; Remove the quoted HTML tags. (setq line (org-html-expand-for-ascii line)) + ;; Remove targets + (while (string-match "<<]*>>>?[ \t]*\n?" line) + (setq line (replace-match "" t t line))) + ;; Replace internal links + (while (string-match org-bracket-link-regexp line) + (setq line (replace-match + (if (match-end 3) "[\\3]" "[\\1]") + t nil line))) (cond ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) ;; a Headline @@ -10781,7 +10835,9 @@ headlines. The default is 3. Lower levels will become bulleted lists." (if region-p (region-beginning) (point-min)) (if region-p (region-end) (point-max)))) (all_lines - (org-skip-comments (org-split-string region "[\r\n]"))) + (org-skip-comments (org-split-string + (org-cleaned-string-for-export region) + "[\r\n]"))) (lines (org-export-find-first-heading-line all_lines)) (level 0) (line "") (origline "") txt todo (umax nil) @@ -10944,7 +11000,26 @@ headlines. The default is 3. Lower levels will become bulleted lists." (insert "\n")) (throw 'nextline nil)) - ;; Protect the links + + ;; make targets to anchors + (while (string-match "<<]*\\)>>>?[ \t]*\n?" line) + (setq line (replace-match + (concat "@\\nbsp@") + t t line))) + ;; Replace internal links + (while (string-match org-bracket-link-regexp line) + (setq line (replace-match + (concat + "@" + (match-string (if (match-end 3) 3 1) line) + "@") + t t line))) + + ;; Protect the external links (setq start 0) (while (string-match org-link-maybe-angles-regexp line start) (setq start (match-end 0)) @@ -12363,8 +12438,9 @@ work correctly." (defun org-add-hook (hook function &optional append local) "Add-hook, compatible with both Emacsen." - (if (and local org-xemacs-p) (make-local-hook hook)) ;; Needed for XEmacs - (add-hook hook function append local)) + (if (and local org-xemacs-p) + (add-local-hook hook function append) + (add-hook hook function append local))) (defun org-region-active-p () "Is `transient-mark-mode' on and the region active? From 09fd368a840ec54aeffa42e4dc8147dd6df4f13e Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Thu, 23 Feb 2006 10:56:04 +0000 Subject: [PATCH 28/41] Version number change only --- etc/orgcard.tex | 4 ++-- man/org.texi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/orgcard.tex b/etc/orgcard.tex index caccb7622eb..75ff98514b5 100644 --- a/etc/orgcard.tex +++ b/etc/orgcard.tex @@ -1,4 +1,4 @@ -% Reference Card for Org Mode 4.05 +% Reference Card for Org Mode 4.06 % %**start of header \newcount\columnsperpage @@ -58,7 +58,7 @@ % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik % for their many good ideas. -\def\orgversionnumber{4.05} +\def\orgversionnumber{4.06} \def\year{2006} \def\shortcopyrightnotice{\vskip 1ex plus 2 fill diff --git a/man/org.texi b/man/org.texi index a93de06235e..ecb3480efa1 100644 --- a/man/org.texi +++ b/man/org.texi @@ -4,7 +4,7 @@ @setfilename ../info/org @settitle Org Mode Manual -@set VERSION 4.05 +@set VERSION 4.06 @set DATE February 2006 @dircategory Emacs From 85563680f51127639b32e81432754f7412a7139e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 23 Feb 2006 11:59:35 +0000 Subject: [PATCH 29/41] *** empty log message *** --- lisp/ChangeLog | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b560004ec2b..9c1ff952196 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,17 +1,16 @@ -2006-02-23 Carsten Dominik +12006-02-23 Carsten Dominik - * textmodes/org.el: (org-cleaned-string-for-export, - org-solidify-link-text): New function. - (org-add-hook): Use `add-local-hook' instead of `make-local-hook' - for XEmacs, just to silence the compiler. + * textmodes/org.el (org-cleaned-string-for-export) + (org-solidify-link-text): New function. + (org-add-hook): Use `add-local-hook' instead of `make-local-hook' for + XEmacs, just to silence the compiler. (org-export-as-ascii, org-export-as-html-and-open): Use `org-cleaned-string-for-export' and create internal links. (org-follow-mhe-link): Require mh-e, use folder. 2006-02-23 Nick Roberts - * progmodes/gud.el (gud-speedbar-buttons): Use shadow face. - properly. + * progmodes/gud.el (gud-speedbar-buttons): Use shadow face properly. * progmodes/gdb-ui.el (gdb-debug-ring-max): Rename from gdb-debug-log-length. @@ -34,16 +33,14 @@ 2006-02-22 Carsten Dominik - * textmodes/reftex.el (reftex-locate-file): Removed duplicate - function. + * textmodes/reftex.el (reftex-locate-file): Remove duplicate function. - * textmodes/reftex-vars.el: (reftex-try-all-extensions): New - option. + * textmodes/reftex-vars.el (reftex-try-all-extensions): New option. - * textmodes/reftex.el: (reftex-locate-file): Search all extensions + * textmodes/reftex.el (reftex-locate-file): Search all extensions if `reftex-try-all-extensions' is set. - * textmodes/org.el: (org-mark-ring-previous, org-mark-ring-set): + * textmodes/org.el (org-mark-ring-previous, org-mark-ring-set): New commands. (org-mark-ring): New variable. (org-mark-ring-length): New option. @@ -92,10 +89,10 @@ (org-agenda-remove-tags-when-in-prefix): New option. 2006-02-21 Michael Kifer - + * ediff-diff.el (ediff-setup-diff-regions, ediff-setup-diff-regions3): - fix the regular expressions. - + Fix the regular expressions. + 2006-02-21 Richard M. Stallman * progmodes/sh-script.el (sh-mode): Set shell type based on file name From cca179692374bb39769ca42e6350c1da07720329 Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 23 Feb 2006 13:31:03 +0000 Subject: [PATCH 30/41] Fix omission bug: Add dot (ASCII 0x2E) on first line. --- etc/ChangeLog | 4 ++++ etc/TUTORIAL.cn | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 61fec42dbe2..cfc2f3e9a04 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2006-02-23 Herbert Euler (tiny change) + + * TUTORIAL.cn: Fix omission bug: Add dot (ASCII 0x2E) on first line. + 2006-02-22 Carsten Dominik * orgcard.tex: (section{Links}): Rewritten to cover the modified diff --git a/etc/TUTORIAL.cn b/etc/TUTORIAL.cn index 2546b84e465..a1589aa0cd7 100644 --- a/etc/TUTORIAL.cn +++ b/etc/TUTORIAL.cn @@ -1,4 +1,4 @@ -Emacs ¿ìËÙÖ¸ÄÏ£¨²é¿´°æÈ¨ÉùÃ÷ÇëÖÁ±¾ÎÄĩ⣩ +Emacs ¿ìËÙÖ¸ÄÏ.£¨²é¿´°æÈ¨ÉùÃ÷ÇëÖÁ±¾ÎÄĩ⣩ ¡¾×¢Ò⣺λÓÚ¡¾¡¿Ö®¼äµÄÄÚÈÝÊÇÒë×¢£¬±ÈÈç±¾ÐУ¬ÏÂͬ¡£¡¿ From 35402b9845e63e8e97371c0f70b2ac409ff288f0 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 23 Feb 2006 14:43:40 +0000 Subject: [PATCH 31/41] (org-xemacs-p, org-export-html-show-new-buffer, org-table-may-need-update, org-insert-item, org-mhe-get-message-real-folder, org-mhe-get-message-folder-from-index, org-mhe-get-message-folder, org-mhe-get-message-num, org-mhe-get-header, org-make-org-heading-search-string, org-make-org-heading-camel, org-table-sort-lines, org-format-org-table-html, org-format-table-table-html): Fix typos in docstrings. --- lisp/ChangeLog | 51 ++++++++++++++++++++++------------- lisp/textmodes/org.el | 63 +++++++++++++++++++++---------------------- 2 files changed, 63 insertions(+), 51 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c1ff952196..601f4928a13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2006-02-23 Juanma Barranquero + + * textmodes/org.el (org-xemacs-p) + (org-export-html-show-new-buffer, org-table-may-need-update) + (org-insert-item, org-mhe-get-message-real-folder) + (org-mhe-get-message-folder-from-index) + (org-mhe-get-message-folder, org-mhe-get-message-num) + (org-mhe-get-header, org-make-org-heading-search-string) + (org-make-org-heading-camel, org-table-sort-lines) + (org-format-org-table-html, org-format-table-table-html): + Fix typos in docstrings. + 12006-02-23 Carsten Dominik * textmodes/org.el (org-cleaned-string-for-export) @@ -40,7 +52,7 @@ * textmodes/reftex.el (reftex-locate-file): Search all extensions if `reftex-try-all-extensions' is set. - * textmodes/org.el (org-mark-ring-previous, org-mark-ring-set): + * textmodes/org.el (org-mark-ring-push, org-mark-ring-goto): New commands. (org-mark-ring): New variable. (org-mark-ring-length): New option. @@ -48,12 +60,12 @@ onto the mark ring. (org-add-hook): New function. (org-export-table-remove-special-lines): New option. - (org-skip-comments, org-format-org-table-html): Respect new option - `org-export-table-remove-special-lines'. - (org-open-file): Allow special command configuration for directory - link. - (org-file-apps): Fixed bugs in customize type, added setting for - directories. + (org-skip-comments, org-format-org-table-html): Respect new + option `org-export-table-remove-special-lines'. + (org-open-file): Allow special command configuration for + directory link. + (org-file-apps): Fixed bugs in customize type, added setting + for directories. (org-activate-tags, org-format-agenda-item, org-complete) (org-get-tags-at, org-scan-tags, org-make-tags-matcher) (org-get-tags, org-get-buffer-tags, org-open-at-point) @@ -62,30 +74,31 @@ (org-radio-targets, org-file-link-context-use-camel-case) (org-activate-camels): New options. (org-update-radio-target-regexp, org-all-targets) - (org-make-target-link-regexp, org-activate-target-links): New - functions. + (org-make-target-link-regexp, org-activate-target-links): + New functions. (org-make-org-heading-search-string): New function. (org-store-link, org-insert-link): Use new option `org-file-link-context-use-camel-case'. (org-activate-camels): Use new option `org-activate-camels'. (org-link-regexp): Added mhe prefix. - (org-open-at-point,org-store-link): Support for mhe links. - (org-mhe-get-message-id, org-mhe-get-message-folder) - (org-mhe-get-header,org-follow-mhe-link): New functions. - (org-remove-angle-brackets, org-add-angle-brackets): New - functions. - (org-bracked-link-regexp): New constant. + (org-open-at-point, org-store-link): Support for mhe links. + (org-mhe-get-message-real-folder, org-mhe-get-message-folder) + (org-mhe-get-message-folder-from-index, org-mhe-get-message-num) + (org-mhe-get-header, org-follow-mhe-link): New functions. + (org-remove-angle-brackets, org-add-angle-brackets): + New functions. + (org-bracket-link-regexp): New constant. (org-read-date): Fixed bug that was rejecting all typed dates. (org-link-search): Make hierarchy above visible after a match. (org-follow-bbdb-link): Inhibit electric mode for BBDB. (org-store-link): Fixed bug with link creation when cursor is in an empty line. - (org-open-at-point): Fixed bug with matching a link. Fixed buggy - argument sequence in call to `org-view-tags'. + (org-open-at-point): Fixed bug with matching a link. + Fixed buggy argument sequence in call to `org-view-tags'. (org-compile-prefix-format): Set `org-prefix-has-tag'. (org-prefix-has-tag): New variable. - (org-format-agenda-item): Remove tags from headline if - appropriate. + (org-format-agenda-item): Remove tags from headline + if appropriate. (org-agenda-remove-tags-when-in-prefix): New option. 2006-02-21 Michael Kifer diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index ab06318e0e5..cecfe7f5164 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -140,7 +140,7 @@ ;; versions (Emacs versus XEmacs) and with different versions of outline.el. ;; The compatibility code in org.el is based on these two constants. (defconst org-xemacs-p (featurep 'xemacs) - "Are we running xemacs?") + "Are we running XEmacs?") (defconst org-noutline-p (featurep 'noutline) "Are we using the new outline mode?") @@ -1651,7 +1651,7 @@ Otherwise the buffer will just be saved to a file and stay hidden." :type 'boolean) (defcustom org-export-html-show-new-buffer nil - "Non-nil means, popup buffer containing the exported html text. + "Non-nil means, popup buffer containing the exported HTML text. Otherwise, the buffer will just be saved to a file and stay hidden." :group 'org-export :type 'boolean) @@ -1999,8 +1999,8 @@ When this is non-nil, the headline after the keyword is set to the ;; an update. (defvar org-table-may-need-update t "Indicates that a table might need an update. -This variable is set by `org-before-change-function'. `org-table-align' -sets it back to nil.") +This variable is set by `org-before-change-function'. +`org-table-align'sets it back to nil.") (defvar org-mode-hook nil) (defvar org-inhibit-startup nil) ; Dynamically-scoped param. (defvar org-agenda-keep-modes nil) ; Dynamically-scoped param. @@ -2660,7 +2660,7 @@ or nil." (defun org-insert-item () "Insert a new item at the current level. -Return t when tings worked, nil when we are not in an item." +Return t when things worked, nil when we are not in an item." (when (save-excursion (condition-case nil (progn @@ -3371,7 +3371,7 @@ At all other locations, this simply calls `ispell-complete-word'." (save-excursion (goto-char (point-min)) (while (re-search-forward org-todo-line-regexp nil t) - (push (list + (push (list (if org-file-link-context-use-camel-case (org-make-org-heading-camel (match-string 3) t) (org-make-org-heading-search-string @@ -6988,7 +6988,7 @@ to read." (interactive) (setq pos (or pos (point))) (setq org-mark-ring (nthcdr (1- org-mark-ring-length) org-mark-ring)) - (move-marker (car org-mark-ring) + (move-marker (car org-mark-ring) (or pos (point)) (or buffer (current-buffer))) (message @@ -7136,14 +7136,14 @@ onto the ring." ;; mh-e integration based on planner-mode (defun org-mhe-get-message-real-folder () "Return the name of the current message real folder, so if you use - sequences, it will now work." +sequences, it will now work." (save-excursion (let* ((folder (if (equal major-mode 'mh-folder-mode) mh-current-folder ;; Refer to the show buffer mh-show-folder-buffer)) - (end-index + (end-index (if (boundp 'mh-index-folder) (min (length mh-index-folder) (length folder)))) ) @@ -7166,8 +7166,7 @@ onto the ring." ))) (defun org-mhe-get-message-folder-from-index () - "Returns the name of the message folder in a index folder - buffer." + "Returns the name of the message folder in a index folder buffer." (save-excursion (mh-index-previous-folder) (if (not (re-search-forward "^\\(+.*\\)$" nil t)) @@ -7175,8 +7174,8 @@ onto the ring." (message (match-string 1))))) (defun org-mhe-get-message-folder () - "Return the name of the current message folder. Be careful if you - use sequences." + "Return the name of the current message folder. Be careful if you +use sequences." (save-excursion (if (equal major-mode 'mh-folder-mode) mh-current-folder @@ -7184,8 +7183,8 @@ onto the ring." mh-show-folder-buffer))) (defun org-mhe-get-message-num () - "Return the number of the current message. Be careful if you - use sequences." + "Return the number of the current message. Be careful if you +use sequences." (save-excursion (if (equal major-mode 'mh-folder-mode) (mh-get-msg-num nil) @@ -7193,9 +7192,9 @@ onto the ring." (mh-show-buffer-message-number)))) (defun org-mhe-get-header (header) - "Return a header of the message in folder mode. This will create a - show buffer for the corresponding message. If you have a more clever - idea..." + "Return a header of the message in folder mode. This will create a +show buffer for the corresponding message. If you have a more clever +idea..." (let* ((folder (org-mhe-get-message-folder)) (num (org-mhe-get-message-num)) (buffer (get-buffer-create (concat "show-" folder))) @@ -7222,7 +7221,7 @@ onto the ring." (get-buffer-create show-buf) (mh-show-msg (string-to-number - (car (split-string + (car (split-string (with-temp-buffer (call-process (expand-file-name "pick" mh-progs) @@ -7387,7 +7386,7 @@ For file links, arg negates `org-context-in-file-links'." (setq cpltxt (concat from-header " on: " subject)) (setq link (concat cpltxt "\n " (org-make-link - "mhe:" (org-mhe-get-message-real-folder) "#" + "mhe:" (org-mhe-get-message-real-folder) "#" (org-remove-angle-brackets (org-mhe-get-header "Message-Id:"))))))) @@ -7495,7 +7494,7 @@ For file links, arg negates `org-context-in-file-links'." (error "Cannot link to a buffer which is not visiting a file")) (t (setq link nil))) - + (if (and (interactive-p) link) (progn (setq org-stored-links @@ -7504,7 +7503,7 @@ For file links, arg negates `org-context-in-file-links'." link))) (defun org-make-org-heading-search-string (&optional string heading) - "Make search string for S or current headline." + "Make search string for STRING or current headline." (interactive) (let ((s (or string (org-get-heading)))) (unless (and string (not heading)) @@ -7525,7 +7524,7 @@ For file links, arg negates `org-context-in-file-links'." (mapconcat 'identity (org-split-string s "[ \t]+") " "))) (defun org-make-org-heading-camel (&optional string heading) - "Make a CamelCase string for S or the current headline." + "Make a CamelCase string for STRING or the current headline." (interactive) (let ((s (or string (org-get-heading)))) (unless (and string (not heading)) @@ -8642,8 +8641,8 @@ Point and mark define the first and last line to include. Both point and mark should be in the column that is used for sorting. For example, to sort according to column 3, put the mark in the first line to sort, in table column 3. Put point into the last line to be included in the sorting, -also in table column 3. The command will prompt for the sorting method (n for -numerical, a for alphanumeric)." +also in table column 3. The command will prompt for the sorting method +\(n for numerical, a for alphanumeric)." (interactive "r\nsSorting method: [n]=numeric [a]=alpha: ") (setq numericp (string-match "[nN]" numericp)) (org-table-align) ;; Just to be safe @@ -9482,8 +9481,8 @@ not overwrite the stored one." (if (= c ?p) (setq modes (org-set-calc-mode 'calc-internal-prec n)) (setq modes (org-set-calc-mode 'calc-float-format - (list (cdr (assoc c '((?n. float) (?f. fix) - (?s. sci) (?e. eng)))) + (list (cdr (assoc c '((?n . float) (?f . fix) + (?s . sci) (?e . eng)))) n)))) (setq fmt (replace-match "" t t fmt))) (while (string-match "[DRFS]" fmt) @@ -11004,7 +11003,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." ;; make targets to anchors (while (string-match "<<]*\\)>>>?[ \t]*\n?" line) (setq line (replace-match - (concat "@\\nbsp@") t t line))) @@ -11012,7 +11011,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (while (string-match org-bracket-link-regexp line) (setq line (replace-match (concat - "@" (match-string (if (match-end 3) 3 1) line) @@ -11197,7 +11196,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (org-format-table-table-html-using-table-generate-source olines))))) (defun org-format-org-table-html (lines) - "Format a table into html." + "Format a table into HTML." (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) (setq lines (nreverse lines)) (if (string-match "^[ \t]*|-" (car lines)) (setq lines (cdr lines))) @@ -11224,7 +11223,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." (string-match "^[ \t]*|[^|]*|" x)) (replace-match "|" t t x)))) lines)))))) - + (let ((head (and org-export-highlight-first-table-line (delq nil (mapcar (lambda (x) (string-match "^[ \t]*|-" x)) @@ -11263,7 +11262,7 @@ headlines. The default is 3. Lower levels will become bulleted lists." newstr)) (defun org-format-table-table-html (lines) - "Format a table generated by table.el into html. + "Format a table generated by table.el into HTML. This conversion does *not* use `table-generate-source' from table.el. This has the advantage that Org-mode's HTML conversions can be used. But it has the disadvantage, that no cell- or row-spanning is allowed." From c57a573feaa7c887a0323c6a2df9f817469d5ef8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 23 Feb 2006 16:35:41 +0000 Subject: [PATCH 32/41] Remove unnecessary leading * in docstrings. --- lisp/progmodes/glasses.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index a8d2d8b8fe1..dadc9cffc7a 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -67,7 +67,7 @@ (defcustom glasses-separator "_" - "*String to be displayed as a visual separator in identifiers. + "String to be displayed as a visual separator in identifiers. It is used both for adding missing separators and for replacing separators defined by `glasses-original-separator'. If you don't want to add missing separators, set `glasses-separator' to an empty string. If you don't want to @@ -93,7 +93,7 @@ performed." (defcustom glasses-face nil - "*Face to be put on capitals of an identifier looked through glasses. + "Face to be put on capitals of an identifier looked through glasses. If it is nil, no face is placed at the capitalized letter. For example, you can set `glasses-separator' to an empty string and @@ -106,13 +106,13 @@ but will have their capitals in bold." (defcustom glasses-separate-parentheses-p t - "*If non-nil, ensure space between an identifier and an opening parenthesis." + "If non-nil, ensure space between an identifier and an opening parenthesis." :group 'glasses :type 'boolean) (defcustom glasses-uncapitalize-p nil - "*If non-nil, downcase embedded capital letters in identifiers. + "If non-nil, downcase embedded capital letters in identifiers. Only identifiers starting with lower case letters are affected, letters inside other identifiers are unchanged." :group 'glasses @@ -122,7 +122,7 @@ other identifiers are unchanged." (defcustom glasses-uncapitalize-regexp "[a-z]" - "*Regexp matching beginnings of words to be uncapitalized. + "Regexp matching beginnings of words to be uncapitalized. Only words starting with this regexp are uncapitalized. The regexp is case sensitive. It has any effect only when `glasses-uncapitalize-p' is non-nil." @@ -133,7 +133,7 @@ It has any effect only when `glasses-uncapitalize-p' is non-nil." (defcustom glasses-convert-on-write-p nil - "*If non-nil, remove separators when writing glasses buffer to a file. + "If non-nil, remove separators when writing glasses buffer to a file. If you are confused by glasses so much, that you write the separators into code during coding, set this variable to t. The separators will be removed on each file write then. @@ -313,5 +313,5 @@ at places they belong to." (provide 'glasses) -;;; arch-tag: a3515167-c89e-484f-90a1-d85143e52b12 +;; arch-tag: a3515167-c89e-484f-90a1-d85143e52b12 ;;; glasses.el ends here From 31468dcbbaaf1f533ff4460c913cbe654fb0c0ac Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 23 Feb 2006 16:37:46 +0000 Subject: [PATCH 33/41] Add 2006 copyright. --- lisp/allout.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/allout.el b/lisp/allout.el index 69d72506fce..edce1e8d61e 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -1,7 +1,7 @@ ;;; allout.el --- extensive outline mode for use alone and with other modes ;; Copyright (C) 1992, 1993, 1994, 2001, 2002, 2003, 2004, -;; 2005 Free Software Foundation, Inc. +;; 2005, 2006 Free Software Foundation, Inc. ;; Author: Ken Manheimer ;; Maintainer: Ken Manheimer @@ -5811,14 +5811,14 @@ the point does not move. To ignore field boundaries bind (provide 'allout) ;;;_* Local emacs vars. -;;; The following `allout-layout' local variable setting: -;;; - closes all topics from the first topic to just before the third-to-last, -;;; - shows the children of the third to last (config vars) -;;; - and the second to last (code section), -;;; - and closes the last topic (this local-variables section). -;;;Local variables: -;;;allout-layout: (0 : -1 -1 0) -;;;End: +;; The following `allout-layout' local variable setting: +;; - closes all topics from the first topic to just before the third-to-last, +;; - shows the children of the third to last (config vars) +;; - and the second to last (code section), +;; - and closes the last topic (this local-variables section). +;;Local variables: +;;allout-layout: (0 : -1 -1 0) +;;End: -;;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c +;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c ;;; allout.el ends here From 4e6d317052ad617bd403077d391d4c86ba3aee07 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 23 Feb 2006 16:39:24 +0000 Subject: [PATCH 34/41] (describe-mode): Pass `mode-name' to format-mode-line. --- lisp/ChangeLog | 22 +++++++++++++--------- lisp/help.el | 11 ++++------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 601f4928a13..23c90421b89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2006-02-23 Stefan Monnier + + * help.el (describe-mode): Pass `mode-name' to format-mode-line. + 2006-02-23 Juanma Barranquero * textmodes/org.el (org-xemacs-p) @@ -16,8 +20,8 @@ (org-solidify-link-text): New function. (org-add-hook): Use `add-local-hook' instead of `make-local-hook' for XEmacs, just to silence the compiler. - (org-export-as-ascii, org-export-as-html-and-open): Use - `org-cleaned-string-for-export' and create internal links. + (org-export-as-ascii, org-export-as-html-and-open): + Use `org-cleaned-string-for-export' and create internal links. (org-follow-mhe-link): Require mh-e, use folder. 2006-02-23 Nick Roberts @@ -64,7 +68,7 @@ option `org-export-table-remove-special-lines'. (org-open-file): Allow special command configuration for directory link. - (org-file-apps): Fixed bugs in customize type, added setting + (org-file-apps): Fix bugs in customize type, added setting for directories. (org-activate-tags, org-format-agenda-item, org-complete) (org-get-tags-at, org-scan-tags, org-make-tags-matcher) @@ -80,7 +84,7 @@ (org-store-link, org-insert-link): Use new option `org-file-link-context-use-camel-case'. (org-activate-camels): Use new option `org-activate-camels'. - (org-link-regexp): Added mhe prefix. + (org-link-regexp): Add mhe prefix. (org-open-at-point, org-store-link): Support for mhe links. (org-mhe-get-message-real-folder, org-mhe-get-message-folder) (org-mhe-get-message-folder-from-index, org-mhe-get-message-num) @@ -88,12 +92,12 @@ (org-remove-angle-brackets, org-add-angle-brackets): New functions. (org-bracket-link-regexp): New constant. - (org-read-date): Fixed bug that was rejecting all typed dates. + (org-read-date): Fix bug that was rejecting all typed dates. (org-link-search): Make hierarchy above visible after a match. (org-follow-bbdb-link): Inhibit electric mode for BBDB. - (org-store-link): Fixed bug with link creation when cursor is in + (org-store-link): Fix bug with link creation when cursor is in an empty line. - (org-open-at-point): Fixed bug with matching a link. + (org-open-at-point): Fix bug with matching a link. Fixed buggy argument sequence in call to `org-view-tags'. (org-compile-prefix-format): Set `org-prefix-has-tag'. (org-prefix-has-tag): New variable. @@ -157,8 +161,8 @@ 2006-02-20 Chong Yidong - * custom.el (customize-mark-to-save, customize-mark-as-set): Load - the symbol first. + * custom.el (customize-mark-to-save, customize-mark-as-set): + Load the symbol first. 2006-02-20 Juanma Barranquero diff --git a/lisp/help.el b/lisp/help.el index f74293b8dd6..14de292dd13 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -835,8 +835,9 @@ follows the description of the major mode.)\n\n")) ;; Document the major mode. (let ((mode mode-name)) (with-current-buffer standard-output - (insert mode) - (add-text-properties (- (point) (length mode)) (point) '(face bold)))) + (let ((start (point))) + (insert (format-mode-line mode)) + (add-text-properties start (point) '(face bold))))) (princ " mode:\n") (princ (documentation major-mode))) (print-help-return-message)))) @@ -932,7 +933,7 @@ is currently activated with completion." ;;; Automatic resizing of temporary buffers. (defcustom temp-buffer-max-height (lambda (buffer) (/ (- (frame-height) 2) 2)) - "*Maximum height of a window displaying a temporary buffer. + "Maximum height of a window displaying a temporary buffer. This is the maximum height (in text lines) which `resize-temp-buffer-window' will give to a window displaying a temporary buffer. It can also be a function which will be called with the object corresponding @@ -971,9 +972,5 @@ out of view." (funcall temp-buffer-max-height (current-buffer)) temp-buffer-max-height)))) -;; Provide this for the sake of define-minor-mode which generates -;; defcustoms which require 'help'. -(provide 'help) - ;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 ;;; help.el ends here From 9b0f7f31c0e64d83bd379931c28d982a157da5b1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 23 Feb 2006 21:41:26 +0000 Subject: [PATCH 35/41] (compare-windows-highlight): Add new value `persistent' and change :type from `boolean' to `choice'. (compare-windows-overlays1, compare-windows-overlays2): New internal variables. (compare-windows-highlight): If compare-windows-highlight is `persistent', add current overlays to compare-windows-overlays[12] instead of adding compare-windows-dehighlight to pre-command-hook. (compare-windows-dehighlight): Delete all overlays from compare-windows-overlays[12]. --- lisp/compare-w.el | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/lisp/compare-w.el b/lisp/compare-w.el index 2d23de8c54c..e61f24a0c7c 100644 --- a/lisp/compare-w.el +++ b/lisp/compare-w.el @@ -117,8 +117,14 @@ and the value `((4) (4))' for horizontally split windows." :version "22.1") (defcustom compare-windows-highlight t - "*Non-nil means compare-windows highlights the differences." - :type 'boolean + "*Non-nil means compare-windows highlights the differences. +The value t removes highlighting immediately after invoking a command +other than `compare-windows'. +The value `persistent' leaves all highlighted differences. You can clear +out all highlighting later with the command `compare-windows-dehighlight'." + :type '(choice (const :tag "No highlighting" nil) + (const :tag "Persistent highlighting" persistent) + (other :tag "Highlight until next command" t)) :group 'compare-w :version "22.1") @@ -130,6 +136,8 @@ and the value `((4) (4))' for horizontally split windows." (defvar compare-windows-overlay1 nil) (defvar compare-windows-overlay2 nil) +(defvar compare-windows-overlays1 nil) +(defvar compare-windows-overlays2 nil) (defvar compare-windows-sync-point nil) ;;;###autoload @@ -351,13 +359,22 @@ on third call it again advances points to the next difference and so on." (overlay-put compare-windows-overlay2 'face 'compare-windows) (overlay-put compare-windows-overlay2 'priority 1000)) (overlay-put compare-windows-overlay2 'window w2) - ;; Remove highlighting before next command is executed - (add-hook 'pre-command-hook 'compare-windows-dehighlight))) + (if (not (eq compare-windows-highlight 'persistent)) + ;; Remove highlighting before next command is executed + (add-hook 'pre-command-hook 'compare-windows-dehighlight) + (when compare-windows-overlay1 + (push (copy-overlay compare-windows-overlay1) compare-windows-overlays1) + (delete-overlay compare-windows-overlay1)) + (when compare-windows-overlay2 + (push (copy-overlay compare-windows-overlay2) compare-windows-overlays2) + (delete-overlay compare-windows-overlay2))))) (defun compare-windows-dehighlight () "Remove highlighting created by `compare-windows-highlight'." (interactive) (remove-hook 'pre-command-hook 'compare-windows-dehighlight) + (mapc 'delete-overlay compare-windows-overlays1) + (mapc 'delete-overlay compare-windows-overlays2) (and compare-windows-overlay1 (delete-overlay compare-windows-overlay1)) (and compare-windows-overlay2 (delete-overlay compare-windows-overlay2))) From 9ca9f7f3f4754ee34dc75a5a6143937d57594815 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 23 Feb 2006 21:41:41 +0000 Subject: [PATCH 36/41] (Info-search): Don't bind search-spaces-regexp to Info-search-whitespace-regexp in non-regexp isearch mode. --- lisp/info.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index e9d7f5ca2de..43ee5cabcbc 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1642,7 +1642,9 @@ If DIRECTION is `backward', search in the reverse direction." (and (search-backward "\^_" nil t) (looking-at "\^_\n\\(Tag Table\\|Local Variables\\)")))))) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) + (let ((search-spaces-regexp + (if (or (not isearch-mode) isearch-regexp) + Info-search-whitespace-regexp))) (if (if backward (re-search-backward regexp bound t) (re-search-forward regexp bound t)) @@ -1660,7 +1662,9 @@ If DIRECTION is `backward', search in the reverse direction." ;; If no subfiles, give error now. (if give-up (if (null Info-current-subfile) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) + (let ((search-spaces-regexp + (if (or (not isearch-mode) isearch-regexp) + Info-search-whitespace-regexp))) (if backward (re-search-backward regexp) (re-search-forward regexp))) @@ -1731,7 +1735,9 @@ If DIRECTION is `backward', search in the reverse direction." (and (search-backward "\^_" nil t) (looking-at "\^_\n\\(Tag Table\\|Local Variables\\)")))))) - (let ((search-spaces-regexp Info-search-whitespace-regexp)) + (let ((search-spaces-regexp + (if (or (not isearch-mode) isearch-regexp) + Info-search-whitespace-regexp))) (if (if backward (re-search-backward regexp nil t) (re-search-forward regexp nil t)) From 037724a0ec22b98ca0c454b762c57cc6c632dde9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 23 Feb 2006 22:17:49 +0000 Subject: [PATCH 37/41] (Newsgroup archives): Update URLs of GNU mail archives. (Reporting bugs): Suggest using `M-x report-emacs-bug'. Add xref to `(emacs)Reporting Bugs'. (Getting a printed manual): Add URL to other formats of the manual. (Common requests): Fix menu. (Highlighting a region): Remove ref to `Turning on syntax highlighting'. (Horizontal scrolling): Mention `truncate-partial-width-windows'. (Inserting text at the beginning of each line): Add pxref to `Changing the included text prefix'. (Forcing the cursor to remain in the same column): Mention `track-eol' and `set-goal-column'. Add pxref to `(emacs)Moving Point'. (Replacing text across multiple files): Add keybinding `Q' for `dired-do-query-replace'. --- man/faq.texi | 82 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 29 deletions(-) diff --git a/man/faq.texi b/man/faq.texi index 01becae0c87..9dc6772d7e1 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -423,14 +423,17 @@ years, although there may be some unintentional gaps in coverage. The archive is not particularly well organized or easy to retrieve individual postings from, but pretty much everything is there. -The archive is at @uref{ftp://ftp-mailing-list-archives.gnu.org}. +The archive is at @uref{ftp://lists.gnu.org/}. The archive can be browsed over the web at -@uref{http://mail.gnu.org/archive/html/, the GNU mail archive}. +@uref{http://lists.gnu.org/archive/html/, the GNU mail archive}. Web-based Usenet search services, such as -@uref{http://groups.google.com, Google}, also archive the -@code{gnu.*} groups. +@uref{http://groups.google.com/groups/dir?sel=33592484, Google}, also +archive the @code{gnu.*} groups. + +You can read the archives of the @code{gnu.*} groups and post new +messages at @uref{http://gmane.org/, Gmane}. @node Reporting bugs, Unsubscribing from Emacs lists, Newsgroup archives, General questions @section Where should I report bugs and other problems with Emacs? @@ -439,16 +442,19 @@ Web-based Usenet search services, such as @cindex How to submit a bug report @cindex Reporting bugs -The correct way to report Emacs bugs is by e-mail to -@email{bug-gnu-emacs@@gnu.org}. Anything sent here also appears in the +The correct way to report Emacs bugs is to use the command +@kbd{M-x report-emacs-bug}. It sets up a mail buffer with the +essential information and the correct e-mail address which is +@email{bug-gnu-emacs@@gnu.org} for the released versions of Emacs. +Anything sent to @email{bug-gnu-emacs@@gnu.org} also appears in the newsgroup @uref{news:gnu.emacs.bug}, but please use e-mail instead of news to submit the bug report. This ensures a reliable return address so you can be contacted for further details. Be sure to read the ``Bugs'' section of the Emacs manual before reporting -a bug to bug-gnu-emacs! The manual describes in detail how to submit a -useful bug report. (@xref{On-line manual}, if you don't know how to read the -manual.) +a bug! The manual describes in detail how to submit a useful bug +report (@pxref{Bugs, , Reporting Bugs, emacs, The GNU Emacs Manual}). +(@xref{On-line manual}, if you don't know how to read the manual.) RMS says: @@ -674,6 +680,10 @@ An HTML version of the manual is at @uref{http://www.gnu.org/software/emacs/manual/emacs.html} +The manual is available in other formats at + +@uref{http://www.gnu.org/software/emacs/manual/} + @xref{Learning how to do something}, for how to view the manual on-line. @node Emacs Lisp documentation, Installing Texinfo documentation, Getting a printed manual, Getting help @@ -763,12 +773,19 @@ privileges, you have several options: @itemize @bullet @item -Info files don't actually need to be installed before being used. You -can feed a file name to the @code{Info-goto-node} command (invoked by -pressing @key{g} in Info mode) by typing the name of the file in -parentheses. This goes to the node named ``Top'' in that file. For -example, to view a Info file named @file{@var{info-file}} in your home -directory, you can type this: +Info files don't actually need to be installed before being used. +You can use a prefix argument for the @code{info} command and specify +the name of the Info file in the minibuffer. This goes to the node +named @samp{Top} in that file. For example, to view a Info file named +@file{@var{info-file}} in your home directory, you can type this: + +@example +@kbd{C-u C-h i ~/@var{info-file} @key{RET}} +@end example + +Alternatively, you can feed a file name to the @code{Info-goto-node} +command (invoked by pressing @key{g} in Info mode) by typing the name +of the file in parentheses, like this: @example @kbd{C-h i g (~/@var{info-file}) @key{RET}} @@ -1074,7 +1091,7 @@ conventions}). Emacs @value{VER} is the current version as of this writing. -@node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs +@node New in Emacs 20, New in Emacs 21, Latest version of Emacs, Status of Emacs @section What is different about Emacs 20? @cindex Differences between Emacs 19 and Emacs 20 @cindex Emacs 20, new features in @@ -1122,7 +1139,7 @@ In addition, Emacs 21 supports faces on text-only terminals. This means that you can now have colors when you run Emacs on a GNU/Linux console and on @code{xterm} with @kbd{emacs -nw}. -@node New in Emacs 22, , New in Emacs 21, Status of Emacs +@node New in Emacs 22, , New in Emacs 21, Status of Emacs @section What is different about Emacs 22? @cindex Differences between Emacs 21 and Emacs 22 @cindex Emacs 22, new features in @@ -1163,8 +1180,8 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual @menu * Setting up a customization file:: * Using Customize:: -* Debugging a customization file:: * Colors on a TTY:: +* Debugging a customization file:: * Displaying the current line or column:: * Displaying the current file name in the titlebar:: * Turning on abbrevs by default:: @@ -1173,9 +1190,9 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual * Working with unprintable characters:: * Highlighting a region:: * Controlling case sensitivity:: -* Wrapping words automatically:: * Searching for/replacing newlines:: * Yanking text in isearch:: +* Wrapping words automatically:: * Spell-checkers:: * Checking TeX and *roff documents:: * Changing load-path:: @@ -1530,8 +1547,7 @@ including @end lisp @noindent -in your @file{.emacs} file. (Also see @ref{Turning on syntax -highlighting}.) +in your @file{.emacs} file. @node Controlling case sensitivity, Searching for/replacing newlines, Highlighting a region, Common requests @section How do I control Emacs's case-sensitivity when searching/replacing? @@ -1845,6 +1861,10 @@ In Emacs 21 and later, this is on by default: if the variable automatically scrolls the display horizontally when point moves off the left or right edge of the window. +Note that this is overridden by the variable +@code{truncate-partial-width-windows} if that variable is non-nil +and the current buffer is not full-frame width. + In Emacs 20, use the @code{hscroll-mode}. Here is some information from the documentation, available by typing @kbd{C-h f hscroll-mode @key{RET}}: @@ -2158,7 +2178,7 @@ If you are trying to prefix a yanked mail message with @samp{>}, you might want to set the variable @code{mail-yank-prefix}. In Message buffers, you can even use @kbd{M-;} to cite yanked messages (@kbd{M-;} runs the function @code{comment-region}, it is a general-purpose -mechanism to comment regions). +mechanism to comment regions) (@pxref{Changing the included text prefix}). @node Underlining paragraphs, Repeating a command as many times as possible, Inserting text at the beginning of each line, Common requests @section How do I insert @samp{_^H} before each character in a region to get an underlined paragraph? @@ -2186,7 +2206,11 @@ If you need to repeat a command a small number of times, you can use @cindex Remaining in the same column, regardless of contents @cindex Vertical movement in empty documents -@kbd{M-x picture-mode}. +Use @kbd{M-x picture-mode}. + +See also the variable @code{track-eol} and the command +@code{set-goal-column} bound to @kbd{C-x C-n} +(@pxref{Moving Point, , , emacs, The GNU Emacs Manual}). @node Forcing Emacs to iconify itself, Using regular expressions, Forcing the cursor to remain in the same column, Common requests @section How do I tell Emacs to iconify itself? @@ -2240,8 +2264,8 @@ The ``tags'' feature of Emacs includes the command files mentioned in the @file{TAGS} file. @inforef{Tags Search, Tags Search, emacs}. -As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x -d}) supports the command @code{dired-do-query-replace}, which allows +As of Emacs 19.29, Dired mode (@kbd{M-x dired @key{RET}}, or @kbd{C-x d}) +supports the command @code{dired-do-query-replace} (@kbd{Q}), which allows users to replace regular expressions in multiple files. @node Documentation for etags, Disabling backups, Replacing text across multiple files, Common requests @@ -2601,7 +2625,7 @@ If you are running a version of Emacs before 20.1, get @code{crypt++} and saved, allowing you to ignore the different conventions that Unix and MS-DOS have for delineating the end of a line. -@node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests +@node Filling paragraphs with a single space, Escape sequences in shell output, Editing MS-DOS files, Common requests @section How can I tell Emacs to fill paragraphs with a single space after each period? @cindex One space following periods @cindex Single space following periods @@ -2613,7 +2637,7 @@ Add the following line to your @file{.emacs} file: (setq sentence-end-double-space nil) @end lisp -@node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests +@node Escape sequences in shell output, , Filling paragraphs with a single space, Common requests @section Why these strange escape sequences from @code{ls} from the Shell mode? @cindex Escape sequences in @code{ls} output @cindex @code{ls} in Shell mode @@ -3715,7 +3739,7 @@ Beginning with version 22.1, Emacs supports Mac OS X natively. Up-to-date information about GNU software (including Emacs) for VMS is available at @uref{http://vms.gnu.org/}. -@node Modes for various languages, , Emacs for VMS and DECwindows, Finding Emacs and related packages +@node Modes for various languages, , Emacs for VMS and DECwindows, Finding Emacs and related packages @section Where can I get modes for Lex, Yacc/Bison, Bourne shell, csh, C@t{++}, Objective-C, Pascal, Java, and Awk? @cindex Awk, mode for @cindex @code{awk-mode} @@ -4782,7 +4806,7 @@ xmodmap -e 'remove mod1 = Mode_switch' This will disable the use of the extra keysyms systemwide, which may be undesirable if you actually intend to use them. -@node SPC no longer completes file names, , ExtendChar key does not work as Meta, Key bindings +@node SPC no longer completes file names, , ExtendChar key does not work as Meta, Key bindings @section Why doesn't SPC complete file names anymore? @cindex @kbd{SPC} file name completion From 32670900cec4259f86efe945105b4e81f8c17f89 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 23 Feb 2006 22:18:21 +0000 Subject: [PATCH 38/41] *** empty log message *** --- lisp/ChangeLog | 15 +++++++++++++++ man/ChangeLog | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23c90421b89..b445a94a9f0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2006-02-23 Juri Linkov + + * compare-w.el (compare-windows-highlight): Add new value + `persistent' and change :type from `boolean' to `choice'. + (compare-windows-overlays1, compare-windows-overlays2): + New internal variables. + (compare-windows-highlight): If compare-windows-highlight is + `persistent', add current overlays to compare-windows-overlays[12] + instead of adding compare-windows-dehighlight to pre-command-hook. + (compare-windows-dehighlight): Delete all overlays from + compare-windows-overlays[12]. + + * info.el (Info-search): Don't bind search-spaces-regexp to + Info-search-whitespace-regexp in non-regexp isearch mode. + 2006-02-23 Stefan Monnier * help.el (describe-mode): Pass `mode-name' to format-mode-line. diff --git a/man/ChangeLog b/man/ChangeLog index 3e7a62c09bf..6b12f4390da 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,19 @@ +2006-02-23 Juri Linkov + + * faq.texi (Newsgroup archives): Update URLs of GNU mail archives. + (Reporting bugs): Suggest using `M-x report-emacs-bug'. + Add xref to `(emacs)Reporting Bugs'. + (Getting a printed manual): Add URL to other formats of the manual. + (Common requests): Fix menu. + (Highlighting a region): Remove ref to `Turning on syntax highlighting'. + (Horizontal scrolling): Mention `truncate-partial-width-windows'. + (Inserting text at the beginning of each line): Add pxref to + `Changing the included text prefix'. + (Forcing the cursor to remain in the same column): Mention `track-eol' + and `set-goal-column'. Add pxref to `(emacs)Moving Point'. + (Replacing text across multiple files): Add keybinding `Q' for + `dired-do-query-replace'. + 2006-02-22 Carsten Dominik * reftex.texi: Version number and date change only. From 172892e3973182349f5ce43c02281fb4358d1e13 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 23 Feb 2006 23:14:01 +0000 Subject: [PATCH 39/41] (help): Revert last part of 2006-02-23 change (deletion of the `provide' call). --- lisp/ChangeLog | 7 ++++++- lisp/help.el | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b445a94a9f0..52c222bc36d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-02-24 Juanma Barranquero + + * help.el (help): Revert last part of 2006-02-23 change (deletion + of the `provide' call). + 2006-02-23 Juri Linkov * compare-w.el (compare-windows-highlight): Add new value @@ -290,7 +295,7 @@ * progmodes/gdb-ui.el (gdb-var-evaluate-expression-handler) (gdb-var-update-handler): Detect out of scope variables with pre GDB 6.4 too. - (gdb-post-prompt): Revert changet 2006-02-17 (force update). + (gdb-post-prompt): Revert change from 2006-02-17 (force update). Reset status of variable objects to nil in update handlers. (gdb-var-update-handler-1): Detect when a variable object comes in scope. setcar on var changes gdb-var-list directly. diff --git a/lisp/help.el b/lisp/help.el index 14de292dd13..bed25366aab 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -972,5 +972,8 @@ out of view." (funcall temp-buffer-max-height (current-buffer)) temp-buffer-max-height)))) + +(provide 'help) + ;; arch-tag: cf427352-27e9-49b7-9a6f-741ebab02423 ;;; help.el ends here From 9f261d3c1d29f48ca2f8f96e4809bccbe3c81e89 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 23 Feb 2006 23:16:12 +0000 Subject: [PATCH 40/41] (Common requests): Move `Turning on auto-fill by default' after `Wrapping words automatically'. Move `Working with unprintable characters' before `Searching for/replacing newlines'. Move `Replacing highlighted text' after `Highlighting a region'. Merge `Repeating commands' and `Repeating a command as many times as possible' into the former. (Packages that do not come with Emacs): Add refs to Gmane and etc/MORE.STUFF. --- man/ChangeLog | 11 +++ man/faq.texi | 269 +++++++++++++++++++++++--------------------------- 2 files changed, 136 insertions(+), 144 deletions(-) diff --git a/man/ChangeLog b/man/ChangeLog index 6b12f4390da..e2d948aef35 100644 --- a/man/ChangeLog +++ b/man/ChangeLog @@ -1,3 +1,14 @@ +2006-02-23 Juri Linkov + + * faq.texi (Common requests): Move `Turning on auto-fill by + default' after `Wrapping words automatically'. Move `Working with + unprintable characters' before `Searching for/replacing newlines'. + Move `Replacing highlighted text' after `Highlighting a region'. + Merge `Repeating commands' and `Repeating a command as many times + as possible' into the former. + (Packages that do not come with Emacs): Add refs to Gmane and + etc/MORE.STUFF. + 2006-02-23 Juri Linkov * faq.texi (Newsgroup archives): Update URLs of GNU mail archives. diff --git a/man/faq.texi b/man/faq.texi index 9dc6772d7e1..0c4838d9019 100644 --- a/man/faq.texi +++ b/man/faq.texi @@ -1185,14 +1185,15 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual * Displaying the current line or column:: * Displaying the current file name in the titlebar:: * Turning on abbrevs by default:: -* Turning on auto-fill by default:: * Associating modes with files:: -* Working with unprintable characters:: * Highlighting a region:: +* Replacing highlighted text:: * Controlling case sensitivity:: +* Working with unprintable characters:: * Searching for/replacing newlines:: * Yanking text in isearch:: * Wrapping words automatically:: +* Turning on auto-fill by default:: * Spell-checkers:: * Checking TeX and *roff documents:: * Changing load-path:: @@ -1213,7 +1214,6 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual * Changing the length of a Tab:: * Inserting text at the beginning of each line:: * Underlining paragraphs:: -* Repeating a command as many times as possible:: * Forcing the cursor to remain in the same column:: * Forcing Emacs to iconify itself:: * Using regular expressions:: @@ -1226,7 +1226,6 @@ In addition, Emacs 22 now includes the Emacs Lisp Reference Manual * Deleting menus and menu options:: * Turning on syntax highlighting:: * Scrolling only one line:: -* Replacing highlighted text:: * Editing MS-DOS files:: * Filling paragraphs with a single space:: * Escape sequences in shell output:: @@ -1404,7 +1403,7 @@ in your @file{.emacs}: (setq frame-title-format "%b") @end lisp -@node Turning on abbrevs by default, Turning on auto-fill by default, Displaying the current file name in the titlebar, Common requests +@node Turning on abbrevs by default, Associating modes with files, Displaying the current file name in the titlebar, Common requests @section How do I turn on abbrevs by default just in mode @var{mymode}? @cindex Abbrevs, turning on by default @@ -1423,30 +1422,7 @@ Put this in your @file{.emacs} file: Starting with Emacs 22, the standard abbrevs file is read automatically at startup, so the first of these two forms becomes unnecessary. -@node Turning on auto-fill by default, Associating modes with files, Turning on abbrevs by default, Common requests -@section How do I turn on @code{auto-fill-mode} by default? -@cindex @code{auto-fill-mode}, activating automatically -@cindex Filling automatically -@cindex Automatic entry to @code{auto-fill-mode} - -To turn on @code{auto-fill-mode} just once for one buffer, use @kbd{M-x -auto-fill-mode}. - -To turn it on for every buffer in a certain mode, you must use the hook -for that mode. For example, to turn on @code{auto-fill} mode for all -text buffers, including the following in your @file{.emacs} file: - -@lisp -(add-hook 'text-mode-hook 'turn-on-auto-fill) -@end lisp - -If you want @code{auto-fill} mode on in all major modes, do this: - -@lisp -(setq-default auto-fill-function 'do-auto-fill) -@end lisp - -@node Associating modes with files, Working with unprintable characters, Turning on auto-fill by default, Common requests +@node Associating modes with files, Highlighting a region, Turning on abbrevs by default, Common requests @section How do I make Emacs use a certain major mode for certain files? @cindex Associating modes with files @cindex File extensions and modes @@ -1476,7 +1452,81 @@ the script.) This feature only applies when the file name doesn't indicate which mode to use. Use @kbd{C-h v} (or @kbd{M-x describe-variable}) on @code{interpreter-mode-alist} to learn more. -@node Working with unprintable characters, Highlighting a region, Associating modes with files, Common requests +@node Highlighting a region, Replacing highlighted text, Associating modes with files, Common requests +@section How can I highlight a region of text in Emacs? +@cindex Highlighting text +@cindex Text, highlighting +@cindex @code{transient-mark-mode} +@cindex Region, highlighting a + +You can cause the region to be highlighted when the mark is active by +including + +@lisp +(transient-mark-mode t) +@end lisp + +@noindent +in your @file{.emacs} file. + +@node Replacing highlighted text, Controlling case sensitivity, Highlighting a region, Common requests +@section How can I replace highlighted text with what I type? +@cindex @code{delete-selection-mode} +@cindex Replacing highlighted text +@cindex Highlighting and replacing text + +Use @code{delete-selection-mode}, which you can start automatically by +placing the following Lisp form in your @file{.emacs} file: + +@lisp +(delete-selection-mode 1) +@end lisp + +According to the documentation string for @code{delete-selection-mode} +(which you can read using @kbd{M-x describe-function @key{RET} +delete-selection-mode @key{RET}}): + +@quotation +When ON, typed text replaces the selection if the selection is active. +When OFF, typed text is just inserted at point. +@end quotation + +This mode also allows you to delete (not kill) the highlighted region by +pressing @key{DEL}. + +@node Controlling case sensitivity, Working with unprintable characters, Replacing highlighted text, Common requests +@section How do I control Emacs's case-sensitivity when searching/replacing? +@cindex @code{case-fold-search} +@cindex Case sensitivity of searches +@cindex Searching without case sensitivity +@cindex Ignoring case in searches + +For searching, the value of the variable @code{case-fold-search} +determines whether they are case sensitive: + +@lisp +(setq case-fold-search nil) ; make searches case sensitive +(setq case-fold-search t) ; make searches case insensitive +@end lisp + +@cindex Case sensitivity in replacements +@cindex Replacing, and case sensitivity +@cindex @code{case-replace} +Similarly, for replacing, the variable @code{case-replace} determines +whether replacements preserve case. + +You can also toggle case sensitivity at will in isearch with @kbd{M-c}. + +To change the case sensitivity just for one major mode, use the major +mode's hook. For example: + +@lisp +(add-hook '@var{foo}-mode-hook + (lambda () + (setq case-fold-search nil))) +@end lisp + +@node Working with unprintable characters, Searching for/replacing newlines, Controlling case sensitivity, Common requests @section How do I search for, delete, or replace unprintable (eight-bit or control) characters? @cindex Unprintable characters, working with @cindex Working with unprintable characters @@ -1524,64 +1574,7 @@ characters with a colon, use: M-x replace-regexp @key{RET} [^ @key{TAB} C-q @key{LFD} C-q @key{RET} C-q C-l @key{SPC} -~] @key{RET} : @key{RET} -@itemize @bullet - -@item -You don't need to quote @key{TAB} with either isearch or typing -something in the minibuffer. - -@end itemize - -@node Highlighting a region, Controlling case sensitivity, Working with unprintable characters, Common requests -@section How can I highlight a region of text in Emacs? -@cindex Highlighting text -@cindex Text, highlighting -@cindex @code{transient-mark-mode} -@cindex Region, highlighting a - -You can cause the region to be highlighted when the mark is active by -including - -@lisp -(transient-mark-mode t) -@end lisp - -@noindent -in your @file{.emacs} file. - -@node Controlling case sensitivity, Searching for/replacing newlines, Highlighting a region, Common requests -@section How do I control Emacs's case-sensitivity when searching/replacing? -@cindex @code{case-fold-search} -@cindex Case sensitivity of searches -@cindex Searching without case sensitivity -@cindex Ignoring case in searches - -For searching, the value of the variable @code{case-fold-search} -determines whether they are case sensitive: - -@lisp -(setq case-fold-search nil) ; make searches case sensitive -(setq case-fold-search t) ; make searches case insensitive -@end lisp - -@cindex Case sensitivity in replacements -@cindex Replacing, and case sensitivity -@cindex @code{case-replace} -Similarly, for replacing, the variable @code{case-replace} determines -whether replacements preserve case. - -You can also toggle case sensitivity at will in isearch with @kbd{M-c}. - -To change the case sensitivity just for one major mode, use the major -mode's hook. For example: - -@lisp -(add-hook '@var{foo}-mode-hook - (lambda () - (setq case-fold-search nil))) -@end lisp - -@node Searching for/replacing newlines, Yanking text in isearch, Controlling case sensitivity, Common requests +@node Searching for/replacing newlines, Yanking text in isearch, Working with unprintable characters, Common requests @section How do I input a newline character in isearch or query-replace? @cindex Searching for newlines @cindex Replacing newlines @@ -1597,7 +1590,7 @@ Special Input for Incremental Search, emacs}. Use @kbd{M-y}. @inforef{Isearch Yank, Isearch Yanking, emacs}. -@node Wrapping words automatically, Spell-checkers, Yanking text in isearch, Common requests +@node Wrapping words automatically, Turning on auto-fill by default, Yanking text in isearch, Common requests @section How do I make Emacs wrap words for me? @cindex Wrapping word automatically @cindex Wrapping lines @@ -1611,7 +1604,30 @@ The default maximum line width is 70, determined by the variable @code{fill-column}. To learn how to turn this on automatically, see @ref{Turning on auto-fill by default}. -@node Spell-checkers, Checking TeX and *roff documents, Wrapping words automatically, Common requests +@node Turning on auto-fill by default, Spell-checkers, Wrapping words automatically, Common requests +@section How do I turn on @code{auto-fill-mode} by default? +@cindex @code{auto-fill-mode}, activating automatically +@cindex Filling automatically +@cindex Automatic entry to @code{auto-fill-mode} + +To turn on @code{auto-fill-mode} just once for one buffer, use @kbd{M-x +auto-fill-mode}. + +To turn it on for every buffer in a certain mode, you must use the hook +for that mode. For example, to turn on @code{auto-fill} mode for all +text buffers, including the following in your @file{.emacs} file: + +@lisp +(add-hook 'text-mode-hook 'turn-on-auto-fill) +@end lisp + +If you want @code{auto-fill} mode on in all major modes, do this: + +@lisp +(setq-default auto-fill-function 'do-auto-fill) +@end lisp + +@node Spell-checkers, Checking TeX and *roff documents, Turning on auto-fill by default, Common requests @section Where can I get a better spelling checker for Emacs? @cindex Checking spelling @cindex Spelling, checking text documents @@ -2055,14 +2071,11 @@ parenthesis, it simply inserts a % like normal. to investigate @file{cpp.el}, which is distributed with Emacs. @node Repeating commands, Valid X resources, Hiding #ifdef lines, Common requests -@section Is there an equivalent to the @code{.} (dot) command of vi? -@cindex Repeating commands as with @code{vi} -@cindex Command, repeat last +@section How do I repeat a command as many times as possible? +@cindex Repeating commands many times +@cindex Commands, repeating many times @cindex @code{.}, equivalent to @code{vi} command -(@code{.} is the redo command in @code{vi}. It redoes the last -insertion/deletion.) - As of Emacs 20.3, there is indeed a @code{repeat} command (@kbd{C-x z}) that repeats the last command. If you preface it with a prefix argument, the prefix arg is applied to the command. @@ -2074,12 +2087,14 @@ type @kbd{M-p} and @kbd{M-n} (and also up-arrow and down-arrow, if your keyboard has these keys) to scan through all the different complex commands you've typed. -To repeat a set of commands, use keyboard macros. (@inforef{Keyboard -Macros, Keyboard Macros, emacs}.) +To repeat a set of commands, use keyboard macros. Use @kbd{C-x (} and +@kbd{C-x )} to make a keyboard macro that invokes the command and then +type @kbd{C-x e}. (@inforef{Keyboard Macros, Keyboard Macros, emacs}.) -If you're really desperate for the @code{.} command, use VIPER, a -@code{vi} emulation mode which comes with Emacs, and which appears to -support it. (@xref{VIPER}.) +If you're really desperate for the @code{.} command in @code{vi} that +redoes the last insertion/deletion, use VIPER, a @code{vi} emulation +mode which comes with Emacs, and which appears to support it. +(@xref{VIPER}.) @node Valid X resources, Evaluating Emacs Lisp code, Repeating commands, Common requests @section What are the valid X resource settings (i.e., stuff in .Xdefaults)? @@ -2180,27 +2195,14 @@ buffers, you can even use @kbd{M-;} to cite yanked messages (@kbd{M-;} runs the function @code{comment-region}, it is a general-purpose mechanism to comment regions) (@pxref{Changing the included text prefix}). -@node Underlining paragraphs, Repeating a command as many times as possible, Inserting text at the beginning of each line, Common requests +@node Underlining paragraphs, Forcing the cursor to remain in the same column, Inserting text at the beginning of each line, Common requests @section How do I insert @samp{_^H} before each character in a region to get an underlined paragraph? @cindex Underlining a region of text @cindex @code{underline-region} Mark the region and then type @kbd{M-x underline-region @key{RET}}. -@node Repeating a command as many times as possible, Forcing the cursor to remain in the same column, Underlining paragraphs, Common requests -@section How do I repeat a command as many times as possible? -@cindex Repeating commands many times -@cindex Commands, repeating many times - -Use @kbd{C-x (} and @kbd{C-x )} to make a keyboard macro that invokes -the command and then type @kbd{M-0 C-x e}. - -Any messages your command prints in the echo area will be suppressed. - -If you need to repeat a command a small number of times, you can use -@kbd{C-x z} (@pxref{Repeating commands}) or @kbd{C-x e}. - -@node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Repeating a command as many times as possible, Common requests +@node Forcing the cursor to remain in the same column, Forcing Emacs to iconify itself, Underlining paragraphs, Common requests @section How do I make Emacs behave like this: when I go up or down, the cursor should stay in the same column even if the line is too short? @cindex @code{picture-mode} @cindex Remaining in the same column, regardless of contents @@ -2561,7 +2563,7 @@ PostScript printer, or a PostScript interpreter such as Ghostscript; consult the documentation of the variables @code{ps-printer-name}, @code{ps-lpr-command}, and @code{ps-lpr-switches} for more details. -@node Scrolling only one line, Replacing highlighted text, Turning on syntax highlighting, Common requests +@node Scrolling only one line, Editing MS-DOS files, Turning on syntax highlighting, Common requests @section How can I force Emacs to scroll only one line when I move past the bottom of the screen? @cindex Scrolling only one line @cindex Reducing the increment when scrolling @@ -2577,32 +2579,7 @@ Alternatively, use the following Lisp form in your @file{.emacs}: (setq scroll-conservatively most-positive-fixnum) @end lisp -@node Replacing highlighted text, Editing MS-DOS files, Scrolling only one line, Common requests -@section How can I replace highlighted text with what I type? -@cindex @code{delete-selection-mode} -@cindex Replacing highlighted text -@cindex Highlighting and replacing text - -Use @code{delete-selection-mode}, which you can start automatically by -placing the following Lisp form in your @file{.emacs} file: - -@lisp -(delete-selection-mode 1) -@end lisp - -According to the documentation string for @code{delete-selection-mode} -(which you can read using @kbd{M-x describe-function @key{RET} -delete-selection-mode @key{RET}}): - -@quotation -When ON, typed text replaces the selection if the selection is active. -When OFF, typed text is just inserted at point. -@end quotation - -This mode also allows you to delete (not kill) the highlighted region by -pressing @key{DEL}. - -@node Editing MS-DOS files, Filling paragraphs with a single space, Replacing highlighted text, Common requests +@node Editing MS-DOS files, Filling paragraphs with a single space, Scrolling only one line, Common requests @section How can I edit MS-DOS files using Emacs? @cindex Editing MS-DOS files @cindex MS-DOS files, editing @@ -3502,7 +3479,8 @@ the @file{ell} package}. Many authors post their packages to the @uref{news:gnu.emacs.sources, Emacs sources newsgroup}. You can search the archives of this -group with @uref{http://groups.google.com, Google}, for example. +group with @uref{http://groups.google.com/group/gnu.emacs.sources, Google}, +or @uref{http://dir.gmane.org/gmane.emacs.sources, Gmane}, for example. Several packages are stored in @uref{http://emacswiki.org/elisp/, the Lisp area of the Emacs Wiki}. @@ -3513,6 +3491,9 @@ although you can still access the old files at @uref{ftp://ftp.cis.ohio-state.edu/pub/emacs-lisp/WWW/index.html} +Read the file @file{etc/MORE.STUFF} for more information about +external packages. + @node Current GNU distributions, Difference between Emacs and XEmacs, Packages that do not come with Emacs, Finding Emacs and related packages @section Where can I get other up-to-date GNU stuff? @cindex Current GNU distributions From 5f4264e54bb59b9b0590a113fbd015c3c0920f7a Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 24 Feb 2006 05:02:12 +0000 Subject: [PATCH 41/41] Revision: emacs@sv.gnu.org/emacs--devo--0--patch-118 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 38-39) - Update from CVS --- lisp/gnus/ChangeLog | 37 ++++++++++++++++++++++++++++++++++++- lisp/gnus/flow-fill.el | 10 ++++++++-- lisp/gnus/message.el | 4 ++-- lisp/gnus/mm-util.el | 4 ++-- lisp/gnus/mm-view.el | 9 ++++++++- lisp/gnus/nnimap.el | 1 + lisp/gnus/qp.el | 2 +- lisp/gnus/utf7.el | 2 +- 8 files changed, 59 insertions(+), 10 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c77c92d05c7..87327dde482 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,38 @@ +2006-02-23 Lars Magne Ingebrigtsen + + * flow-fill.el (fill-flowed): Bind adaptive-fill-mode to nil. + Remove space stuffing, and only do quotes that actually start with + ">" at the beginning of the lines. + Merge of 2005-11-17 and 2004-07-25 from the trunk. + +2006-02-23 Reiner Steib + + * utf7.el (utf7-utf-16-coding-system): Fix comment. utf-16-be is + also available in Emacs 21.3. + + * message.el (message-fix-before-sending): Change "Emacs 22" to + "Emacs 23 (unicode)" in comment. + + * qp.el (quoted-printable-encode-region): Change "Emacs 22" to + "Emacs 23 (unicode)" in comment. + + * mm-util.el: Change "Emacs 22" to "Emacs 23 (unicode)" in + comment. + (mm-coding-system-p): Add comment about no-MULE XEmacs. + + * mm-view.el (mm-fill-flowed): Add :version. + +2006-02-23 Ralf Angeli + + * mm-view.el (mm-fill-flowed): New variable. + (mm-inline-text): Use it. + +2006-02-21 Wolfram Fenske + (tiny change) + + * nnimap.el (nnimap-request-move-article): Change folder back to + source group before deleting. + 2006-02-20 Katsumi Yamaoka * rfc2047.el (rfc2047-charset-to-coding-system): Don't check the @@ -1266,7 +1301,7 @@ * gnus-topic.el (gnus-topic-mode): Ditto. -2005-07-08 Ralf Angeli (tiny change) +2005-07-08 Ralf Angeli * gnus-art.el (gnus-article-next-page, gnus-article-next-page-1) (gnus-article-prev-page): Take scroll-margin into consideration. diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el index c3f7f7bb20e..480505549c9 100644 --- a/lisp/gnus/flow-fill.el +++ b/lisp/gnus/flow-fill.el @@ -113,10 +113,15 @@ RFC 2646 suggests 66 characters for readability." (save-excursion (set-buffer (or (current-buffer) buffer)) (goto-char (point-min)) + ;; Remove space stuffing. + (while (re-search-forward "^ " nil t) + (delete-char -1) + (forward-line 1)) + (goto-char (point-min)) (while (re-search-forward " $" nil t) (when (save-excursion (beginning-of-line) - (looking-at "^\\(>*\\)\\( ?\\)")) + (looking-at "^\\(>+\\)\\( ?\\)")) (let ((quote (match-string 1)) sig) (if (string= quote "") @@ -146,7 +151,8 @@ RFC 2646 suggests 66 characters for readability." (condition-case nil (let ((fill-prefix (when quote (concat quote " "))) (fill-column (eval fill-flowed-display-column)) - filladapt-mode) + filladapt-mode + adaptive-fill-mode) (fill-region (fill-flowed-point-at-bol) (min (1+ (fill-flowed-point-at-eol)) (point-max)) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 28325b73e26..1bdc2f6a11f 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3615,8 +3615,8 @@ It should typically alter the sending method in some way or other." (when (let ((char (char-after))) (or (< (mm-char-int char) 128) (and (mm-multibyte-p) - ;; Fixme: Wrong for Emacs 22 and for things - ;; like undecable utf-8. Should at least + ;; FIXME: Wrong for Emacs 23 (unicode) and for + ;; things like undecable utf-8. Should at least ;; use find-coding-systems-region. (memq (char-charset char) '(eight-bit-control eight-bit-graphic diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 9bdbc3c72b1..a7f375aeba8 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -174,7 +174,7 @@ system object in XEmacs." (if (fboundp 'coding-system-p) (when (coding-system-p cs) cs) - ;; Is this branch ever actually useful? + ;; no-MULE XEmacs: (car (memq cs (mm-get-coding-system-list)))))) (defvar mm-charset-synonym-alist @@ -331,7 +331,7 @@ with Mule charsets. It is completely useless for Emacs." cs mime mule alist) (while css (setq cs (pop css) - mime (or (coding-system-get cs :mime-charset) ; Emacs 22 + mime (or (coding-system-get cs :mime-charset) ; Emacs 23 (unicode) (coding-system-get cs 'mime-charset))) (when (and mime (not (eq t (setq mule diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 43d6bddf194..c2b4e19f806 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -72,6 +72,12 @@ (html2text html2text)) "The attributes of washer types for text/html.") +(defcustom mm-fill-flowed t + "If non-nil an format=flowed article will be displayed flowed." + :type 'boolean + :version "22.1" + :group 'mime-display) + ;;; Internal variables. ;;; @@ -407,7 +413,8 @@ (mm-insert-part handle) (goto-char (point-max))) (insert (mm-decode-string (mm-get-part handle) charset))) - (when (and (equal type "plain") + (when (and mm-fill-flowed + (equal type "plain") (equal (cdr (assoc 'format (mm-handle-type handle))) "flowed")) (save-restriction diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 26c0f8901ee..3c05b3713ea 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1492,6 +1492,7 @@ function is generally only called when Gnus is shutting down." (setq result (eval accept-form)) (kill-buffer buf) result) + (nnimap-possibly-change-group group server) (imap-message-flags-add (imap-range-to-message-set (list article)) "\\Deleted" 'silent nnimap-server-buffer)) diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el index cb89a3550ba..15914922d1c 100644 --- a/lisp/gnus/qp.el +++ b/lisp/gnus/qp.el @@ -118,7 +118,7 @@ encode lines starting with \"From\"." (not (eobp))) (insert (prog1 - ;; To unibyte in case of Emacs 22 eight-bit. + ;; To unibyte in case of Emacs 23 (unicode) eight-bit. (format "=%02X" (mm-multibyte-char-to-unibyte (char-after))) (delete-char 1)))) ;; Encode white space at the end of lines. diff --git a/lisp/gnus/utf7.el b/lisp/gnus/utf7.el index bb47077612e..a1b7fdc6702 100644 --- a/lisp/gnus/utf7.el +++ b/lisp/gnus/utf7.el @@ -80,7 +80,7 @@ (defconst utf7-utf-16-coding-system (cond ((mm-coding-system-p 'utf-16-be-no-signature) ; Mule-UCS 'utf-16-be-no-signature) - ((and (mm-coding-system-p 'utf-16-be) ; Emacs 22.1 + ((and (mm-coding-system-p 'utf-16-be) ; Emacs 21.3, Emacs 22 ;; Avoid versions with BOM. (= 2 (length (encode-coding-string "a" 'utf-16-be)))) 'utf-16-be)