From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dimitri Fontaine Newsgroups: gmane.emacs.bugs Subject: bug#6078: Acknowledgement (23.1.90; switch-to-buffer does not redisplay until an event occurs) Date: Sun, 02 May 2010 18:00:15 +0200 Organization: Hi-Media Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1272934141 7057 80.91.229.12 (4 May 2010 00:49:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 00:49:01 +0000 (UTC) To: 6078@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 04 02:48:59 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O96Jj-0007y4-6A for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 May 2010 02:48:55 +0200 Original-Received: from localhost ([127.0.0.1]:56680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O96Ji-0005S1-Mc for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 May 2010 20:48:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O92DV-0001of-EA for bug-gnu-emacs@gnu.org; Mon, 03 May 2010 16:26:13 -0400 Original-Received: from [140.186.70.92] (port=55546 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O92DR-0001jB-LI for bug-gnu-emacs@gnu.org; Mon, 03 May 2010 16:26:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O92DO-0007At-5I for bug-gnu-emacs@gnu.org; Mon, 03 May 2010 16:26:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55744) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O92DO-0007Ap-3Y for bug-gnu-emacs@gnu.org; Mon, 03 May 2010 16:26:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1O91kH-0005db-QC; Mon, 03 May 2010 15:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dimitri Fontaine Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 May 2010 19:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6078 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6078-submit@debbugs.gnu.org id=B6078.127291653421653 (code B ref 6078); Mon, 03 May 2010 19:56:01 +0000 Original-Received: (at 6078) by debbugs.gnu.org; 3 May 2010 19:55:34 +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 1O91jp-0005dA-B9 for submit@debbugs.gnu.org; Mon, 03 May 2010 15:55:34 -0400 Original-Received: from smtp1.hi-media-techno.com ([195.158.241.85]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O91ax-0005Yw-E5 for 6078@debbugs.gnu.org; Mon, 03 May 2010 15:46:24 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id E70FF93B90 for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:18 +0200 (CEST) Original-Received: from smtp1.hi-media-techno.com ([127.0.0.1]) by localhost (smtp1.backbone.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V0S-AN1r3135 for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:18 +0200 (CEST) Original-Received: from mail1.hi-media-techno.com (unknown [192.168.27.17]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 35BE993BF7 for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:18 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail1.hi-media-techno.com (Postfix) with ESMTP id BBE89B934D for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail1.hi-media-techno.com Original-Received: from mail1.hi-media-techno.com ([127.0.0.1]) by localhost (mail1.hi-media-techno.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0U5QKCPytgKQ for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:17 +0200 (CEST) Original-Received: from DimIMac.local (89-158-241-71.rev.dartybox.com [89.158.241.71]) by mail1.hi-media-techno.com (Postfix) with ESMTPSA id 9AABE17881 for <6078@debbugs.gnu.org>; Mon, 3 May 2010 21:46:17 +0200 (CEST) Original-Received: by DimIMac.local (Postfix, from userid 501) id 8B6347D2C03; Sun, 2 May 2010 18:00:15 +0200 (CEST) User-Mail-Address: dfontaine@hi-media.com In-Reply-To: (GNU bug Tracking System's message of "Sun, 02 May 2010 11:06:01 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (darwin) X-Mailman-Approved-At: Mon, 03 May 2010 15:55:32 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 03 May 2010 15:56:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 03 May 2010 20:46:30 -0400 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36676 Archived-At: --=-=-= help-debbugs@gnu.org (GNU bug Tracking System) writes: > If you wish to submit further information on this problem, please > send it to 6078@debbugs.gnu.org. It appears that the bug is in fact calling text-scale-adjust which consumes one event. Calling text-scale-increase instead fixes it. For the working version of the program, please see the following link, or the attachment inline. http://www.emacswiki.org/emacs/switch-window.el Regards, -- Dimitri Fontaine --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=dim-switch-window.el Content-Transfer-Encoding: quoted-printable Content-Description: visual method for switching windows ;;; dim-switch-window.el ;; ;; Offer a *visual* way to choose a window to switch to ;; ;; Copyright (C) 2010 Dimitri Fontaine ;; ;; Author: Dimitri Fontaine ;; URL: http://www.emacswiki.org/emacs/switch-window.el ;; Version: 0.2 ;; Created: 2010-04-30 ;; Keywords: window navigation ;; Licence: WTFPL, grab your copy here: http://sam.zoy.org/wtfpl/ ;; ;; This file is NOT part of GNU Emacs. ;; ;; Install: ;; (require 'dim-switch-window) ;; ;; It'll take over your C-x o binding. (defgroup dim:switch-window nil "dim:switch-window customization group" :group 'convenience) (defcustom dim:switch-window-increase 12 "How much to increase text size in the window numbering" :type 'integer :group 'dim:switch-window) (defcustom dim:switch-window-timeout 5 "After this many seconds, cancel the window switching" :type 'integer :group 'dim:switch-window) (defun dim:switch-window-display-number (win num) "prepare a temp buffer to diplay in the window while choosing" (let ((buf (get-buffer-create (concat " *" (number-to-string num)=20 ": "=20 (buffer-name (window-buffer win)) "*")))) (with-current-buffer buf (insert (concat "\n\n " (number-to-string num))) (text-scale-increase dim:switch-window-increase)) (set-window-buffer win buf) buf)) (defun dim:switch-window () "Display an overlay in each window showing a unique key, then ask user for the window where move to" (interactive) (let ((config (current-window-configuration)) (num 1) (redisplay-dont-pause t) key buffers) =20=20=20=20 ;; display big numbers to ease window selection (dolist (win (window-list)) (setq buffers (cons (dim:switch-window-display-number win num) buffer= s)) (setq num (1+ num))) ;; choose a window (while (not key) (let ((input=20 (event-basic-type (read-event "Move to window: " nil dim:switch-window-timeout)))) =09 (when (or (null input) (not (symbolp input))) (cond ((null input) ; reached timeout (setq key 1)) ((and (<=3D 49 input) (>=3D 57 input)) ; 1 to 9 (setq key (- input 48))) ((eq input 113) ; q (setq key 1)))))) ;; get those huge numbers away (dolist (buf buffers) (kill-buffer buf)) (set-window-configuration config) ;; move to selected window (setq num 1) (dolist (win (window-list)) (when (eq num key) (select-window win)) (setq num (1+ num))) (message "Moved to %S" (buffer-name (window-buffer (selected-window))))= )) (global-set-key (kbd "C-x o") 'dim:switch-window) (provide 'dim-switch-window) --=-=-=--