all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
@ 2012-11-08 17:29 Michael Heerdegen
  2022-05-10 12:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2012-11-08 17:29 UTC (permalink / raw)
  To: 12840

Hello,

I use ediff with this setting:

(setq ediff-window-setup-function 'ediff-setup-windows-plain)

Then, the mode-line of the control buffer looks like that:

-- *Ediff Control Panel*   diff 1 of 1        Quick Help

My questions/requests:

1.  It would be much more convenient if the "diff ... of ..." part would
be highlighted somehow, so that it is more visible.  It is an extremely
relevant information, and can now be recognized very badly.

The function to change would probably be
`ediff-make-wide-control-buffer-id'.  I tested with this, for example:

(defun ediff-make-wide-control-buffer-id ()
  (list (concat "%b   "
                (propertize (cond ((< ediff-current-difference 0)
                                   (format "At start of %d diffs"
                                           ediff-number-of-differences))
                                  ((>= ediff-current-difference ediff-number-of-differences)
                                   (format "At end of %d diffs"
                                           ediff-number-of-differences))
                                  (t
                                   (format "diff %d of %d"
                                           (1+ ediff-current-difference)
                                           ediff-number-of-differences)))
                            'face 'mode-line-buffer-id))))

2. What's the "Quick Help" part for?  I don't see any use for it.  It
seems to be always present, but it doesn't indicate anything, and I
cannot click on it.  Also, if I didn't hit ? in the control buffer, the
only content of this buffer already is "Type ? for help".

This is more a question.  I just don't see the purpose of showing this
string.  Maybe I've overlooked something.


Thanks,

Michael.



In GNU Emacs 24.2.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2012-11-01 on dex, modified by Debian
 (emacs-snapshot package, version 2:20121101-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
System Description:	Debian GNU/Linux testing (wheezy)

Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.2.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2.50/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g
 -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t






^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2012-11-08 17:29 bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request Michael Heerdegen
@ 2022-05-10 12:08 ` Lars Ingebrigtsen
  2022-05-11  0:02   ` Michael Heerdegen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-10 12:08 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 12840

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

Michael Heerdegen <michael_heerdegen@web.de> writes:

> 1.  It would be much more convenient if the "diff ... of ..." part would
> be highlighted somehow, so that it is more visible.  It is an extremely
> relevant information, and can now be recognized very badly.
>
> The function to change would probably be
> `ediff-make-wide-control-buffer-id'.  I tested with this, for example:

[...]

>                             'face 'mode-line-buffer-id))))

I wouldn't mind making that bit bold, but it is somewhat unusual for
modes to do that.  On the other and, there isn't really a lot of other
info in that mode line, so it wouldn't be distracting, either:


