0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-24 09:18:38 +00:00

Merge branch 'simplify-but-keep-xemacs-compatibility'

Conflicts:
	lisp/ChangeLog
This commit is contained in:
Carsten Dominik 2010-04-18 16:55:32 +02:00
commit a000f6163d
19 changed files with 326 additions and 262 deletions

View file

@ -1,3 +1,7 @@
2010-04-18 Carsten Dominik <carsten.dominik@gmail.com>
* Makefile (BATCH): Write the BATCH command a bit more compact.
2010-04-05 Carsten Dominik <carsten.dominik@gmail.com>
* ORGWEBPAGE/Changes.org: More details on LaTeX headers.

View file

@ -29,7 +29,7 @@ infodir = $(prefix)/share/info
# Using emacs in batch mode.
BATCH=$(EMACS) -batch -q -no-site-file -eval \
"(progn (add-to-list (quote load-path) \"$(lispdir)\") (add-to-list (quote load-path) (expand-file-name \"./lisp/\")))"
"(setq load-path (cons (expand-file-name \"./lisp/\") (cons \"$(lispdir)\" load-path)))"
# Specify the byte-compiler for compiling org-mode files
ELC= $(BATCH) -f batch-byte-compile

View file

@ -1,3 +1,18 @@
2010-04-18 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-learn.el (require): `calendar' is now required already
by org.el on top level.
* lisp/org-toc.el (org-toc-cycle-subtree, org-toc-show)
(org-toc-restore-config): Use the normal overlay API.
* lisp/org-expiry.el (org-expiry-process-entry): Use the normal
overlay API.
* babel/lisp/org-babel.el (org-babel-hide-hash)
(org-babel-hash-at-point, org-babel-show-result-all)
(org-babel-hide-result-toggle): Use the normal overlay API.
2010-03-31 Carsten Dominik <carsten.dominik@gmail.com>
* lisp/org-mac-iCal.el (org-mac-iCal): Snow Leopard

View file

@ -403,10 +403,10 @@ visible."
(end (match-end 3))
(hash (match-string 3))
ov1 ov2)
(setq ov1 (org-make-overlay start hide-start))
(setq ov2 (org-make-overlay hide-start end))
(org-overlay-put ov2 'invisible 'org-babel-hide-hash)
(org-overlay-put ov1 'babel-hash hash)))))
(setq ov1 (make-overlay start hide-start))
(setq ov2 (make-overlay hide-start end))
(overlay-put ov2 'invisible 'org-babel-hide-hash)
(overlay-put ov1 'babel-hash hash)))))
(defun org-babel-hide-all-hashes ()
"Hide the hash in the current buffer. Only the initial
@ -426,7 +426,7 @@ added as the last element of the kill ring. This can be called
with C-c C-c."
(interactive)
(let ((hash (car (delq nil (mapcar
(lambda (ol) (org-overlay-get ol 'babel-hash))
(lambda (ol) (overlay-get ol 'babel-hash))
(org-overlays-at (or point (point))))))))
(when hash (kill-new hash) (message hash))))
(add-hook 'org-ctrl-c-ctrl-c-hook 'org-babel-hash-at-point)
@ -449,7 +449,7 @@ with C-c C-c."
(defun org-babel-show-result-all ()
"Unfold all results in the current buffer."
(mapc 'org-delete-overlay org-babel-hide-result-overlays)
(mapc 'delete-overlay org-babel-hide-result-overlays)
(setq org-babel-hide-result-overlays nil))
(defun org-babel-hide-result-toggle-maybe ()
@ -473,7 +473,7 @@ with C-c C-c."
(end (progn (goto-char (- (org-babel-result-end) 1)) (point)))
ov)
(if (memq t (mapcar (lambda (overlay)
(eq (org-overlay-get overlay 'invisible)
(eq (overlay-get overlay 'invisible)
'org-babel-hide-result))
(org-overlays-at start)))
(if (or (not force) (eq force 'off))
@ -481,22 +481,22 @@ with C-c C-c."
(when (member ov org-babel-hide-result-overlays)
(setq org-babel-hide-result-overlays
(delq ov org-babel-hide-result-overlays)))
(when (eq (org-overlay-get ov 'invisible)
(when (eq (overlay-get ov 'invisible)
'org-babel-hide-result)
(org-delete-overlay ov)))
(delete-overlay ov)))
(org-overlays-at start)))
(setq ov (org-make-overlay start end))
(org-overlay-put ov 'invisible 'org-babel-hide-result)
(setq ov (make-overlay start end))
(overlay-put ov 'invisible 'org-babel-hide-result)
;; make the block accessible to isearch
(org-overlay-put
(overlay-put
ov 'isearch-open-invisible
(lambda (ov)
(when (member ov org-babel-hide-result-overlays)
(setq org-babel-hide-result-overlays
(delq ov org-babel-hide-result-overlays)))
(when (eq (org-overlay-get ov 'invisible)
(when (eq (overlay-get ov 'invisible)
'org-babel-hide-result)
(org-delete-overlay ov))))
(delete-overlay ov))))
(push ov org-babel-hide-result-overlays)))
(error "Not looking at a result line"))))

View file

@ -237,10 +237,10 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
(when (org-expiry-expired-p)
(org-back-to-heading)
(looking-at org-complex-heading-regexp)
(let* ((ov (org-make-overlay (point) (match-end 0)))
(let* ((ov (make-overlay (point) (match-end 0)))
(e (org-expiry-expired-p))
(d (time-to-number-of-days e)))
(org-overlay-put ov 'face 'secondary-selection)
(overlay-put ov 'face 'secondary-selection)
(if (or force
(null org-expiry-confirm-flag)
(and (eq org-expiry-confirm-flag 'interactive)
@ -248,7 +248,7 @@ Otherwise rely on `org-expiry-confirm-flag' to decide."
(and org-expiry-confirm-flag
(y-or-n-p (format "Entry expired by %d days. Process? " d))))
(funcall 'org-expiry-handler-function))
(org-delete-overlay ov)))))
(delete-overlay ov)))))
(defun org-expiry-process-entries (beg end)
"Process all expired entries between BEG and END.

View file

@ -36,8 +36,7 @@
(require 'org)
(eval-when-compile
(require 'cl)
(require 'calendar))
(require 'cl))
(defgroup org-learn nil
"Options concerning the learning code in Org-mode."

View file

@ -190,20 +190,20 @@ specified, then make `org-toc-recenter' use this value."
(end (save-excursion (end-of-line) (point)))
(ov (car (org-overlays-at (point))))
status)
(if ov (setq status (org-overlay-get ov 'status))
(setq ov (org-make-overlay beg end)))
(if ov (setq status (overlay-get ov 'status))
(setq ov (make-overlay beg end)))
;; change the folding status of this headline
(cond ((or (null status) (eq status 'folded))
(show-children)
(message "CHILDREN")
(org-overlay-put ov 'status 'children))
(overlay-put ov 'status 'children))
((eq status 'children)
(show-branches)
(message "BRANCHES")
(org-overlay-put ov 'status 'branches))
(overlay-put ov 'status 'branches))
(t (hide-subtree)
(message "FOLDED")
(org-overlay-put ov 'status 'folded)))))
(overlay-put ov 'status 'folded)))))
;;; Main show function:
;; FIXME name this org-before-first-heading-p?
@ -239,11 +239,11 @@ specified, then make `org-toc-recenter' use this value."
(let* ((beg (point-min))
(end (and (re-search-forward "^\\*" nil t)
(1- (match-beginning 0))))
(ov (org-make-overlay beg end))
(ov (make-overlay beg end))
(help (format "Table of contents for %s (press ? for a quick help):\n"
(buffer-name org-toc-base-buffer))))
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'before-string help))
(overlay-put ov 'invisible t)
(overlay-put ov 'before-string help))
;; build the browsable TOC
(cond (depth
(let* ((dpth (if org-toc-odd-levels-only
@ -417,16 +417,16 @@ current table of contents to it."
(goto-char (point-min))
(when (search-forward (car hlcfg0) nil t)
(unless (org-overlays-at (match-beginning 0))
(setq ov (org-make-overlay (match-beginning 0)
(match-end 0))))
(setq ov (make-overlay (match-beginning 0)
(match-end 0))))
(cond ((eq (cdr hlcfg0) 'children)
(show-children)
(message "CHILDREN")
(org-overlay-put ov 'status 'children))
(overlay-put ov 'status 'children))
((eq (cdr hlcfg0) 'branches)
(show-branches)
(message "BRANCHES")
(org-overlay-put ov 'status 'branches))))))
(overlay-put ov 'status 'branches))))))
(goto-char pos)
(if org-toc-follow-mode (org-toc-goto))
(message "Last TOC configuration restored")

View file

@ -3,6 +3,79 @@
* org-html.el (org-export-as-html-and-open): Add argument to
kill-buffer.
* org-habit.el (require): `calendar' is now required already by
org.el on top level.
* org-clock.el (require): `calendar' is now required already by
org.el on top level.
* org-agenda.el (require, org-timeline, org-agenda-list)
(org-todo-list, org-agenda-to-appt): `calendar' is now required
already by org.el on top level.
* org.el (org-export-latex-fix-inputenc): Declare function.
* org-agenda.el (org-agenda-goto-calendar): Do not bind obsolete
variables.
* org.el (calendar): Require calendar now on top level in org.el
and define aliases to new variables when needed.
(org-read-date, org-goto-calendar): Do not bind obsolete
variables.
* org-clock.el (org-clock-out, org-clock-cancel): Get rid of
compilation warning, add comment that this cannot be done with
`with-current-buffer'.
* org-wl.el (org-wl-open): Use `with-current-buffer'.
* org.el (overlay, org-remove-empty-overlays-at)
(org-outline-overlay-data, org-set-outline-overlay-data)
(org-show-block-all, org-hide-block-toggle)
(org-highlight-new-match, org-remove-occur-highlights)
(org-tags-overlay, org-fast-tag-selection, org-date-ovl)
(org-read-date, org-read-date-display, org-eval-in-calendar)
(org-format-latex, org-context)
(org-speedbar-restriction-lock-overlay)
(org-speedbar-set-agenda-restriction): Use the normal overlay API.
* org-table.el (org-table-add-rectangle-overlay)
(org-table-remove-rectangle-highlight)
(org-table-overlay-coordinates)
(org-table-toggle-coordinate-overlays): Use the normal overlay
API.
* org-src.el (org-edit-src-code, org-edit-fixed-width-region)
(org-edit-src-exit, org-src-mode-configure-edit-buffer): Use the
normal overlay API.
* org-colview.el (org-columns-new-overlay)
(org-columns-display-here, org-columns-remove-overlays)
(org-columns-edit-value, org-columns-next-allowed-value)
(org-columns-update): Use the normal overlay API.
* org-clock.el (org-clock-out, org-clock-cancel)
(org-clock-put-overlay, org-clock-remove-overlays): Use the normal
overlay API.
* org-agenda.el (org-agenda-mark-filtered-text)
(org-agenda-mark-clocking-task, org-agenda-fontify-priorities)
(org-agenda-dim-blocked-tasks, org-agenda-entry-text-show-here)
(org-agenda-entry-text-hide)
(org-agenda-restriction-lock-overlay)
(org-agenda-set-restriction-lock)
(org-agenda-filter-by-tag-hide-line)
(org-agenda-fix-tags-filter-overlays-at)
(org-agenda-filter-by-tag-show-all, org-hl)
(org-agenda-goto-calendar, org-agenda-bulk-mark)
(org-agenda-bulk-remove-overlays): Use the normal overlay API.
* org-freemind.el (org-freemind-from-org-mode-node)
(org-freemind-from-org-mode, )
(org-freemind-from-org-sparse-tree, org-freemind-to-org-mode): Use
interactive-p instead of called-interactively, because this is
backward compatible with older Emacsen I still support..
2010-04-16 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-define-heading-targets): Fix bug in

View file

@ -32,8 +32,7 @@
(require 'org)
(eval-when-compile
(require 'cl)
(require 'calendar))
(require 'cl))
(declare-function diary-add-to-list "diary-lib"
(date string specifier &optional marker globcolor literal))
@ -1967,7 +1966,6 @@ Pressing `<' twice means to restrict to the current subtree or region
(move-marker org-agenda-restrict-end
(progn (org-end-of-subtree t)))))))
(require 'calendar) ; FIXME: can we avoid this for some commands?
;; For example the todo list should not need it (but does...)
(cond
((setq entry (assoc keys org-agenda-custom-commands))
@ -2518,9 +2516,9 @@ higher priority settings."
(let ((inhibit-read-only t))
(mapc
(lambda (o)
(when (equal (org-overlay-buffer o) (current-buffer))
(when (equal (overlay-buffer o) (current-buffer))
(put-text-property
(org-overlay-start o) (org-overlay-end o)
(overlay-start o) (overlay-end o)
'org-filtered t)))
org-agenda-filter-overlays)))
@ -2797,8 +2795,8 @@ bind it in the options section.")
(defun org-agenda-mark-clocking-task ()
"Mark the current clock entry in the agenda if it is present."
(mapc (lambda (o)
(if (eq (org-overlay-get o 'type) 'org-agenda-clocking)
(org-delete-overlay o)))
(if (eq (overlay-get o 'type) 'org-agenda-clocking)
(delete-overlay o)))
(org-overlays-in (point-min) (point-max)))
(when (marker-buffer org-clock-hd-marker)
(save-excursion
@ -2808,17 +2806,17 @@ bind it in the options section.")
(goto-char s)
(when (equal (org-get-at-bol 'org-hd-marker)
org-clock-hd-marker)
(setq ov (org-make-overlay (point-at-bol) (1+ (point-at-eol))))
(org-overlay-put ov 'type 'org-agenda-clocking)
(org-overlay-put ov 'face 'org-agenda-clocking)
(org-overlay-put ov 'help-echo
(setq ov (make-overlay (point-at-bol) (1+ (point-at-eol))))
(overlay-put ov 'type 'org-agenda-clocking)
(overlay-put ov 'face 'org-agenda-clocking)
(overlay-put ov 'help-echo
"The clock is running in this item")))))))
(defun org-agenda-fontify-priorities ()
"Make highest priority lines bold, and lowest italic."
(interactive)
(mapc (lambda (o) (if (eq (org-overlay-get o 'org-type) 'org-priority)
(org-delete-overlay o)))
(mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-priority)
(delete-overlay o)))
(org-overlays-in (point-min) (point-max)))
(save-excursion
(let ((inhibit-read-only t)
@ -2834,8 +2832,8 @@ bind it in the options section.")
e (if (eq org-agenda-fontify-priorities 'cookies)
(match-end 0)
(point-at-eol))
ov (org-make-overlay b e))
(org-overlay-put
ov (make-overlay b e))
(overlay-put
ov 'face
(cond ((org-face-from-face-or-color
'priority nil
@ -2846,12 +2844,12 @@ bind it in the options section.")
(cdr (assoc p org-agenda-fontify-priorities)))))
((equal p l) 'italic)
((equal p h) 'bold)))
(org-overlay-put ov 'org-type 'org-priority)))))
(overlay-put ov 'org-type 'org-priority)))))
(defun org-agenda-dim-blocked-tasks ()
"Dim currently blocked TODO's in the agenda display."
(mapc (lambda (o) (if (eq (org-overlay-get o 'org-type) 'org-blocked-todo)
(org-delete-overlay o)))
(mapc (lambda (o) (if (eq (overlay-get o 'org-type) 'org-blocked-todo)
(delete-overlay o)))
(org-overlays-in (point-min) (point-max)))
(save-excursion
(let ((inhibit-read-only t)
@ -2881,11 +2879,11 @@ bind it in the options section.")
(max (point-min) (1- (point-at-bol)))
(point-at-bol))
e (point-at-eol)
ov (org-make-overlay b e))
ov (make-overlay b e))
(if invis1
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(org-overlay-put ov 'org-type 'org-blocked-todo)))))))
(overlay-put ov 'invisible t)
(overlay-put ov 'face 'org-agenda-dimmed-todo-face))
(overlay-put ov 'org-type 'org-blocked-todo)))))))
(defvar org-agenda-skip-function nil
"Function to be called at each match during agenda construction.
@ -2958,10 +2956,10 @@ no longer in use."
(org-agenda-get-some-entry-text
m org-agenda-entry-text-maxlines " > "))))
(when (string-match "\\S-" txt)
(setq o (org-make-overlay (point-at-bol) (point-at-eol)))
(org-overlay-put o 'evaporate t)
(org-overlay-put o 'org-overlay-type 'agenda-entry-content)
(org-overlay-put o 'after-string txt))))
(setq o (make-overlay (point-at-bol) (point-at-eol)))
(overlay-put o 'evaporate t)
(overlay-put o 'org-overlay-type 'agenda-entry-content)
(overlay-put o 'after-string txt))))
(defun org-agenda-entry-text-show ()
"Add entry context for all agenda lines."
@ -2978,9 +2976,9 @@ no longer in use."
"Remove any shown entry context."
(delq nil
(mapcar (lambda (o)
(if (eq (org-overlay-get o 'org-overlay-type)
(if (eq (overlay-get o 'org-overlay-type)
'agenda-entry-content)
(progn (org-delete-overlay o) t)))
(progn (delete-overlay o) t)))
(org-overlays-in (point-min) (point-max)))))
;;; Agenda timeline
@ -2995,7 +2993,6 @@ under the current date.
If the buffer contains an active region, only check the region for
dates."
(interactive "P")
(require 'calendar)
(org-compile-prefix-format 'timeline)
(org-set-sorting-strategy 'timeline)
(let* ((dopast t)
@ -3197,7 +3194,6 @@ given in `org-agenda-start-on-weekday'."
(setq org-agenda-last-arguments (list include-all start-day ndays))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
(require 'calendar)
(let* ((org-agenda-start-on-weekday
(if (or (equal ndays 7) (and (null ndays) (equal 7 org-agenda-ndays)))
org-agenda-start-on-weekday nil))
@ -3624,7 +3620,6 @@ the list to these. When using \\[universal-argument], you will be prompted
for a keyword. A numeric prefix directly selects the Nth keyword in
`org-todo-keywords-1'."
(interactive "P")
(require 'calendar)
(org-compile-prefix-format 'todo)
(org-set-sorting-strategy 'todo)
(org-prepare-agenda "TODO")
@ -3981,7 +3976,6 @@ MATCH is being ignored."
"Get the (Emacs Calendar) diary entries for DATE."
(require 'diary-lib)
(let* ((diary-fancy-buffer "*temporary-fancy-diary-buffer*")
(fancy-diary-buffer diary-fancy-buffer)
(diary-display-hook '(fancy-diary-display))
(diary-display-function 'fancy-diary-display)
(pop-up-frames nil)
@ -5274,12 +5268,12 @@ HH:MM."
;;; Agenda restriction lock
(defvar org-agenda-restriction-lock-overlay (org-make-overlay 1 1)
(defvar org-agenda-restriction-lock-overlay (make-overlay 1 1)
"Overlay to mark the headline to which agenda commands are restricted.")
(org-overlay-put org-agenda-restriction-lock-overlay
'face 'org-agenda-restriction-lock)
(org-overlay-put org-agenda-restriction-lock-overlay
'help-echo "Agendas are currently limited to this subtree.")
(overlay-put org-agenda-restriction-lock-overlay
'face 'org-agenda-restriction-lock)
(overlay-put org-agenda-restriction-lock-overlay
'help-echo "Agendas are currently limited to this subtree.")
(org-detach-overlay org-agenda-restriction-lock-overlay)
(defun org-agenda-set-restriction-lock (&optional type)
@ -5302,7 +5296,7 @@ in the file. Otherwise, restriction will be to the current subtree."
(put 'org-agenda-files 'org-restrict
(list (buffer-file-name (buffer-base-buffer))))
(org-back-to-heading t)
(org-move-overlay org-agenda-restriction-lock-overlay (point) (point-at-eol))
(move-overlay org-agenda-restriction-lock-overlay (point) (point-at-eol))
(move-marker org-agenda-restrict-begin (point))
(move-marker org-agenda-restrict-end
(save-excursion (org-end-of-subtree t)))
@ -5588,25 +5582,25 @@ If the line does not have an effort defined, return nil."
(defun org-agenda-filter-by-tag-hide-line ()
(let (ov)
(setq ov (org-make-overlay (max (point-min) (1- (point-at-bol)))
(setq ov (make-overlay (max (point-min) (1- (point-at-bol)))
(point-at-eol)))
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'type 'tags-filter)
(overlay-put ov 'invisible t)
(overlay-put ov 'type 'tags-filter)
(push ov org-agenda-filter-overlays)))
(defun org-agenda-fix-tags-filter-overlays-at (&optional pos)
(setq pos (or pos (point)))
(save-excursion
(dolist (ov (org-overlays-at pos))
(when (and (org-overlay-get ov 'invisible)
(eq (org-overlay-get ov 'type) 'tags-filter))
(when (and (overlay-get ov 'invisible)
(eq (overlay-get ov 'type) 'tags-filter))
(goto-char pos)
(if (< (org-overlay-start ov) (point-at-eol))
(org-move-overlay ov (point-at-eol)
(org-overlay-end ov)))))))
(if (< (overlay-start ov) (point-at-eol))
(move-overlay ov (point-at-eol)
(overlay-end ov)))))))
(defun org-agenda-filter-by-tag-show-all ()
(mapc 'org-delete-overlay org-agenda-filter-overlays)
(mapc 'delete-overlay org-agenda-filter-overlays)
(setq org-agenda-filter-overlays nil)
(setq org-agenda-filter nil)
(setq org-agenda-filter-form nil)
@ -5881,8 +5875,8 @@ so that the date SD will be in that range."
(error "No previous date before this line in this buffer")))
;; Initialize the highlight
(defvar org-hl (org-make-overlay 1 1))
(org-overlay-put org-hl 'face 'highlight)
(defvar org-hl (make-overlay 1 1))
(overlay-put org-hl 'face 'highlight)
(defun org-highlight (begin end &optional buffer)
"Highlight a region with overlay."
@ -7313,9 +7307,7 @@ argument, latitude and longitude will be prompted for."
(date (calendar-gregorian-from-absolute day))
(calendar-move-hook nil)
(calendar-view-holidays-initially-flag nil)
(calendar-view-diary-initially-flag nil)
(view-calendar-holidays-initially nil)
(view-diary-entries-initially nil))
(calendar-view-diary-initially-flag nil))
(calendar)
(calendar-goto-date date)))
@ -7374,11 +7366,11 @@ This is a command that has to be installed in `calendar-mode-map'."
(unless (org-agenda-bulk-marked-p)
(unless m (error "Nothing to mark at point"))
(push m org-agenda-bulk-marked-entries)
(setq ov (org-make-overlay (point-at-bol) (+ 2 (point-at-bol))))
(setq ov (make-overlay (point-at-bol) (+ 2 (point-at-bol))))
(org-overlay-display ov "> "
(org-get-todo-face "TODO")
'evaporate)
(org-overlay-put ov 'type 'org-marked-entry-overlay))
(overlay-put ov 'type 'org-marked-entry-overlay))
(beginning-of-line 2)
(while (and (get-char-property (point) 'invisible) (not (eobp)))
(beginning-of-line 2))
@ -7415,8 +7407,8 @@ This only removes the overlays, it does not remove the markers
from the list in `org-agenda-bulk-marked-entries'."
(interactive)
(mapc (lambda (ov)
(and (eq (org-overlay-get ov 'type) 'org-marked-entry-overlay)
(org-delete-overlay ov)))
(and (eq (overlay-get ov 'type) 'org-marked-entry-overlay)
(delete-overlay ov)))
(org-overlays-in (or beg (point-min)) (or end (point-max)))))
(defun org-agenda-bulk-remove-all-marks ()
@ -7596,7 +7588,6 @@ either 'headline or 'category. For example:
will only add headlines containing IMPORTANT or headlines
belonging to the \"Work\" category."
(interactive "P")
(require 'calendar)
(if refresh (setq appt-time-msg-list nil))
(if (eq filter t)
(setq filter (read-from-minibuffer "Regexp filter: ")))

View file

@ -30,8 +30,7 @@
(require 'org)
(eval-when-compile
(require 'cl)
(require 'calendar))
(require 'cl))
(declare-function calendar-absolute-from-iso "cal-iso" (&optional date))
(defvar org-time-stamp-formats)
@ -1199,8 +1198,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(if (not (org-clocking-p))
(if fail-quietly (throw 'exit t) (error "No active clock")))
(let (ts te s h m remove)
(save-excursion
(set-buffer (org-clocking-buffer))
(save-excursion ; Do not replace this with `with-current-buffer'.
(with-no-warnings (set-buffer (org-clocking-buffer)))
(save-restriction
(widen)
(goto-char org-clock-marker)
@ -1267,8 +1266,8 @@ If there is no running clock, throw an error, unless FAIL-QUIETLY is set."
(interactive)
(if (not (org-clocking-p))
(error "No active clock"))
(save-excursion
(set-buffer (org-clocking-buffer))
(save-excursion ; Do not replace this with `with-current-buffer'.
(with-no-warnings (set-buffer (org-clocking-buffer)))
(goto-char org-clock-marker)
(delete-region (1- (point-at-bol)) (point-at-eol))
;; Just in case, remove any empty LOGBOOK left over
@ -1430,7 +1429,7 @@ will be easy to remove."
(org-move-to-column c)
(unless (eolp) (skip-chars-backward "^ \t"))
(skip-chars-backward " \t")
(setq ov (org-make-overlay (1- (point)) (point-at-eol))
(setq ov (make-overlay (1- (point)) (point-at-eol))
tx (concat (buffer-substring (1- (point)) (point))
(make-string (+ off (max 0 (- c (current-column)))) ?.)
(org-add-props (if org-time-clocksum-use-fractional
@ -1444,9 +1443,9 @@ will be easy to remove."
(list 'face 'org-clock-overlay))
""))
(if (not (featurep 'xemacs))
(org-overlay-put ov 'display tx)
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'end-glyph (make-glyph tx)))
(overlay-put ov 'display tx)
(overlay-put ov 'invisible t)
(overlay-put ov 'end-glyph (make-glyph tx)))
(push ov org-clock-overlays)))
(defun org-clock-remove-overlays (&optional beg end noremove)
@ -1455,7 +1454,7 @@ BEG and END are ignored. If NOREMOVE is nil, remove this function
from the `before-change-functions' in the current buffer."
(interactive)
(unless org-inhibit-highlight-removal
(mapc 'org-delete-overlay org-clock-overlays)
(mapc 'delete-overlay org-clock-overlays)
(setq org-clock-overlays nil)
(unless noremove
(remove-hook 'before-change-functions

View file

@ -284,14 +284,14 @@ This is the compiled version of the format.")
(defun org-columns-new-overlay (beg end &optional string face)
"Create a new column overlay and add it to the list."
(let ((ov (org-make-overlay beg end)))
(let ((ov (make-overlay beg end)))
(if (featurep 'xemacs)
(progn
(org-overlay-put ov 'face (or face 'org-columns-space1))
(org-overlay-put ov 'start-open t)
(overlay-put ov 'face (or face 'org-columns-space1))
(overlay-put ov 'start-open t)
(if string
(org-overlay-display ov string (or face 'org-columns-space1))))
(org-overlay-put ov 'face (or face 'secondary-selection))
(overlay-put ov 'face (or face 'secondary-selection))
(org-overlay-display ov string face))
(push ov org-columns-overlays)
ov))
@ -370,12 +370,12 @@ This is the compiled version of the format.")
(org-unmodified
(setq ov (org-columns-new-overlay
beg (setq beg (1+ beg)) string face))
(org-overlay-put ov 'keymap org-columns-map)
(org-overlay-put ov 'org-columns-key property)
(org-overlay-put ov 'org-columns-value (cdr ass))
(org-overlay-put ov 'org-columns-value-modified modval)
(org-overlay-put ov 'org-columns-pom pom)
(org-overlay-put ov 'org-columns-format f)
(overlay-put ov 'keymap org-columns-map)
(overlay-put ov 'org-columns-key property)
(overlay-put ov 'org-columns-value (cdr ass))
(overlay-put ov 'org-columns-value-modified modval)
(overlay-put ov 'org-columns-pom pom)
(overlay-put ov 'org-columns-format f)
(when (featurep 'xemacs)
(if (or (not (char-after beg))
(equal (char-after beg) ?\n))
@ -400,12 +400,12 @@ This is the compiled version of the format.")
;; Make the rest of the line disappear.
(org-unmodified
(setq ov (org-columns-new-overlay beg (point-at-eol)))
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'keymap org-columns-map)
(org-overlay-put ov 'intangible t)
(overlay-put ov 'invisible t)
(overlay-put ov 'keymap org-columns-map)
(overlay-put ov 'intangible t)
(push ov org-columns-overlays)
(setq ov (org-make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
(org-overlay-put ov 'keymap org-columns-map)
(setq ov (make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
(overlay-put ov 'keymap org-columns-map)
(push ov org-columns-overlays)
(let ((inhibit-read-only t))
(put-text-property (max (point-min) (1- (point-at-bol)))
@ -497,7 +497,7 @@ This is the compiled version of the format.")
(move-marker org-columns-begin-marker nil)
(move-marker org-columns-top-level-marker nil)
(org-unmodified
(mapc 'org-delete-overlay org-columns-overlays)
(mapc 'delete-overlay org-columns-overlays)
(setq org-columns-overlays nil)
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max) '(read-only t))))
@ -601,9 +601,9 @@ Where possible, use the standard interface for changing this line."
(point))) ; keep despite of compiler warning
(line-overlays
(delq nil (mapcar (lambda (x)
(and (eq (org-overlay-buffer x) (current-buffer))
(>= (org-overlay-start x) bol)
(<= (org-overlay-start x) eol)
(and (eq (overlay-buffer x) (current-buffer))
(>= (overlay-start x) bol)
(<= (overlay-start x) eol)
x))
org-columns-overlays)))
(org-columns-time (time-to-number-of-days (current-time)))
@ -668,7 +668,7 @@ Where possible, use the standard interface for changing this line."
(progn
(setq org-columns-overlays
(org-delete-all line-overlays org-columns-overlays))
(mapc 'org-delete-overlay line-overlays)
(mapc 'delete-overlay line-overlays)
(org-columns-eval eval))
(org-columns-display-here)))
(org-move-to-column col)
@ -745,9 +745,9 @@ an integer, select that value."
(point))) ; keep despite of compiler waring
(line-overlays
(delq nil (mapcar (lambda (x)
(and (eq (org-overlay-buffer x) (current-buffer))
(>= (org-overlay-start x) bol)
(<= (org-overlay-start x) eol)
(and (eq (overlay-buffer x) (current-buffer))
(>= (overlay-start x) bol)
(<= (overlay-start x) eol)
x))
org-columns-overlays)))
(allowed (or (org-property-get-allowed-values pom key)
@ -797,7 +797,7 @@ an integer, select that value."
(progn
(setq org-columns-overlays
(org-delete-all line-overlays org-columns-overlays))
(mapc 'org-delete-overlay line-overlays)
(mapc 'delete-overlay line-overlays)
(org-columns-eval '(org-entry-put pom key nval)))
(org-columns-display-here)))
(org-move-to-column col)
@ -1092,14 +1092,14 @@ Don't set this, this is meant for dynamic scoping.")
(let (fmt val pos face)
(save-excursion
(mapc (lambda (ov)
(when (equal (org-overlay-get ov 'org-columns-key) property)
(setq pos (org-overlay-start ov))
(when (equal (overlay-get ov 'org-columns-key) property)
(setq pos (overlay-start ov))
(goto-char pos)
(when (setq val (cdr (assoc property
(get-text-property
(point-at-bol) 'org-summaries))))
(setq fmt (org-overlay-get ov 'org-columns-format))
(org-overlay-put ov 'org-columns-value val)
(setq fmt (overlay-get ov 'org-columns-format))
(overlay-put ov 'org-columns-value val)
(if (featurep 'xemacs)
(progn
(setq face (glyph-face (extent-end-glyph ov)))

View file

@ -146,8 +146,8 @@ This is the compiled version of the format.")
(defun org-columns-new-overlay (beg end &optional string face)
"Create a new column overlay and add it to the list."
(let ((ov (org-make-overlay beg end)))
(org-overlay-put ov 'face (or face 'secondary-selection))
(let ((ov (make-overlay beg end)))
(overlay-put ov 'face (or face 'secondary-selection))
(org-overlay-display ov string face)
(push ov org-columns-overlays)
ov))
@ -220,12 +220,12 @@ This is the compiled version of the format.")
(org-unmodified
(setq ov (org-columns-new-overlay
beg (setq beg (1+ beg)) string (if dateline face1 face)))
(org-overlay-put ov 'keymap org-columns-map)
(org-overlay-put ov 'org-columns-key property)
(org-overlay-put ov 'org-columns-value (cdr ass))
(org-overlay-put ov 'org-columns-value-modified modval)
(org-overlay-put ov 'org-columns-pom pom)
(org-overlay-put ov 'org-columns-format f))
(overlay-put ov 'keymap org-columns-map)
(overlay-put ov 'org-columns-key property)
(overlay-put ov 'org-columns-value (cdr ass))
(overlay-put ov 'org-columns-value-modified modval)
(overlay-put ov 'org-columns-pom pom)
(overlay-put ov 'org-columns-format f))
(if (or (not (char-after beg))
(equal (char-after beg) ?\n))
(let ((inhibit-read-only t))
@ -235,12 +235,12 @@ This is the compiled version of the format.")
;; Make the rest of the line disappear.
(org-unmodified
(setq ov (org-columns-new-overlay beg (point-at-eol)))
(org-overlay-put ov 'invisible t)
(org-overlay-put ov 'keymap org-columns-map)
(org-overlay-put ov 'intangible t)
(overlay-put ov 'invisible t)
(overlay-put ov 'keymap org-columns-map)
(overlay-put ov 'intangible t)
(push ov org-columns-overlays)
(setq ov (org-make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
(org-overlay-put ov 'keymap org-columns-map)
(setq ov (make-overlay (1- (point-at-eol)) (1+ (point-at-eol))))
(overlay-put ov 'keymap org-columns-map)
(push ov org-columns-overlays)
(let ((inhibit-read-only t))
(put-text-property (max (point-min) (1- (point-at-bol)))
@ -323,7 +323,7 @@ for the duration of the command.")
(move-marker org-columns-begin-marker nil)
(move-marker org-columns-top-level-marker nil)
(org-unmodified
(mapc 'org-delete-overlay org-columns-overlays)
(mapc 'delete-overlay org-columns-overlays)
(setq org-columns-overlays nil)
(let ((inhibit-read-only t))
(remove-text-properties (point-min) (point-max) '(read-only t))))
@ -495,7 +495,7 @@ Where possible, use the standard interface for changing this line."
(progn
(setq org-columns-overlays
(org-delete-all line-overlays org-columns-overlays))
(mapc 'org-delete-overlay line-overlays)
(mapc 'delete-overlay line-overlays)
(org-columns-eval eval))
(org-columns-display-here)))
(org-move-to-column col)
@ -624,7 +624,7 @@ an integer, select that value."
(progn
(setq org-columns-overlays
(org-delete-all line-overlays org-columns-overlays))
(mapc 'org-delete-overlay line-overlays)
(mapc 'delete-overlay line-overlays)
(org-columns-eval '(org-entry-put pom key nval)))
(org-columns-display-here)))
(org-move-to-column col)
@ -918,15 +918,15 @@ Don't set this, this is meant for dynamic scoping.")
(let (fmt val pos)
(save-excursion
(mapc (lambda (ov)
(when (equal (org-overlay-get ov 'org-columns-key) property)
(setq pos (org-overlay-start ov))
(when (equal (overlay-get ov 'org-columns-key) property)
(setq pos (overlay-start ov))
(goto-char pos)
(when (setq val (cdr (assoc property
(get-text-property
(point-at-bol) 'org-summaries))))
(setq fmt (org-overlay-get ov 'org-columns-format))
(org-overlay-put ov 'org-columns-value val)
(org-overlay-put ov 'display (format fmt val)))))
(setq fmt (overlay-get ov 'org-columns-format))
(overlay-put ov 'org-columns-value val)
(overlay-put ov 'display (format fmt val)))))
org-columns-overlays))))
(defun org-columns-compute (property)

View file

@ -89,22 +89,8 @@ any other entries, and any resulting duplicates will be removed entirely."
;;;; Emacs/XEmacs compatibility
;; Overlay compatibility functions
(defun org-make-overlay (beg end &optional buffer)
(if (featurep 'xemacs)
(make-extent beg end buffer)
(make-overlay beg end buffer)))
(defun org-delete-overlay (ovl)
(if (featurep 'xemacs) (progn (delete-extent ovl) nil) (delete-overlay ovl)))
(defun org-detach-overlay (ovl)
(if (featurep 'xemacs) (detach-extent ovl) (delete-overlay ovl)))
(defun org-move-overlay (ovl beg end &optional buffer)
(if (featurep 'xemacs)
(set-extent-endpoints ovl beg end (or buffer (current-buffer)))
(move-overlay ovl beg end buffer)))
(defun org-overlay-put (ovl prop value)
(if (featurep 'xemacs)
(set-extent-property ovl prop value)
(overlay-put ovl prop value)))
(defun org-overlay-display (ovl text &optional face evap)
"Make overlay OVL display TEXT with face FACE."
(if (featurep 'xemacs)
@ -124,30 +110,20 @@ any other entries, and any resulting duplicates will be removed entirely."
(if face (org-add-props text nil 'face face))
(overlay-put ovl 'before-string text)
(if evap (overlay-put ovl 'evaporate t))))
(defun org-overlay-get (ovl prop)
(if (featurep 'xemacs)
(extent-property ovl prop)
(overlay-get ovl prop)))
(defun org-overlays-at (pos)
(if (featurep 'xemacs) (extents-at pos) (overlays-at pos)))
(defun org-overlays-in (&optional start end)
(if (featurep 'xemacs)
(extent-list nil start end)
(overlays-in start end)))
(defun org-overlay-start (o)
(if (featurep 'xemacs) (extent-start-position o) (overlay-start o)))
(defun org-overlay-end (o)
(if (featurep 'xemacs) (extent-end-position o) (overlay-end o)))
(defun org-overlay-buffer (o)
(if (featurep 'xemacs) (extent-buffer o) (overlay-buffer o)))
(defun org-find-overlays (prop &optional pos delete)
"Find all overlays specifying PROP at POS or point.
If DELETE is non-nil, delete all those overlays."
(let ((overlays (org-overlays-at (or pos (point))))
ov found)
(while (setq ov (pop overlays))
(if (org-overlay-get ov prop)
(if delete (org-delete-overlay ov) (push ov found))))
(if (overlay-get ov prop)
(if delete (delete-overlay ov) (push ov found))))
found))
(defun org-add-hook (hook function &optional append local)

View file

@ -808,13 +808,13 @@ Otherwise give an error say the file exists."
".mm"))
(mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
(list line mm-file))))
(when (org-freemind-check-overwrite mm-file (called-interactively-p))
(when (org-freemind-check-overwrite mm-file (interactive-p))
(let ((org-buffer (current-buffer))
(mm-buffer (find-file-noselect mm-file)))
(org-freemind-write-mm-buffer org-buffer mm-buffer node-line)
(with-current-buffer mm-buffer
(basic-save-buffer)
(when (called-interactively-p)
(when (interactive-p)
(switch-to-buffer-other-window mm-buffer)
(when (y-or-n-p "Show in FreeMind? ")
(org-freemind-show buffer-file-name)))))))
@ -832,13 +832,13 @@ Otherwise give an error say the file exists."
".mm"))
(mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
(list org-file mm-file)))
(when (org-freemind-check-overwrite mm-file (called-interactively-p))
(when (org-freemind-check-overwrite mm-file (interactive-p))
(let ((org-buffer (if org-file (find-file-noselect org-file) (current-buffer)))
(mm-buffer (find-file-noselect mm-file)))
(org-freemind-write-mm-buffer org-buffer mm-buffer nil)
(with-current-buffer mm-buffer
(basic-save-buffer)
(when (called-interactively-p)
(when (interactive-p)
(switch-to-buffer-other-window mm-buffer)
(when (y-or-n-p "Show in FreeMind? ")
(org-freemind-show buffer-file-name)))))))
@ -855,7 +855,7 @@ Otherwise give an error say the file exists."
"-sparse.mm"))
(mm-file (read-file-name "Output FreeMind file: " nil nil nil default-mm-file)))
(list (current-buffer) mm-file)))
(when (org-freemind-check-overwrite mm-file (called-interactively-p))
(when (org-freemind-check-overwrite mm-file (interactive-p))
(let (org-buffer
(mm-buffer (find-file-noselect mm-file)))
(save-window-excursion
@ -864,7 +864,7 @@ Otherwise give an error say the file exists."
(org-freemind-write-mm-buffer org-buffer mm-buffer nil)
(with-current-buffer mm-buffer
(basic-save-buffer)
(when (called-interactively-p)
(when (interactive-p)
(switch-to-buffer-other-window mm-buffer)
(when (y-or-n-p "Show in FreeMind? ")
(org-freemind-show buffer-file-name)))))))
@ -1091,7 +1091,7 @@ PATH should be a list of steps, where each step has the form
(default-org-file (concat (file-name-nondirectory mm-file) ".org"))
(org-file (read-file-name "Output org-mode file: " nil nil nil default-org-file)))
(list mm-file org-file))))
(when (org-freemind-check-overwrite org-file (called-interactively-p))
(when (org-freemind-check-overwrite org-file (interactive-p))
(let ((mm-buffer (find-file-noselect mm-file))
(org-buffer (find-file-noselect org-file)))
(with-current-buffer mm-buffer

View file

@ -30,8 +30,7 @@
(require 'org)
(require 'org-agenda)
(eval-when-compile
(require 'cl)
(require 'calendar))
(require 'cl))
(defgroup org-habit nil
"Options concerning habit tracking in Org-mode."

View file

@ -238,20 +238,20 @@ the edited version. Optional argument CONTEXT is used by
(when buffer
(with-current-buffer buffer
(if (boundp 'org-edit-src-overlay)
(org-delete-overlay org-edit-src-overlay)))
(delete-overlay org-edit-src-overlay)))
(kill-buffer buffer))
(setq buffer (generate-new-buffer
(org-src-construct-edit-buffer-name (buffer-name) lang)))
(setq ovl (org-make-overlay beg end))
(org-overlay-put ovl 'edit-buffer buffer)
(org-overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
(org-overlay-put ovl 'face 'secondary-selection)
(org-overlay-put ovl
(setq ovl (make-overlay beg end))
(overlay-put ovl 'edit-buffer buffer)
(overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
(overlay-put ovl 'face 'secondary-selection)
(overlay-put ovl
'keymap
(let ((map (make-sparse-keymap)))
(define-key map [mouse-1] 'org-edit-src-continue)
map))
(org-overlay-put ovl :read-only "Leave me alone")
(overlay-put ovl :read-only "Leave me alone")
(org-src-switch-to-buffer buffer 'edit)
(if (eq single 'macro-definition)
(setq code (replace-regexp-in-string "\\\\n" "\n" code t t)))
@ -381,22 +381,22 @@ the fragment in the Org-mode buffer."
(when buffer
(with-current-buffer buffer
(if (boundp 'org-edit-src-overlay)
(org-delete-overlay org-edit-src-overlay)))
(delete-overlay org-edit-src-overlay)))
(kill-buffer buffer))
(setq buffer (generate-new-buffer
(org-src-construct-edit-buffer-name
(buffer-name) "Fixed Width")))
(setq ovl (org-make-overlay beg end))
(org-overlay-put ovl 'face 'secondary-selection)
(org-overlay-put ovl 'edit-buffer buffer)
(org-overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
(org-overlay-put ovl 'face 'secondary-selection)
(org-overlay-put ovl
(setq ovl (make-overlay beg end))
(overlay-put ovl 'face 'secondary-selection)
(overlay-put ovl 'edit-buffer buffer)
(overlay-put ovl 'help-echo "Click with mouse-1 to switch to buffer editing this segment")
(overlay-put ovl 'face 'secondary-selection)
(overlay-put ovl
'keymap
(let ((map (make-sparse-keymap)))
(define-key map [mouse-1] 'org-edit-src-continue)
map))
(org-overlay-put ovl :read-only "Leave me alone")
(overlay-put ovl :read-only "Leave me alone")
(switch-to-buffer buffer)
(insert code)
(remove-text-properties (point-min) (point-max)
@ -593,7 +593,7 @@ the language, a switch telling if the content should be in a single line."
(goto-char beg)
(if single (just-one-space))
(if (memq t (mapcar (lambda (overlay)
(eq (org-overlay-get overlay 'invisible)
(eq (overlay-get overlay 'invisible)
'org-hide-block))
(org-overlays-at (point))))
;; Block is hidden; put point at start of block
@ -633,7 +633,7 @@ the language, a switch telling if the content should be in a single line."
(set (if (featurep 'xemacs) 'write-contents-hooks 'write-contents-functions)
'(org-edit-src-save))
(org-add-hook 'kill-buffer-hook
'(lambda () (org-delete-overlay org-edit-src-overlay)) nil 'local)))
'(lambda () (delete-overlay org-edit-src-overlay)) nil 'local)))
(org-add-hook 'org-src-mode-hook 'org-src-mode-configure-edit-buffer)

View file

@ -3282,8 +3282,8 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
(defun org-table-add-rectangle-overlay (beg end &optional face)
"Add a new overlay."
(let ((ov (org-make-overlay beg end)))
(org-overlay-put ov 'face (or face 'secondary-selection))
(let ((ov (make-overlay beg end)))
(overlay-put ov 'face (or face 'secondary-selection))
(push ov org-table-rectangle-overlays)))
(defun org-table-highlight-rectangle (&optional beg end face)
@ -3318,7 +3318,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
"Remove the rectangle overlays."
(unless org-inhibit-highlight-removal
(remove-hook 'before-change-functions 'org-table-remove-rectangle-highlight)
(mapc 'org-delete-overlay org-table-rectangle-overlays)
(mapc 'delete-overlay org-table-rectangle-overlays)
(setq org-table-rectangle-overlays nil)))
(defvar org-table-coordinate-overlays nil
@ -3328,14 +3328,14 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
(defun org-table-overlay-coordinates ()
"Add overlays to the table at point, to show row/column coordinates."
(interactive)
(mapc 'org-delete-overlay org-table-coordinate-overlays)
(mapc 'delete-overlay org-table-coordinate-overlays)
(setq org-table-coordinate-overlays nil)
(save-excursion
(let ((id 0) (ih 0) hline eol s1 s2 str ic ov beg)
(goto-char (org-table-begin))
(while (org-at-table-p)
(setq eol (point-at-eol))
(setq ov (org-make-overlay (point-at-bol) (1+ (point-at-bol))))
(setq ov (make-overlay (point-at-bol) (1+ (point-at-bol))))
(push ov org-table-coordinate-overlays)
(setq hline (looking-at org-table-hline-regexp))
(setq str (if hline (format "I*%-2d" (setq ih (1+ ih)))
@ -3349,7 +3349,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
s1 (concat "$" (int-to-string ic))
s2 (org-number-to-letters ic)
str (if (eq org-table-use-standard-references t) s2 s1))
(setq ov (org-make-overlay beg (+ beg (length str))))
(setq ov (make-overlay beg (+ beg (length str))))
(push ov org-table-coordinate-overlays)
(org-overlay-display ov str 'org-special-keyword 'evaporate)))
(beginning-of-line 2)))))
@ -3363,7 +3363,7 @@ Use COMMAND to do the motion, repeat if necessary to end up in a data line."
(if (and (org-at-table-p) org-table-overlay-coordinates)
(org-table-align))
(unless org-table-overlay-coordinates
(mapc 'org-delete-overlay org-table-coordinate-overlays)
(mapc 'delete-overlay org-table-coordinate-overlays)
(setq org-table-coordinate-overlays nil)))
(defun org-table-toggle-formula-debugger ()

View file

@ -223,11 +223,10 @@ for namazu index."
(let ((old-buf (current-buffer))
(old-point (point-marker)))
(wl-folder-goto-folder-subr folder)
(save-excursion
(with-current-buffer old-buf
;; XXX: `wl-folder-goto-folder-subr' moves point to the
;; beginning of the current line. So, restore the point
;; in the old buffer.
(set-buffer old-buf)
(goto-char old-point))
(and (wl-summary-jump-to-msg-by-message-id (org-add-angle-brackets
article))

View file

@ -72,8 +72,19 @@
(eval-when-compile
(require 'cl)
(require 'gnus-sum)
(require 'calendar))
(require 'gnus-sum))
(require 'calendar)
;; Emacs 22 calendar compatibility: Make sure the new variables are available
(unless (boundp 'calendar-view-holidays-initially-flag)
(defvaralias 'calendar-view-holidays-initially-flag
'view-calendar-holidays-initially))
(unless (boundp 'calendar-view-diary-initially-flag)
(defvaralias 'calendar-view-diary-initially-flag
'view-diary-entries-initially))
(unless (boundp 'diary-fancy-buffer)
(defvaralias 'diary-fancy-buffer 'fancy-diary-buffer))
;; For XEmacs, noutline is not yet provided by outline.el, so arrange for
;; the file noutline.el being loaded.
(if (featurep 'xemacs) (condition-case nil (require 'noutline)))
@ -83,6 +94,7 @@
(require 'time-date)
(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time))
(require 'easymenu)
(require 'overlay)
(require 'org-macs)
(require 'org-entities)
@ -3277,6 +3289,7 @@ Normal means no org-mode-specific context."
(declare-function org-indent-mode "org-indent" (&optional arg))
(declare-function parse-time-string "parse-time" (string))
(declare-function org-attach-reveal "org-attach" (&optional if-exists))
(declare-function org-export-latex-fix-inputenc "org-latex" ())
(defvar remember-data-file)
(defvar texmathp-why)
(declare-function speedbar-line-directory "speedbar" (&optional depth))
@ -5643,10 +5656,10 @@ This function is the default value of the hook `org-cycle-hook'."
"Remove outline overlays that do not contain non-white stuff."
(mapc
(lambda (o)
(and (eq 'outline (org-overlay-get o 'invisible))
(not (string-match "\\S-" (buffer-substring (org-overlay-start o)
(org-overlay-end o))))
(org-delete-overlay o)))
(and (eq 'outline (overlay-get o 'invisible))
(not (string-match "\\S-" (buffer-substring (overlay-start o)
(overlay-end o))))
(delete-overlay o)))
(org-overlays-at pos)))
(defun org-clean-visibility-after-subtree-move ()
@ -5809,9 +5822,9 @@ If USE-MARKERS is set, return the positions as markers."
(widen)
(delq nil
(mapcar (lambda (o)
(when (eq (org-overlay-get o 'invisible) 'outline)
(setq beg (org-overlay-start o)
end (org-overlay-end o))
(when (eq (overlay-get o 'invisible) 'outline)
(setq beg (overlay-start o)
end (overlay-end o))
(and beg end (> end beg)
(if use-markers
(cons (move-marker (make-marker) beg)
@ -5828,8 +5841,8 @@ DATA should have been made by `org-outline-overlay-data'."
(widen)
(show-all)
(mapc (lambda (c)
(setq o (org-make-overlay (car c) (cdr c)))
(org-overlay-put o 'invisible 'outline))
(setq o (make-overlay (car c) (cdr c)))
(overlay-put o 'invisible 'outline))
data)))))
(defmacro org-save-outline-visibility (use-markers &rest body)
@ -5888,7 +5901,7 @@ the range."
(defun org-show-block-all ()
"Unfold all blocks in the current buffer."
(mapc 'org-delete-overlay org-hide-block-overlays)
(mapc 'delete-overlay org-hide-block-overlays)
(setq org-hide-block-overlays nil))
(defun org-hide-block-toggle-maybe ()
@ -5912,7 +5925,7 @@ the range."
(end (match-end 0)) ;; end of entire body
ov)
(if (memq t (mapcar (lambda (overlay)
(eq (org-overlay-get overlay 'invisible)
(eq (overlay-get overlay 'invisible)
'org-hide-block))
(org-overlays-at start)))
(if (or (not force) (eq force 'off))
@ -5920,22 +5933,22 @@ the range."
(when (member ov org-hide-block-overlays)
(setq org-hide-block-overlays
(delq ov org-hide-block-overlays)))
(when (eq (org-overlay-get ov 'invisible)
(when (eq (overlay-get ov 'invisible)
'org-hide-block)
(org-delete-overlay ov)))
(delete-overlay ov)))
(org-overlays-at start)))
(setq ov (org-make-overlay start end))
(org-overlay-put ov 'invisible 'org-hide-block)
(setq ov (make-overlay start end))
(overlay-put ov 'invisible 'org-hide-block)
;; make the block accessible to isearch
(org-overlay-put
(overlay-put
ov 'isearch-open-invisible
(lambda (ov)
(when (member ov org-hide-block-overlays)
(setq org-hide-block-overlays
(delq ov org-hide-block-overlays)))
(when (eq (org-overlay-get ov 'invisible)
(when (eq (overlay-get ov 'invisible)
'org-hide-block)
(org-delete-overlay ov))))
(delete-overlay ov))))
(push ov org-hide-block-overlays)))
(error "Not looking at a source block"))))
@ -11506,8 +11519,8 @@ entire tree."
(defun org-highlight-new-match (beg end)
"Highlight from BEG to END and mark the highlight is an occur headline."
(let ((ov (org-make-overlay beg end)))
(org-overlay-put ov 'face 'secondary-selection)
(let ((ov (make-overlay beg end)))
(overlay-put ov 'face 'secondary-selection)
(push ov org-occur-highlights)))
(defun org-remove-occur-highlights (&optional beg end noremove)
@ -11516,7 +11529,7 @@ BEG and END are ignored. If NOREMOVE is nil, remove this function
from the `before-change-functions' in the current buffer."
(interactive)
(unless org-inhibit-highlight-removal
(mapc 'org-delete-overlay org-occur-highlights)
(mapc 'delete-overlay org-occur-highlights)
(setq org-occur-highlights nil)
(setq org-occur-parameters nil)
(unless noremove
@ -12019,7 +12032,7 @@ epoch to the beginning of today (00:00)."
(delq nil list))
(defvar org-add-colon-after-tag-completion nil) ;; dynamically scoped param
(defvar org-tags-overlay (org-make-overlay 1 1))
(defvar org-tags-overlay (make-overlay 1 1))
(org-detach-overlay org-tags-overlay)
(defun org-get-local-tags-at (&optional pos)
@ -12395,7 +12408,7 @@ Returns the new tags string, or nil to not change the current settings."
(if (> (current-column) org-tags-column)
" "
(make-string (- org-tags-column (current-column)) ?\ ))))))
(org-move-overlay org-tags-overlay ov-start ov-end)
(move-overlay org-tags-overlay ov-start ov-end)
(save-window-excursion
(if expert
(set-buffer (get-buffer-create " *Org tags*"))
@ -13476,8 +13489,8 @@ So these are more for recording a certain time/date."
(interactive "P")
(org-time-stamp arg 'inactive))
(defvar org-date-ovl (org-make-overlay 1 1))
(org-overlay-put org-date-ovl 'face 'org-warning)
(defvar org-date-ovl (make-overlay 1 1))
(overlay-put org-date-ovl 'face 'org-warning)
(org-detach-overlay org-date-ovl)
(defvar org-ans1) ; dynamically scoped parameter
@ -13556,9 +13569,7 @@ user."
(calendar-frame-setup nil)
(calendar-move-hook nil)
(calendar-view-diary-initially-flag nil)
(view-diary-entries-initially nil)
(calendar-view-holidays-initially-flag nil)
(view-calendar-holidays-initially nil)
(timestr (format-time-string
(if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
(prompt (concat (if prompt (concat prompt " ") "")
@ -13639,7 +13650,7 @@ user."
(remove-hook 'post-command-hook 'org-read-date-display)
(use-local-map old-map)
(when org-read-date-overlay
(org-delete-overlay org-read-date-overlay)
(delete-overlay org-read-date-overlay)
(setq org-read-date-overlay nil)))))))
(t ; Naked prompt only
@ -13647,7 +13658,7 @@ user."
(setq ans (read-string prompt default-input
'org-read-date-history timestr))
(when org-read-date-overlay
(org-delete-overlay org-read-date-overlay)
(delete-overlay org-read-date-overlay)
(setq org-read-date-overlay nil)))))
(setq final (org-read-date-analyze ans def defdecode))
@ -13669,7 +13680,7 @@ user."
"Display the current date prompt interpretation in the minibuffer."
(when org-read-date-display-live
(when org-read-date-overlay
(org-delete-overlay org-read-date-overlay))
(delete-overlay org-read-date-overlay))
(let ((p (point)))
(end-of-line 1)
(while (not (equal (buffer-substring
@ -13697,7 +13708,7 @@ user."
(when org-read-date-analyze-futurep
(setq txt (concat txt " (=>F)")))
(setq org-read-date-overlay
(org-make-overlay (1- (point-at-eol)) (point-at-eol)))
(make-overlay (1- (point-at-eol)) (point-at-eol)))
(org-overlay-display org-read-date-overlay txt 'secondary-selection))))
(defun org-read-date-analyze (ans def defdecode)
@ -13933,7 +13944,7 @@ Also, store the cursor date in variable org-ans2."
(let* ((date (calendar-cursor-to-date))
(time (encode-time 0 0 0 (nth 1 date) (nth 0 date) (nth 2 date))))
(setq org-ans2 (format-time-string "%Y-%m-%d" time))))
(org-move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
(move-overlay org-date-ovl (1- (point)) (1+ (point)) (current-buffer))
(select-window sw)
(org-select-frame-set-input-focus sf)))
@ -14618,9 +14629,7 @@ A prefix ARG can be used to force the current date."
(let ((tsr org-ts-regexp) diff
(calendar-move-hook nil)
(calendar-view-holidays-initially-flag nil)
(view-calendar-holidays-initially nil)
(calendar-view-diary-initially-flag nil)
(view-diary-entries-initially nil))
(calendar-view-diary-initially-flag nil))
(if (or (org-at-timestamp-p)
(save-excursion
(beginning-of-line 1)
@ -15153,7 +15162,7 @@ Revert to the normal definition outside of these fragments."
(defun org-remove-latex-fragment-image-overlays ()
"Remove all overlays with LaTeX fragment images in current buffer."
(mapc 'org-delete-overlay org-latex-fragment-image-overlays)
(mapc 'delete-overlay org-latex-fragment-image-overlays)
(setq org-latex-fragment-image-overlays nil))
(defun org-preview-latex-fragment (&optional subtree)
@ -15271,19 +15280,19 @@ Some of the options can be changed using the variable
(if overlays
(progn
(mapc (lambda (o)
(if (eq (org-overlay-get o 'org-overlay-type)
(if (eq (overlay-get o 'org-overlay-type)
'org-latex-overlay)
(org-delete-overlay o)))
(delete-overlay o)))
(org-overlays-in beg end))
(setq ov (org-make-overlay beg end))
(org-overlay-put ov 'org-overlay-type 'org-latex-overlay)
(setq ov (make-overlay beg end))
(overlay-put ov 'org-overlay-type 'org-latex-overlay)
(if (featurep 'xemacs)
(progn
(org-overlay-put ov 'invisible t)
(org-overlay-put
(overlay-put ov 'invisible t)
(overlay-put
ov 'end-glyph
(make-glyph (vector 'png :file movefile))))
(org-overlay-put
(overlay-put
ov 'display
(list 'image :type 'png :file movefile :ascent 'center)))
(push ov org-latex-fragment-image-overlays)
@ -17318,9 +17327,9 @@ and :keyword."
(if (memq x org-latex-fragment-image-overlays) x))
(org-overlays-at (point))))))
(push (list :latex-fragment
(org-overlay-start o) (org-overlay-end o)) clist)
(overlay-start o) (overlay-end o)) clist)
(push (list :latex-preview
(org-overlay-start o) (org-overlay-end o)) clist))
(overlay-start o) (overlay-end o)) clist))
((org-inside-LaTeX-fragment-p)
;; FIXME: positions wrong.
(push (list :latex-fragment (point) (point)) clist)))
@ -18459,11 +18468,11 @@ if no description is present"
;; Speedbar support
(defvar org-speedbar-restriction-lock-overlay (org-make-overlay 1 1)
(defvar org-speedbar-restriction-lock-overlay (make-overlay 1 1)
"Overlay marking the agenda restriction line in speedbar.")
(org-overlay-put org-speedbar-restriction-lock-overlay
(overlay-put org-speedbar-restriction-lock-overlay
'face 'org-agenda-restriction-lock)
(org-overlay-put org-speedbar-restriction-lock-overlay
(overlay-put org-speedbar-restriction-lock-overlay
'help-echo "Agendas are currently limited to this item.")
(org-detach-overlay org-speedbar-restriction-lock-overlay)
@ -18496,8 +18505,8 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]."
(error "Cannot restrict to non-Org-mode file"))
(org-agenda-set-restriction-lock 'file)))
(t (error "Don't know how to restrict Org-mode's agenda")))
(org-move-overlay org-speedbar-restriction-lock-overlay
(point-at-bol) (point-at-eol))
(move-overlay org-speedbar-restriction-lock-overlay
(point-at-bol) (point-at-eol))
(setq current-prefix-arg nil)
(org-agenda-maybe-redo)))