From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Small enhancement for add-log.el Date: Tue, 12 Oct 2004 00:23:13 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200410072307.i97N7s307908@raven.dms.auburn.edu> <200410081301.i98D1qI13495@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097533458 2859 80.91.229.6 (11 Oct 2004 22:24:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Oct 2004 22:24:18 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 12 00:24:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CH8aM-0001Hn-00 for ; Tue, 12 Oct 2004 00:24:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CH8hJ-0005it-Pw for ged-emacs-devel@m.gmane.org; Mon, 11 Oct 2004 18:31:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CH8hB-0005iW-6n for emacs-devel@gnu.org; Mon, 11 Oct 2004 18:31:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CH8hA-0005iK-ON for emacs-devel@gnu.org; Mon, 11 Oct 2004 18:31:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CH8hA-0005iH-Lk for emacs-devel@gnu.org; Mon, 11 Oct 2004 18:31:08 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CH8Zc-0004Ne-QO for emacs-devel@gnu.org; Mon, 11 Oct 2004 18:23:21 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 7AD2D5EE11B; Tue, 12 Oct 2004 00:23:03 +0200 (CEST) Original-To: Luc Teirlinck In-Reply-To: <200410081301.i98D1qI13495@raven.dms.auburn.edu> (Luc Teirlinck's message of "Fri, 8 Oct 2004 08:01:52 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:28261 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28261 Luc Teirlinck writes: > If you want to visit a buffer in View mode, > just visit it in View mode. Again, I believe that the only problem is > that there is something in the pcl-cvs interface that you do not like. Ok, I agree that my proposal is not desireable. What about the following patch to pcl-cvs that adds a "v" command in cvs-mode (for cvs-mode-view-file): Index: lisp/pcvs-defs.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/pcvs-defs.el,v retrieving revision 1.28 diff -u -r1.28 pcvs-defs.el --- lisp/pcvs-defs.el 11 Oct 2004 14:58:54 -0000 1.28 +++ lisp/pcvs-defs.el 11 Oct 2004 22:15:32 -0000 @@ -374,7 +374,7 @@ ("r" . cvs-mode-remove) ("s" . cvs-mode-status) ("t" . cvs-mode-tag) - ;;("v" . cvs-mode-diff-vendor) + ("v" . cvs-mode-view-file) ("x" . cvs-mode-remove-handled) ;; cvstree bindings ("+" . cvs-mode-tree) Index: lisp/pcvs.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/pcvs.el,v retrieving revision 1.71 diff -u -r1.71 pcvs.el --- lisp/pcvs.el 2 Jul 2004 04:32:54 -0000 1.71 +++ lisp/pcvs.el 11 Oct 2004 22:21:34 -0000 @@ -1925,6 +1925,18 @@ (cvs-mode-find-file e 'dont-select)) +(defun cvs-mode-view-file (e) + "View the file." + (interactive (list last-input-event)) + (cvs-mode-find-file e nil t)) + + +(defun cvs-mode-view-file-other-window (e) + "View the file." + (interactive (list last-input-event)) + (cvs-mode-find-file e t t)) + + (defun cvs-find-modif (fi) (with-temp-buffer (call-process cvs-program nil (current-buffer) nil @@ -1935,7 +1947,7 @@ 1))) -(defun cvs-mode-find-file (e &optional other) +(defun cvs-mode-find-file (e &optional other view) "Select a buffer containing the file. With a prefix, opens the buffer in an OTHER window." (interactive (list last-input-event current-prefix-arg)) @@ -1968,6 +1980,8 @@ buf) (when (and cvs-find-file-and-jump (cvs-applicable-p fi 'diff-base)) (goto-line (cvs-find-modif fi))) + (when view + (view-mode 1)) buf)))))) -- Kim F. Storm http://www.cua.dk