[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] New package: dict
From: |
Eshel Yaron |
Subject: |
Re: [ELPA] New package: dict |
Date: |
Fri, 26 May 2023 15:26:19 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi,
Rudolf Adamkovič <salutis@me.com> writes:
> QUESTION 1.
>
> Is it expected that 'dictionary-lookup-definition' still uses the old
> interface, even thought I set
>
> (with-eval-after-load 'dictionary
> (setopt dictionary-search-interface 'help))
Yes, `dictionary-search-interface` only affects `dictionary-search`.
It shouldn't be too hard to have it also affect
`dictionary-lookup-definition` though, would that be helpful?
Note that now you can also have `dictionary-search` use the word at
point without prompting, as `dictionary-lookup-definition` does, by
setting `dictionary-read-word-function` to something like:
--8<---------------cut here---------------start------------->8---
(lambda (&rest _) (thing-at-point 'word))
--8<---------------cut here---------------end--------------->8---
> QUESTION 2.
>
> With
>
> (with-eval-after-load 'dictionary
> (setopt dictionary-server "dict.org"))
>
> when I have
>
> dictionary<POINT>
>
> and type 'M-x dictionary-search RET', I get
>
> Search word (default Ditionary): <POINT>
>
> Notice the default word "Ditionary" [sic].
>
> Further, when I continue by manually typing 'dictionary M-RET' (in
> Vertico), Emacs says "[Match required]" and does nothing.
That's interesting, AFAICT this is essentially a problem with the
defaults of the dict.org server: when using its default matching
strategy, the only match it provides for "dictionary" is "ditionary",
and vice versa. The main problem is that in this case the word we're
matching ("dictionary") is not returned as a match, although it is
defined.
If you set `dictionary-default-strategy` to something other than the
default "." (which means "let the server choose"), maybe something like
"prefix", then this oddity is avoided.
But since this is currently the default setting I wonder what'd be the
best way to address this issue. We can change the call to
`completing-read` such that it doesn't require a match, so you could
always input a word regardless of the completion candidates. Another
option would be to change the default for `dictionary-default-strategy`
to something more useful. Any other ideas?
--
Thanks,
Eshel
- Re: [ELPA] New package: dict, (continued)
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/19
- Re: [ELPA] New package: dict, Eli Zaretskii, 2023/05/20
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/20
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/20
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/20
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/21
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/25
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/25
- Re: [ELPA] New package: dict, Eli Zaretskii, 2023/05/26
- Re: [ELPA] New package: dict, Rudolf Adamkovič, 2023/05/26
- Re: [ELPA] New package: dict,
Eshel Yaron <=
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/18
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/18
- Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/18
- Re: [ELPA] New package: dict, Stephen Leake, 2023/05/14
- Re: [ELPA] New package: dict, Eshel Yaron, 2023/05/15
Re: [ELPA] New package: dict, Philip Kaludercic, 2023/05/11