From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45688: 28.0.50; New action for display-buffer? Date: Thu, 07 Jan 2021 16:39:29 +0100 Message-ID: <87o8i03gem.fsf@gnus.org> References: <87im8a1dff.fsf@gnus.org> <83y2h6133r.fsf@gnu.org> <8735ze0yp7.fsf@gnus.org> <83o8i20w1f.fsf@gnu.org> <87lfd5yny9.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27187"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45688@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 07 16:40:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxXOV-0006le-0y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 16:40:11 +0100 Original-Received: from localhost ([::1]:51330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxXOU-0002EG-3o for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 10:40:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXOM-0002E9-37 for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 10:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxXOL-0007CN-Ov for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 10:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxXOL-0008HF-LV for bug-gnu-emacs@gnu.org; Thu, 07 Jan 2021 10:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Jan 2021 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45688 X-GNU-PR-Package: emacs Original-Received: via spool by 45688-submit@debbugs.gnu.org id=B45688.161003398231785 (code B ref 45688); Thu, 07 Jan 2021 15:40:01 +0000 Original-Received: (at 45688) by debbugs.gnu.org; 7 Jan 2021 15:39:42 +0000 Original-Received: from localhost ([127.0.0.1]:48347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxXO2-0008Gb-1B for submit@debbugs.gnu.org; Thu, 07 Jan 2021 10:39:42 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:39102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxXNz-0008GN-Rf for 45688@debbugs.gnu.org; Thu, 07 Jan 2021 10:39:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pTaFELhSNTYiKyrzOHijab74GZ7TBgWKvAojqz+PnCY=; b=jkb3ps4wxVJdbb4qxGpPiJ1qqq iWk6HdywGwifdMprGOxjG2YSv3dvwnsXX8SYLRRtmSRwM7c6afZTJKSVnF4yLd9TCLqdNj8NTvA1J 4G9qaq2InYHw5eAO2Nrh22xBf7NxG7sxz2icYEkX5IJFr1BhajX+ZK23a9qluTF0w3VA=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kxXNq-0004Y7-PS; Thu, 07 Jan 2021 16:39:33 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEXt9Ni5w6KIknZR Tkn///+5aDmTAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UBBw8kEbrut/EAAAGjSURBVDjLbZOBkcQg CEUl24CwDQRs4CL993YfMW7cOzKTmfAE5ENKCeOwWv4YMZsOBGiPA8xiwky1aKFaC8H1AQZA+Nbx plUCgFVZ+cAZIv4APGqiVcSM9bqLR+lKqFIUVUTPda2ve95XG03k17jzfqpdeZh2P0vrmXVFRH5R 0Qnw3JXh7x0g1KClGuGSSG8mLjWbqutm0lTM+4z4SEsCcd29j7ZoAeHm9ga46t3SAJiEwZr7SCXn Aia9eWc306c8ZAO4uWsfmW2G9A6fO4KKR4Kllcf5KF0Oz3HOXGY+Qs7yDoApawKxzFVLcygbmiR4 e6ZSa1rDd8wiBwr38Md3JcxchmiFoEWDumhMThYRpZzlESqNVNZ+cjz1TjWsQ5Wr3EuYqYZBsQHO J7hktN40tZtB0RzllWPqbLxAh7AD2HNS0ATjS+D1CbDFPrv3bQulYRHcppIPOwJwgp8NeNM5kx28 vNXZ5J8IRkQ8fu3AYm9fOd/nj+F2No5F6a7br+HWrthEl2470FbRpeFX2Bos7RpL+uWNdejFvv/b BFr+N/rH9ws+hkt2nuNQ0QAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wMS0wN1QxNTozNjoxNysw MDowMCx+ACwAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDEtMDdUMTU6MzY6MTcrMDA6MDBdI7iQ AAAAAElFTkSuQmCC X-Now-Playing: Michelle Shocked's _The Texas Campfire Tapes_: "The Secret To A Long Life (Is Knowing When It's Time To Go)" In-Reply-To: (martin rudalics's message of "Thu, 7 Jan 2021 14:17:22 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197491 Archived-At: martin rudalics writes: >> As Martin explained, display-buffer-use-some-window almost does this, >> but since switching to the buffer doesn't count as "use", it doesn't >> work for this particular use case. > > Switching to the buffer does count as "use" but 'display-buffer' doesn't > switch to the buffer because it doesn't select it. Sorry; I meant "use the window". > Add a function say 'window-bump-use-time' that does > > w->use_time = ++window_select_count; > > and call that from `display-buffer'. Thanks! I've now pushed this -- like I said, my familiarity with this area in Emacs is approx. nil, so if this implementation is beyond stupid, please feel free to pipe up. :-) But with this setting: (setq display-buffer-base-action '(display-buffer-use-least-recent-window)) it's quite XEmacs-like? I think? At least in my tests. So now we've got that all-important ex-XEmacs market segment covered. The only oddity is that it'll resize windows to their previous sizes -- is there any way to inhibit that? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no