Mark a few functions as obsolete

* lisp/ob-R.el (org-babel-variable-assignments:R):
* lisp/ob-ref.el (org-babel-ref-goto-headline-id):
* lisp/org-agenda.el (org-agenda-prepare-window):
(org-agenda-switch-to):
* lisp/org-capture.el (org-capture-goto-target):
* lisp/org-clock.el (org-clock-goto):
(org-clock-special-range):
* lisp/org-ctags.el (org-ctags-visit-buffer-or-file):
* lisp/org-eshell.el (org-eshell-open):
* lisp/org-feed.el (org-feed-show-raw-feed):
* lisp/org-id.el (org-id-goto):
* lisp/org-irc.el (org-irc-visit-erc):
* lisp/org-macs.el (org-string-nw-p):
* lisp/org-mobile.el (org-mobile-apply):
* lisp/org-src.el (org-src-switch-to-buffer):
* lisp/org.el (org-get-location):
(org-tree-to-indirect-buffer):
(org-mark-ring-goto):
(org-refile):
(org-add-log-note):
(org-revert-all-org-buffers):
(org-switchb):
(org-cycle-agenda-files):
(org-submit-bug-report):
(org-goto-marker-or-bmk):
* lisp/ox-html.el (org-html-htmlize-generate-css): Silence byte
  compiler.

The following functions are marked as obsolete:
- `org-string-match-p'
- `org-number-sequence'
- `org-floor*'
- `org-pop-to-buffer-same-window'
- `org-delete-directory'
- `org-buffer-narrowed-p'
This commit is contained in:
Nicolas Goaziou 2016-06-23 10:00:00 +02:00
parent bfed384cd8
commit d13b0745dc
18 changed files with 99 additions and 197 deletions

View File

