From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3973: cleanup view-mode usage in vc-resynch-window Date: Fri, 31 Jul 2009 15:19:18 -0400 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> Reply-To: Stefan Monnier , 3973@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249068425 18679 80.91.229.12 (31 Jul 2009 19:27:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 19:27:05 +0000 (UTC) Cc: 3973@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 31 21:26:58 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MWxko-0006bm-2x for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 21:26:58 +0200 Original-Received: from localhost ([127.0.0.1]:58950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWxkn-0001AY-AG for geb-bug-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 15:26:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWxkj-0001AM-Jg for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 15:26:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWxke-0001A1-4p for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 15:26:52 -0400 Original-Received: from [199.232.76.173] (port=53297 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWxkd-00019y-Ue for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 15:26:47 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:40308) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWxkd-0008Rs-FW for bug-gnu-emacs@gnu.org; Fri, 31 Jul 2009 15:26:47 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6VJQink015296; Fri, 31 Jul 2009 12:26:45 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6VJP668015014; Fri, 31 Jul 2009 12:25:06 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 19:25:06 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3973-submit@emacsbugs.donarmstrong.com id=B3973.124906797014551 (code B ref 3973); Fri, 31 Jul 2009 19:25:06 +0000 Original-Received: (at 3973) by emacsbugs.donarmstrong.com; 31 Jul 2009 19:19:30 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-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" Original-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 Original-Received: by pastel.home (Postfix, from userid 20848) id 8370C800B; Fri, 31 Jul 2009 15:19:18 -0400 (EDT) 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) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 31 Jul 2009 15:26:52 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29770 Archived-At: > 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