unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* TAB in Eval: prompt in minibuffer?
@ 2005-12-06  0:44 Lennart Borgman
  2005-12-06  0:57 ` Juri Linkov
  2005-12-06  1:46 ` Chong Yidong
  0 siblings, 2 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-12-06  0:44 UTC (permalink / raw)


Is there any reason not to bind TAB to `lisp-complete-symbol' for the 
"Eval:" prompt in minibuffer? It is bound to `indent-for-tab-command' now.

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06  0:44 TAB in Eval: prompt in minibuffer? Lennart Borgman
@ 2005-12-06  0:57 ` Juri Linkov
  2005-12-06  1:46 ` Chong Yidong
  1 sibling, 0 replies; 16+ messages in thread
From: Juri Linkov @ 2005-12-06  0:57 UTC (permalink / raw)
  Cc: emacs-devel

> Is there any reason not to bind TAB to `lisp-complete-symbol' for the
> "Eval:" prompt in minibuffer? It is bound to
> indent-for-tab-command' now.

TAB in the minibuffer normally is used to complete the whole contents
of the minibuffer, but the "Eval:" minibuffer can contain arbitrary
expressions.  What you want is already available via M-TAB in the
minibuffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06  0:44 TAB in Eval: prompt in minibuffer? Lennart Borgman
  2005-12-06  0:57 ` Juri Linkov
@ 2005-12-06  1:46 ` Chong Yidong
  2005-12-06  1:52   ` Juri Linkov
  1 sibling, 1 reply; 16+ messages in thread
From: Chong Yidong @ 2005-12-06  1:46 UTC (permalink / raw)
  Cc: Emacs Devel

Lennart Borgman <lennart.borgman.073@student.lu.se> writes:

>> Is there any reason not to bind TAB to `lisp-complete-symbol' for the
>> "Eval:" prompt in minibuffer? It is bound to
>> indent-for-tab-command' now.
>
> TAB in the minibuffer normally is used to complete the whole contents
> of the minibuffer, but the "Eval:" minibuffer can contain arbitrary
> expressions.  What you want is already available via M-TAB in the
> minibuffer.

What's the point of indenting lisp expressions in the minibuffer?

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06  1:46 ` Chong Yidong
@ 2005-12-06  1:52   ` Juri Linkov
  2005-12-06  7:24     ` Lennart Borgman
  2005-12-06 21:54     ` Richard M. Stallman
  0 siblings, 2 replies; 16+ messages in thread
From: Juri Linkov @ 2005-12-06  1:52 UTC (permalink / raw)
  Cc: lennart.borgman.073, emacs-devel

>>> Is there any reason not to bind TAB to `lisp-complete-symbol' for the
>>> "Eval:" prompt in minibuffer? It is bound to
>>> indent-for-tab-command' now.
>>
>> TAB in the minibuffer normally is used to complete the whole contents
>> of the minibuffer, but the "Eval:" minibuffer can contain arbitrary
>> expressions.  What you want is already available via M-TAB in the
>> minibuffer.
>
> What's the point of indenting lisp expressions in the minibuffer?

Indenting Lisp expressions in the minibuffer is useless.  OTOH, binding TAB
to `lisp-complete-symbol' is redundant and also not quite a natural to type
inside Lisp expressions in the minibuffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06  1:52   ` Juri Linkov
@ 2005-12-06  7:24     ` Lennart Borgman
  2005-12-06 21:54     ` Richard M. Stallman
  1 sibling, 0 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-12-06  7:24 UTC (permalink / raw)
  Cc: Chong Yidong, emacs-devel

Juri Linkov wrote:

>>>>Is there any reason not to bind TAB to `lisp-complete-symbol' for the
>>>>"Eval:" prompt in minibuffer? It is bound to
>>>>indent-for-tab-command' now.
>>>>        
>>>>
>>>TAB in the minibuffer normally is used to complete the whole contents
>>>of the minibuffer, but the "Eval:" minibuffer can contain arbitrary
>>>expressions.  What you want is already available via M-TAB in the
>>>minibuffer.
>>>      
>>>
>>What's the point of indenting lisp expressions in the minibuffer?
>>    
>>
>
>Indenting Lisp expressions in the minibuffer is useless.  OTOH, binding TAB
>to `lisp-complete-symbol' is redundant and also not quite a natural to type
>inside Lisp expressions in the minibuffer.
>
My point is of course that I often find myself typing TAB to complete in 
the minibuffer even though I know I can use M-TAB. TAB is used to 
complete interactive commands and file names. Some part of my brain does 
not seem to care that it is another prompt.

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06  1:52   ` Juri Linkov
  2005-12-06  7:24     ` Lennart Borgman
@ 2005-12-06 21:54     ` Richard M. Stallman
  2005-12-06 22:58       ` Paul Pogonyshev
  1 sibling, 1 reply; 16+ messages in thread
From: Richard M. Stallman @ 2005-12-06 21:54 UTC (permalink / raw)
  Cc: lennart.borgman.073, cyd, emacs-devel

    > What's the point of indenting lisp expressions in the minibuffer?

    Indenting Lisp expressions in the minibuffer is useless.

It is not totally useless, but its usefulness is rather rare.
However, since completion is not that common, and since it
is easy enough on M-TAB, I agree we should make no change.

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06 21:54     ` Richard M. Stallman
@ 2005-12-06 22:58       ` Paul Pogonyshev
  2005-12-07  7:55         ` Juri Linkov
  0 siblings, 1 reply; 16+ messages in thread
From: Paul Pogonyshev @ 2005-12-06 22:58 UTC (permalink / raw)
  Cc: Juri Linkov, lennart.borgman.073, cyd

Richard M. Stallman wrote:
>     > What's the point of indenting lisp expressions in the minibuffer?
> 
>     Indenting Lisp expressions in the minibuffer is useless.
> 
> It is not totally useless, but its usefulness is rather rare.
> However, since completion is not that common, and since it
> is easy enough on M-TAB, I agree we should make no change.

Well, all modern desktops bind M-TAB to window switching, so Emacs
is left with `ESC TAB' only, which is not that easy.

Paul

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-06 22:58       ` Paul Pogonyshev
@ 2005-12-07  7:55         ` Juri Linkov
  2005-12-07 17:09           ` Drew Adams
  2005-12-07 22:59           ` Richard M. Stallman
  0 siblings, 2 replies; 16+ messages in thread
From: Juri Linkov @ 2005-12-07  7:55 UTC (permalink / raw)
  Cc: lennart.borgman.073, cyd, rms, emacs-devel

> Well, all modern desktops bind M-TAB to window switching, so Emacs
> is left with `ESC TAB' only, which is not that easy.

I suggest using its equivalent M-C-i.  Or maybe lisp-complete-symbol
should have an aliased keybinding S-TAB?

BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
available.  I think info.el, help.el and wid-edit.el should bind both
S-TAB and M-TAB to the same commands: S-TAB for window environments,
and M-TAB for ttys.  The current binding of M-TAB (`complete-symbol')
makes no sense in these modes anyway.