@ -37,7 +37,6 @@
(declare-function ess-eval-buffer "ext:ess-inf" (vis))
(declare-function ess-wait-for-process "ext:ess-inf"
(&optional proc sec-prompt wait force-redisplay))
(declare-function org-number-sequence "org-compat" (from &optional to inc))
(defconst org-babel-header-args:R
'((width . :any)
@ -221,7 +220,7 @@ This function is called by `org-babel-execute-src-block'."
(cdr (nth i vars))
(cdr (nth i (cdr (assoc :colname-names params))))
(cdr (nth i (cdr (assoc :rowname-names params)))))))
(org-number-sequence 0 (1- (length vars)))))))
(number-sequence 0 (1- (length vars)))))))
(defun org-babel-R-quote-tsv-field (s)
"Quote field S for export to R."

View File

@ -62,8 +62,6 @@
(declare-function org-id-find-id-in-file "org-id" (id file &optional markerp))
(declare-function org-in-commented-heading-p "org" (&optional no-inheritance))
(declare-function org-narrow-to-subtree "org" ())
(declare-function org-pop-to-buffer-same-window "org-compat"
(&optional buffer-or-name norecord label))
(declare-function org-show-context "org" (&optional key))
(declare-function org-trim "org" (s &optional keep-lead))
@ -105,7 +103,7 @@ the variable."
(m (when file (org-id-find-id-in-file id file 'marker))))
(when (and file m)
(message "file:%S" file)
(org-pop-to-buffer-same-window (marker-buffer m))
(pop-to-buffer-same-window (marker-buffer m))
(goto-char m)
(move-marker m nil)
(org-show-context)

View File

@ -80,8 +80,6 @@
(declare-function org-is-habit-p "org-habit" (&optional pom))
(declare-function org-habit-parse-todo "org-habit" (&optional pom))
(declare-function org-habit-get-priority "org-habit" (habit &optional moment))
(declare-function org-pop-to-buffer-same-window "org-compat"
(&optional buffer-or-name norecord label))
(declare-function org-agenda-columns "org-colview" ())
(declare-function org-add-archive-files "org-archive" (files))
(declare-function org-capture "org-capture" (&optional goto keys))
@ -263,8 +261,8 @@ you can \"misuse\" it to also add other text to the header."
;; Keep custom values for `org-agenda-filter-preset' compatible with
;; the new variable `org-agenda-tag-filter-preset'.
(org-defvaralias 'org-agenda-filter-preset 'org-agenda-tag-filter-preset)
(org-defvaralias 'org-agenda-filter 'org-agenda-tag-filter)
(defvaralias 'org-agenda-filter-preset 'org-agenda-tag-filter-preset)
(defvaralias 'org-agenda-filter 'org-agenda-tag-filter)
(defvar org-agenda-entry-types '(:deadline :scheduled :timestamp :sexp)
"List of types searched for when creating the daily/weekly agenda.
@ -1416,7 +1414,7 @@ boolean search."
:version "24.1"
:type 'boolean)
(org-defvaralias 'org-agenda-search-view-search-words-only
(defvaralias 'org-agenda-search-view-search-words-only
'org-agenda-search-view-always-boolean)
(defcustom org-agenda-search-view-force-full-words nil
@ -1861,7 +1859,7 @@ When this is the symbol `prefix', only remove tags when
(const :tag "Never" nil)
(const :tag "When prefix format contains %T" prefix)))
(org-defvaralias 'org-agenda-remove-tags-when-in-prefix
(defvaralias 'org-agenda-remove-tags-when-in-prefix
'org-agenda-remove-tags)
(defcustom org-agenda-tags-column -80
@ -1872,7 +1870,7 @@ it means that the tags should be flushright to that column. For example,
:group 'org-agenda-line-format
:type 'integer)
(org-defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column)
(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column)
(defcustom org-agenda-fontify-priorities 'cookies
"Non-nil means highlight low and high priorities in agenda.
@ -2039,7 +2037,7 @@ works you probably want to add it to `org-agenda-custom-commands' for good."
(defvar org-agenda-mode-map (make-sparse-keymap)
"Keymap for `org-agenda-mode'.")
(org-defvaralias 'org-agenda-keymap 'org-agenda-mode-map)
(defvaralias 'org-agenda-keymap 'org-agenda-mode-map)
(defvar org-agenda-menu) ; defined later in this file.
(defvar org-agenda-restrict nil) ; defined later in this file.
@ -3632,14 +3630,14 @@ FILTER-ALIST is an alist of filters we need to apply when
(awin (select-window awin))
((not (setq wconf (current-window-configuration))))
((equal org-agenda-window-setup 'current-window)
(org-pop-to-buffer-same-window abuf))
(pop-to-buffer-same-window abuf))
((equal org-agenda-window-setup 'other-window)
(org-switch-to-buffer-other-window abuf))
((equal org-agenda-window-setup 'other-frame)
(switch-to-buffer-other-frame abuf))
((eq org-agenda-window-setup 'only-window)
(delete-other-windows)
(org-pop-to-buffer-same-window abuf))
(pop-to-buffer-same-window abuf))
((equal org-agenda-window-setup 'reorganize-frame)
(delete-other-windows)
(org-switch-to-buffer-other-window abuf)))
@ -3650,7 +3648,7 @@ FILTER-ALIST is an alist of filters we need to apply when
;; Additional test in case agenda is invoked from within agenda
;; buffer via elisp link.
(unless (equal (current-buffer) abuf)
(org-pop-to-buffer-same-window abuf))
(pop-to-buffer-same-window abuf))
(setq org-agenda-pre-window-conf
(or wconf org-agenda-pre-window-conf))))
@ -8644,7 +8642,7 @@ displayed Org file fills the frame."
(buffer (marker-buffer marker))
(pos (marker-position marker)))
(unless buffer (user-error "Trying to switch to non-existent buffer"))
(org-pop-to-buffer-same-window buffer)
(pop-to-buffer-same-window buffer)
(when delete-other-windows (delete-other-windows))
(widen)
(goto-char pos)

View File

@ -55,8 +55,6 @@
(date &optional keep-restriction))
(declare-function org-decrypt-entry "org-crypt" ())
(declare-function org-encrypt-entry "org-crypt" ())
(declare-function org-pop-to-buffer-same-window "org-compat"
(&optional buffer-or-name norecord label))
(declare-function org-table-analyze "org-table" ())
(declare-function org-table-goto-line "org-table" (N))
@ -1407,7 +1405,7 @@ The user is queried for the template."
(unless entry (error "No capture template selected"))
(org-capture-set-plist entry)
(org-capture-set-target-location)
(org-pop-to-buffer-same-window (org-capture-get :buffer))
(pop-to-buffer-same-window (org-capture-get :buffer))
(goto-char (org-capture-get :pos))))
(defun org-capture-get-indirect-buffer (&optional buffer prefix)

View File

@ -28,13 +28,11 @@
;;; Code:
(eval-when-compile
(require 'cl))
(require 'cl-lib)
(require 'org)
(declare-function calendar-iso-to-absolute "cal-iso" (date))
(declare-function notifications-notify "notifications" (&rest params))
(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
(declare-function org-element-property "org-element" (property element))
(declare-function org-element-type "org-element" (element))
(declare-function org-table-goto-line "org-table" (n))
@ -260,7 +258,7 @@ auto Automatically, either `all', or `repeat' for repeating tasks"
(const :tag "All task time" all)
(const :tag "Automatically, `all' or since `repeat'" auto)))
(org-defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text)
(defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text)
(defcustom org-clock-task-overrun-text nil
"Extra mode line text to indicate that the clock is overrun.
The can be nil to indicate that instead of adding text, the clock time
@ -1747,7 +1745,7 @@ With prefix arg SELECT, offer recently clocked tasks for selection."
(setq recent t)
(car org-clock-history))
(t (error "No active or recent clock task")))))
(org-pop-to-buffer-same-window (marker-buffer m))
(pop-to-buffer-same-window (marker-buffer m))
(if (or (< m (point-min)) (> m (point-max))) (widen))
(goto-char m)
(org-show-entry)
@ -2210,7 +2208,7 @@ have priority."
((< (+ (- q 1) shift) 0) ; Shift not in this year.
(let* ((interval (* -1 (+ (- q 1) shift)))
;; Set tmp to ((years to shift) (quarters to shift)).
(tmp (org-floor* interval 4)))
(tmp (cl-floor interval 4)))
;; Due to the use of floor, 0 quarters actually means 4.
(if (= 0 (nth 1 tmp))
(setq shiftedy (- y (nth 0 tmp))

View File

@ -44,12 +44,62 @@
(defalias 'outline-show-children 'show-children)
(defalias 'outline-show-entry 'show-entry)
(defalias 'outline-show-subtree 'show-subtree)
(defalias 'xref-find-definitions 'find-tag))
(defalias 'xref-find-definitions 'find-tag)
(defalias 'format-message 'format))
(eval-when-compile
(when (< emacs-major-version 25)
(defalias 'gui-get-selection 'x-get-selection)))
;;; Obsolete aliases
(define-obsolete-function-alias 'org-activate-mark 'activate-mark)
;;;; XEmacs compatibility, now removed.
(define-obsolete-function-alias 'org-add-hook 'add-hook "Org 9.0")
(define-obsolete-function-alias 'org-decompose-region 'decompose-region "Org 9.0")
(define-obsolete-function-alias 'org-defvaralias 'defvaralias "Org 9.0")
(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "Org 9.0")
(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "Org 9.0")
(define-obsolete-function-alias 'org-float-time 'float-time "Org 9.0")
(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "Org 9.0")
(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "Org 9.0")
(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "Org 9.0")
(define-obsolete-function-alias 'org-looking-back 'looking-back "Org 9.0")
(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-properties "Org 9.0")
(define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0")
(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0")
(defmacro org-re (s)
"Replace posix classes in regular expression."
(declare (debug (form)))
s)
(make-obsolete 'org-re "It is now a no-op. Please remove it altogether." "Org 9.0")
;;;; Functions from cl-lib that Org used to have its own implementation of.
(define-obsolete-function-alias 'org-count 'cl-count "Org 9.0")
(define-obsolete-function-alias 'org-every 'cl-every "Org 9.0")
(define-obsolete-function-alias 'org-find-if 'cl-find-if "Org 9.0")
(define-obsolete-function-alias 'org-reduce 'cl-reduce "Org 9.0")
(define-obsolete-function-alias 'org-remove-if 'cl-remove-if "Org 9.0")
(define-obsolete-function-alias 'org-remove-if-not 'cl-remove-if-not "Org 9.0")
(define-obsolete-function-alias 'org-some 'cl-some "Org 9.0")
(define-obsolete-function-alias 'org-floor* 'cl-floor "Org 9.0")
;;;; Functions available since Emacs 24.3
(define-obsolete-function-alias 'org-buffer-narrowed-p 'buffer-narrowed-p "Org 9.0")
(define-obsolete-function-alias 'org-delete-directory 'delete-directory "Org 9.0")
(define-obsolete-function-alias 'org-number-sequence 'number-sequence "Org 9.0")
(define-obsolete-function-alias 'org-pop-to-buffer-same-window 'pop-to-buffer-same-window "Org 9.0")
(define-obsolete-function-alias 'org-string-match-p 'string-match-p "Org 9.0")
;;;; Variables declared obsolete.
(define-obsolete-variable-alias 'org-hierarchical-checkbox-statistics
'org-checkbox-hierarchical-statistics "Org 8.0")
(define-obsolete-variable-alias 'org-description-max-indent
'org-list-description-max-indent "Org 8.0")
(defun org-compatible-face (inherits specs)
"Make a compatible face specification.
If INHERITS is an existing face and if the Emacs version supports it,
@ -110,39 +160,6 @@ If INHERITS is not given and SPECS is, use SPECS to define the face."
t)))
;;; Emacs/XEmacs compatibility
(eval-and-compile
(defun org-defvaralias (new-alias base-variable &optional docstring)
"Compatibility function for defvaralias.
Don't do the aliasing when `defvaralias' is not bound."
(declare (indent 1))
(when (fboundp 'defvaralias)
(defvaralias new-alias base-variable docstring)))
(when (and (not (boundp 'user-emacs-directory))
(boundp 'user-init-directory))
(org-defvaralias 'user-emacs-directory 'user-init-directory)))
(define-obsolete-function-alias 'org-add-hook 'add-hook "Org 9.0")
(define-obsolete-function-alias 'org-decompose-region 'decompose-region "Org 9.0")
(define-obsolete-function-alias 'org-detach-overlay 'delete-overlay "Org 9.0")
(define-obsolete-function-alias 'org-file-equal-p 'file-equal-p "Org 9.0")
(define-obsolete-function-alias 'org-float-time 'float-time "Org 9.0")
(define-obsolete-function-alias 'org-indent-line-to 'indent-line-to "Org 9.0")
(define-obsolete-function-alias 'org-indent-to-column 'indent-to-column "Org 9.0")
(define-obsolete-function-alias 'org-looking-at-p 'looking-at-p "Org 9.0")
(define-obsolete-function-alias 'org-looking-back 'looking-back "Org 9.0")
(define-obsolete-function-alias 'org-match-string-no-properties 'match-string-properties "Org 9.0")
(define-obsolete-function-alias 'org-propertize 'propertize "Org 9.0")
(define-obsolete-function-alias 'org-select-frame-set-input-focus 'select-frame-set-input-focus "Org 9.0")
(defmacro org-re (s)
"Replace posix classes in regular expression."
(declare (debug (form)))
s)
(make-obsolete 'org-re "It is now a no-op. Please remove it altogether." "Org 9.0")
;;; Miscellaneous functions
(defun org-get-x-clipboard (value)
@ -183,26 +200,6 @@ ignored in this case."
(shrink-window-if-larger-than-buffer window)))
(or window (selected-window)))
(defun org-number-sequence (from &optional to inc)
"Call `number-sequence' or emulate it."
(if (fboundp 'number-sequence)
(number-sequence from to inc)
(if (or (not to) (= from to))
(list from)
(or inc (setq inc 1))
(when (zerop inc) (error "The increment can not be zero"))
(let (seq (n 0) (next from))
(if (> inc 0)
(while (<= next to)
(setq seq (cons next seq)
n (1+ n)
next (+ from (* n inc))))
(while (>= next to)
(setq seq (cons next seq)
n (1+ n)
next (+ from (* n inc)))))
(nreverse seq)))))
;; `set-transient-map' is only in Emacs >= 24.4
(defalias 'org-set-transient-map
(if (fboundp 'set-transient-map)
@ -227,9 +224,6 @@ ignored in this case."
(> (point) (region-beginning)))
(exchange-point-and-mark)))
;;; Old alias for emacs 22 compatibility, now dropped
(define-obsolete-function-alias 'org-activate-mark 'activate-mark)
;;; Invisibility compatibility
(defun org-remove-from-invisibility-spec (arg)
@ -271,14 +265,6 @@ Pass COLUMN and FORCE to `move-to-column'."
string)
(apply 'kill-new string args))
;; `user-error' is only available from 24.2.50 on
(unless (fboundp 'user-error)
(defalias 'user-error 'error))
;; format-message is available only from 25 on
(unless (fboundp 'format-message)
(defalias 'format-message 'format))
;; `font-lock-ensure' is only available from 24.4.50 on
(defalias 'org-font-lock-ensure
(if (fboundp 'font-lock-ensure)
@ -296,48 +282,6 @@ effect, which variables to use depends on the Emacs version."
`(let (pop-up-frames special-display-buffer-names special-display-regexps special-display-function)
,@body)))
(if (fboundp 'string-match-p)
(defalias 'org-string-match-p 'string-match-p)
(defun org-string-match-p (regexp string &optional start)
(save-match-data
(funcall 'string-match regexp string start))))
(defun org-floor* (x &optional y)
"Return a list of the floor of X and the fractional part of X.
With two arguments, return floor and remainder of their quotient."
(let ((q (floor x y)))
(list q (- x (if y (* y q) q)))))
;; `pop-to-buffer-same-window' has been introduced in Emacs 24.1.
(defun org-pop-to-buffer-same-window
(&optional buffer-or-name norecord _label)
"Pop to buffer specified by BUFFER-OR-NAME in the selected window."
(if (fboundp 'pop-to-buffer-same-window)
(funcall
'pop-to-buffer-same-window buffer-or-name norecord)
(funcall 'switch-to-buffer buffer-or-name norecord)))
;; RECURSIVE has been introduced with Emacs 23.2.
;; This is copying and adapted from `tramp-compat-delete-directory'
(defun org-delete-directory (directory &optional recursive)
"Compatibility function for `delete-directory'."
(if (null recursive)
(delete-directory directory)
(condition-case nil
(funcall 'delete-directory directory recursive)
;; This Emacs version does not support the RECURSIVE flag. We
;; use the implementation from Emacs 23.2.
(wrong-number-of-arguments
(setq directory (directory-file-name (expand-file-name directory)))
(if (not (file-symlink-p directory))
(mapc (lambda (file)
(if (eq t (car (file-attributes file)))
(org-delete-directory file recursive)
(delete-file file)))
(directory-files
directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
(delete-directory directory)))))
;;;###autoload
(defmacro org-check-version ()
"Try very hard to provide sensible version strings."
@ -356,13 +300,6 @@ With two arguments, return floor and remainder of their quotient."
(defun org-release () "N/A")
(defun org-git-version () "N/A !!check installation!!"))))))
;; `buffer-narrowed-p' is available for Emacs >=24.3
(defun org-buffer-narrowed-p ()
"Compatibility function for `buffer-narrowed-p'."
(if (fboundp 'buffer-narrowed-p)
(buffer-narrowed-p)
(/= (- (point-max) (point-min)) (buffer-size))))
(defmacro org-with-silent-modifications (&rest body)
(if (fboundp 'with-silent-modifications)
`(with-silent-modifications ,@body)
@ -379,15 +316,6 @@ Implements `define-error' for older emacsen."
(put name 'error-conditions
(copy-sequence (cons name (get 'error 'error-conditions))))))
;;; Functions from cl-lib that Org used to have its own implementation of
(define-obsolete-function-alias 'org-count 'cl-count "Org 9.0")
(define-obsolete-function-alias 'org-every 'cl-every "Org 9.0")
(define-obsolete-function-alias 'org-find-if 'cl-find-if "Org 9.0")
(define-obsolete-function-alias 'org-reduce 'cl-reduce "Org 9.0")
(define-obsolete-function-alias 'org-remove-if 'cl-remove-if "Org 9.0")
(define-obsolete-function-alias 'org-remove-if-not 'cl-remove-if-not "Org 9.0")
(define-obsolete-function-alias 'org-some 'cl-some "Org 9.0")
(provide 'org-compat)
;;; org-compat.el ends here

View File

@ -137,8 +137,6 @@
(require 'org)
(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
(defgroup org-ctags nil
"Options concerning use of ctags within org mode."
:tag "Org-Ctags"
@ -378,7 +376,7 @@ the new file."
(cond
((get-buffer (concat name ".org"))
;; Buffer is already open
(org-pop-to-buffer-same-window (get-buffer (concat name ".org"))))
(pop-to-buffer-same-window (get-buffer (concat name ".org"))))
((file-exists-p filename)
;; File exists but is not open --> open it
(message "Opening existing org file `%S'..."

View File

@ -43,7 +43,7 @@
(eshell-buffer-name (car buffer-and-command))
(command (cadr buffer-and-command)))
(if (get-buffer eshell-buffer-name)
(org-pop-to-buffer-same-window eshell-buffer-name)
(pop-to-buffer-same-window eshell-buffer-name)
(eshell))
(goto-char (point-max))
(eshell-kill-input)

View File

@ -440,7 +440,7 @@ it can be a list structured like an entry in `org-feed-alist'."
(if (stringp feed) (setq feed (assoc feed org-feed-alist)))
(unless feed
(error "No such feed in `org-feed-alist"))
(org-pop-to-buffer-same-window
(pop-to-buffer-same-window
(org-feed-update feed 'retrieve-only))
(goto-char (point-min)))

View File

@ -44,7 +44,7 @@
;; Customization variables
(org-defvaralias 'org-usenet-links-prefer-google 'org-gnus-prefer-web-links)
(defvaralias 'org-usenet-links-prefer-google 'org-gnus-prefer-web-links)
(defcustom org-gnus-prefer-web-links nil
"If non-nil, `org-store-link' creates web links to Google groups or Gmane.

View File

@ -73,8 +73,6 @@
(require 'org)
(declare-function message-make-fqdn "message" ())
(declare-function org-pop-to-buffer-same-window
"org-compat" (&optional buffer-or-name norecord label))
;;; Customization
@ -295,7 +293,7 @@ Move the cursor to that entry in that buffer."
(let ((m (org-id-find id 'marker)))
(unless m
(error "Cannot find entry with ID \"%s\"" id))
(org-pop-to-buffer-same-window (marker-buffer m))
(pop-to-buffer-same-window (marker-buffer m))
(goto-char m)
(move-marker m nil)
(org-show-context)))

View File

@ -59,8 +59,6 @@
(declare-function erc-server-buffer "erc" ())
(declare-function erc-get-server-nickname-list "erc" ())
(declare-function erc-cmd-JOIN "erc" (channel &optional key))
(declare-function org-pop-to-buffer-same-window
"org-compat" (&optional buffer-or-name norecord label))
(defvar org-irc-client 'erc
"The IRC client to act on.")
@ -231,7 +229,7 @@ default."
(throw 'found x))))))
(if chan-buf
(progn
(org-pop-to-buffer-same-window chan-buf)
(pop-to-buffer-same-window chan-buf)
;; if we got a nick, and they're in the chan,
;; then start a chat with them
(let ((nick (pop link)))
@ -242,9 +240,9 @@ default."
(insert (concat nick ": ")))
(error "%s not found in %s" nick chan-name)))))
(progn
(org-pop-to-buffer-same-window server-buffer)
(pop-to-buffer-same-window server-buffer)
(erc-cmd-JOIN chan-name))))
(org-pop-to-buffer-same-window server-buffer)))
(pop-to-buffer-same-window server-buffer)))
;; no server match, make new connection
(erc-select :server server :port port))))

View File

@ -322,8 +322,6 @@ This hook runs even if checkbox rule in
implement alternative ways of collecting statistics
information.")
(define-obsolete-variable-alias 'org-hierarchical-checkbox-statistics
'org-checkbox-hierarchical-statistics "24.4") ;; Since 8.0
(defcustom org-checkbox-hierarchical-statistics t
"Non-nil means checkbox statistics counts only the state of direct children.
When nil, all boxes below the cookie are counted.
@ -332,8 +330,6 @@ with the word \"recursive\" in the value."
:group 'org-plain-lists
:type 'boolean)
(org-defvaralias 'org-description-max-indent
'org-list-description-max-indent) ;; Since 8.0
(defcustom org-list-description-max-indent 20
"Maximum indentation for the second line of a description list.
When the indentation would be larger than this, it will become

View File

@ -45,8 +45,6 @@
(string (decode-char 'ucs c)))))
(declare-function org-add-props "org-compat" (string plist &rest props))
(declare-function org-string-match-p "org-compat"
(regexp string &optional start))
(defmacro org-with-gensyms (symbols &rest body)
(declare (debug (sexp body)) (indent 1))
@ -73,7 +71,7 @@
"Return S if S is a string containing a non-blank character.
Otherwise, return nil."
(and (stringp s)
(org-string-match-p "[^ \r\t\n]" s)
(string-match-p "[^ \r\t\n]" s)
s))
(defun org-not-nil (v)

View File

@ -895,7 +895,7 @@ If BEG and END are given, only do this in that region."
(buffer-file-name))))))
(error (setq org-mobile-error msg))))
(when org-mobile-error
(org-pop-to-buffer-same-window (marker-buffer marker))
(pop-to-buffer-same-window (marker-buffer marker))
(goto-char marker)
(incf cnt-error)
(insert (if (stringp (nth 1 org-mobile-error))

View File

@ -48,8 +48,6 @@
(declare-function org-footnote-goto-definition "org-footnote"
(label &optional location))
(declare-function org-get-indentation "org" (&optional line))
(declare-function org-pop-to-buffer-same-window "org-compat"
(&optional buffer-or-name norecord label))
(declare-function org-switch-to-buffer-other-window "org" (&rest args))
(declare-function org-trim "org" (s &optional keep-lead))
@ -694,7 +692,7 @@ If BUFFER is non-nil, test it instead."
(defun org-src-switch-to-buffer (buffer context)
(case org-src-window-setup
(current-window (org-pop-to-buffer-same-window buffer))
(current-window (pop-to-buffer-same-window buffer))
(other-window
(switch-to-buffer-other-window buffer))
(other-frame
@ -705,7 +703,7 @@ If BUFFER is non-nil, test it instead."
(delete-frame frame)))
(save
(kill-buffer (current-buffer))
(org-pop-to-buffer-same-window buffer))
(pop-to-buffer-same-window buffer))
(t (switch-to-buffer-other-frame buffer))))
(reorganize-frame
(when (eq context 'edit) (delete-other-windows))
@ -715,7 +713,7 @@ If BUFFER is non-nil, test it instead."
(t
(message "Invalid value %s for `org-src-window-setup'"
org-src-window-setup)
(org-pop-to-buffer-same-window buffer))))
(pop-to-buffer-same-window buffer))))
(defun org-edit-footnote-reference ()
"Edit definition of footnote reference at point."

View File

@ -150,7 +150,6 @@ Stars are put in group 1 and the trimmed body in group 2.")
(declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
(declare-function org-inlinetask-toggle-visibility "org-inlinetask" ())
(declare-function org-plot/gnuplot "org-plot" (&optional params))
(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
(declare-function org-table-align "org-table" ())
(declare-function org-table-begin "org-table" (&optional table-type))
(declare-function org-table-beginning-of-field "org-table" (&optional n))
@ -1069,7 +1068,7 @@ it work for ESC."
:group 'org-startup
:type 'boolean)
(org-defvaralias 'org-CUA-compatible 'org-replace-disputed-keys)
(defvaralias 'org-CUA-compatible 'org-replace-disputed-keys)
(defcustom org-disputed-keys
'(([(shift up)] . [(meta p)])
@ -1493,7 +1492,7 @@ This may also be a cons cell where the behavior for `C-a' and
(const :tag "off" nil)
(const :tag "on: before tags first" t)
(const :tag "reversed: after tags first" reversed)))))
(org-defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)
(defvaralias 'org-special-ctrl-a 'org-special-ctrl-a/e)
(defcustom org-special-ctrl-k nil
"Non-nil means `C-k' will behave specially in headlines.
@ -2940,7 +2939,7 @@ function `org-log-into-drawer' instead."
(const :tag "LOGBOOK" t)
(string :tag "Other")))
(org-defvaralias 'org-log-state-notes-into-drawer 'org-log-into-drawer)
(defvaralias 'org-log-state-notes-into-drawer 'org-log-into-drawer)
(defun org-log-into-drawer ()
"Name of the log drawer, as a string, or nil.
@ -3382,7 +3381,7 @@ minibuffer will also be active, and you can simply enter the date as well.
When nil, only the minibuffer will be available."
:group 'org-time
:type 'boolean)
(org-defvaralias 'org-popup-calendar-for-date-prompt
(defvaralias 'org-popup-calendar-for-date-prompt
'org-read-date-popup-calendar)
(make-obsolete-variable
@ -3856,7 +3855,7 @@ scope."
(const :tag "Agenda Archives" agenda-archives)
(repeat :inline t (file))))
(org-defvaralias 'org-agenda-multi-occur-extra-files
(defvaralias 'org-agenda-multi-occur-extra-files
'org-agenda-text-search-extra-files)
(defcustom org-agenda-skip-unavailable-files nil
@ -7527,7 +7526,7 @@ or nil."
(save-window-excursion
(delete-other-windows)
(and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
(org-pop-to-buffer-same-window
(pop-to-buffer-same-window
(condition-case nil
(make-indirect-buffer (current-buffer) "*org-goto*")
(error (make-indirect-buffer (current-buffer) "*org-goto*"))))
@ -7674,7 +7673,7 @@ frame is not changed."
(and arg (eq org-indirect-buffer-display 'dedicated-frame)))
(select-frame (make-frame))
(delete-other-windows)
(org-pop-to-buffer-same-window ibuf)
(pop-to-buffer-same-window ibuf)
(org-set-frame-title heading))
((eq org-indirect-buffer-display 'dedicated-frame)
(raise-frame
@ -7683,10 +7682,10 @@ frame is not changed."
org-indirect-dedicated-frame)
(setq org-indirect-dedicated-frame (make-frame)))))
(delete-other-windows)
(org-pop-to-buffer-same-window ibuf)
(pop-to-buffer-same-window ibuf)
(org-set-frame-title (concat "Indirect: " heading)))
((eq org-indirect-buffer-display 'current-window)
(org-pop-to-buffer-same-window ibuf))
(pop-to-buffer-same-window ibuf))
((eq org-indirect-buffer-display 'other-window)
(pop-to-buffer ibuf))
(t (error "Invalid value")))
@ -11275,7 +11274,7 @@ onto the ring."
(setq p org-mark-ring))
(setq org-mark-ring-last-goto p)
(setq m (car p))
(org-pop-to-buffer-same-window (marker-buffer m))
(pop-to-buffer-same-window (marker-buffer m))
(goto-char m)
(when (or (outline-invisible-p) (org-invisible-p2)) (org-show-context 'mark-goto))))
@ -11957,7 +11956,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(find-file-noselect file)))
(if (and arg (not (equal arg 3)))
(progn
(org-pop-to-buffer-same-window nbuf)
(pop-to-buffer-same-window nbuf)
(goto-char pos)
(org-show-context 'org-goto))
(if regionp
@ -13732,7 +13731,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
(setq org-log-note-window-configuration (current-window-configuration))
(delete-other-windows)
(move-marker org-log-note-return-to (point))
(org-pop-to-buffer-same-window (marker-buffer org-log-note-marker))
(pop-to-buffer-same-window (marker-buffer org-log-note-marker))
(goto-char org-log-note-marker)
(org-switch-to-buffer-other-window "*Org Note*")
(erase-buffer)
@ -18519,7 +18518,7 @@ changes from another. I believe the procedure must be like this:
(dolist (b (buffer-list))
(when (and (with-current-buffer b (derived-mode-p 'org-mode))
(with-current-buffer b buffer-file-name))
(org-pop-to-buffer-same-window b)
(pop-to-buffer-same-window b)
(revert-buffer t 'no-confirm)))
(when (and (featurep 'org-id) org-id-track-globally)
(org-id-locations-load)))))
@ -18538,7 +18537,7 @@ prefix, restrict available buffers to agenda files."
(let ((blist (org-buffer-list
(cond ((equal arg '(4)) 'files)
((equal arg '(16)) 'agenda)))))
(org-pop-to-buffer-same-window
(pop-to-buffer-same-window
(completing-read "Org buffer: "
(mapcar #'list (mapcar #'buffer-name blist))
nil t))))
@ -18698,7 +18697,7 @@ If the current buffer does not, find the first agenda file."
(while (and (setq file (pop files))
(not (equal (file-truename file) tcf)))))
(find-file (car (or files fs)))
(when (buffer-base-buffer) (org-pop-to-buffer-same-window (buffer-base-buffer)))))
(when (buffer-base-buffer) (pop-to-buffer-same-window (buffer-base-buffer)))))
(defun org-agenda-file-to-front (&optional to-end)
"Move/add the current file to the top of the agenda file list.
@ -21960,7 +21959,7 @@ information about your Org-mode version and configuration."
(org-version nil 'full)
(let (list)
(save-window-excursion
(org-pop-to-buffer-same-window (get-buffer-create "*Warn about privacy*"))
(pop-to-buffer-same-window (get-buffer-create "*Warn about privacy*"))
(delete-other-windows)
(erase-buffer)
(insert "You are about to submit a bug report to the Org-mode mailing list.
@ -22183,7 +22182,7 @@ If DELETE is non-nil, delete all those overlays."
(if (and marker (marker-buffer marker)
(buffer-live-p (marker-buffer marker)))
(progn
(org-pop-to-buffer-same-window (marker-buffer marker))
(pop-to-buffer-same-window (marker-buffer marker))
(when (or (> marker (point-max)) (< marker (point-min)))
(widen))
(goto-char marker)

View File

@ -41,8 +41,6 @@
(declare-function org-id-find-id-file "org-id" (id))
(declare-function htmlize-region "ext:htmlize" (beg end))
(declare-function org-pop-to-buffer-same-window
"org-compat" (&optional buffer-or-name norecord label))
(declare-function mm-url-decode-entities "mm-url" ())
(defvar htmlize-css-name-prefix)
@ -1708,7 +1706,7 @@ produce code that uses these same face definitions."
(when (and (symbolp f) (or (not i) (not (listp i))))
(insert (org-add-props (copy-sequence "1") nil 'face f))))
(htmlize-region (point-min) (point-max))))
(org-pop-to-buffer-same-window "*html*")
(pop-to-buffer-same-window "*html*")
(goto-char (point-min))
(if (re-search-forward "<style" nil t)
(delete-region (point-min) (match-beginning 0)))