diff options
Diffstat (limited to 'lisp/textmodes/org.el')
-rw-r--r-- | lisp/textmodes/org.el | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el index d9baad489a3..4cd697af36d 100644 --- a/lisp/textmodes/org.el +++ b/lisp/textmodes/org.el @@ -5,7 +5,7 @@ ;; Author: Carsten Dominik <dominik at science dot uva dot nl> ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ -;; Version: 4.56b +;; Version: 4.56e ;; ;; This file is part of GNU Emacs. ;; @@ -114,7 +114,7 @@ ;;; Customization variables -(defvar org-version "4.56b" +(defvar org-version "4.56e" "The version number of the file org.el.") (defun org-version () (interactive) @@ -3211,6 +3211,9 @@ The following commands are available: ;; Paragraphs and auto-filling (org-set-autofill-regexps) (org-update-radio-target-regexp) + ;; Make isearch reveal context after success + (org-set-local 'outline-isearch-open-invisible-function + (lambda (&rest ignore) (org-show-context nil t))) (if (and org-insert-mode-line-in-empty-file (interactive-p) @@ -3238,7 +3241,7 @@ The following commands are available: (defsubst org-current-line (&optional pos) (save-excursion (and pos (goto-char pos)) - (+ (if (bolp) 1 0) (count-lines (point-min) (point))))) + (+ (if (bolp) 1 0) (count-lines 1 (point))))) (defun org-current-time () "Current time, possibly rounded to `org-time-stamp-rounding-minutes'." @@ -5691,6 +5694,7 @@ When SIBLINGS is non-nil, show all siblings on each hierarchy level." (save-excursion (and (if heading-p (org-goto-sibling) (outline-next-heading)) (org-flag-heading nil)))) + (when siblings (org-show-siblings)) (when hierarchy-p ;; show all higher headings, possibly with siblings (save-excursion @@ -5699,12 +5703,15 @@ When SIBLINGS is non-nil, show all siblings on each hierarchy level." (error nil)) (not (bobp))) (org-flag-heading nil) - (when siblings - (save-excursion - (while (org-goto-sibling) (org-flag-heading nil))) - (save-excursion - (while (org-goto-sibling 'previous) - (org-flag-heading nil)))))))))) + (when siblings (org-show-siblings)))))))) + +(defun org-show-siblings () + "Show all siblings of the current headline." + (save-excursion + (while (org-goto-sibling) (org-flag-heading nil))) + (save-excursion + (while (org-goto-sibling 'previous) + (org-flag-heading nil)))) (defun org-reveal (&optional siblings) "Show current entry, hierarchy above it, and the following headline. @@ -12375,11 +12382,11 @@ with `org-table-paste-rectangle'." (rpl (if cut " " nil))) (goto-char beg) (org-table-check-inside-data-field) - (setq l01 (count-lines (point-min) (point)) + (setq l01 (org-current-line) c01 (org-table-current-column)) (goto-char end) (org-table-check-inside-data-field) - (setq l02 (count-lines (point-min) (point)) + (setq l02 (org-current-line) c02 (org-table-current-column)) (setq l1 (min l01 l02) l2 (max l01 l02) c1 (min c01 c02) c2 (max c01 c02)) @@ -12410,7 +12417,7 @@ lines." (error "First cut/copy a region to paste!")) (org-table-check-inside-data-field) (let* ((clip org-table-clip) - (line (count-lines (point-min) (point))) + (line (org-current-line)) (col (org-table-current-column)) (org-enable-table-editor t) (org-table-automatic-realign nil) @@ -16278,6 +16285,7 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]." (define-key org-mode-map [(tab)] 'org-cycle) (define-key org-mode-map [(control tab)] 'org-force-cycle-archived) (define-key org-mode-map [(meta tab)] 'org-complete) +(define-key org-mode-map "\M-\t" 'org-complete) ;; The following line is necessary under Suse GNU/Linux (unless (featurep 'xemacs) (define-key org-mode-map [S-iso-lefttab] 'org-shifttab)) |