all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#8256: widget-complete does not complete for type 'directory on w32
@ 2011-03-15 10:26 Lennart Borgman
  2011-03-15 11:17 ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 10:26 UTC (permalink / raw
  To: 8256

I can not complete directories in a custom buffer for something like this:

(defcustom my-dir nil
  "doc"
  :type 'directory)

Nothing happens when I call widget-complete.

GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2011-03-02





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 10:26 bug#8256: widget-complete does not complete for type 'directory on w32 Lennart Borgman
@ 2011-03-15 11:17 ` Eli Zaretskii
  2011-03-15 11:22   ` Lennart Borgman
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2011-03-15 11:17 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Tue, 15 Mar 2011 11:26:11 +0100
> Cc: 
> 
> I can not complete directories in a custom buffer for something like this:
> 
> (defcustom my-dir nil
>   "doc"
>   :type 'directory)
> 
> Nothing happens when I call widget-complete.

Does ESC-TAB complete in that case?





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 11:17 ` Eli Zaretskii
@ 2011-03-15 11:22   ` Lennart Borgman
  2011-03-15 11:56     ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 11:22 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 8256

On Tue, Mar 15, 2011 at 12:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Tue, 15 Mar 2011 11:26:11 +0100
>> Cc:
>>
>> I can not complete directories in a custom buffer for something like this:
>>
>> (defcustom my-dir nil
>>   "doc"
>>   :type 'directory)
>>
>> Nothing happens when I call widget-complete.
>
> Does ESC-TAB complete in that case?

What do you mean? I just said it didn't?





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 11:22   ` Lennart Borgman
@ 2011-03-15 11:56     ` Eli Zaretskii
  2011-03-15 12:32       ` Lennart Borgman
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2011-03-15 11:56 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Tue, 15 Mar 2011 12:22:13 +0100
> Cc: 8256@debbugs.gnu.org
> 
> On Tue, Mar 15, 2011 at 12:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> From: Lennart Borgman <lennart.borgman@gmail.com>
> >> Date: Tue, 15 Mar 2011 11:26:11 +0100
> >> Cc:
> >>
> >> I can not complete directories in a custom buffer for something like this:
> >>
> >> (defcustom my-dir nil
> >>   "doc"
> >>   :type 'directory)
> >>
> >> Nothing happens when I call widget-complete.
> >
> > Does ESC-TAB complete in that case?
> 
> What do you mean? I just said it didn't?

No, you said you called widget-complete, but did not say what happens
if you type ESC-TAB.

The thing is, it works for me (on Windows), at least in Emacs 23.3.





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 11:56     ` Eli Zaretskii
@ 2011-03-15 12:32       ` Lennart Borgman
  2011-03-15 13:00         ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 12:32 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 8256

On Tue, Mar 15, 2011 at 12:56 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Lennart Borgman <lennart.borgman@gmail.com>
>> Date: Tue, 15 Mar 2011 12:22:13 +0100
>> Cc: 8256@debbugs.gnu.org
>>
>> On Tue, Mar 15, 2011 at 12:17 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> >> From: Lennart Borgman <lennart.borgman@gmail.com>
>> >> Date: Tue, 15 Mar 2011 11:26:11 +0100
>> >> Cc:
>> >>
>> >> I can not complete directories in a custom buffer for something like this:
>> >>
>> >> (defcustom my-dir nil
>> >>   "doc"
>> >>   :type 'directory)
>> >>
>> >> Nothing happens when I call widget-complete.
>> >
>> > Does ESC-TAB complete in that case?
>>
>> What do you mean? I just said it didn't?
>
> No, you said you called widget-complete, but did not say what happens
> if you type ESC-TAB.

Yes, but ESC-TAB runs widget-complete (if you have not changed anything).

> The thing is, it works for me (on Windows), at least in Emacs 23.3.

Sorry, forgot to say I am using the trunk sources.

But I just downloaded the official 23.3 binaries and tested. It does
not work for me. When I hit ESC-TAB I just get a message:

  complete-symbol: No completions available; use M-x visit-tags-table
or M-x semantic-mode

I can see "complete-symbol" only in *Messages*, not in the echo area.
(How does that work?)





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 12:32       ` Lennart Borgman
@ 2011-03-15 13:00         ` Eli Zaretskii
  2011-03-15 13:08           ` Lennart Borgman
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2011-03-15 13:00 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Tue, 15 Mar 2011 13:32:38 +0100
> Cc: 8256@debbugs.gnu.org
> 
> But I just downloaded the official 23.3 binaries and tested. It does
> not work for me. When I hit ESC-TAB I just get a message:
> 
>   complete-symbol: No completions available; use M-x visit-tags-table
> or M-x semantic-mode
> 
> I can see "complete-symbol" only in *Messages*, not in the echo area.
> (How does that work?)

We are probably doing different things, because you didn't provide the
exact recipe for reproducing the problem.  Could you please give such
a recipe, starting with "emacs -Q"?





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 13:00         ` Eli Zaretskii
@ 2011-03-15 13:08           ` Lennart Borgman
  2011-03-15 14:48             ` Eli Zaretskii
                               ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 13:08 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 8256

On Tue, Mar 15, 2011 at 2:00 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> We are probably doing different things, because you didn't provide the
> exact recipe for reproducing the problem.  Could you please give such
> a recipe, starting with "emacs -Q"?

Is that really possible for such a simple thing?;-)

Ok, here it is:

  emacs -Q
  Paste to *scratch* this code:

      (defcustom my-dir nil
          "doc"
         :type 'directory)

  Eval it.
  M-x customize-option RET my-dir RET

  Place point in the directory value field and erase "nil" that is there.
  Now in the empty directory value field press ESC-TAB (or do M-x
widget-complete).

This fails for me with the message I gave before:

>   complete-symbol: No completions available; use M-x visit-tags-table
> or M-x semantic-mode

  Write for example "c:/" in the field and try again. It fails the same way.





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 13:08           ` Lennart Borgman
@ 2011-03-15 14:48             ` Eli Zaretskii
  2011-03-15 14:50             ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
                               ` (2 subsequent siblings)
  3 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2011-03-15 14:48 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

> From: Lennart Borgman <lennart.borgman@gmail.com>
> Date: Tue, 15 Mar 2011 14:08:33 +0100
> Cc: 8256@debbugs.gnu.org
> 
> On Tue, Mar 15, 2011 at 2:00 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >
> > We are probably doing different things, because you didn't provide the
> > exact recipe for reproducing the problem.  Could you please give such
> > a recipe, starting with "emacs -Q"?
> 
> Is that really possible for such a simple thing?;-)

Yes, it is.  I was trying to reproduce this with a real defcustom
(archive-tmpdir, if you want to know), not with a fictitious
defcustom.

>   emacs -Q
>   Paste to *scratch* this code:
> 
>       (defcustom my-dir nil
>           "doc"
>          :type 'directory)
> 
>   Eval it.
>   M-x customize-option RET my-dir RET
> 
>   Place point in the directory value field and erase "nil" that is there.
>   Now in the empty directory value field press ESC-TAB (or do M-x
> widget-complete).
> 
> This fails for me with the message I gave before:
> 
> >   complete-symbol: No completions available; use M-x visit-tags-table
> > or M-x semantic-mode
> 
>   Write for example "c:/" in the field and try again. It fails the same way.

I see the same on GNU/Linux (except that "C:/" should be replaced with
a "/", of course).  So this is not w32-specific.





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

* bug#8256: widget-complete does not complete for type 'directory onw32
  2011-03-15 13:08           ` Lennart Borgman
  2011-03-15 14:48             ` Eli Zaretskii
@ 2011-03-15 14:50             ` Drew Adams
  2011-03-15 15:27               ` Lennart Borgman
  2011-03-15 16:01             ` bug#8256: widget-complete does not complete for type 'directory on w32 Juanma Barranquero
  2011-03-15 17:18             ` Stefan Monnier
  3 siblings, 1 reply; 18+ messages in thread
From: Drew Adams @ 2011-03-15 14:50 UTC (permalink / raw
  To: 'Lennart Borgman', 'Eli Zaretskii'; +Cc: 8256

>       (defcustom my-dir nil "doc" :type 'directory)
> 
>   M-x customize-option RET my-dir RET

You get a type mismatch, of course, since nil is not a directory.

>   Place point in the directory value field and erase "nil" 
>   that is there.  Now in the empty directory value field
>   press ESC-TAB. This fails

Try again, with a valid directory as the default value - e.g. "c:/foo/"

Keep in mind too that the completion uses `default-directory'.  Dunno whether
that's always appropriate, but that's what it uses.

But I agree that regardless of the initial type mismatch, you should be able to
type a legitimate directory prefix and get completion.






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

* bug#8256: widget-complete does not complete for type 'directory onw32
  2011-03-15 14:50             ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
@ 2011-03-15 15:27               ` Lennart Borgman
  0 siblings, 0 replies; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 15:27 UTC (permalink / raw
  To: Drew Adams; +Cc: 8256

On Tue, Mar 15, 2011 at 3:50 PM, Drew Adams <drew.adams@oracle.com> wrote:
>>       (defcustom my-dir nil "doc" :type 'directory)
>>
>>   M-x customize-option RET my-dir RET
>
> You get a type mismatch, of course, since nil is not a directory.
>
>>   Place point in the directory value field and erase "nil"
>>   that is there.  Now in the empty directory value field
>>   press ESC-TAB. This fails
>
> Try again, with a valid directory as the default value - e.g. "c:/foo/"

Ah, you are right. It kind of works with a valid default. (And this
does not have to be an existing directory.)

That was quite unexpected. And it is of course very inconvenient that
you can not customize a variable the normal way just because the
default value happens to be bad.

I think similar troubles in other places in custom too, but I can't
remember where now.


> Keep in mind too that the completion uses `default-directory'.  Dunno whether
> that's always appropriate, but that's what it uses.

Thanks. I see a little bit different behaviour, but, yes, there is
another bug. This is what I see:

I looked at two rather similar cases that does not behave the same:

1) Default is a non-existing directory. If I try to complete this I
get completion candidates. It looks like it complets against
default-directory.

2) Default is "", but I enter the same directory into the directory
field in custom. Now I get no completion candidates.





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 13:08           ` Lennart Borgman
  2011-03-15 14:48             ` Eli Zaretskii
  2011-03-15 14:50             ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
@ 2011-03-15 16:01             ` Juanma Barranquero
  2011-03-15 16:16               ` Lennart Borgman
  2011-03-15 17:18             ` Stefan Monnier
  3 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2011-03-15 16:01 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

On Tue, Mar 15, 2011 at 14:08, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

>> We are probably doing different things, because you didn't provide the
>> exact recipe for reproducing the problem.  Could you please give such
>> a recipe, starting with "emacs -Q"?
>
> Is that really possible for such a simple thing?;-)

It's really so difficult to understand that giving an "emacs -Q"
recipe should be the *standard*, *default* way to make a bug report
and by not making so you waste other people's time?

    Juanma





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 16:01             ` bug#8256: widget-complete does not complete for type 'directory on w32 Juanma Barranquero
@ 2011-03-15 16:16               ` Lennart Borgman
  2011-03-15 17:12                 ` Juanma Barranquero
  0 siblings, 1 reply; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 16:16 UTC (permalink / raw
  To: Juanma Barranquero; +Cc: 8256

On Tue, Mar 15, 2011 at 5:01 PM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Tue, Mar 15, 2011 at 14:08, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>>> We are probably doing different things, because you didn't provide the
>>> exact recipe for reproducing the problem.  Could you please give such
>>> a recipe, starting with "emacs -Q"?
>>
>> Is that really possible for such a simple thing?;-)
>
> It's really so difficult to understand that giving an "emacs -Q"
> recipe should be the *standard*, *default* way to make a bug report
> and by not making so you waste other people's time?

That was not the problem here. The problem was that perhaps was not
clear enough that I did give it.





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 16:16               ` Lennart Borgman
@ 2011-03-15 17:12                 ` Juanma Barranquero
  2012-02-22 20:25                   ` Glenn Morris
  0 siblings, 1 reply; 18+ messages in thread
From: Juanma Barranquero @ 2011-03-15 17:12 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

On Tue, Mar 15, 2011 at 17:16, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> That was not the problem here. The problem was that perhaps was not
> clear enough that I did give it.

Not giving an "emacs -Q" recipe in a bug report is always* a problem.

* [unless the nature of the bug precludes doing so, which is infrequent]

    Juanma





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 13:08           ` Lennart Borgman
                               ` (2 preceding siblings ...)
  2011-03-15 16:01             ` bug#8256: widget-complete does not complete for type 'directory on w32 Juanma Barranquero
@ 2011-03-15 17:18             ` Stefan Monnier
  2011-03-15 17:40               ` Lennart Borgman
  2011-03-15 18:04               ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
  3 siblings, 2 replies; 18+ messages in thread
From: Stefan Monnier @ 2011-03-15 17:18 UTC (permalink / raw
  To: Lennart Borgman; +Cc: 8256

>   emacs -Q
>   Paste to *scratch* this code:

>       (defcustom my-dir nil
>           "doc"
>          :type 'directory)

>   Eval it.
>   M-x customize-option RET my-dir RET

Problem here: nil is not a directory, so the above defcustom is not
valid.  Oddly enough Customize does not signal the error, and instead
gets into a weird state.  Once you set my-dir to a string, things work
much better.


        Stefan





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 17:18             ` Stefan Monnier
@ 2011-03-15 17:40               ` Lennart Borgman
  2011-03-15 18:04               ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
  1 sibling, 0 replies; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 17:40 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 8256

On Tue, Mar 15, 2011 at 6:18 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>   emacs -Q
>>   Paste to *scratch* this code:
>
>>       (defcustom my-dir nil
>>           "doc"
>>          :type 'directory)
>
>>   Eval it.
>>   M-x customize-option RET my-dir RET
>
> Problem here: nil is not a directory, so the above defcustom is not
> valid.  Oddly enough Customize does not signal the error, and instead
> gets into a weird state.  Once you set my-dir to a string, things work
> much better.

What should signal that it the defcustom is not valid? And when?





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

* bug#8256: widget-complete does not complete for type 'directory onw32
  2011-03-15 17:18             ` Stefan Monnier
  2011-03-15 17:40               ` Lennart Borgman
@ 2011-03-15 18:04               ` Drew Adams
  2011-03-15 18:11                 ` Lennart Borgman
  1 sibling, 1 reply; 18+ messages in thread
From: Drew Adams @ 2011-03-15 18:04 UTC (permalink / raw
  To: 'Stefan Monnier', 'Lennart Borgman'; +Cc: 8256

> Problem here: nil is not a directory, so the above defcustom is not
> valid.  Oddly enough Customize does not signal the error, and instead
> gets into a weird state.  Once you set my-dir to a string, things work
> much better.

Customize does indicate the type mismatch, as usual via `(mismatch)'.






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

* bug#8256: widget-complete does not complete for type 'directory onw32
  2011-03-15 18:04               ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
@ 2011-03-15 18:11                 ` Lennart Borgman
  0 siblings, 0 replies; 18+ messages in thread
From: Lennart Borgman @ 2011-03-15 18:11 UTC (permalink / raw
  To: Drew Adams; +Cc: 8256

On Tue, Mar 15, 2011 at 7:04 PM, Drew Adams <drew.adams@oracle.com> wrote:
>> Problem here: nil is not a directory, so the above defcustom is not
>> valid.  Oddly enough Customize does not signal the error, and instead
>> gets into a weird state.  Once you set my-dir to a string, things work
>> much better.
>
> Customize does indicate the type mismatch, as usual via `(mismatch)'.

Yes. It writes that. And then goes into a weird state.





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

* bug#8256: widget-complete does not complete for type 'directory on w32
  2011-03-15 17:12                 ` Juanma Barranquero
@ 2012-02-22 20:25                   ` Glenn Morris
  0 siblings, 0 replies; 18+ messages in thread
From: Glenn Morris @ 2012-02-22 20:25 UTC (permalink / raw
  To: 8256


I have no idea what's necessary to close this.
AFAICS, the whole thing boils down to a fictitious example using an
incorrect default.
nil != :type 'directory, and custom indicates this with "mismatch".





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

end of thread, other threads:[~2012-02-22 20:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15 10:26 bug#8256: widget-complete does not complete for type 'directory on w32 Lennart Borgman
2011-03-15 11:17 ` Eli Zaretskii
2011-03-15 11:22   ` Lennart Borgman
2011-03-15 11:56     ` Eli Zaretskii
2011-03-15 12:32       ` Lennart Borgman
2011-03-15 13:00         ` Eli Zaretskii
2011-03-15 13:08           ` Lennart Borgman
2011-03-15 14:48             ` Eli Zaretskii
2011-03-15 14:50             ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
2011-03-15 15:27               ` Lennart Borgman
2011-03-15 16:01             ` bug#8256: widget-complete does not complete for type 'directory on w32 Juanma Barranquero
2011-03-15 16:16               ` Lennart Borgman
2011-03-15 17:12                 ` Juanma Barranquero
2012-02-22 20:25                   ` Glenn Morris
2011-03-15 17:18             ` Stefan Monnier
2011-03-15 17:40               ` Lennart Borgman
2011-03-15 18:04               ` bug#8256: widget-complete does not complete for type 'directory onw32 Drew Adams
2011-03-15 18:11                 ` Lennart Borgman

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.