From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 07:05:53 2010 Received: (at submit) by debbugs.gnu.org; 2 May 2010 11:05:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Wze-0007NC-G2 for submit@debbugs.gnu.org; Sun, 02 May 2010 07:05:52 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8TMi-0005ip-4k for submit@debbugs.gnu.org; Sun, 02 May 2010 03:13:25 -0400 Received: from mx10.gnu.org ([199.232.76.166]:46950) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8TMe-0004XK-SQ for emacs-pretest-bug@gnu.org; Sun, 02 May 2010 03:13:21 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56141) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O8TMe-0000kn-9d for emacs-pretest-bug@gnu.org; Sun, 02 May 2010 03:13:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8TMX-0006Kd-IF for emacs-pretest-bug@gnu.org; Sun, 02 May 2010 03:13:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, RCVD_IN_RP_RNBL,RDNS_DYNAMIC,TO_NO_BRKTS_DYNIP,TVD_RCVD_IP,T_FRT_HOUR autolearn=no version=3.3.0 Received: from 89-158-241-71.rev.dartybox.com ([89.158.241.71]:49819 helo=DimIMac.local) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8TMS-0006Go-F5 for emacs-pretest-bug@gnu.org; Sun, 02 May 2010 03:13:12 -0400 Received: by DimIMac.local (Postfix, from userid 501) id B437E7AADB4; Fri, 30 Apr 2010 20:35:15 +0200 (CEST) From: Dimitri Fontaine To: emacs-pretest-bug@gnu.org Subject: 23.1.90; switch-to-buffer does not redisplay until an event occurs Date: Fri, 30 Apr 2010 20:35:15 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 02 May 2010 07:05:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) The following code, an attempt to have a visual window switching facility, is failing to provide the visual clue it's meant to give. That seems to be because switch-to-buffer won't redisplay until some event occurred, and neither using sit-for nor redisplay helps. Here's the code: (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) "*")))) (with-current-buffer buf (insert (concat "\n\n " (number-to-string num))) (text-scale-adjust 12)) ;; when it works we'll choose one or the other (set-window-buffer win buf) (select-window win) (switch-to-buffer buf 'non-record) 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) (dolist (win (window-list)) (setq buffers (cons (dim:switch-window-display-number win num) buffers)) (setq num (1+ num))) ;(redisplay 1) (sit-for 0) (while (not key) (let ((input (event-basic-type (read-event "Move to window: " nil 5)))) (when (and (not (symbolp input)) (<= 49 input) (>= 57 input)) (setq key (- input 48))))) (message "%S" key) (dolist (buf buffers) (kill-buffer buf)) (set-window-configuration config) (setq num 1) (dolist (win (window-list)) (when (eq num key) (select-window win)) (setq num (1+ num))))) In GNU Emacs 23.1.90.1 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25) of 2010-03-25 on proton.local Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--without-dbus' '--with-ns' 'CFLAGS=-pipe -O2 -march=nocona'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: savehist-mode: t desktop-save-mode: t nxhtml-global-minor-mode: t iswitchb-mode: t diff-auto-refine-mode: t global-hl-line-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-fill-mode: 1 Recent input: a r y : : SPC t h e SPC o n y l y SPC c h a n g e SPC i s SPC h o w SPC t o SPC d o SPC i t , SPC n o t SPC w h a t SPC e r w e C-a M-f M-f M-f SPC p r o p o s e d C-e SPC c u r r e n d o . C-x C-s C-a C-c C-c q p M-` M-` C-n n M-` c o l u m n s , SPC s o r r y a h SPC o y s e s C-c C-b w g a t h a t s ' s SPC t h a t SPC l i n g SPC h a s M-b M-b M-b SPC h a s SPC C-e k SPC t SPC o SPC d o SPC h e r e ? SPC : ) M-` M-` i l k i k e SPC q a a SPC 1 0 SPC h o u r s SPC t p l a n e SPC t r p i p SPC f o r SPC t h a t ? SPC n o SPC t h a n s k s SPC : ) M-` SPC n SPC n M-1 M-` C-h C-g C-x h M-w M-x e m a s c s c s - r e r e p o r e m b Recent messages: Fetching headers for nnimap+hm.local:PostgreSQL.hackers...done Generating summary...done Auto-saving... 20:23 You were mentioned by yonkeltron in #emacs [2 times] 20:24 You were mentioned by yonkeltron in #emacs [2 times] Mark set [2 times] Saved text until "+ num))))) (provide 'dim-switch-window)" Making completion list... [2 times] Load-path shadows: /Users/dim/.emacs.d/elpa/emms-3.0/tq hides ~/.emacs.d/emms/lisp/tq /Users/dim/.emacs.d/elpa/emms-3.0/ogg-comment hides ~/.emacs.d/emms/lisp/ogg-comment /Users/dim/.emacs.d/elpa/emms-3.0/later-do hides ~/.emacs.d/emms/lisp/later-do /Users/dim/.emacs.d/elpa/emms-3.0/jack hides ~/.emacs.d/emms/lisp/jack /Users/dim/.emacs.d/elpa/emms-3.0/emms hides ~/.emacs.d/emms/lisp/emms /Users/dim/.emacs.d/elpa/emms-3.0/emms-volume hides ~/.emacs.d/emms/lisp/emms-volume /Users/dim/.emacs.d/elpa/emms-3.0/emms-volume-amixer hides ~/.emacs.d/emms/lisp/emms-volume-amixer /Users/dim/.emacs.d/elpa/emms-3.0/emms-url hides ~/.emacs.d/emms/lisp/emms-url /Users/dim/.emacs.d/elpa/emms-3.0/emms-tag-editor hides ~/.emacs.d/emms/lisp/emms-tag-editor /Users/dim/.emacs.d/elpa/emms-3.0/emms-streams hides ~/.emacs.d/emms/lisp/emms-streams /Users/dim/.emacs.d/elpa/emms-3.0/emms-stream-info hides ~/.emacs.d/emms/lisp/emms-stream-info /Users/dim/.emacs.d/elpa/emms-3.0/emms-source-playlist hides ~/.emacs.d/emms/lisp/emms-source-playlist /Users/dim/.emacs.d/elpa/emms-3.0/emms-source-file hides ~/.emacs.d/emms/lisp/emms-source-file /Users/dim/.emacs.d/elpa/emms-3.0/emms-setup hides ~/.emacs.d/emms/lisp/emms-setup /Users/dim/.emacs.d/elpa/emms-3.0/emms-score hides ~/.emacs.d/emms/lisp/emms-score /Users/dim/.emacs.d/elpa/emms-3.0/emms-playlist-sort hides ~/.emacs.d/emms/lisp/emms-playlist-sort /Users/dim/.emacs.d/elpa/emms-3.0/emms-playlist-mode hides ~/.emacs.d/emms/lisp/emms-playlist-mode /Users/dim/.emacs.d/elpa/emms-3.0/emms-playing-time hides ~/.emacs.d/emms/lisp/emms-playing-time /Users/dim/.emacs.d/elpa/emms-3.0/emms-player-xine hides ~/.emacs.d/emms/lisp/emms-player-xine /Users/dim/.emacs.d/elpa/emms-3.0/emms-player-simple hides ~/.emacs.d/emms/lisp/emms-player-simple /Users/dim/.emacs.d/elpa/emms-3.0/emms-player-mplayer hides ~/.emacs.d/emms/lisp/emms-player-mplayer /Users/dim/.emacs.d/elpa/emms-3.0/emms-player-mpg321-remote hides ~/.emacs.d/emms/lisp/emms-player-mpg321-remote /Users/dim/.emacs.d/elpa/emms-3.0/emms-player-mpd hides ~/.emacs.d/emms/lisp/emms-player-mpd /Users/dim/.emacs.d/elpa/emms-3.0/emms-mode-line hides ~/.emacs.d/emms/lisp/emms-mode-line /Users/dim/.emacs.d/elpa/emms-3.0/emms-mode-line-icon hides ~/.emacs.d/emms/lisp/emms-mode-line-icon /Users/dim/.emacs.d/elpa/emms-3.0/emms-metaplaylist-mode hides ~/.emacs.d/emms/lisp/emms-metaplaylist-mode /Users/dim/.emacs.d/elpa/emms-3.0/emms-mark hides ~/.emacs.d/emms/lisp/emms-mark /Users/dim/.emacs.d/elpa/emms-3.0/emms-lyrics hides ~/.emacs.d/emms/lisp/emms-lyrics /Users/dim/.emacs.d/elpa/emms-3.0/emms-lastfm hides ~/.emacs.d/emms/lisp/emms-lastfm /Users/dim/.emacs.d/elpa/emms-3.0/emms-last-played hides ~/.emacs.d/emms/lisp/emms-last-played /Users/dim/.emacs.d/elpa/emms-3.0/emms-info hides ~/.emacs.d/emms/lisp/emms-info /Users/dim/.emacs.d/elpa/emms-3.0/emms-info-ogginfo hides ~/.emacs.d/emms/lisp/emms-info-ogginfo /Users/dim/.emacs.d/elpa/emms-3.0/emms-info-ogg hides ~/.emacs.d/emms/lisp/emms-info-ogg /Users/dim/.emacs.d/elpa/emms-3.0/emms-info-mp3info hides ~/.emacs.d/emms/lisp/emms-info-mp3info /Users/dim/.emacs.d/elpa/emms-3.0/emms-info-libtag hides ~/.emacs.d/emms/lisp/emms-info-libtag /Users/dim/.emacs.d/elpa/emms-3.0/emms-i18n hides ~/.emacs.d/emms/lisp/emms-i18n /Users/dim/.emacs.d/elpa/emms-3.0/emms-history hides ~/.emacs.d/emms/lisp/emms-history /Users/dim/.emacs.d/elpa/emms-3.0/emms-compat hides ~/.emacs.d/emms/lisp/emms-compat /Users/dim/.emacs.d/elpa/emms-3.0/emms-cache hides ~/.emacs.d/emms/lisp/emms-cache /Users/dim/.emacs.d/elpa/emms-3.0/emms-browser hides ~/.emacs.d/emms/lisp/emms-browser /Users/dim/.emacs.d/elpa/emms-3.0/emms-bookmarks hides ~/.emacs.d/emms/lisp/emms-bookmarks /Users/dim/.emacs.d/nxhtml/util/htmlfontify hides /Applications/Emacs.app/Contents/Resources/lisp/htmlfontify /Users/dim/.emacs.d/elpa/emms-3.0/tq hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/tq /Users/dim/.emacs.d/nxhtml/util/chart hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/chart Features: (shadow emacsbug flow-fill multi-isearch bbdb-hooks w3m-form w3m-symbol w3m doc-view image-mode w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util dim-switch-window bbdb-gui gnus-cite smiley ansi-color gnus-agent gnus-srvr nnvirtual gnus-async gnus-bcklg gnus-score score-mode sort gnus-ml gnus-msg tar-mode face-remap ffap gnus-topic nndoc gnus-cache nnfolder utf-7 utf7 auth-source nnimap imap nndraft nnmh bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings nnnil nntp bbdb-autoloads bbdb timezone gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source format-spec dim-gnus-imap-count gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems flyspell ispell hideshow mlinks rx nxml-uchnm rng-nxml rng-xsd xsd-regexp rng-cmpct sgml-mode nxhtml-mumamo mumamo-fun mumamo nxhtml-mode popcmp url-expand url-util url-methods url-parse url-vars rngalt rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok loadhist make-mode doc-mode sql cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs python-21 python muse-colors org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb bitlbee conf-mode newcomment jka-compr savehist desktop dim-tels-pro dim-modes dim-org org-clock org-remember org-datetree org byte-opt bytecomp byte-compile org-footnote org-src org-list org-faces org-compat org-macs noutline outline remember org-install dim-ack browse-kill-ring tramp-multi-sshx dictionary link connection emms-cache emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file emms-setup emms emms-compat dim-pgsql linum w3m-load nxhtml-autoload majmodpri nxhtml-menu nxhtml-autostart rst compile asciidoc apropos dim-keys dim-previous-message dim-mailrc message ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils dim-input-method quail help-mode view dim-google browse-url hippie-exp comint iswitchb dired-details dired-x dired-aux dired winner buffer-move windmove dim-escreen escreen dim-splits dim-rcirc dim-rcirc-log growl rcirc-late-fix rcirc-color advice help-fns advice-preload rcirc-groups rcirc time-date dim-projects dim-projects-home projects ibuf-ext dim-muse dim-muse-hack muse-context muse-journal muse-book muse-latex muse-html muse-xml-common cus-edit cus-start cus-load muse-publish muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode dim-init-macosx dim-offlineimap magit diff-mode log-edit easy-mmode pcvs-util add-log parse-time cssh derived term disp-table ehelp electric ring ibuffer pcmpl-unix pcomplete woman man assoc color-theme-emacs23-default color-theme edmacro kmacro wid-edit cl cl-19 sendmail regexp-opt dim-visual-common hl-line dim-ports dim-lib dictionary-autoloads emms-autoloads full-ack-autoloads gist-autoloads htmlize-autoloads lisppaste-autoloads magit-autoloads muse-autoloads info xml-rpc-autoloads package reporter tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) -- Dimitri Fontaine From debbugs-submit-bounces@debbugs.gnu.org Sun May 02 14:57:53 2010 Received: (at 6078) by debbugs.gnu.org; 2 May 2010 18:57:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8eMS-0002uG-Tw for submit@debbugs.gnu.org; Sun, 02 May 2010 14:57:53 -0400 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O8eMP-0002u7-6C for 6078@debbugs.gnu.org; Sun, 02 May 2010 14:57:50 -0400 Received: (qmail invoked by alias); 02 May 2010 18:57:36 -0000 Received: from 62-47-55-98.adsl.highway.telekom.at (EHLO [62.47.55.98]) [62.47.55.98] by mail.gmx.net (mp018) with SMTP; 02 May 2010 20:57:36 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+gFjFBf0WgWogg+pbe5bMj9a+JNUJdwouutaeBpZ ghOudnoNLopW6J Message-ID: <4BDDCB1D.2080909@gmx.at> Date: Sun, 02 May 2010 20:57:33 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Dimitri Fontaine Subject: Re: bug#6078: 23.1.90; switch-to-buffer does not redisplay until an event occurs References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73999999999999999 X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 6078 Cc: 6078@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.7 (-) > The following code, an attempt to have a visual window switching > facility, is failing to provide the visual clue it's meant to give. That > seems to be because switch-to-buffer won't redisplay until some event > occurred, and neither using sit-for nor redisplay helps. Your problem is with `text-scale-adjust' which should be used only interactively. (BTW, you need neither the `select-window' nor the `switch-to-buffer' in your code, `set-window-buffer' is sufficient.) martin From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 12:32:31 2010 Received: (at 6078) by debbugs.gnu.org; 3 May 2010 16:32:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8yZL-00047d-OY for submit@debbugs.gnu.org; Mon, 03 May 2010 12:32:31 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8yZJ-00047X-PX for 6078@debbugs.gnu.org; Mon, 03 May 2010 12:32:30 -0400 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o43GWNVf024276; Mon, 3 May 2010 12:32:23 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id C86A8B4C27; Mon, 3 May 2010 12:32:22 -0400 (EDT) From: Stefan Monnier To: martin rudalics Subject: Re: bug#6078: 23.1.90; switch-to-buffer does not redisplay until an event occurs Message-ID: References: <4BDDCB1D.2080909@gmx.at> Date: Mon, 03 May 2010 12:32:22 -0400 In-Reply-To: <4BDDCB1D.2080909@gmx.at> (martin rudalics's message of "Sun, 02 May 2010 20:57:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3525=0 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6078 Cc: Dimitri Fontaine , 6078@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > (BTW, you need neither the `select-window' nor the `switch-to-buffer' > in your code, `set-window-buffer' is sufficient.) OTOH, you'll want to pay attention to dedicated windows (i.e. save&restore the window-dedicated-p value). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 13:17:23 2010 Received: (at 6078) by debbugs.gnu.org; 3 May 2010 17:17:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8zGl-0004Rk-DG for submit@debbugs.gnu.org; Mon, 03 May 2010 13:17:23 -0400 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O8zGh-0004Rf-Ub for 6078@debbugs.gnu.org; Mon, 03 May 2010 13:17:22 -0400 Received: (qmail invoked by alias); 03 May 2010 17:17:13 -0000 Received: from 62-47-44-153.adsl.highway.telekom.at (EHLO [62.47.44.153]) [62.47.44.153] by mail.gmx.net (mp017) with SMTP; 03 May 2010 19:17:13 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+m4Iw9jB6mEKQsYuPuz+arHH7KhWdA646Zk77iQK ripBw3JQbcKkry Message-ID: <4BDF0513.40803@gmx.at> Date: Mon, 03 May 2010 19:17:07 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#6078: 23.1.90; switch-to-buffer does not redisplay until an event occurs References: <4BDDCB1D.2080909@gmx.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.69999999999999996 X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 6078 Cc: Dimitri Fontaine , 6078@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) >> (BTW, you need neither the `select-window' nor the `switch-to-buffer' >> in your code, `set-window-buffer' is sufficient.) > > OTOH, you'll want to pay attention to dedicated windows > (i.e. save&restore the window-dedicated-p value). Dimitri already saves and restores the window configuration. This should handle "weakly" dedicated windows. If he also wants to handle strongly dedicated windows, `set-window-buffer' will barf anyway - he has to reset the status manually for each window and have the restore step take care of setting it again. martin From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 15:55:34 2010 Received: (at 6078) by debbugs.gnu.org; 3 May 2010 19:55:34 +0000 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 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 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) 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) 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) 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 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) 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) Received: by DimIMac.local (Postfix, from userid 501) id 8B6347D2C03; Sun, 2 May 2010 18:00:15 +0200 (CEST) From: Dimitri Fontaine To: 6078@debbugs.gnu.org Subject: Re: bug#6078: Acknowledgement (23.1.90; switch-to-buffer does not redisplay until an event occurs) Organization: Hi-Media References: User-Mail-Address: dfontaine@hi-media.com Date: Sun, 02 May 2010 18:00:15 +0200 In-Reply-To: (GNU bug Tracking System's message of "Sun, 02 May 2010 11:06:01 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 6078 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 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) --=-=-= 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) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 03 15:55:34 2010 Received: (at 6078) by debbugs.gnu.org; 3 May 2010 19:55:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O91jq-0005dE-Ef for submit@debbugs.gnu.org; Mon, 03 May 2010 15:55:34 -0400 Received: from smtp1.hi-media-techno.com ([195.158.241.85]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O91ax-0005Yv-E7 for 6078@debbugs.gnu.org; Mon, 03 May 2010 15:46:24 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 7360793BF8; Mon, 3 May 2010 21:46:18 +0200 (CEST) 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 xOQpRXpNEM91; Mon, 3 May 2010 21:46:18 +0200 (CEST) Received: from mail1.hi-media-techno.com (unknown [192.168.27.17]) by smtp1.hi-media-techno.com (Postfix) with ESMTP id 1634C93B89; Mon, 3 May 2010 21:46:18 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail1.hi-media-techno.com (Postfix) with ESMTP id 97D17B9962; Mon, 3 May 2010 21:46:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail1.hi-media-techno.com 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 Y8HtJWUWqV-D; Mon, 3 May 2010 21:46:17 +0200 (CEST) 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 77D761776B; Mon, 3 May 2010 21:46:17 +0200 (CEST) Received: by DimIMac.local (Postfix, from userid 501) id 8A6617D2C02; Sun, 2 May 2010 21:52:57 +0200 (CEST) From: Dimitri Fontaine To: martin rudalics Subject: Re: bug#6078: 23.1.90; switch-to-buffer does not redisplay until an event occurs Organization: Hi-Media References: <4BDDCB1D.2080909@gmx.at> User-Mail-Address: dfontaine@hi-media.com Date: Sun, 02 May 2010 21:52:57 +0200 In-Reply-To: <4BDDCB1D.2080909@gmx.at> (martin rudalics's message of "Sun, 02 May 2010 20:57:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (darwin) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 6078 X-Mailman-Approved-At: Mon, 03 May 2010 15:55:32 -0400 Cc: 6078@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) martin rudalics writes: > Your problem is with `text-scale-adjust' which should be used only > interactively. (BTW, you need neither the `select-window' nor the > `switch-to-buffer' in your code, `set-window-buffer' is sufficient.) Yeah, I've been hinted to use toggle-debug-on-quit meantime, and sent a follow-up with this finding. Thanks a lot for helping, though! As far as set-window-buffer is concerned, yeah, the fixed version only use that, what you saw was like maddened attempts at forcing the code into producing what I expected :) Regards, -- Dimitri Fontaine From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 01:29:48 2012 Received: (at control) by debbugs.gnu.org; 5 Dec 2012 06:29:48 +0000 Received: from localhost ([127.0.0.1]:54123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg8UN-0002AP-Bd for submit@debbugs.gnu.org; Wed, 05 Dec 2012 01:29:48 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:41504) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg8UK-0002AH-JF for control@debbugs.gnu.org; Wed, 05 Dec 2012 01:29:45 -0500 Received: by mail-pb0-f44.google.com with SMTP id uo1so3244073pbc.3 for ; Tue, 04 Dec 2012 22:29:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=MDWexDysDmH0acZ0abx60DZ2Tc/eiRR8+3z5UWsgy6A=; b=wjUpAhsvb4zcVwuseQXFHUWP9EBdB3C1ExDHGG7csA5x9tQ054yxMhbRpDaFGMUai3 7+dLNCB3jjk9LWMIek0SlptstxP0PbTRpesY29wpeyuIZfZH1bIAvZ5eTCeYKoZPzDoA cp3ugkC2CXPR7KLY3/TOS3zxJ4Qy1UPraXG0tHbRKSoviqb1baWbX4niV6K3bitlab+J UJHQhr0CIMJe9k0GpvfMWqcNlhau/y4tejPKJgbElIklctO86JCiRZNP3k0LO91dxSSi LCzu+H8SUb5gOxdLuUkALkKn0FTqdrnA5b4H7e3bzCEeO6Itsr1zbcJSvXX5YXi4bgjW bLDw== Received: by 10.68.129.233 with SMTP id nz9mr45165005pbb.139.1354688978139; Tue, 04 Dec 2012 22:29:38 -0800 (PST) Received: from ulysses ([155.69.18.229]) by mx.google.com with ESMTPS id uh9sm2353074pbc.5.2012.12.04.22.29.34 (version=SSLv3 cipher=OTHER); Tue, 04 Dec 2012 22:29:36 -0800 (PST) From: Chong Yidong To: control@debbugs.gnu.org Subject: tags 6078 + notabug Date: Wed, 05 Dec 2012 14:29:31 +0800 Message-ID: <87vcchroz8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) tags 6078 + notabug close 6078 thanks From unknown Fri Jun 20 07:19:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 02 Jan 2013 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator