From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marvin Newsgroups: gmane.emacs.help,gmane.emacs.devel Subject: Re: [PATCH] Display brief keybinding help on ediff-directories Date: Mon, 22 Jan 2007 16:17:55 -0500 Message-ID: <45B52A03.2080109@gmail.com> References: <45B5247D.6050203@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030705070705000904030502" X-Trace: sea.gmane.org 1169508453 31250 80.91.229.12 (22 Jan 2007 23:27:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 22 Jan 2007 23:27:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 23 00:27:25 2007 Return-path: Envelope-to: geh-help-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 1H98ZL-0004y8-Ej for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Jan 2007 00:27:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H98ZH-0006Lp-Ka for geh-help-gnu-emacs@m.gmane.org; Mon, 22 Jan 2007 18:27:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H96YB-00074z-48 for help-gnu-emacs@gnu.org; Mon, 22 Jan 2007 16:17:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H96Y8-00071y-Cz for help-gnu-emacs@gnu.org; Mon, 22 Jan 2007 16:17:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H96Y8-00071a-5Z; Mon, 22 Jan 2007 16:17:56 -0500 Original-Received: from [65.222.174.5] (helo=class.objectsciences.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H96Y7-0001DU-OB; Mon, 22 Jan 2007 16:17:55 -0500 Original-Received: from [127.0.0.1] (class.objectsciences.com [65.222.174.5]) by class.objectsciences.com (8.13.1/8.13.1) with ESMTP id l0MLHtt2025572; Mon, 22 Jan 2007 16:17:55 -0500 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: emacs-devel@gnu.org, help-gnu-emacs@gnu.org In-Reply-To: <45B5247D.6050203@gmail.com> X-Mailman-Approved-At: Mon, 22 Jan 2007 18:26:36 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40544 gmane.emacs.devel:65392 Archived-At: This is a multi-part message in MIME format. --------------030705070705000904030502 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit (oops) I am forever tired of ediff-directories using 2/3 of the screen for key bindings that I learned a while back. This patch makes ediff-directories meta buffer behave in a fashion analogous to the ediff buffer, toggling detailed help on '?' Patch is from emacs 22 on ediff-mult.el (r1.51) Marvin Greenberg --------------030705070705000904030502 Content-Type: text/plain; name="ediff-mult.el.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ediff-mult.el.patch" --- ediff-mult.el-r1.51 2007-01-22 15:23:31.840383700 -0500 +++ ediff-mult.el 2007-01-22 15:33:46.336239700 -0500 @@ -129,10 +129,15 @@ ;; the registry buffer (defvar ediff-registry-buffer nil) -(defconst ediff-meta-buffer-message "This is an Ediff Session Group Panel: %s +(defconst ediff-meta-buffer-brief-message "Ediff Session Group Panel: %s + ?:\tDisplay more key bindings +") + +(defconst ediff-meta-buffer-verbose-message "Ediff Session Group Panel: %s Useful commands: button2, v, or RET over session record: start that Ediff session + ?:\tHide more key bindings M:\tin sessions invoked from here, brings back this group panel R:\tdisplay the registry of active Ediff sessions h:\tmark session for hiding (toggle) @@ -360,10 +365,24 @@ (if (stringp (ediff-get-session-objC-name session-info)) (file-directory-p (ediff-get-session-objC-name session-info)) t))) + +(ediff-defvar-local ediff-verbose-help-enabled nil + "If t, display redundant help in ediff-directories and other meta buffers. +Toggled by ediff-toggle-verbose-help-meta-buffer" ) + +;; Toggle verbose help in meta-buffers +;; TODO: Someone who understands all this can make it better. +(defun ediff-toggle-verbose-help-meta-buffer () + "Toggle showing tediously verbose help in meta buffers." + (interactive) + (setq ediff-verbose-help-enabled (not ediff-verbose-help-enabled)) + (ediff-update-meta-buffer (current-buffer) 'must-redraw)) + ;; set up the keymap in the meta buffer (defun ediff-setup-meta-map () (setq ediff-meta-buffer-map (make-sparse-keymap)) (suppress-keymap ediff-meta-buffer-map) + (define-key ediff-meta-buffer-map "?" 'ediff-toggle-verbose-help-meta-buffer) (define-key ediff-meta-buffer-map "q" 'ediff-quit-meta-buffer) (define-key ediff-meta-buffer-map "T" 'ediff-toggle-filename-truncation) (define-key ediff-meta-buffer-map "R" 'ediff-show-registry) @@ -392,7 +411,6 @@ ;; modify ediff-meta-buffer-map here (run-hooks 'ediff-meta-buffer-keymap-setup-hook)) - (defun ediff-meta-mode () "This mode controls all operations on Ediff session groups. It is entered through one of the following commands: @@ -924,27 +942,31 @@ (mapcar 'delete-overlay (overlays-in 1 1)) ; emacs ) - (insert (format ediff-meta-buffer-message - (ediff-abbrev-jobname ediff-metajob-name))) - (setq regexp (ediff-get-group-regexp meta-list) merge-autostore-dir (ediff-get-group-merge-autostore-dir meta-list)) - (cond ((ediff-collect-diffs-metajob) - (insert - " P:\tcollect custom diffs of all marked sessions\n")) - ((ediff-patch-metajob) - (insert - " P:\tshow patch appropriately for the context (session or group)\n"))) - (insert - " ^:\tshow parent session group\n") - (or (ediff-one-filegroup-metajob) - (insert - " D:\tshow differences among directories\n" - " ==:\tfor each session, show which files are identical\n" - " =h:\tlike ==, but also marks those sessions for hiding\n" - " =m:\tlike ==, but also marks those sessions for operation\n\n")) + (if ediff-verbose-help-enabled + (progn + (insert (format ediff-meta-buffer-verbose-message + (ediff-abbrev-jobname ediff-metajob-name))) + + (cond ((ediff-collect-diffs-metajob) + (insert + " P:\tcollect custom diffs of all marked sessions\n")) + ((ediff-patch-metajob) + (insert + " P:\tshow patch appropriately for the context (session or group)\n"))) + (insert + " ^:\tshow parent session group\n") + (or (ediff-one-filegroup-metajob) + (insert + " D:\tshow differences among directories\n" + " ==:\tfor each session, show which files are identical\n" + " =h:\tlike ==, but also marks those sessions for hiding\n" + " =m:\tlike ==, but also marks those sessions for operation\n\n"))) + (insert (format ediff-meta-buffer-brief-message + (ediff-abbrev-jobname ediff-metajob-name)))) (insert "\n") (if (and (stringp regexp) (> (length regexp) 0)) --------------030705070705000904030502 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --------------030705070705000904030502--