From unknown Mon Jun 16 17:52:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#3973 <3973@debbugs.gnu.org> To: bug#3973 <3973@debbugs.gnu.org> Subject: Status: cleanup view-mode usage in vc-resynch-window Reply-To: bug#3973 <3973@debbugs.gnu.org> Date: Tue, 17 Jun 2025 00:52:55 +0000 retitle 3973 cleanup view-mode usage in vc-resynch-window reassign 3973 emacs submitter 3973 Dan Nicolaescu severity 3973 minor tag 3973 fixed thanks From dann@godzilla.ics.uci.edu Thu Jul 30 00:47:53 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Jul 2009 07:47:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,FOURLA,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6U7lmeC001487 for ; Thu, 30 Jul 2009 00:47:50 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWQMe-0003rG-K0 for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 03:47:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWQMa-0003pg-PE for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 03:47:48 -0400 Received: from [199.232.76.173] (port=55431 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWQMa-0003pT-HU for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 03:47:44 -0400 Received: from mx20.gnu.org ([199.232.41.8]:13206) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWQMZ-0006IY-GZ for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 03:47:43 -0400 Received: from sallyv2.ics.uci.edu ([128.195.1.120]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWQL6-0007R8-Mq for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 03:46:13 -0400 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6U7iwSH004961 for ; Thu, 30 Jul 2009 00:44:59 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6U7iwdl028160; Thu, 30 Jul 2009 00:44:58 -0700 (PDT) Date: Thu, 30 Jul 2009 00:44:58 -0700 (PDT) Message-Id: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> From: Dan Nicolaescu To: bug-gnu-emacs Subject: cleanup view-mode usage in vc-resynch-window X-Debbugs-No-Ack: yes Lines: 18 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6U7iwSH004961 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Detected-Operating-System: by mx20.gnu.org: Solaris 10 (beta) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) vc-resynch-window contains this code: ;; TODO: Adjusting view mode might no longer be necessary ;; after RMS change to files.el of 1999-08-08. Investigate ;; this when we install the new VC. (and view-read-only (if (file-writable-p file) (and view-mode (let ((view-old-buffer-read-only nil)) (view-mode-exit))) (and (not view-mode) (not (eq (get major-mode 'mode-class) 'special)) (view-mode-enter)))) not sure what it's supposed to do... But the comment (added in Apr 2000!) seems to say that it can be removed. Should it? From monnier@IRO.UMontreal.CA Thu Jul 30 14:14:40 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Jul 2009 21:14:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.4 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6ULEaCq002063 for ; Thu, 30 Jul 2009 14:14:38 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWcxP-0001Nz-NP for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 17:14:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWcxL-0001MK-8l for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 17:14:35 -0400 Received: from [199.232.76.173] (port=56217 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWcxK-0001MD-Ug for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 17:14:31 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45166) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWcxK-0001Xr-Gx for bug-gnu-emacs@gnu.org; Thu, 30 Jul 2009 17:14:30 -0400 Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id n6ULENWX002551; Thu, 30 Jul 2009 17:14:23 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 4B9653A06B; Thu, 30 Jul 2009 17:14:20 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 3973@debbugs.gnu.org, bug-gnu-emacs Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window Message-ID: References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> Date: Thu, 30 Jul 2009 17:14:20 -0400 In-Reply-To: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 30 Jul 2009 00:44:58 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (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 RV3330=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) > not sure what it's supposed to do... > But the comment (added in Apr 2000!) seems to say that it can be removed. > Should it? I don't know. Someone needs to try it, Stefan From dann@godzilla.ics.uci.edu Thu Jul 30 15:07:23 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 30 Jul 2009 22:07:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6UM7H81008549 for <3973@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 15:07:18 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6UM6pT7001357; Thu, 30 Jul 2009 15:06:52 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6UM6pBR008840; Thu, 30 Jul 2009 15:06:51 -0700 (PDT) Date: Thu, 30 Jul 2009 15:06:51 -0700 (PDT) Message-Id: <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Stefan Monnier's message of "Thu, 30 Jul 2009 17:14:20 -0400") Lines: 11 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6UM6pT7001357 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > > not sure what it's supposed to do... > > But the comment (added in Apr 2000!) seems to say that it can be removed. > > Should it? > > I don't know. Someone needs to try it, I have removed that code locally for a while and didn't see any problem. But I don't explicitly use view-mode, so... How about remove the code and see if someone sees a problem? From monnier@iro.umontreal.ca Thu Jul 30 19:17:51 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 02:17:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V2HkdJ027842 for <3973@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 19:17:48 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsFAErscUpFpZgv/2dsb2JhbACBUtElhBcFhxqCUQ X-IronPort-AV: E=Sophos;i="4.43,299,1246852800"; d="scan'208";a="42598247" Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 30 Jul 2009 21:54:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id BE102800B; Thu, 30 Jul 2009 21:54:38 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window Message-ID: References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> Date: Thu, 30 Jul 2009 21:54:38 -0400 In-Reply-To: <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 30 Jul 2009 15:06:51 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > I have removed that code locally for a while and didn't see any > problem. But I don't explicitly use view-mode, so... Obiously the code only makes a difference when you use view-read-only, so you'll need to set it to a non-nil value before doing any test. > How about remove the code and see if someone sees a problem? Not before trying out the corresponding feature, I think. Stefan From dann@godzilla.ics.uci.edu Thu Jul 30 20:23:31 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 03:23:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-7.0 required=4.0 tests=AWL,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from sallyv2.ics.uci.edu (sallyv2.ics.uci.edu [128.195.1.120]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V3NSSi002602 for <3973@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 20:23:29 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by sallyv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6V3Mo5Z016071; Thu, 30 Jul 2009 20:22:50 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6V3Mo26012548; Thu, 30 Jul 2009 20:22:50 -0700 (PDT) Date: Thu, 30 Jul 2009 20:22:50 -0700 (PDT) Message-Id: <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Stefan Monnier's message of "Thu, 30 Jul 2009 21:54:38 -0400") Lines: 20 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6V3Mo5Z016071 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > > I have removed that code locally for a while and didn't see any > > problem. But I don't explicitly use view-mode, so... > > Obiously the code only makes a difference when you use view-read-only, > so you'll need to set it to a non-nil value before doing any test. [I've never done anything with view-read-only before...] I set view-read-only to t, then played with a file under RCS. When the files is checked in view-mode is turned on, when checking it out it's turned off. If the code in question is eliminated, view-mode stays turned on after checking out. There's some code in `after-find-file' (that gets called from `revert-buffer') that looks like it does something very similar to the code in question here, but `after-find-file' is called with `nomodes' t, so that code does not trigger. From monnier@iro.umontreal.ca Thu Jul 30 20:43:50 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 03:43:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V3hjv6004458 for <3973@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 20:43:47 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvoEAOcEckpFpZgv/2dsb2JhbACBUtEWhBcFhxqCUQ X-IronPort-AV: E=Sophos;i="4.43,299,1246852800"; d="scan'208";a="42601016" Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 30 Jul 2009 23:43:39 -0400 Received: by pastel.home (Postfix, from userid 20848) id 79978800B; Thu, 30 Jul 2009 23:43:39 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window Message-ID: References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> Date: Thu, 30 Jul 2009 23:43:39 -0400 In-Reply-To: <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 30 Jul 2009 20:22:50 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> > I have removed that code locally for a while and didn't see any >> > problem. But I don't explicitly use view-mode, so... >> >> Obiously the code only makes a difference when you use view-read-only, >> so you'll need to set it to a non-nil value before doing any test. > [I've never done anything with view-read-only before...] > I set view-read-only to t, then played with a file under RCS. > When the files is checked in view-mode is turned on, when checking it > out it's turned off. > If the code in question is eliminated, view-mode stays turned on after > checking out. > There's some code in `after-find-file' (that gets called from > `revert-buffer') that looks like it does something very similar to the > code in question here, but `after-find-file' is called with `nomodes' t, > so that code does not trigger. So it seems the code is still needed. Maybe we could/should replace it with something more clear: E.g. move that code to a new function `view-refresh' (or whatever else), which we can then call from VC. Maybe a better option in the longer term is refine the meaning of the `preserve-modes' arg to revert-buffer, so that some minor modes can request to be refreshed or not (the VC state is one that would also benefit from such a change, as can be seen in auto-revert-mode). Stefan From dann@godzilla.ics.uci.edu Thu Jul 30 23:28:36 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 06:28:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V6SWj8027340 for <3973@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 23:28:33 -0700 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n6V6SASS005030; Thu, 30 Jul 2009 23:28:10 -0700 (PDT) Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n6V6SAS7014974; Thu, 30 Jul 2009 23:28:10 -0700 (PDT) Date: Thu, 30 Jul 2009 23:28:10 -0700 (PDT) Message-Id: <200907310628.n6V6SAS7014974@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Stefan Monnier Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> X-Debbugs-No-Ack: yes In-Reply-To: (Stefan Monnier's message of "Thu, 30 Jul 2009 23:43:39 -0400") Lines: 49 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n6V6SASS005030 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu Stefan Monnier writes: > >> > I have removed that code locally for a while and didn't see any > >> > problem. But I don't explicitly use view-mode, so... > >> > >> Obiously the code only makes a difference when you use view-read-only, > >> so you'll need to set it to a non-nil value before doing any test. > > > [I've never done anything with view-read-only before...] > > I set view-read-only to t, then played with a file under RCS. > > When the files is checked in view-mode is turned on, when checking it > > out it's turned off. > > > If the code in question is eliminated, view-mode stays turned on after > > checking out. > > > There's some code in `after-find-file' (that gets called from > > `revert-buffer') that looks like it does something very similar to the > > code in question here, but `after-find-file' is called with `nomodes' t, > > so that code does not trigger. > > So it seems the code is still needed. Maybe we could/should replace it > with something more clear: E.g. move that code to a new function > `view-refresh' (or whatever else), which we can then call from VC. The function would look like this: (defun view-maybe-enter-exit (file) (if (file-writable-p file) (and view-mode (let ((view-old-buffer-read-only nil)) (view-mode-exit))) (and (not view-mode) (not (eq (get major-mode 'mode-class) 'special)) (view-mode-enter)))) but the calling convention is strange: it needs to be called with a buffer selected and pass the file name... Not sure it's worth it. At least the TODO comment can go and be replaced with a comment about why changing the state of view-mode is needed there. > Maybe a better option in the longer term is refine the meaning of the > `preserve-modes' arg to revert-buffer, so that some minor modes can > request to be refreshed or not (the VC state is one that would also > benefit from such a change, as can be seen in auto-revert-mode). That sounds like a good idea. Unfortunately I am not familiar with that code, it is quite complex and critical, and I don't think it's too important to fix it now, so I'll punt. From monnier@iro.umontreal.ca Fri Jul 31 12:19:29 2009 Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 19:19:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6VJJO1r014541 for <3973@emacsbugs.donarmstrong.com>; Fri, 31 Jul 2009 12:19:26 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsEFAAvgckpFpZgv/2dsb2JhbACBUtJZhBgFhyKCUQ X-IronPort-AV: E=Sophos;i="4.43,303,1246852800"; d="scan'208";a="42641332" Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 31 Jul 2009 15:19:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8370C800B; Fri, 31 Jul 2009 15:19:18 -0400 (EDT) From: Stefan Monnier To: Dan Nicolaescu Cc: 3973@debbugs.gnu.org Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window Message-ID: References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> <200907310628.n6V6SAS7014974@godzilla.ics.uci.edu> Date: Fri, 31 Jul 2009 15:19:18 -0400 In-Reply-To: <200907310628.n6V6SAS7014974@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 30 Jul 2009 23:28:10 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > The function would look like this: > (defun view-maybe-enter-exit (file) > (if (file-writable-p file) > (and view-mode > (let ((view-old-buffer-read-only nil)) > (view-mode-exit))) > (and (not view-mode) > (not (eq (get major-mode 'mode-class) 'special)) > (view-mode-enter)))) > but the calling convention is strange: it needs to be called with a > buffer selected and pass the file name... Not sure it's worth it. Why do we need to pass `file'? Can't we (assert (equal file buffer-file-name))? > At least the TODO comment can go and be replaced with a comment about > why changing the state of view-mode is needed there. Yes, please. >> Maybe a better option in the longer term is refine the meaning of the >> `preserve-modes' arg to revert-buffer, so that some minor modes can >> request to be refreshed or not (the VC state is one that would also >> benefit from such a change, as can be seen in auto-revert-mode). > That sounds like a good idea. Unfortunately I am not familiar with that > code, it is quite complex and critical, and I don't think it's too > important to fix it now, so I'll punt. Wise choice, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 16:18:02 2011 Received: (at control) by debbugs.gnu.org; 12 Jul 2011 20:18:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgjP7-0000L4-Jq for submit@debbugs.gnu.org; Tue, 12 Jul 2011 16:18:01 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgjP5-0000Kh-QB for control@debbugs.gnu.org; Tue, 12 Jul 2011 16:18:00 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QgjOs-000589-2K for control@debbugs.gnu.org; Tue, 12 Jul 2011 22:17:46 +0200 Date: Tue, 12 Jul 2011 22:17:45 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #3973 X-MailScanner-ID: 1QgjOs-000589-2K X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311106666.45152@ibtP2EyB0Uj7f3keBJhs2w X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control 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.7 (--) tags 3973 fixed close 3973 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 16:20:31 2011 Received: (at 3973) by debbugs.gnu.org; 12 Jul 2011 20:20: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 1QgjRT-0000QZ-1s for submit@debbugs.gnu.org; Tue, 12 Jul 2011 16:20:31 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgjQy-0000O4-VS for 3973@debbugs.gnu.org; Tue, 12 Jul 2011 16:20:04 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QgjQk-0005Aq-DM; Tue, 12 Jul 2011 22:19:42 +0200 From: Lars Magne Ingebrigtsen To: Stefan Monnier Subject: Re: bug#3973: cleanup view-mode usage in vc-resynch-window In-Reply-To: (Stefan Monnier's message of "Fri, 31 Jul 2009 15:19:18 -0400") Date: Tue, 12 Jul 2011 22:17:39 +0200 Message-ID: References: <200907300744.n6U7iwdl028160@godzilla.ics.uci.edu> <200907302206.n6UM6pBR008840@godzilla.ics.uci.edu> <200907310322.n6V3Mo26012548@godzilla.ics.uci.edu> <200907310628.n6V6SAS7014974@godzilla.ics.uci.edu> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Peter Gabriel's _Peter Gabriel 4_: "San Jacinto" X-Hashcash: 1:23:110712:3973@debbugs.gnu.org::LbKF/T4+rS/2aAav:00000000000000000000000000000000000000000ZM+y X-Hashcash: 1:23:110712:monnier@iro.umontreal.ca::+tZnFAxY9ouxx28u:0000000000000000000000000000000000000bM7L X-Hashcash: 1:23:110712:dann@ics.uci.edu::3r4kBgMxm3M/xvS+:1OjQM MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QgjQk-0005Aq-DM X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311106782.74456@CbPGAKCHaOeBDms+Cqgaow X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 3973 Cc: 3973@debbugs.gnu.org, Dan Nicolaescu 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.7 (--) Stefan Monnier writes: >> At least the TODO comment can go and be replaced with a comment about >> why changing the state of view-mode is needed there. > > Yes, please. Apparently this was done, so I'm closing this report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Mon Jun 16 17:52:55 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, 10 Aug 2011 11:24:06 +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