From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#45084: so-long mode vs. dired-view-file Date: Mon, 07 Jun 2021 20:14:11 +1200 Message-ID: <5b60e019029d510150f5bd9f2b87ddf4@webmail.orcon.net.nz> References: <87v9dfunti.5.fsf@jidanni.org> <376f3bbf8aa9df9efc2fc798077ea954@webmail.orcon.net.nz> <87y2bns2q5.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40356"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Orcon Webmail Cc: 45084@debbugs.gnu.org, Richard Stallman , jidanni@jidanni.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 07 10:15: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 1lqAPf-000AJP-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Jun 2021 10:15:11 +0200 Original-Received: from localhost ([::1]:33490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqAPe-0001pZ-Ag for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Jun 2021 04:15:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqAPW-0001om-Iy for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2021 04:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqAPW-0007aC-AP for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2021 04:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqAPW-0001mR-6Y for bug-gnu-emacs@gnu.org; Mon, 07 Jun 2021 04:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Jun 2021 08:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45084 X-GNU-PR-Package: emacs Original-Received: via spool by 45084-submit@debbugs.gnu.org id=B45084.16230536756794 (code B ref 45084); Mon, 07 Jun 2021 08:15:02 +0000 Original-Received: (at 45084) by debbugs.gnu.org; 7 Jun 2021 08:14:35 +0000 Original-Received: from localhost ([127.0.0.1]:54402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqAP1-0001lS-8A for submit@debbugs.gnu.org; Mon, 07 Jun 2021 04:14:34 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:43951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqAOv-0001lG-Tn for 45084@debbugs.gnu.org; Mon, 07 Jun 2021 04:14:29 -0400 Original-Received: from [10.253.37.70] (port=52568 helo=webmail.orcon.net.nz) by smtp-3.orcon.net.nz with esmtpa (Exim 4.90_1) (envelope-from ) id 1lqAOh-0002Eu-6E; Mon, 07 Jun 2021 20:14:15 +1200 Original-Received: from ip-116-251-149-206.kinect.net.nz ([116.251.149.206]) via [10.253.37.253] by webmail.orcon.net.nz with HTTP (HTTP/1.1 POST); Mon, 07 Jun 2021 20:14:11 +1200 In-Reply-To: <87y2bns2q5.fsf@gnus.org> X-Sender: psainty@orcon.net.nz X-GeoIP: -- X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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:208175 Archived-At: Hi Lars, Thanks for this. I've actually implemented a more general solution with default support for the view-mode case, so I'll revert your changes when I merge the scratch/so-long changes. https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=scratch/so-long&id=6edeae3b4b7dd5105c9cf0dc0560d4c2c96a85bd I don't see a problem with leaving your change in place for the interim, though. It doesn't handle the `so-long-revert' case, but there's no need to address that as my changes will deal with it. -Phil On 2021-06-06 22:32, Lars Ingebrigtsen wrote: > Richard Stallman writes: > >> dired-view-file does something quite unusual: it visits a file and >> puts >> it in View mode. >> >> I think so-long needs to make a special case for View mode. >> For instance, if View mode is in effect, it could (1) turn off View >> mode, >> (2) switch modes however it does, then (3) reenable View mode. > > It does feel a bit messy to special-case `view-mode' here, but on the > other hand, not doing so will make the `v' command in Dired a less > handy. > > So I've gone ahead with Richard's suggestion here in Emacs 28 -- > `so-long' will now restore the view minor mode if it was switched on.