From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: master b2150e0: Preserve point under 'dired-auto-revert-buffer' (second case) Date: Wed, 19 Jul 2017 12:23:52 +0200 Message-ID: <8760eou3lz.fsf@rosalinde> References: <20170717091700.5734.53572@vcs0.savannah.gnu.org> <20170717091702.497B522E0A@vcs0.savannah.gnu.org> <87a841c056.fsf@rosalinde> <596F15D8.207@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1500459884 24656 195.159.176.226 (19 Jul 2017 10:24:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 19 Jul 2017 10:24:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Glenn Morris , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 19 12:24:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXm9d-0005el-E0 for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2017 12:24:29 +0200 Original-Received: from localhost ([::1]:60915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXm9i-0002QX-KT for ged-emacs-devel@m.gmane.org; Wed, 19 Jul 2017 06:24:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXm9A-0002QM-BN for emacs-devel@gnu.org; Wed, 19 Jul 2017 06:24:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXm96-0000aL-AX for emacs-devel@gnu.org; Wed, 19 Jul 2017 06:24:00 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:49363) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXm96-0000X4-0D; Wed, 19 Jul 2017 06:23:56 -0400 Original-Received: from rosalinde ([83.135.4.170]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mfn40-1dJX4v3wIe-00NAbg; Wed, 19 Jul 2017 12:23:54 +0200 In-Reply-To: <596F15D8.207@gmx.at> (martin rudalics's message of "Wed, 19 Jul 2017 10:18:32 +0200") X-Provags-ID: V03:K0:xYqR+bSkJr6BTTNM/4Wfg/EdlWD7ic9hxfzTiCAPF7En2cCo1Qy 5At/xVEADlas7MVAb4R1B0dtewm92qPgPZcXgyUeDgSFlGWFpuEYxgqtV3XuAbs9O97/WJJ +A3tfRB6Tyv7AnLv6s4YWjVxoXTjqGhRGJ+QiB75hni9/ezhnMNoUxtC1gGW5tPfeg8QEa/ KFnFOmkB2Ozb28xvTkQaw== X-UI-Out-Filterresults: notjunk:1;V01:K0:NB6FE30qqQo=:kOKoQxf6HMId5TwO0lgVW0 +JUCC2knyIRp9rIfqkj3TqnPuMEPwWMGY9STucGJcd3uFion2DldDmYHwWeVqSq2OJQ/xKzCr oxX1hH+cwPsZ7QGdlefDjMcU4kKfnIhh+RPfK19lc7uUCRgcO5Wu6l6FnC31Rm5WOw/AfW0Kp P14PmLTpjPSqVDBuveIr67/+QJ0zlX7gmnQHnYZYQY5eDZy7rpkgZT7pHHcdsIuC4thC9hewH tGqfZ5QO3DFAxRxMVInygf7FxPGHLBsl1QubxvTl4g3quE3nDie9nvXVTU9naBxV0iEb/pQRe bTdMa2gxNzgZ4A882YHH5VSVvIY7/pRvfvBYQW4TPL3D8QVgxsOWjjwi1wNNKUTEU6lVf6Hpv hfurJl174R72XK1pw4ZeQxBeAYJWV2UxxniQprY8IUZsvDXcP0g/HZjZAtMeLGsUGWwqCnZ4o FCQdGl3fU5my2GBErvcBM74k791nTTIOE0IZc5EhsiHZhnsTq0m06wBMlFXOIHDweksbiQXbD AN7YMfRU3G7GrwylY/PyTVM69OspzYe9NqQDSMbx8cEf+83yUQEU0L9k0NtfVlZjJO9JpvmyF HSlGputt8CoRwfOMgXRW8CttC9aAISgWtvMjhbpv7gDfe8v1eC8vRs0kXp3dtQdSXN5DUV9G7 1KK4Rcon5+ruPG/0X8h7qNCpzL4wi3DkpQxJgirFHsk2YSItR8XZtoPeenvHfkv0PZmDMR1zT Z69i+DpFFg7CJ7EmlFgim7n2Ml5SNJizEb4sIBPKoIifTEAeOjQbkvlSaek7Immx5x+kbNPc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216875 Archived-At: On Wed, 19 Jul 2017 10:18:32 +0200 martin rudalics wrote: >> This is what's supposed to happen >> (what the test tests for): (1) the todo-mode buffer is displayed in a >> window; (2) calling dired makes the window display a directory; (3) >> calling todo-show makes the window display the todo-mode buffer again; >> (4) calling todo-quit buries the todo-mode buffer, so the window >> displays the directory again; (5) now immediately calling quit-window in >> the directory should not make the window display the todo-mode buffer >> again, if there is an alternative. This worked when dired used >> switch-to-buffer, but no longer works now that dired uses >> pop-to-buffer-same-window. I'd be grateful for any advice. > > The problematic step is (4). =E2=80=98quit-window=E2=80=99 has no idea o= f the semantics > of =E2=80=98bury-buffer=E2=80=99 (neither do I). But if no one objects w= e could install > the attached patch. Thanks for the patch (and the clarifications). But I feel uneasy about changing a general function to cater to the specific needs of todo-mode, unless it is certain that the change would not cause problems for other existing uses. This unease prompted me to look at todo-quit again, and it turns out that replacing bury-buffer there by quit-window DTRT as described above. So I will make that change and there's no need to change bury-buffer. This should also mean the existing test will work again without change (I'll confirm with `make check' before pushing). (I had taken over the invocation of bury-buffer in todo-quit from the old first version of todo-mode.el, which I believe predates the introduction quit-window, and till now had not second-guessed its use. Better late than never.) Thanks for the feedback. Steve Berman