From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: When do you prefer frames instead of windows? Date: Wed, 26 Nov 2014 12:02:15 +0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416978156 8716 80.91.229.3 (26 Nov 2014 05:02:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2014 05:02:36 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Ralf Fassel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 26 06:02:30 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XtUkH-0006ey-6U for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2014 06:02:29 +0100 Original-Received: from localhost ([::1]:60467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtUkG-0004Aw-FQ for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Nov 2014 00:02:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtUk5-0004Ac-N7 for help-gnu-emacs@gnu.org; Wed, 26 Nov 2014 00:02:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtUk4-0001iR-K5 for help-gnu-emacs@gnu.org; Wed, 26 Nov 2014 00:02:17 -0500 Original-Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]:65148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtUk4-0001iM-Ew for help-gnu-emacs@gnu.org; Wed, 26 Nov 2014 00:02:16 -0500 Original-Received: by mail-ig0-f177.google.com with SMTP id z20so2005974igj.4 for ; Tue, 25 Nov 2014 21:02:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=h/jlAORHmVKQaW1PLE0RvVUz8E1MaMM7wpeSrIEFbOk=; b=GjbGKKKL092sjfIiL4mUwp6nmKpqhll19jIMgNLcXMHIkUoGAuJ26OSpGwbdf7wCtY i4C5zDOvCQ8NO4dbAMYi1fSItfOWoLmF8x5MWJ9zF/mtwtgsWB2b3csrCUOnIb8gBvSR CU5VQxtfAg+3ChIAF+2yd5VZuZihJX4IX0gCUEpwa865MU5ar6BYxLqL/XXnDEA/mA1r JtuCXZdKHtlJvTtCcrzybgxhIuYUuRFLHa28FpBH+BwBS+q9yx4svLOW2j8plDFM5iIE i4QM2GqzfURe7PLZntsDu2u+el0xdsG2SdWgI06cOKEX5UZlo5L6wxIv/w5vS5DXmwWu 101A== X-Received: by 10.50.35.195 with SMTP id k3mr21397282igj.11.1416978135707; Tue, 25 Nov 2014 21:02:15 -0800 (PST) Original-Received: by 10.107.48.82 with HTTP; Tue, 25 Nov 2014 21:02:15 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: XeHV3oHa1TaDXRnHkNN8946JvCw X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101207 Archived-At: On Tue, Nov 25, 2014 at 9:57 PM, Ralf Fassel wrote: > I now have bound a key to get my ediff control panel back: > runs the command (lambda nil (interactive) (let ((buf > (get-buffer "*Ediff Control Panel*"))) (if buf (pop-to-buffer buf))))= , > which is an interactive Lisp function. > and then C-l recenters everything (could even pack that in the > keybinding, but...) You might want to go further (I know I do!) and make bindings that (1) temporarily switch to the ediff control panel, (2) perform an ediff control panel command, (3) switch back to the buffer you were in =E2=80=94 = for each command that you frequently use in ediff. (Personally I find next-difference and previous-difference sufficient.) Something like this: (require 'cl) (defun yk-global-ediff--find-session (buffer) "Return the control buffer of the first ediff session involving BUFFER, or the control buffer of the first ediff session, or nil." (or (cl-find-if (lambda (control-buffer) (with-current-buffer control-buffer (memq buffer (list ediff-buffer-A ediff-buffer-B ediff-buffer-C)))) ediff-session-registry) (car-safe ediff-session-registry))) (defun yk-global-ediff-next-difference () "Go to the next difference according to the ediff session involving the current buffer, or if there is no such session, according to the first ediff session." (interactive) (let ((session (yk-global-ediff--find-session (current-buffer)))) (when session (save-window-excursion (with-current-buffer session (ediff-next-difference)))))) (defun yk-global-ediff-previous-difference () "Go to the previous difference according to the ediff session involving the current buffer, or if there is no such session, according to the first ediff session." (interactive) (let ((session (yk-global-ediff--find-session (current-buffer)))) (when session (save-window-excursion (with-current-buffer session (ediff-previous-difference)))))) (define-minor-mode yk-global-ediff-navigation-mode "Toggle global ediff navigation mode." :global t :lighter " E=E2=89=9C" :init-value nil :keymap `((,(kbd "M-n") . yk-global-ediff-next-difference) (,(kbd "M-p") . yk-global-ediff-previous-difference))) (defun yk-global-ediff--cleanup () (unless ediff-session-registry (yk-global-ediff-navigation-mode 0))) (add-hook 'ediff-mode-hook 'yk-global-ediff-navigation-mode) (add-hook 'ediff-cleanup-hook 'yk-global-ediff--cleanup)