Index: lisp/info.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/info.el,v
retrieving revision 1.465
diff -c -r1.465 info.el
*** lisp/info.el	4 Dec 2005 04:31:59 -0000	1.465
--- lisp/info.el	7 Dec 2005 07:54:45 -0000
***************
*** 3071,3076 ****
--- 3083,3089 ----
    (define-key Info-mode-map " " 'Info-scroll-up)
    (define-key Info-mode-map "\C-m" 'Info-follow-nearest-node)
    (define-key Info-mode-map "\t" 'Info-next-reference)
+   (define-key Info-mode-map "\e\t" 'Info-prev-reference)
    (define-key Info-mode-map [(shift tab)] 'Info-prev-reference)
    (define-key Info-mode-map [backtab] 'Info-prev-reference)
    (define-key Info-mode-map "1" 'Info-nth-menu-item)

Index: lisp/button.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/button.el,v
retrieving revision 1.18
diff -c -r1.18 button.el
*** lisp/button.el	6 Aug 2005 22:13:41 -0000	1.18
--- lisp/button.el	7 Dec 2005 07:54:56 -0000
***************
*** 69,74 ****
--- 73,79 ----
  (defvar button-buffer-map
    (let ((map (make-sparse-keymap)))
      (define-key map [?\t] 'forward-button)
+     (define-key map "\e\t" 'backward-button)
      (define-key map [backtab] 'backward-button)
      map)
    "Keymap useful for buffers containing buttons.

Index: lisp/wid-edit.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/wid-edit.el,v
retrieving revision 1.155
diff -c -r1.155 wid-edit.el
*** lisp/wid-edit.el	16 Nov 2005 22:15:59 -0000	1.155
--- lisp/wid-edit.el	7 Dec 2005 07:54:38 -0000
***************
*** 852,857 ****
--- 852,858 ----
  (defvar widget-keymap
    (let ((map (make-sparse-keymap)))
      (define-key map "\t" 'widget-forward)
+     (define-key map "\e\t" 'widget-backward)
      (define-key map [(shift tab)] 'widget-backward)
      (define-key map [backtab] 'widget-backward)
      (define-key map [down-mouse-2] 'widget-button-click)

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* RE: TAB in Eval: prompt in minibuffer?
  2005-12-07  7:55         ` Juri Linkov
@ 2005-12-07 17:09           ` Drew Adams
  2005-12-07 20:55             ` Paul Pogonyshev
  2005-12-07 22:59           ` Richard M. Stallman
  1 sibling, 1 reply; 16+ messages in thread
From: Drew Adams @ 2005-12-07 17:09 UTC (permalink / raw)


    > Well, all modern desktops bind M-TAB to window switching, so Emacs
    > is left with `ESC TAB' only, which is not that easy.

    I suggest using its equivalent M-C-i.

That's OK too.

    Or maybe lisp-complete-symbol
    should have an aliased keybinding S-TAB?

No, no, please. Let's not swap modifiers. Let's leave S-TAB alone.

What's so bad about ESC-TAB? I use it all the time. It should complete
symbols in every editable buffer, including the minibuffer, IMO.

    BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
    makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
    available.  I think info.el, help.el and wid-edit.el should bind both
    S-TAB and M-TAB to the same commands: S-TAB for window environments,
    and M-TAB for ttys.  The current binding of M-TAB (`complete-symbol')
    makes no sense in these modes anyway.

Let's leave S-TAB alone here too. It should be M-TAB (or ESC-TAB, for those
of us who don't have M-TAB).

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-07 17:09           ` Drew Adams
@ 2005-12-07 20:55             ` Paul Pogonyshev
  2005-12-08  4:54               ` Richard M. Stallman
  0 siblings, 1 reply; 16+ messages in thread
From: Paul Pogonyshev @ 2005-12-07 20:55 UTC (permalink / raw)
  Cc: Drew Adams

Drew Adams wrote:
>     BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
>     makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
>     available.  I think info.el, help.el and wid-edit.el should bind both
>     S-TAB and M-TAB to the same commands: S-TAB for window environments,
>     and M-TAB for ttys.  The current binding of M-TAB (`complete-symbol')
>     makes no sense in these modes anyway.
> 
> Let's leave S-TAB alone here too. It should be M-TAB (or ESC-TAB, for those
> of us who don't have M-TAB).

If I remember correctly, it was me who proposed this change.  S-TAB is
consistent with desktop environment where Shift is commonly used as a
`reversal' modifier.  I.e. TAB moves forward, S-TAB moves backward.

I'm not proposing to unify Emacs shortcuts with `standard' ones, like
Ctrl+F for search, since Emacs is, eh..., Emacs :)  But in some cases
this is useful and S-TAB is one of them.  S-TAB is normally unused in
Emacs anyway and, as has been mentioned, there couldn't be any conflicts
since S-TAB cannot be typed on a tty.

Of course, there is nothing wrong in keeping M-TAB in Info mode with
the same functionality, but, please, let's not reverse the S-TAB
addition.

Paul

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-07  7:55         ` Juri Linkov
  2005-12-07 17:09           ` Drew Adams
@ 2005-12-07 22:59           ` Richard M. Stallman
  2005-12-07 23:08             ` Lennart Borgman
  2005-12-08  0:57             ` Juri Linkov
  1 sibling, 2 replies; 16+ messages in thread
From: Richard M. Stallman @ 2005-12-07 22:59 UTC (permalink / raw)
  Cc: lennart.borgman.073, cyd, emacs-devel, pogonyshev

    BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
    makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
    available.  I think info.el, help.el and wid-edit.el should bind both
    S-TAB and M-TAB to the same commands: S-TAB for window environments,
    and M-TAB for ttys.

Could someone please look at the discussion that led to defining
S-TAB in info.el, and see what the motives were?

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-07 22:59           ` Richard M. Stallman
@ 2005-12-07 23:08             ` Lennart Borgman
  2005-12-08  0:57             ` Juri Linkov
  1 sibling, 0 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-12-07 23:08 UTC (permalink / raw)
  Cc: Juri Linkov, cyd, emacs-devel, pogonyshev

Richard M. Stallman wrote:

>    BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
>    makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
>    available.  I think info.el, help.el and wid-edit.el should bind both
>    S-TAB and M-TAB to the same commands: S-TAB for window environments,
>    and M-TAB for ttys.
>
>Could someone please look at the discussion that led to defining
>S-TAB in info.el, and see what the motives were?
>  
>
I do not know the reason for dropping M-TAB, but defining S-TAB to 
`Info-prev-reference' was made to make it easier for users. Going 
backwards to previous link with S-TAB is what is found in those GUI 
browsers I have used.

S-TAB is bound in a similar manner in help and custom buffers too.

I see no reason not to bind M-TAB too in info buffers if that is 
desirable. In that case I believe it should be done in help and custom 
buffers also.

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-07 22:59           ` Richard M. Stallman
  2005-12-07 23:08             ` Lennart Borgman
@ 2005-12-08  0:57             ` Juri Linkov
  2005-12-08 19:28               ` Richard M. Stallman
  1 sibling, 1 reply; 16+ messages in thread
From: Juri Linkov @ 2005-12-08  0:57 UTC (permalink / raw)
  Cc: lennart.borgman.073, cyd, emacs-devel, pogonyshev

>     BTW, info.el dropped M-TAB in favor of S-TAB.  Unfortunately, this
>     makes `Info-prev-reference' inaccessible on ttys where S-TAB is not
>     available.  I think info.el, help.el and wid-edit.el should bind both
>     S-TAB and M-TAB to the same commands: S-TAB for window environments,
>     and M-TAB for ttys.
>
> Could someone please look at the discussion that led to defining
> S-TAB in info.el, and see what the motives were?

In http://lists.gnu.org/archive/html/bug-gnu-emacs/2003-08/msg00155.html
Paul proposed a patch that adds S-TAB to info.el.  This is unquestionably
a good change for desktop environments where M-TAB is not available
for Emacs, but S-TAB is a standard key to go to the previous link.

However, on 2003/08/29 you installed a different patch in CVS, that
adds S-TAB and removes M-TAB.  I don't know the reason for removing M-TAB
and can't find what led you to it.  M-TAB is necessary for ttys where S-TAB
is not available.  I think both keys S-TAB and M-TAB should be bound
to the same command.  So the same command will be accessible with a key
on all environments.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-07 20:55             ` Paul Pogonyshev
@ 2005-12-08  4:54               ` Richard M. Stallman
  2005-12-08  7:52                 ` Juri Linkov
  0 siblings, 1 reply; 16+ messages in thread
From: Richard M. Stallman @ 2005-12-08  4:54 UTC (permalink / raw)
  Cc: drew.adams, emacs-devel

    If I remember correctly, it was me who proposed this change.  S-TAB is
    consistent with desktop environment where Shift is commonly used as a
    `reversal' modifier.  I.e. TAB moves forward, S-TAB moves backward.

It makes sense for S-TAB to do that.  However,
deleting Info's binding of M-TAB is a separate question.
Is there any reason not to restore that binding in Info?

    Of course, there is nothing wrong in keeping M-TAB in Info mode with
    the same functionality, but, please, let's not reverse the S-TAB
    addition.

Sounds like there is no reason.  So I am in favor of this change:

      I think info.el, help.el and wid-edit.el should bind both
    >     S-TAB and M-TAB to the same commands: S-TAB for window environments,
    >     and M-TAB for ttys.

Could someone please do that, then ack?

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-08  4:54               ` Richard M. Stallman
@ 2005-12-08  7:52                 ` Juri Linkov
  0 siblings, 0 replies; 16+ messages in thread
From: Juri Linkov @ 2005-12-08  7:52 UTC (permalink / raw)
  Cc: emacs-devel, drew.adams, pogonyshev

> Sounds like there is no reason.  So I am in favor of this change:
>
>       I think info.el, help.el and wid-edit.el should bind both
>     >     S-TAB and M-TAB to the same commands: S-TAB for window environments,
>     >     and M-TAB for ttys.
>
> Could someone please do that, then ack?

Done.

-- 
Juri Linkov
http://www.jurta.org/emacs/

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

* Re: TAB in Eval: prompt in minibuffer?
  2005-12-08  0:57             ` Juri Linkov
@ 2005-12-08 19:28               ` Richard M. Stallman
  0 siblings, 0 replies; 16+ messages in thread
From: Richard M. Stallman @ 2005-12-08 19:28 UTC (permalink / raw)
  Cc: lennart.borgman.073, cyd, emacs-devel, pogonyshev

    However, on 2003/08/29 you installed a different patch in CVS, that
    adds S-TAB and removes M-TAB.  I don't know the reason for removing M-TAB
    and can't find what led you to it.

I don't remember the reason--perhaps I thought that moving cleanly to
a different convention was best.  But indeed it is annoying that this
does not work on ttys.  Adding M-TAB back seems like a good idea.

I see someone already has done so.

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

end of thread, other threads:[~2005-12-08 19:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-06  0:44 TAB in Eval: prompt in minibuffer? Lennart Borgman
2005-12-06  0:57 ` Juri Linkov
2005-12-06  1:46 ` Chong Yidong
2005-12-06  1:52   ` Juri Linkov
2005-12-06  7:24     ` Lennart Borgman
2005-12-06 21:54     ` Richard M. Stallman
2005-12-06 22:58       ` Paul Pogonyshev
2005-12-07  7:55         ` Juri Linkov
2005-12-07 17:09           ` Drew Adams
2005-12-07 20:55             ` Paul Pogonyshev
2005-12-08  4:54               ` Richard M. Stallman
2005-12-08  7:52                 ` Juri Linkov
2005-12-07 22:59           ` Richard M. Stallman
2005-12-07 23:08             ` Lennart Borgman
2005-12-08  0:57             ` Juri Linkov
2005-12-08 19:28               ` 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).