unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bindings on the mode-line
@ 2005-09-14  9:57 Nick Roberts
  2005-09-14 14:05 ` Masatake YAMATO
  2005-09-15  2:41 ` Richard M. Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Nick Roberts @ 2005-09-14  9:57 UTC (permalink / raw)



Now that mouse-sensitive parts of the mode line look more like buttons, how
about moving mode-line-toggle-read-only, mode-line-toggle-modified et al from
mouse-3 to mouse-1?  This helps preserve the idiom of mouse-3 for context
menus.  I realise that there is no mouse face on text terminals but earlier
this year we decided to turn mouse functionality there off by default (for
xterms), so inadvertant activation is less likely.

Nick

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

* Re: Bindings on the mode-line
  2005-09-14  9:57 Bindings on the mode-line Nick Roberts
@ 2005-09-14 14:05 ` Masatake YAMATO
  2005-09-14 16:34   ` Drew Adams
  2005-09-15  2:41 ` Richard M. Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: Masatake YAMATO @ 2005-09-14 14:05 UTC (permalink / raw)
  Cc: emacs-devel

> Now that mouse-sensitive parts of the mode line look more like buttons, how
> about moving mode-line-toggle-read-only, mode-line-toggle-modified et al from
> mouse-3 to mouse-1?  This helps preserve the idiom of mouse-3 for context
> menus. 

I support this proposal. Emacs doesn't have convention for the usage of 
mouse-[1-3]. It is good time to define a convention like C-x for global
binding prefix and C-c for major mode prefix.

I hope mouse-3 is reserved for context menus.  In addition a key is
needed for popping up a context menu under point. The key may be
useful for heavy users who don't want to use mice. In xtla, C-j is
used for popping up a context menu in read-only buffers.

Masatake YAMATO

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

* RE: Bindings on the mode-line
  2005-09-14 14:05 ` Masatake YAMATO
@ 2005-09-14 16:34   ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2005-09-14 16:34 UTC (permalink / raw)


    I support this proposal. Emacs doesn't have convention for the usage of
    mouse-[1-3]. It is good time to define a convention like C-x for global
    binding prefix and C-c for major mode prefix.

I don't know if this is a good time for that - I doubt it. It will likely be
another wrestling match, with everyone having a different, strong opinion.
UI matters always seem to bring that out. After the release is a better
time.

    I hope mouse-3 is reserved for context menus.

I generally agree, with the proviso that "reserved" here be interpreted
rather softly. Mouse-3 is already used for such things as extending the
region, so such a reservation could not anyway be strict. IOW, it is
generally a good convention to use mouse-3, or mouse-3 with some modifier,
for context menus, but we shouldn't change important existing functionality
just to respect such a convention (IMO).

Also, it is sometimes useful to have different context menus available at
the same time. We already have C-mouse-3 (mode) and C-mouse-2 (Text
Properties), for instance. An additional (soft) convention could hold that
in such cases, the mouse-3 menu would be more directly related to the mode
(as is the case with C-mouse-3).

    In addition a key is needed for popping up a context menu under point.

Yes, that would be useful. When there is more than one such menu, the user
could choose (e.g. in the minibuffer).

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

* Re: Bindings on the mode-line
  2005-09-14  9:57 Bindings on the mode-line Nick Roberts
  2005-09-14 14:05 ` Masatake YAMATO
@ 2005-09-15  2:41 ` Richard M. Stallman
  2005-09-15  4:22   ` Nick Roberts
  1 sibling, 1 reply; 6+ messages in thread
From: Richard M. Stallman @ 2005-09-15  2:41 UTC (permalink / raw)
  Cc: emacs-devel

    Now that mouse-sensitive parts of the mode line look more like buttons, how
    about moving mode-line-toggle-read-only, mode-line-toggle-modified et al from
    mouse-3 to mouse-1?

Yes, that would be more consistent.  So please make that change, and thanks.

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

* Re: Bindings on the mode-line
  2005-09-15  2:41 ` Richard M. Stallman
@ 2005-09-15  4:22   ` Nick Roberts
  2005-09-16  1:01     ` Richard M. Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Roberts @ 2005-09-15  4:22 UTC (permalink / raw)
  Cc: emacs-devel

 >     Now that mouse-sensitive parts of the mode line look more like buttons,
 >     how about moving mode-line-toggle-read-only, mode-line-toggle-modified
 >     et al from mouse-3 to mouse-1?
 > 
 > Yes, that would be more consistent.  So please make that change, and thanks.

Done.  

Previously I have suggested putting goto-line on the mode line which
you didn't like.  However, it seems more natural now that it appears as a
button and can go on mouse-1.  WDYT?

Nick


(let* ((help-echo
	"mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this")
       (my-help-echo
	"mouse-1: go to line, mouse-2: delete others, mouse-3: delete this"))
(setq-default mode-line-position
    `((-3 ,(propertize "%p" 'help-echo help-echo))
      (size-indication-mode
       (8 ,(propertize " of %I" 'help-echo help-echo)))
      (line-number-mode
       ((column-number-mode
	 (10 ,(propertize " (%l,%c)" 'help-echo help-echo))
	 (6 ,(propertize " L%l" 'help-echo my-help-echo
			 'mouse-face 'mode-line-highlight
			 'local-map (make-mode-line-mouse-map
				     'mouse-1
				     #'mode-line-go-to-line)))))
      ((column-number-mode
	(5 ,(propertize " C%c" 'help-echo help-echo))))))))

(defun mode-line-go-to-line (event)
  "Like `go-to-line', for the mode-line."
  (interactive "e")
  (save-selected-window
    (select-window (posn-window (event-start event)))
    (let ((arg (read-from-minibuffer "Goto line: ")))
      (goto-line (string-to-int arg)))
    (force-mode-line-update)))

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

* Re: Bindings on the mode-line
  2005-09-15  4:22   ` Nick Roberts
@ 2005-09-16  1:01     ` Richard M. Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard M. Stallman @ 2005-09-16  1:01 UTC (permalink / raw)
  Cc: emacs-devel

I still don't like this.  What I don't like is that a command invoked
by clicking in the mode line reads a number in the minibuffer.
That seems like a bad interface design.

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

end of thread, other threads:[~2005-09-16  1:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-14  9:57 Bindings on the mode-line Nick Roberts
2005-09-14 14:05 ` Masatake YAMATO
2005-09-14 16:34   ` Drew Adams
2005-09-15  2:41 ` Richard M. Stallman
2005-09-15  4:22   ` Nick Roberts
2005-09-16  1:01     ` Richard M. Stallman

Code repositories for project(s) associated with this public inbox

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

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).