|
@@ -106,6 +106,10 @@
|
|
|
(declare-function org-inlinetask-at-task-p "org-inlinetask" ())
|
|
|
(declare-function org-inlinetask-outline-regexp "org-inlinetask" ())
|
|
|
(declare-function org-inlinetask-toggle-visibility "org-inlinetask" ())
|
|
|
+(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label))
|
|
|
+(declare-function org-at-clock-log-p "org-clock" ())
|
|
|
+(declare-function org-clock-timestamps-up "org-clock" ())
|
|
|
+(declare-function org-clock-timestamps-down "org-clock" ())
|
|
|
|
|
|
;; babel
|
|
|
(require 'ob)
|
|
@@ -6657,7 +6661,7 @@ or nil."
|
|
|
(save-window-excursion
|
|
|
(delete-other-windows)
|
|
|
(and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
|
|
|
- (switch-to-buffer
|
|
|
+ (org-pop-to-buffer-same-window
|
|
|
(condition-case nil
|
|
|
(make-indirect-buffer (current-buffer) "*org-goto*")
|
|
|
(error (make-indirect-buffer (current-buffer) "*org-goto*"))))
|
|
@@ -6795,7 +6799,7 @@ frame is not changed."
|
|
|
(and arg (eq org-indirect-buffer-display 'dedicated-frame)))
|
|
|
(select-frame (make-frame))
|
|
|
(delete-other-windows)
|
|
|
- (switch-to-buffer ibuf)
|
|
|
+ (org-pop-to-buffer-same-window ibuf)
|
|
|
(org-set-frame-title heading))
|
|
|
((eq org-indirect-buffer-display 'dedicated-frame)
|
|
|
(raise-frame
|
|
@@ -6804,10 +6808,10 @@ frame is not changed."
|
|
|
org-indirect-dedicated-frame)
|
|
|
(setq org-indirect-dedicated-frame (make-frame)))))
|
|
|
(delete-other-windows)
|
|
|
- (switch-to-buffer ibuf)
|
|
|
+ (org-pop-to-buffer-same-window ibuf)
|
|
|
(org-set-frame-title (concat "Indirect: " heading)))
|
|
|
((eq org-indirect-buffer-display 'current-window)
|
|
|
- (switch-to-buffer ibuf))
|
|
|
+ (org-pop-to-buffer-same-window ibuf))
|
|
|
((eq org-indirect-buffer-display 'other-window)
|
|
|
(pop-to-buffer ibuf))
|
|
|
(t (error "Invalid value")))
|
|
@@ -9830,7 +9834,7 @@ onto the ring."
|
|
|
(setq p org-mark-ring))
|
|
|
(setq org-mark-ring-last-goto p)
|
|
|
(setq m (car p))
|
|
|
- (switch-to-buffer (marker-buffer m))
|
|
|
+ (org-pop-to-buffer-same-window (marker-buffer m))
|
|
|
(goto-char m)
|
|
|
(if (or (outline-invisible-p) (org-invisible-p2)) (org-show-context 'mark-goto))))
|
|
|
|
|
@@ -10425,7 +10429,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
|
|
|
(find-file-noselect file)))
|
|
|
(if goto
|
|
|
(progn
|
|
|
- (switch-to-buffer nbuf)
|
|
|
+ (org-pop-to-buffer-same-window nbuf)
|
|
|
(goto-char pos)
|
|
|
(org-show-context 'org-goto))
|
|
|
(if regionp
|
|
@@ -11989,7 +11993,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))
|
|
|
- (switch-to-buffer (marker-buffer org-log-note-marker))
|
|
|
+ (org-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)
|
|
@@ -14129,6 +14133,7 @@ This is computed according to `org-property-set-functions-alist'."
|
|
|
cur
|
|
|
val)))
|
|
|
|
|
|
+(defvar org-last-set-property nil)
|
|
|
(defun org-read-property-name ()
|
|
|
"Read a property name."
|
|
|
(let* ((completion-ignore-case t)
|
|
@@ -14155,7 +14160,6 @@ This is computed according to `org-property-set-functions-alist'."
|
|
|
keys)))
|
|
|
property))))
|
|
|
|
|
|
-(defvar org-last-set-property nil)
|
|
|
(defun org-set-property (property value)
|
|
|
"In the current entry, set PROPERTY to VALUE.
|
|
|
When called interactively, this will prompt for a property name, offering
|
|
@@ -15804,7 +15808,7 @@ changes from another. I believe the procedure must be like this:
|
|
|
(lambda (b)
|
|
|
(when (and (with-current-buffer b (org-mode-p))
|
|
|
(with-current-buffer b buffer-file-name))
|
|
|
- (switch-to-buffer b)
|
|
|
+ (org-pop-to-buffer-same-window b)
|
|
|
(revert-buffer t 'no-confirm)))
|
|
|
(buffer-list))
|
|
|
(when (and (featurep 'org-id) org-id-track-globally)
|
|
@@ -15828,7 +15832,7 @@ Set `org-completion-use-ido' to make it use ido instead."
|
|
|
(org-completion-use-ido org-completion-use-ido))
|
|
|
(unless (or org-completion-use-ido org-completion-use-iswitchb)
|
|
|
(setq org-completion-use-iswitchb t))
|
|
|
- (switch-to-buffer
|
|
|
+ (org-pop-to-buffer-same-window
|
|
|
(org-icompleting-read "Org buffer: "
|
|
|
(mapcar 'list (mapcar 'buffer-name blist))
|
|
|
nil t))))
|
|
@@ -15995,7 +15999,7 @@ If the current buffer does not, find the first agenda file."
|
|
|
(find-file (car files))
|
|
|
(throw 'exit t))))
|
|
|
(find-file (car fs)))
|
|
|
- (if (buffer-base-buffer) (switch-to-buffer (buffer-base-buffer)))))
|
|
|
+ (if (buffer-base-buffer) (org-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.
|
|
@@ -18396,7 +18400,7 @@ information about your Org-mode version and configuration."
|
|
|
(org-version)
|
|
|
(let (list)
|
|
|
(save-window-excursion
|
|
|
- (switch-to-buffer (get-buffer-create "*Warn about privacy*"))
|
|
|
+ (org-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.
|
|
@@ -18593,7 +18597,7 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
|
|
|
(if (and marker (marker-buffer marker)
|
|
|
(buffer-live-p (marker-buffer marker)))
|
|
|
(progn
|
|
|
- (switch-to-buffer (marker-buffer marker))
|
|
|
+ (org-pop-to-buffer-same-window (marker-buffer marker))
|
|
|
(if (or (> marker (point-max)) (< marker (point-min)))
|
|
|
(widen))
|
|
|
(goto-char marker)
|