Closed hongyi-zhao closed 2 years ago
Hi there. I don't see any issues on my current installation. Are you sure you are running this correctly?
The command powerthesaurus-lookup-word
asks for the word to find synonyms for in the minibuffer whereas the command powerthesaurus-lookup-word-at-point
will look for synonyms for the word where the cursor is located.
I also tried with M-x powerthesaurus-lookup-word-at-point RET
, but obtain the same result:
That's strange. Can you try the following a couple of times and tell me if that works for you (no need to post a screenshot):
M-x powerthesaurus-lookup-word
you
and, finally, press enter.Also, mind telling me if you installed this package from source or from MELPA?
That's strange. Can you try the following a couple of times and tell me if that works for you (no need to post a screenshot):
1. Run `M-x powerthesaurus-lookup-word` 2. At the minibuffer's prompt, type the word `you` and, finally, press enter.
I tried it 3 times and all the results were the same as previously reported.
Also, mind telling me if you installed this package from source or from MELPA?
In my situation, emacs-powerthesaurus
is installed by straight.el, which has the capability of integration-with-use-package, and it will automatically retrieve the upstream git master version. See below for the version info of emacs-powerthesaurus
managed by straight.el:
$ git log -1
commit 93036d3b111925ebc34f747ff846cb0b8669b92e (HEAD -> master, origin/master, origin/HEAD)
Merge: 81a262e dd9037f
Author: Panagiotis Vlantis <panagiotis.vlantis.mtc@windowslive.com>
Date: Mon Jul 20 18:46:37 2020 +0300
Merge pull request #12 from maxchaos/master
Fix powerthesaurus.org interface
Yes, I'm seeing the same problem, on Debian 9, with 27.2. GNU Emacs 27.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2021-03-27
Hmm. Can you please check if this is an issue with retrieving data from the website? You should be able to do so by setting request
to log everything (e.g., by pressing M-:
, entering (powerthesaurus-debug-connection)
and hitting enter) and then repeating the steps above. When this process is finished, there should be a hidden buffer named *request-log*
(there is a space at the beginning of the buffer's name) which should contain the logs in question.
I uploaded the log here, just FYI.
I have the same issue using powerthesaurus.el on Windows 10 with Emacs 27.2 and powerthesaurus 0.1.0 (latest commit dd9037f). The log I got (which was in Messages for some reason) is here: https://ttm.sh/eEd.txt
Same issue here. GNU Emacs 28.1 (build 52, x86_64-w64-mingw32) of 2022-04-04
For everyone else on this thread, I've found that dictionary.el, which queries dict.org and other dictionaries, including the moby thesaurus, is fairly useful for synonym lookups.
@duckwork Have you confirmed that the package is running smoothly?
@hongyi-zhao this package? no, I don't use it. the dictionary.el I linked in my comment works for me though.
@ntrocado unfortunately the repositories of my distribution do not provide Emacs 28 yet so I cannot test whether it is a compatibility issue with the new version in general or in combination with mingw. This means that I'll have to set up a podman image for testing as soon as I find some time. Are the symptoms you experience exactly the same as the ones of the issue's original author? That would be strange because the internals of this package have been rewritten quite a bit since then.
@maxchaos They are the same symptoms as far as I can tell.
I installed via straight-use-package
. M-x
powerthesaurus-lookup-word
enter you
enter, and the minibuffer shows:
(1/0) Choose a candidate:
Here's my *request log*
.
@hongyi-zhao this package? no, I don't use it. the dictionary.el I linked in my comment works for me though.
Do you mean dictionary.el works for the latest Emacs version?
Yes. I'm currently using it on Emacs git master.
What's your configuration? It seems this package doesn't exist on melpa.
@ntrocado this package seems to work as expected with Emacs version 28.1 running inside an Ubuntu based container so I'll need more to go on.
Firstly, can you tell me the exact version of the powerthesaurus package you are using (it should be written in the comments section of the elisp module, which you can visit by running M-x find-library RET powerthesaurus RET
)?
Secondly, do you have curl
installed on your system and, if so, does it support compression? Taking a quick look at the log you uploaded, either Emacs failed to uncompress the response or there is some kind of encoding issue since the text following the headers is unreadable. In order to check if you version of 'curl' supports encoding, you can run the following in the terminal and check if libz
is mentioned among the features.
@maxchaos I'm using version 0.2.1. curl -V
prints libz
among the features.
There's definitively some kind of encoding issue.... In fact, I solved the problem by adding this to my init file:
(setq powerthesaurus-request-headers
(delete '("Accept-Encoding" . "gzip, deflate, br")
powerthesaurus-request-headers))
Unless you have further suggestions that can also be useful for others, as far as I'm concerned feel free to close the issue... Thanks!
@hongyi-zhao I linked the repo in my first comment about it, above. I'm not going to comment on this thread further since it's off-topic.
@ntrocado, I pushed a new commit that removes this request header from the defaults.
If anyone else feels like it, feel free to let me know if ntrocado's fix works for you or your problem persists. Otherwise, I'll just go ahead and close this issue.
On Ubuntu 20.04, I tried to use this package, but it didn't work.
As you can see above,
M-x powerthesaurus-lookup-word RET
command returned nothing.Any hints for this problem?
Regards, HY