From: Marvin <public.marvin@gmail.com>
Subject: Re: [PATCH] Display brief keybinding help on ediff-directories
Date: Mon, 22 Jan 2007 16:17:55 -0500 [thread overview]
Message-ID: <45B52A03.2080109@gmail.com> (raw)
In-Reply-To: <45B5247D.6050203@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
(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
[-- Attachment #2: ediff-mult.el.patch --]
[-- Type: text/plain, Size: 4118 bytes --]
--- 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))
[-- Attachment #3: Type: text/plain, Size: 152 bytes --]
_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
prev parent reply other threads:[~2007-01-22 21:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-22 20:54 [PATCH] Display brief keybinding help on ediff-directories Marvin
2007-01-22 21:17 ` Marvin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45B52A03.2080109@gmail.com \
--to=public.marvin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).