emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: Compilation warnings and a test failure
Date: Thu, 20 Dec 2012 10:23:04 +0100	[thread overview]
Message-ID: <87obhpw007.fsf@Rainer.invalid> (raw)
In-Reply-To: 878v8th8a4.fsf@bzg.ath.cx

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

Bastien writes:
>> | In org-get-location:
>> | org.el:6989:10:Warning: `special-display-function' is an obsolete variable (as
>> |     of 24.3); use `display-buffer-alist' instead.
>> | org.el:6988:10:Warning: `special-display-regexps' is an obsolete variable (as
>> |     of 24.3); use `display-buffer-alist' instead.
>> | org.el:6987:10:Warning: `special-display-buffer-names' is an obsolete variable
>> |     (as of 24.3); use `display-buffer-alist' instead.
>
> These are not trivial to fix.  If someone wants to have a look,
> please go ahead.

Something like this maybe?


[-- Attachment #2: 0001-org-compat-new-macro-org-suppress-popups.patch --]
[-- Type: text/x-patch, Size: 5518 bytes --]

From 089903a29936f00d76fd7bf082603c2dff242a5c Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Thu, 20 Dec 2012 10:18:02 +0100
Subject: [PATCH] org-compat: new macro org-suppress-popups
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/org-compat.el (org-suppress-popups): New wrapper macro,
  let-binds the correct variables to suppress popup windows depending
  on Emacs version.

* lisp/org.el (org-get-location, org-switch-to-buffer-other-window):
  Use the wrapper `org-suppress-popups´ to let-bind variables that are
  version-dependent.
---
 lisp/org-compat.el |  7 +++++
 lisp/org.el        | 86 ++++++++++++++++++++++++++----------------------------
 2 files changed, 48 insertions(+), 45 deletions(-)

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 1f330b1..e8983f0 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -375,6 +375,13 @@ (defun org-float-time (&optional time)
 (unless (fboundp 'user-error)
   (defalias 'user-error 'error))
 
+(defmacro org-suppress-popups (&rest body)
+    (if (org-version-check "24.2.50" "" :predicate)
+	`(let (pop-up-frames display-buffer-alist)
+	   ,@body)
+      `(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)
diff --git a/lisp/org.el b/lisp/org.el
index e93356c..67fb8ed 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6982,48 +6982,45 @@ (defun org-get-location (buf help)
   "Let the user select a location in the Org-mode buffer BUF.
 This function uses a recursive edit.  It returns the selected position
 or nil."
-  (let ((isearch-mode-map org-goto-local-auto-isearch-map)
-	(isearch-hide-immediately nil)
-	(isearch-search-fun-function
-	 (lambda () 'org-goto-local-search-headings))
-	(org-goto-selected-point org-goto-exit-command)
-	(pop-up-frames nil)
-	(special-display-buffer-names nil)
-	(special-display-regexps nil)
-	(special-display-function nil))
-    (save-excursion
-      (save-window-excursion
-	(delete-other-windows)
-	(and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
-	(org-pop-to-buffer-same-window
-	 (condition-case nil
-	     (make-indirect-buffer (current-buffer) "*org-goto*")
-	   (error (make-indirect-buffer (current-buffer) "*org-goto*"))))
-	(with-output-to-temp-buffer "*Help*"
-	  (princ help))
-	(org-fit-window-to-buffer (get-buffer-window "*Help*"))
-	(setq buffer-read-only nil)
-	(let ((org-startup-truncated t)
-	      (org-startup-folded nil)
-	      (org-startup-align-all-tables nil))
-	  (org-mode)
-	  (org-overview))
-	(setq buffer-read-only t)
-	(if (and (boundp 'org-goto-start-pos)
-		 (integer-or-marker-p org-goto-start-pos))
-	    (let ((org-show-hierarchy-above t)
-		  (org-show-siblings t)
-		  (org-show-following-heading t))
-	      (goto-char org-goto-start-pos)
-	      (and (outline-invisible-p) (org-show-context)))
-	  (goto-char (point-min)))
-	(let (org-special-ctrl-a/e) (org-beginning-of-line))
-	(message "Select location and press RET")
-	(use-local-map org-goto-map)
-	(recursive-edit)
-	))
-    (kill-buffer "*org-goto*")
-    (cons org-goto-selected-point org-goto-exit-command)))
+  (org-suppress-popups
+   (let ((isearch-mode-map org-goto-local-auto-isearch-map)
+	 (isearch-hide-immediately nil)
+	 (isearch-search-fun-function
+	  (lambda () 'org-goto-local-search-headings))
+	 (org-goto-selected-point org-goto-exit-command))
+     (save-excursion
+       (save-window-excursion
+	 (delete-other-windows)
+	 (and (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
+	 (org-pop-to-buffer-same-window
+	  (condition-case nil
+	      (make-indirect-buffer (current-buffer) "*org-goto*")
+	    (error (make-indirect-buffer (current-buffer) "*org-goto*"))))
+	 (with-output-to-temp-buffer "*Help*"
+	   (princ help))
+	 (org-fit-window-to-buffer (get-buffer-window "*Help*"))
+	 (setq buffer-read-only nil)
+	 (let ((org-startup-truncated t)
+	       (org-startup-folded nil)
+	       (org-startup-align-all-tables nil))
+	   (org-mode)
+	   (org-overview))
+	 (setq buffer-read-only t)
+	 (if (and (boundp 'org-goto-start-pos)
+		  (integer-or-marker-p org-goto-start-pos))
+	     (let ((org-show-hierarchy-above t)
+		   (org-show-siblings t)
+		   (org-show-following-heading t))
+	       (goto-char org-goto-start-pos)
+	       (and (outline-invisible-p) (org-show-context)))
+	   (goto-char (point-min)))
+	 (let (org-special-ctrl-a/e) (org-beginning-of-line))
+	 (message "Select location and press RET")
+	 (use-local-map org-goto-map)
+	 (recursive-edit)
+	 ))
+     (kill-buffer "*org-goto*")
+     (cons org-goto-selected-point org-goto-exit-command))))
 
 (defvar org-goto-local-auto-isearch-map (make-sparse-keymap))
 (set-keymap-parent org-goto-local-auto-isearch-map isearch-mode-map)
@@ -20967,9 +20964,8 @@ (defun org-switch-to-buffer-other-window (&rest args)
   "Switch to buffer in a second window on the current frame.
 In particular, do not allow pop-up frames.
 Returns the newly created buffer."
-  (let (pop-up-frames special-display-buffer-names special-display-regexps
-		      special-display-function)
-    (apply 'switch-to-buffer-other-window args)))
+  (org-suppress-popups
+   (apply 'switch-to-buffer-other-window args)))
 
 (defun org-combine-plists (&rest plists)
   "Create a single property list from all plists in PLISTS.
-- 
1.8.0.1


[-- Attachment #3: Type: text/plain, Size: 574 bytes --]



>> | In org-shiftcontrolup:
>> | org.el:19234:11:Warning: org-clock-timestamps-up called with 1 argument, but
>> |     accepts only 0
>> | 
>> | In org-shiftcontroldown:
>> | org.el:19244:11:Warning: org-clock-timestamps-down called with 1 argument, but
>> |     accepts only 0
>
> Fixed, thanks.
[...]
> Same as above.
>
>> and a test failure:
>
> Fixed too, thanks!

Confirmed.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

  reply	other threads:[~2012-12-20  9:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 16:46 Compilation warnings and a test failure Nick Dokos
2012-12-20  0:33 ` Bastien
2012-12-20  9:23   ` Achim Gratz [this message]
2012-12-20 10:41     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obhpw007.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).