unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Completion with M-Tab for custom type 'directory
@ 2005-07-03 19:03 Lennart Borgman
  2005-07-03 19:53 ` Henrik Enberg
  0 siblings, 1 reply; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 19:03 UTC (permalink / raw)


In Info

  `directory'
       The value must be a directory name, and you can do completion with
       `M-<TAB>'.

Does this work? On w32 I can of course not do M-Tab, but I have another 
meta-key to, but that does not seem to work.

Could it be bound to something useful instead? M-k for example?

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 19:03 Completion with M-Tab for custom type 'directory Lennart Borgman
@ 2005-07-03 19:53 ` Henrik Enberg
  2005-07-03 20:19   ` Lennart Borgman
  0 siblings, 1 reply; 16+ messages in thread
From: Henrik Enberg @ 2005-07-03 19:53 UTC (permalink / raw)
  Cc: emacs-devel

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

> Does this work? On w32 I can of course not do M-Tab, but I have another
> meta-key to, but that does not seem to work.

Doesn't ESC-Tab work on windows?

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 19:53 ` Henrik Enberg
@ 2005-07-03 20:19   ` Lennart Borgman
  2005-07-03 20:49     ` Lennart Borgman
  2005-07-03 21:02     ` Henrik Enberg
  0 siblings, 2 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 20:19 UTC (permalink / raw)
  Cc: Michael Kifer, emacs-devel

Henrik Enberg wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>Does this work? On w32 I can of course not do M-Tab, but I have another
>>meta-key to, but that does not seem to work.
>>    
>>
>
>Doesn't ESC-Tab work on windows?
>  
>
Yes, but I saw some strange things. First I got into that "show initial 
lisp value" state. Then I did not do that any more, but I really do not 
understand why. I start with (customiz-option 'my-opt).

Then, in the correct state, I put the point  to the beginning of the 
field. If I then type Esc Tab I get an "Wrong type argument: stringp, nil".

After moving the point a bit to the right I actually have completion 
working.  But, ...

1) If there are spaces in the directory name it stops working.

2) I can not click with the right button to select from the list. I have 
set w32-num-buttons to 2. Should not the right button then be mouse-2?

3) I can not select with RET in the selection list (because viper is 
active in the completion buffer).

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 20:19   ` Lennart Borgman
@ 2005-07-03 20:49     ` Lennart Borgman
  2005-07-03 21:02     ` Henrik Enberg
  1 sibling, 0 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 20:49 UTC (permalink / raw)
  Cc: emacs-devel

Lennart Borgman wrote:

> Yes, but I saw some strange things. First I got into that "show 
> initial lisp value" state. Then I did not do that any more, but I 
> really do not understand why. I start with (customiz-option 'my-opt).

The problem with the state was because I set the default value to nil 
instead of "".

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 20:19   ` Lennart Borgman
  2005-07-03 20:49     ` Lennart Borgman
@ 2005-07-03 21:02     ` Henrik Enberg
  2005-07-03 21:24       ` Lennart Borgman
  1 sibling, 1 reply; 16+ messages in thread
From: Henrik Enberg @ 2005-07-03 21:02 UTC (permalink / raw)
  Cc: Michael Kifer, emacs-devel

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

> Henrik Enberg wrote:
>
>>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>>
>>  
>>
>>>Does this work? On w32 I can of course not do M-Tab, but I have another
>>>meta-key to, but that does not seem to work.
>>>    
>>>
>>
>>Doesn't ESC-Tab work on windows?
>>  
>>
> Yes, but I saw some strange things. First I got into that "show initial
> lisp value" state. Then I did not do that any more, but I really do not
> understand why. I start with (customize-option 'my-opt).
>
> Then, in the correct state, I put the point  to the beginning of the
> field. If I then type Esc Tab I get an "Wrong type argument: stringp,
> nil".

Hmm, I get a huge list of symbols to complete against. Even at the
beginning of the field without deleting the initial "nil".

> After moving the point a bit to the right I actually have completion
> working.  But, ...
>
> 1) If there are spaces in the directory name it stops working.

> 2) I can not click with the right button to select from the list. I have
>    set w32-num-buttons to 2. Should not the right button then be
>    mouse-2?

I don't know about windows, but on Unix-likes, the right button would
most probably be button 3.  With a 2 button mouse, you'd either have to
hit both buttons (or the scroll wheel if one exists) to get mouse-2.

> 3) I can not select with RET in the selection list (because viper is
>    active in the completion buffer).