[-- Attachment #2: Type: image/png, Size: 12938 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]


> 2. What's the "Quick Help" part for?  I don't see any use for it.  It
> seems to be always present, but it doesn't indicate anything, and I
> cannot click on it.  Also, if I didn't hit ? in the control buffer, the
> only content of this buffer already is "Type ? for help".

The "Quick Help" bit has a popup that says what mouse-2 and mouse-3
does, which seems somewhat helpful.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-05-10 12:08 ` Lars Ingebrigtsen
@ 2022-05-11  0:02   ` Michael Heerdegen
  2022-05-11 11:51     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2022-05-11  0:02 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 12840

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I wouldn't mind making that bit bold, but it is somewhat unusual for
> modes to do that.  On the other and, there isn't really a lot of other
> info in that mode line, so it wouldn't be distracting, either:
> [screenshot]

I can only speak for me.  When looking at the mode line I want to see
the diff numbers in nearly all cases, and I don't want distractions when
using Ediff, so I made them outstanding (red).

> > 2. What's the "Quick Help" part for?  I don't see any use for it.  It
> > seems to be always present, but it doesn't indicate anything, and I
> > cannot click on it.  Also, if I didn't hit ? in the control buffer, the
> > only content of this buffer already is "Type ? for help".
>
> The "Quick Help" bit has a popup that says what mouse-2 and mouse-3
> does, which seems somewhat helpful.

But that's the same mouse tooltip as the rest of the mode-line of the
control buffer has.

Those mouse bindings are not "Quick Help" nor Ediff specific, they are
the very basic bindings from mouse.el:

(global-set-key [mode-line mouse-1] #'mouse-select-window)
(global-set-key [mode-line mouse-2] #'mouse-delete-other-windows)
(global-set-key [mode-line mouse-3] #'mouse-delete-window)

No problem about the tooltip - but that doesn't explain why "Quick Help"
is displayed.

The "quick help" is what you get when you hit `?`.  Look: Without the

  (setq ediff-window-setup-function 'ediff-setup-windows-plain)

setting, the control frame doesn't display a mode-line, but after
hitting `?` it does, and the "Quick Help" info gets visible.  My
interpretation is that 'ediff-setup-windows-plain has been added later,
after quick help, and the "Quick Help" string was never intended to be
visible all the time.  Plausible?

Michael.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-05-11  0:02   ` Michael Heerdegen
@ 2022-05-11 11:51     ` Lars Ingebrigtsen
  2022-06-13 13:50       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-05-11 11:51 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 12840

Michael Heerdegen <michael_heerdegen@web.de> writes:

> The "quick help" is what you get when you hit `?`.  Look: Without the
>
>   (setq ediff-window-setup-function 'ediff-setup-windows-plain)
>
> setting, the control frame doesn't display a mode-line, but after
> hitting `?` it does, and the "Quick Help" info gets visible.  My
> interpretation is that 'ediff-setup-windows-plain has been added later,
> after quick help, and the "Quick Help" string was never intended to be
> visible all the time.  Plausible?

Yes, that sounds likely to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-05-11 11:51     ` Lars Ingebrigtsen
@ 2022-06-13 13:50       ` Lars Ingebrigtsen
  2022-06-14 14:45         ` Michael Heerdegen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-13 13:50 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 12840

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
>> The "quick help" is what you get when you hit `?`.  Look: Without the
>>
>>   (setq ediff-window-setup-function 'ediff-setup-windows-plain)
>>
>> setting, the control frame doesn't display a mode-line, but after
>> hitting `?` it does, and the "Quick Help" info gets visible.  My
>> interpretation is that 'ediff-setup-windows-plain has been added later,
>> after quick help, and the "Quick Help" string was never intended to be
>> visible all the time.  Plausible?
>
> Yes, that sounds likely to me.

I've now done these changes in Emacs 29 -- removed the "Quick Help"
thing with the plain setting, and made the informative parts bold (using
your suggested function).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-06-13 13:50       ` Lars Ingebrigtsen
@ 2022-06-14 14:45         ` Michael Heerdegen
  2022-06-15 12:09           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2022-06-14 14:45 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 12840

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I've now done these changes in Emacs 29 -- removed the "Quick Help"
> thing with the plain setting, and made the informative parts bold
> (using your suggested function).

Thanks.

I would rather like to avoid to decide based on the value of
`ediff-window-setup-function' since users may wish to implement their
own setup functions.

Maybe a better approach of deciding would be to make it depend on
whether the Quick Help is currently displayed?  Seems there is a
variable we could use:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Tune-when-to-show-Quick-Help-in-Ediff.patch --]
[-- Type: text/x-diff, Size: 1045 bytes --]

From fb2ff90ea8011eb7ebe1961869a74374a266c1d6 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Tue, 14 Jun 2022 15:09:31 +0200
Subject: [PATCH] WIP: Tune when to show "Quick Help" in Ediff

---
 lisp/vc/ediff-wind.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 4549b910b1..6db3667545 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -1136,9 +1136,7 @@ ediff-refresh-mode-lines
 	  (if (ediff-narrow-control-frame-p)
 	      (list "   " mode-line-buffer-identification)
 	    (list "-- " mode-line-buffer-identification
-                  (and (not (eq ediff-window-setup-function
-                                'ediff-setup-windows-plain))
-                       "        Quick Help"))))
+                  (list 'ediff-use-long-help-message "        Quick Help"))))
     ;; control buffer id
     (setq mode-line-buffer-identification
 	  (if (ediff-narrow-control-frame-p)
--
2.30.2


[-- Attachment #3: Type: text/plain, Size: 11 bytes --]



Michael.

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-06-14 14:45         ` Michael Heerdegen
@ 2022-06-15 12:09           ` Lars Ingebrigtsen
  2022-06-19 12:30             ` Michael Heerdegen
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-15 12:09 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 12840

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Maybe a better approach of deciding would be to make it depend on
> whether the Quick Help is currently displayed?  Seems there is a
> variable we could use:

Sure, that's better; please go ahead and push.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request
  2022-06-15 12:09           ` Lars Ingebrigtsen
@ 2022-06-19 12:30             ` Michael Heerdegen
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Heerdegen @ 2022-06-19 12:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 12840

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Sure, that's better; please go ahead and push.

Done.

I also investigated what the original intention could have been.
Originally, "Howdy!" was shown instead of "Quick Help".

Later this was changed to "Quick Help" (to say something meaningful, I
guess).  So I would say we are compatible with the original intention.

Michael.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-19 12:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 17:29 bug#12840: 24.2.50; ediff: mode-line of control buffer - improvement request Michael Heerdegen
2022-05-10 12:08 ` Lars Ingebrigtsen
2022-05-11  0:02   ` Michael Heerdegen
2022-05-11 11:51     ` Lars Ingebrigtsen
2022-06-13 13:50       ` Lars Ingebrigtsen
2022-06-14 14:45         ` Michael Heerdegen
2022-06-15 12:09           ` Lars Ingebrigtsen
2022-06-19 12:30             ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.