From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#8856: 24.0.50; regression: special-display-frame is no longer dedicated Date: Fri, 24 Jun 2011 14:21:31 -0700 Message-ID: <90A40DD7F1B14BC1BE282ADB68D57511@us.oracle.com> References: <853BDEF1AA9646ACB90724066E1A5951@us.oracle.com><4DF65024.20305@gmx.at><0C191F638279437BADFCC697A5389F9E@us.oracle.com><4DF726A1.7020804@gmx.at><8E7452317D5B4FD183FD24E0FAA14F6F@us.oracle.com><4DFB6BBF.3080504@gmx.at><6FAF5DFD0E094823A512C3E0E87B6DF5@us.oracle.com><4DFE09A7.10500@gmx.at><0137606B527A48C69E3D6C704C5C6595@us.oracle.com><4DFF1709.3010409@gmx.at><309F7428711D4BEBB6063C60808D8069@us.oracle.com><4E00C54C.5080108@gmx.at> <7AF0B637CAE14034973FBCC658AFEBD9@us.oracle.com> <31769215C0FF4E1E89F9F641C5843E91@us.oracle.com> <4E033CBA.1050700@gmx.at> <4E037708.2000205@gmx.at> <4E045081.3020009@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0071_01CC327A.0455C2F0" X-Trace: dough.gmane.org 1308950553 25360 80.91.229.12 (24 Jun 2011 21:22:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2011 21:22:33 +0000 (UTC) Cc: 8856@debbugs.gnu.org To: "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 23:22:28 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDpc-0005OV-1T for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 23:22:28 +0200 Original-Received: from localhost ([::1]:37197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDpa-0003UB-IP for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 17:22:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55354) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDpE-0003TN-U0 for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaDpD-0004f3-0u for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:22:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaDpC-0004ey-Nq for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2011 17:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QaDpC-0005tN-6K; Fri, 24 Jun 2011 17:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2011 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8856 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8856-submit@debbugs.gnu.org id=B8856.130895050822629 (code B ref 8856); Fri, 24 Jun 2011 21:22:02 +0000 Original-Received: (at 8856) by debbugs.gnu.org; 24 Jun 2011 21:21:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDox-0005sw-Lr for submit@debbugs.gnu.org; Fri, 24 Jun 2011 17:21:48 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QaDou-0005sj-8B for 8856@debbugs.gnu.org; Fri, 24 Jun 2011 17:21:45 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet10.oracle.com (Switch-3.4.4/Switch-3.4.2) with ESMTP id p5OLLaLQ005187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 24 Jun 2011 21:21:38 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p5OLLZoS021292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Jun 2011 21:21:36 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p5OLLUmZ032411; Fri, 24 Jun 2011 16:21:30 -0500 Original-Received: from dradamslap1 (/10.159.59.236) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 24 Jun 2011 14:21:29 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4E045081.3020009@gmx.at> Thread-Index: AcwyTDCHzo+IDuUWT7uetViV0s1W3QAYOT7g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4E04FFE2.005D:SCFMA922111,ss=1,re=-6.300,fgs=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 24 Jun 2011 17:22:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47447 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0071_01CC327A.0455C2F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Martin, OK, I believe I've located the problem. Sorry for all of the confusion. However, this is not necessarily simple, and you will need to load more in order to see it. I spent a lot of time on this today, but I cannot easily simplify things more. I think you will need to look at it first, and then we'll see what we can do together to focus in more on the problem. But I suspect that just by looking at the problematic part of the code you will be able to offer a suggestion that will fix things. Hope so. I call `display-buffer' with the old calling sequence, and that, I imagine, is the problem. With a little luck you will be able to let me know what the correction should be, and that will take care of things. You might be able to do that without bothering to test at all - see the end of this message. But I suspect it might help you to see what happens, even so. I have tested this with Emacs 23.3 and with your latest window.el (Emacs 24 build from 6/20). Here is the startup. File throw-10.el is attached. It loads Icicles. runemacs.exe -Q --debug-init -l "window-2011-06-23a-MARTIN.el" -l "throw-10.el" -f "1on1-emacs" (For Emacs 23, the startup is the same, but without the -l of your window.el file.) Once Emacs is started, you can test as before: `M-x f TAB o'. But to see the problem you need to be in Icicle mode, so do this first: `M-x icy-mode' (toggles the mode). You can thus test with and without Icicle mode to see the difference. With Emacs 23, both in and out of Icicle mode work. With your code it works only when not in Icicle mode. -- You will need to download all of the Icicles source files for the test. The attached file, throw-10.el, loads them all, but it also then simplifies the part of the code that I think is leading to the problem. So the code you actually need to look at is, I think, quite focused. These are the Icicles files, and the place to get them: http://www.emacswiki.org/cgi-bin/wiki?action=index;match=%5C.(el%7Ctar)(%5C.gz)% 3F%24 icicles-mac.el icicles-face.el icicles-opt.el icicles-var.el icicles-fn.el icicles-mcmd.el icicles-cmd1.el icicles-cmd2.el icicles-mode.el icicles.el The code to focus on is, I believe, in test-10.el, function `icicle-display-candidates-in-Completions'. (This function is called a lot, in many Icicles contexts.) This is the part of the code that I think is problematic - marked with a `@@@@@@@' comment: (let ((comp-buf (get-buffer-create "*Completions*"))) (unless (get-buffer-window comp-buf 'visible) (save-selected-window (display-buffer comp-buf t 0) ; <== the problem, no doubt (deactivate-mark)))) This calls `display-buffer', but it uses the old calling sequence, which I'm guessing is the problem. The point of this code is just to visit display the buffer and deactivate the mark there. Again, sorry for the amount of work. Hoping this will help. Thx - Drew ------=_NextPart_000_0071_01CC327A.0455C2F0 Content-Type: application/octet-stream; name="throw-10.el" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="throw-10.el" (setq debug-on-error t)=0A= =0A= (load-file "c:/drews-lisp-20/icicles-mac.el")=0A= (load-file "c:/drews-lisp-20/icicles-face.el")=0A= (load-file "c:/drews-lisp-20/icicles-opt.el")=0A= (load-file "c:/drews-lisp-20/icicles-var.el")=0A= (load-file "c:/drews-lisp-20/icicles-fn.el")=0A= (load-file "c:/drews-lisp-20/icicles-mcmd.el")=0A= (load-file "c:/drews-lisp-20/icicles-cmd1.el")=0A= (load-file "c:/drews-lisp-20/icicles-cmd2.el")=0A= (load-file "c:/drews-lisp-20/icicles-mode.el")=0A= (load-file "c:/drews-lisp-20/icicles.el")=0A= =0A= ;; (when (fboundp 'icicle-mode) (icicle-mode 1))=0A= =0A= ;; Pared down.=0A= (defun icicle-display-candidates-in-Completions (&optional reverse-p = no-display-p)=0A= ""=0A= (setq icicle-incremental-completion-p = icicle-incremental-completion-flag)=0A= (when (and (eq t icicle-incremental-completion-p) (get-buffer-window = "*Completions*" 0))=0A= (setq icicle-incremental-completion-p 'always))=0A= (let ((nb-cands (length icicle-completion-candidates)))=0A= (cond ((eq no-display-p 'no-msg)) ; No-op.=0A= (no-display-p) ; Simplified for test.=0A= ((null icicle-completion-candidates) ; Simplified for test.=0A= (save-selected-window (icicle-remove-Completions-window)))=0A= (t=0A= ;; @@@ THIS SEEMS TO BE WHERE THE PROBLEM IS = @@@@@@@@@@@@@@@@@@@=0A= (when (consp icicle-completion-candidates)=0A= (let ((comp-buf (get-buffer-create "*Completions*")))=0A= (unless (get-buffer-window comp-buf 'visible)=0A= ;; Remove any leftover mouse selection.=0A= (save-selected-window=0A= (display-buffer comp-buf t 0) ; <=3D=3D the problem, = no doubt=0A= (deactivate-mark)))))=0A= ;; = @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=0A= =0A= (with-output-to-temp-buffer "*Completions*"=0A= ;; The `condition-case' shouldn't be needed, but it = prevents an=0A= ;; "End of buffer" message from `display-completion-list' = on Emacs 22.=0A= (condition-case nil=0A= (display-completion-list=0A= (if reverse-p (reverse icicle-completion-candidates)=0A= icicle-completion-candidates))=0A= (error nil)))=0A= (message nil)))))=0A= =0A= ;; Make these functions into no-ops, to simplify things a bit.=0A= (defun icicle-activate-mark () "" nil)=0A= (defun icicle-cancel-Help-redirection () "" nil)=0A= (defun icicle-restore-region-face () "" nil)=0A= (defun icicle-unhighlight-lighter () "" nil)=0A= (defun icicle-fit-completions-window (&optional arg) "" nil)=0A= =0A= ;---------------------------------=0A= =0A= =0A= ;;; Minibuffer frame=0A= (defvar 1on1-minibuffer-frame nil "")=0A= =0A= (defcustom 1on1-minibuffer-frame-alist=0A= (list=0A= (assq 'foreground-color minibuffer-frame-alist)=0A= (or (assq 'background-color minibuffer-frame-alist)=0A= (cons 'background-color "LightBlue"))=0A= (assq 'font minibuffer-frame-alist)=0A= (assq 'mouse-color minibuffer-frame-alist)=0A= (assq 'cursor-color minibuffer-frame-alist)=0A= (or (assq 'menu-bar-lines minibuffer-frame-alist)=0A= (cons 'menu-bar-lines 0))=0A= (or (assq 'left minibuffer-frame-alist)=0A= (cons 'left 0))=0A= (or (assq 'height minibuffer-frame-alist)=0A= (cons 'height 2))=0A= (or (assq 'icon-type minibuffer-frame-alist)=0A= (cons 'icon-type (< emacs-major-version 21)))=0A= (or (assq 'minibuffer minibuffer-frame-alist)=0A= (cons 'minibuffer 'only))=0A= (or (assq 'user-position minibuffer-frame-alist)=0A= (cons 'user-position t))=0A= (or (assq 'vertical-scroll-bars minibuffer-frame-alist)=0A= (cons 'vertical-scroll-bars nil))=0A= (or (assq 'name minibuffer-frame-alist)=0A= (cons 'name "Emacs Minibuffer")))=0A= ""=0A= :type '(repeat (cons :format "%v"=0A= (symbol :tag "Frame Parameter")=0A= (sexp :tag "Value")))=0A= :group 'One-On-One)=0A= =0A= ;;; *Completions* frame=0A= (defcustom 1on1-default-frame-alist=0A= (list=0A= (assq 'foreground-color default-frame-alist)=0A= (or (assq 'background-color default-frame-alist)=0A= (cons 'background-color "LightBlue"))=0A= (assq 'font default-frame-alist)=0A= (assq 'mouse-color default-frame-alist)=0A= (assq 'cursor-color default-frame-alist)=0A= (assq 'cursor-type default-frame-alist)=0A= (or (assq 'menu-bar-lines default-frame-alist)=0A= (cons 'menu-bar-lines 1))=0A= (or (assq 'top default-frame-alist)=0A= (cons 'top 0))=0A= (or (assq 'left default-frame-alist)=0A= (cons 'left 0))=0A= (or (assq 'width default-frame-alist)=0A= (cons 'width 80))=0A= (or (assq 'height default-frame-alist)=0A= (cons 'height 35))=0A= (or (assq 'minibuffer default-frame-alist)=0A= (cons 'minibuffer nil))=0A= (or (assq 'user-position default-frame-alist)=0A= (cons 'user-position t))=0A= (or (assq 'vertical-scroll-bars default-frame-alist)=0A= (cons 'vertical-scroll-bars 'right))=0A= (or (assq 'icon-type default-frame-alist)=0A= (cons 'icon-type (< emacs-major-version 21)))=0A= (or (assq 'tool-bar-lines default-frame-alist)=0A= (cons 'tool-bar-lines 1))=0A= (if (cdr (assq 'left-fringe default-frame-alist))=0A= (assq 'left-fringe default-frame-alist)=0A= (cons 'left-fringe 0))=0A= (if (cdr (assq 'right-fringe default-frame-alist))=0A= (assq 'right-fringe default-frame-alist)=0A= (cons 'right-fringe 0))=0A= (or (assq 'fringe default-frame-alist)=0A= (cons 'fringe 0)))=0A= ""=0A= :type '(repeat (cons :format "%v"=0A= (symbol :tag "Frame Parameter")=0A= (sexp :tag "Value")))=0A= :group 'frames)=0A= =0A= ;;; Special-display frames=0A= (defcustom 1on1-special-display-frame-alist=0A= (list=0A= (assq 'font special-display-frame-alist)=0A= (or (assq 'width special-display-frame-alist)=0A= (cons 'width 80))=0A= (or (assq 'height special-display-frame-alist)=0A= (cons 'height 20))=0A= (assq 'mouse-color special-display-frame-alist)=0A= (assq 'cursor-color special-display-frame-alist)=0A= (or (assq 'menu-bar-lines special-display-frame-alist)=0A= (cons 'menu-bar-lines 1))=0A= (assq 'foreground-color special-display-frame-alist)=0A= (or (assq 'background-color special-display-frame-alist)=0A= (cons 'background-color "LightSteelBlue"))=0A= (or (assq 'top special-display-frame-alist)=0A= (cons 'top 0))=0A= (or (assq 'left special-display-frame-alist)=0A= (cons 'left 0))=0A= (or (assq 'unsplittable special-display-frame-alist)=0A= (cons 'unsplittable t))=0A= (or (assq 'user-position special-display-frame-alist)=0A= (cons 'user-position t))=0A= (or (assq 'vertical-scroll-bars special-display-frame-alist)=0A= (cons 'vertical-scroll-bars 'right)))=0A= ""=0A= :type '(repeat (cons :format "%v"=0A= (symbol :tag "Frame Parameter")=0A= (sexp :tag "Value")))=0A= :group 'frames)=0A= =0A= ;; Pared down.=0A= (defun 1on1-emacs ()=0A= ""=0A= (interactive)=0A= (setq default-frame-alist (append 1on1-default-frame-alist = default-frame-alist)=0A= special-display-frame-alist (append = 1on1-special-display-frame-alist=0A= special-display-frame-alist))=0A= (add-to-list ; *Help* frame=0A= 'special-display-buffer-names=0A= (list "*Help*" '1on1-display-*Help*-frame=0A= (list (cons 'background-color "Thistle")=0A= '(height . 40))))=0A= (add-to-list ; *Completions* frame=0A= 'special-display-buffer-names=0A= `("*Completions*" 1on1-display-*Completions*-frame=0A= ((background-color . "LavenderBlush2")=0A= (menu-bar-lines . 0) (tool-bar-lines . 0)=0A= (width . 100))))=0A= (setq pop-up-frames t)=0A= ;; Minibuffer frame=0A= (setq minibuffer-frame-alist (append 1on1-minibuffer-frame-alist=0A= minibuffer-frame-alist))=0A= (if 1on1-minibuffer-frame=0A= (modify-frame-parameters 1on1-minibuffer-frame = 1on1-minibuffer-frame-alist)=0A= (setq 1on1-minibuffer-frame=0A= (make-frame 1on1-minibuffer-frame-alist)))=0A= (set-frame-width 1on1-minibuffer-frame 150)=0A= (modify-frame-parameters 1on1-minibuffer-frame `((top ,@ -50)))=0A= (setq minibuffer-auto-raise t)=0A= ;;; (if foobar=0A= ;;; (add-hook 'post-command-hook '1on1-fit-minibuffer-frame)=0A= ;;; (remove-hook 'post-command-hook '1on1-fit-minibuffer-frame))=0A= (setq w32-grab-focus-on-raise nil))=0A= =0A= ;; Pared down.=0A= (defun 1on1-display-*Help*-frame (buf &optional args)=0A= ""=0A= (let (return-window)=0A= (setq return-window (select-window (funcall special-display-function = buf args)))=0A= (raise-frame)=0A= return-window))=0A= =0A= ;; Pared down.=0A= (defun 1on1-display-*Completions*-frame (buf &optional args)=0A= ""=0A= (let (return-window)=0A= (setq return-window (select-window (funcall special-display-function = buf args)))=0A= (raise-frame)=0A= (when (boundp '1on1-minibuffer-frame)=0A= (redirect-frame-focus (selected-frame) 1on1-minibuffer-frame))=0A= return-window))=0A= =0A= ;; Pared down.=0A= (defun 1on1-set-minibuffer-frame-top/bottom ()=0A= ""=0A= (when (boundp '1on1-minibuffer-frame)=0A= (condition-case nil (redisplay t) (error nil))=0A= (modify-frame-parameters 1on1-minibuffer-frame '((top . -50)))))=0A= =0A= ;; Pared down.=0A= (defun 1on1-fit-minibuffer-frame ()=0A= ""=0A= (interactive)=0A= ;; (unless (require 'fit-frame nil t)=0A= ;; (error "You need to load library `fit-frame.el' to use this = command"))=0A= (when (and (active-minibuffer-window)=0A= (save-selected-window=0A= (select-window (minibuffer-window))=0A= (one-window-p nil 'selected-frame)))=0A= (let* ((frame (save-selected-window=0A= (select-window (minibuffer-window)) = (selected-frame)))=0A= (frame-height (frame-height frame)))=0A= (cond=0A= ((eq last-command '1on1-fit-minibuffer-frame)=0A= (set-frame-height frame (1+ (frame-height frame)))=0A= (1on1-set-minibuffer-frame-top/bottom)=0A= (condition-case nil (scroll-down (frame-height frame)) (error = nil)))=0A= (t=0A= (let* ((beg = (minibuffer-prompt-end))=0A= (fit-frame-max-height nil)=0A= (fit-frame-max-height-percent 10)=0A= (fit-frame-min-height 2)=0A= (window-min-height 2)=0A= (fit-frame-empty-height 2)=0A= (fit-frame-empty-special-display-height 2))=0A= (fit-frame frame (frame-width frame))=0A= (1on1-set-minibuffer-frame-top/bottom)=0A= (condition-case nil (scroll-down (frame-height frame)) (error = nil))))))))=0A= ------=_NextPart_000_0071_01CC327A.0455C2F0--