This sounds probably a viper problem.  I don't think it's a good idea to
rebind standard keys in emacs just to get viper working.  Possibly
viper.el should override keys that gets in the way.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 21:02     ` Henrik Enberg
@ 2005-07-03 21:24       ` Lennart Borgman
  2005-07-03 21:46         ` Luc Teirlinck
                           ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 21:24 UTC (permalink / raw)
  Cc: Michael Kifer, emacs-devel

Henrik Enberg wrote:

>>Then, in the correct state, I put the point  to the beginning of the
>>field. If I then type Esc Tab I get an "Wrong type argument: stringp,
>>nil".
>>    
>>
>
>Hmm, I get a huge list of symbols to complete against. Even at the
>beginning of the field without deleting the initial "nil".
>
I compared with how completion works for C-x d. In this case the default 
directory is used when the string is empty. This is of course not 
meaningful the the custom widget.

I noticed another problem (bug?). The completion list contains all 
files, not only directories. This is meaningful for C-x d, but not for a 
directory widget. To summarize the problems:

1) On w32: You can not get completion when the widget input field for a 
'directory type custom is empty. This perhaps has something to do with 
the absence of a definition of a root directory in dired too?

2) Completion for a 'directory type custom widget includes all files, 
not only directories. (Is this w32 specific?)

3) Alt-Tab is useless as a default since it is not available in window 
type environments. Esc-Tab is in this case available, but is not always 
the case. (This message has been repeated many times now and I really 
long for a resulotion of this.)

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 21:24       ` Lennart Borgman
@ 2005-07-03 21:46         ` Luc Teirlinck
  2005-07-03 21:57           ` Lennart Borgman
  2005-07-03 21:52         ` Henrik Enberg
  2005-07-03 22:00         ` Jason Rumney
  2 siblings, 1 reply; 16+ messages in thread
From: Luc Teirlinck @ 2005-07-03 21:46 UTC (permalink / raw)
  Cc: henrik.enberg, kifer, emacs-devel

Lennart Borgman wrote:

   3) Alt-Tab is useless as a default since it is not available in window 
   type environments.

Did you really mean "in window type environments" (when using a window
system) or did you mean "in an MS Windows type environment".  (I am
not trying to nitpick on terminology, I am really not sure which of
the two you mean.)  If the former, then it is difficult to avoid
conflicts with window manager bindings, due to the large variety of
window managers out there.  A good window manager will allow you to
rebind its keys.  All of my window manager commands use the super key,
so I have no conflicts.

Sincerely,

Luc.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 21:24       ` Lennart Borgman
  2005-07-03 21:46         ` Luc Teirlinck
@ 2005-07-03 21:52         ` Henrik Enberg
  2005-07-03 22:00         ` Jason Rumney
  2 siblings, 0 replies; 16+ messages in thread
From: Henrik Enberg @ 2005-07-03 21:52 UTC (permalink / raw)
  Cc: Michael Kifer, emacs-devel

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

> Henrik Enberg wrote:
>
>>>Then, in the correct state, I put the point  to the beginning of the
>>>field. If I then type Esc Tab I get an "Wrong type argument: stringp,
>>>nil".
>>>    
>>>
>>
>>Hmm, I get a huge list of symbols to complete against. Even at the
>>beginning of the field without deleting the initial "nil".
>>
> I compared with how completion works for C-x d. In this case the default
> directory is used when the string is empty. This is of course not
> meaningful the the custom widget.
>
> I noticed another problem (bug?). The completion list contains all
> files, not only directories. This is meaningful for C-x d, but not for a
> directory widget. To summarize the problems:
>
> 1) On w32: You can not get completion when the widget input field for a
>    directory type custom is empty. This perhaps has something to do with
>    the absence of a definition of a root directory in dired too?

I get an error If the field is empty too, and if the initial input is a
non-existing file or directory.

> 2) Completion for a 'directory type custom widget includes all files,
>    not only directories. (Is this w32 specific?)

I get that on GNU/Linux too.

Looking at wid-edit.el, it seems that the :directory type widget is an
alias for the :file widget, but I'm not 100% sure I understand the
define-widget code, so I could be wrong.

I see that is has a fixme comment stating that it should use
`file-name-as-directory' instead of `file'.

> 3) Alt-Tab is useless as a default since it is not available in window
>    type environments. Esc-Tab is in this case available, but is not
>    always the case. (This message has been repeated many times now and I
>    really long for a resulotion of this.)

It certainly isn't useless as a default.  I use it all the time on my
GNU/Linux system.

ESC-Tab not working all the time on w32 sounds like a bug to me.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 21:46         ` Luc Teirlinck
@ 2005-07-03 21:57           ` Lennart Borgman
  0 siblings, 0 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 21:57 UTC (permalink / raw)
  Cc: emacs-devel

Luc Teirlinck wrote:

>Lennart Borgman wrote:
>
>   3) Alt-Tab is useless as a default since it is not available in window 
>   type environments.
>
>Did you really mean "in window type environments" (when using a window
>system) or did you mean "in an MS Windows type environment".  (I am
>not trying to nitpick on terminology, I am really not sure which of
>the two you mean.)  If the former, then it is difficult to avoid
>conflicts with window manager bindings, due to the large variety of
>window managers out there.  A good window manager will allow you to
>rebind its keys.  All of my window manager commands use the super key,
>so I have no conflicts.
>  
>
I mean on a system where a window manager is used. Several times it has 
been pointed out that many of the most common window managers uses 
Alt-Tab for window managers window switching.

And yes, I use MS Windows. Still a majority does that. We can not 
pretend that the key bindings there are unimportant. They are important 
whehter we like it or not. I think that we will get a much larger user 
base if we acknowledge that. I think that this is important in the long 
run. I have struggled to get a working environment on MS Windows to see 
if I can switch without much trouble. As long as I have trouble getting 
things working on w32 I can not switch.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 21:24       ` Lennart Borgman
  2005-07-03 21:46         ` Luc Teirlinck
  2005-07-03 21:52         ` Henrik Enberg
@ 2005-07-03 22:00         ` Jason Rumney
  2005-07-03 22:07           ` Lennart Borgman
  2 siblings, 1 reply; 16+ messages in thread
From: Jason Rumney @ 2005-07-03 22:00 UTC (permalink / raw)
  Cc: Henrik Enberg, Michael Kifer, emacs-devel

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

> 3) Alt-Tab is useless as a default since it is not available in window
>    type environments. Esc-Tab is in this case available, but is not
>    always the case. (This message has been repeated many times now and
>    I really long for a resulotion of this.)

In what circumstances is Esc-TAB not available?

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 22:00         ` Jason Rumney
@ 2005-07-03 22:07           ` Lennart Borgman
  2005-07-03 22:40             ` David Kastrup
  0 siblings, 1 reply; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 22:07 UTC (permalink / raw)
  Cc: Henrik Enberg, Michael Kifer, emacs-devel

Jason Rumney wrote:

>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>  
>
>>3) Alt-Tab is useless as a default since it is not available in window
>>   type environments. Esc-Tab is in this case available, but is not
>>   always the case. (This message has been repeated many times now and
>>   I really long for a resulotion of this.)
>>    
>>
>
>In what circumstances is Esc-TAB not available?
>  
>
The case I think of is when viper-mode is in vi state. I am using viper 
all the time.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 22:07           ` Lennart Borgman
@ 2005-07-03 22:40             ` David Kastrup
  2005-07-03 23:14               ` Lennart Borgman
  0 siblings, 1 reply; 16+ messages in thread
From: David Kastrup @ 2005-07-03 22:40 UTC (permalink / raw)
  Cc: Henrik Enberg, emacs-devel, Michael Kifer, Jason Rumney

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

> Jason Rumney wrote:
>
>>Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>>
>>  
>>
>>>3) Alt-Tab is useless as a default since it is not available in window
>>>   type environments. Esc-Tab is in this case available, but is not
>>>   always the case. (This message has been repeated many times now and
>>>   I really long for a resulotion of this.)
>>>    
>>>
>>
>>In what circumstances is Esc-TAB not available?
>>  
>>
> The case I think of is when viper-mode is in vi state. I am using
> viper all the time.

Then you really should read

(info "(viper) Vi State")

This is not as much an Emacs problem as it is a viper problem, and
viper has explicitly documented and addressed this problem.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 22:40             ` David Kastrup
@ 2005-07-03 23:14               ` Lennart Borgman
  2005-07-03 23:59                 ` Luc Teirlinck
                                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Lennart Borgman @ 2005-07-03 23:14 UTC (permalink / raw)
  Cc: Jason Rumney, Michael Kifer, emacs-devel

David Kastrup wrote:

>>>>3) Alt-Tab is useless as a default since it is not available in window
>>>>  type environments. Esc-Tab is in this case available, but is not
>>>>  always the case. (This message has been repeated many times now and
>>>>  I really long for a resulotion of this.)
>>>>   
>>>>
>>>>        
>>>>
>>>In what circumstances is Esc-TAB not available?
>>> 
>>>
>>>      
>>>
>>The case I think of is when viper-mode is in vi state. I am using
>>viper all the time.
>>    
>>
>
>Then you really should read
>
>(info "(viper) Vi State")
>
>This is not as much an Emacs problem as it is a viper problem, and
>viper has explicitly documented and addressed this problem.
>
Thanks, I have read it now:

