[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Integration of dictionary package
From: |
Jean Louis |
Subject: |
Re: Integration of dictionary package |
Date: |
Fri, 20 Nov 2020 09:50:35 +0300 |
User-agent: |
Mutt/2.0 (3d08634) (2020-11-07) |
* Torsten Hilbrich <emacs.nolkaf@hilbrich.tk> [2020-11-20 08:57]:
> On 20.11.20 04:11, Jean Louis wrote:
> > Keep choices during session:[1]
> > ----------------------------
> >
> > When I select dictionary and bury the buffer like with quit button,
> > then the selected dictionary is erased.
> >
> > My expectation is that selected dictionary remains at least during
> > the session until I change it. Let us say somebody translates words,
> > then each time new word need to be translated user would again need to
> > select dictionary.
> >
> > This same should apply for [Select Match Strategy] as if I already
> > select "Match substring occurring anywhere in a headword" then I
> > expect as user that match strategy remains at least for the session
> > time, and not that I need to re-select it again. I would not even find
> > or know that some definition did exist for substring.ยด
>
> The current dictionary and the matching strategy are buffer-local
> variables (dictionary-default-strategy and dictionary-default-strategy).
> As the buffer is closed when pressing the quit button this setting is
> then lost.
Thank you.
OK and that is fine, but then do not kill the buffer by key q, just
bury it instead.
> > Failed to open server localhost, continue with dict.org (y/n)?
> > --------------------------------------------------------------
> >
> > If user says one time here, then at least during Emacs session this
> > need not be asked again, unless user sets it up to be let us say
> > localhost.
>
> This could be modified, in this case I could set the variable
> dictionary-server to preserve the user's choice (without storing it
> permanently).
For the duration of Emacs session yes. And if user maybe changes it
during session I guess it will be automatically used.
> > Matching strategy
> > -----------------
> >
> > Matching strategy could be customizable, I am not sure if it is, is
> > it?
>
> You can customize-variable dictionary-default-strategy. However, the RFC
> only requires the "exact" and "prefix" strategy and to provide a default
> strategy when "." is used. So a customisation could only provide a value
> list of these special values and maybe a user-supplied ones.
>
> All other strategy can be queried by the server and set for this
> specific dictionary buffer.
I understand. Also here is helpful not to kill buffer by q.
> > When I already say for example: .
> >
> >
> > [quit] button:
> > --------------
> >
> > Just like M-x calendar and some other features I think there is no
> > need to really kill the *Dictionary* buffer. It better remains in
> > memory. When user click on [quit] it would bury the buffer but it
> > would not kill it.
> >
> > By doing so, also the above first problem with remembering of choices
> > would be partially solved, but I do not think this should be solution
> > for the choices problem during Emacs session. Choices should be
> > remembered during Emacs session even if *Dictionary* buffer is
> > killed. See above [1].
>
> You can customize-variable dictionary-use-single-buffer
I do have that as T. But is not related.
When you press q the buffer is killed, that means the selected
dictionary, match stragegy and the word displayed in the buffer is
gone.
Instead, for q you can just bury the buffer, it need not be killed but
just removed from the screen similar like how many other modes do.
Like M-x grep, if I press q, the *grep* buffer is still in memory but
I just do not see it. I can at any time come back to it.
> "*" and "!" are special dictionary names within the dict protocol.
Alright, I was thinking so.
> > 1. I selected already All dictionaries
> > 2. [Search Definition] I enter: customiozable
> > 3. Word not found, maybe you are looking for one of these words
> > if: No match for "customizable" with strategy "." in dictionary "*".
> > 4. [Select Dictionary] All dictionaries
> > 5. Now I get definitions
> >
> > Something is wrong with this workflow as first I do not get
> > anything.
> >
> > If I again [Search definition] I will again get word not
> > found. Which is not logical.
>
> Selecting a dictionary only does that. No search is performed then. When
> after selecting the dictionary some search result is shown this is the
> result of the previously performed search.
Only that something is maybe wrong there, I have given the
recipe.
> At least in the version within the emacs repository the tab key is
> wrapping around through all the buttons and links used. There I use the
> button library to provide the functionality for the function buttons at
> the top and the links to word definitions in the text.
Then it must be fine. I got the files from repository and I did not
use it in the new built Emacs, just loaded it into this one.
Thank you,
Jean
Re: Integration of dictionary package, Jean Louis, 2020/11/19
Re: Integration of dictionary package, Eli Zaretskii, 2020/11/21