`C-\'
     Viper uses <ESC> as a switch between Insert and Vi states.  Emacs
     uses <ESC> for Meta.  The Meta key is very important in Emacs
     since many functions are accessible only via that key as `M-x
     function-name'.  Therefore, we need to simulate it somehow.  In
     Viper's Vi, Insert, and Replace states, the meta key is set to be
     `C-\'.  Thus, to get `M-x', you should type `C-\ x' (if the
     keyboard has no Meta key, which is rare these days).  This works
     both in the Vi command state and in the Insert and Replace states.
     In Vi command state, you can also use `\ <ESC>' as the meta key.

     Note: Emacs binds `C-\' to a function that offers to change the
     keyboard input method in the multilingual environment.  Viper
     overrides this binding.  However, it is still possible to switch
     the input method by typing `\ C-\' in the Vi command state and
     `C-z \ C-\' in the Insert state.  Or you can use the MULE menu in
     the menubar.

On a swedish keyboard I can not use C-\ at all. In vi state I can not 
use ESC. The window manager prevents me from using Alt-Tab. So what is 
left for completion? And note that I would pretty much want completion 
to be very easy to reach!

Suppose I do not know anything about Emacs. What would you expect me to 
think in a w32 environment with a swedish (or other national) keyboard?

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 23:14               ` Lennart Borgman
@ 2005-07-03 23:59                 ` Luc Teirlinck
  2005-07-04  0:20                 ` David Kastrup
  2005-07-04  0:43                 ` Henrik Enberg
  2 siblings, 0 replies; 16+ messages in thread
From: Luc Teirlinck @ 2005-07-03 23:59 UTC (permalink / raw)
  Cc: emacs-devel, kifer, jasonr

Lennart Borgman wrote:

   On a swedish keyboard I can not use C-\ at all. In vi state I can not 
   use ESC. The window manager prevents me from using Alt-Tab. So what is 
   left for completion?

C-M-i

Sincerely,

Luc.

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 23:14               ` Lennart Borgman
  2005-07-03 23:59                 ` Luc Teirlinck
@ 2005-07-04  0:20                 ` David Kastrup
  2005-07-04  0:43                 ` Henrik Enberg
  2 siblings, 0 replies; 16+ messages in thread
From: David Kastrup @ 2005-07-04  0:20 UTC (permalink / raw)
  Cc: Jason Rumney, Michael Kifer, emacs-devel

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

> On a swedish keyboard I can not use C-\ at all.

Why?  What keys do you have to press to get \ and why would it be
impossible to press Ctrl with them?

> Suppose I do not know anything about Emacs. What would you expect me
> to think in a w32 environment with a swedish (or other national)
> keyboard?

It is perfectly feasible to use Ctrl-\ on a German keyboard.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Completion with M-Tab for custom type 'directory
  2005-07-03 23:14               ` Lennart Borgman
  2005-07-03 23:59                 ` Luc Teirlinck
  2005-07-04  0:20                 ` David Kastrup
@ 2005-07-04  0:43                 ` Henrik Enberg
  2 siblings, 0 replies; 16+ messages in thread
From: Henrik Enberg @ 2005-07-04  0:43 UTC (permalink / raw)
  Cc: emacs-devel, Michael Kifer, Jason Rumney

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

> On a swedish keyboard I can not use C-\ at all. In vi state I can not
> use ESC. The window manager prevents me from using Alt-Tab. So what is
> left for completion? And note that I would pretty much want completion
> to be very easy to reach!

Isn't C-\ just C-AltGr-+ on a typical swedish w32 keyboard?  Anyways, I
think it would be rather silly to start changing around standard Emacs
keybindings just for the combination of windows, viper and swedish
keyboards.

> Suppose I do not know anything about Emacs. What would you expect me to
> think in a w32 environment with a swedish (or other national) keyboard?

People who know nothing about Emacs don't use viper I'd wager.

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

end of thread, other threads:[~2005-07-04  0:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-03 19:03 Completion with M-Tab for custom type 'directory Lennart Borgman
2005-07-03 19:53 ` Henrik Enberg
2005-07-03 20:19   ` Lennart Borgman
2005-07-03 20:49     ` Lennart Borgman
2005-07-03 21:02     ` Henrik Enberg
2005-07-03 21:24       ` Lennart Borgman
2005-07-03 21:46         ` Luc Teirlinck
2005-07-03 21:57           ` Lennart Borgman
2005-07-03 21:52         ` Henrik Enberg
2005-07-03 22:00         ` Jason Rumney
2005-07-03 22:07           ` Lennart Borgman
2005-07-03 22:40             ` David Kastrup
2005-07-03 23:14               ` Lennart Borgman
2005-07-03 23:59                 ` Luc Teirlinck
2005-07-04  0:20                 ` David Kastrup
2005-07-04  0:43                 ` Henrik Enberg

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