Open bbuccianti opened 6 years ago
Have you tried out @abo-abo's package define-word
?
I also did some preliminary online searching, as I've always wanted to look into dictionary client/servers for GNU/Linux and Emacs. Here are some things I found, which might be worth looking into before diving blindly into something like counsel-dict
:
dict
client and dictd
server seem to be the de facto standard and proof of concept implementations, as they were created by the DICT Development Group.
dico
client and dicod
server are part of the GNU project.
Is posible to implement this with counsel?
What UI/behaviour do you have in mind?
I want to just see a word press a key combination and be prompted for a word then retrieve the "dict someword" result in the minibuffer or in an special buffer. I can't find a simple package that do this
Edit: i'm currently using the M-& bind to async-shell-command and run the "dict someword". This works but seems too simple :D
Also i'm thinking on something like try local dict search first, if no results founded search online
I want to just see a word press a key combination and be prompted for a word then retrieve the "dict someword" result in the minibuffer or in an special buffer. I can't find a simple package that do this
OK, but how does this relate to ivy
, whose role is to interactively filter a collection of potential candidates? Where do you expect to get such a list of strings from?
Edit: i'm currently using the M-& bind to async-shell-command and run the "dict someword". This works but seems too simple :D
That's what it's there for. :)
Also i'm thinking on something like try local dict search first, if no results founded search online
Have you tried or do you intend to try out any of the aforementioned Emacs packages?
OK,** but how does this relate to ivy, whose role is to interactively filter a collection of potential candidates? Where do you expect to get such a list of strings from?
Maybe you can complete the word that you want to lookup. Some times looking for "settings" don't get anything but "setting" get results
I created a function minutes before to prompt me for a word and call dict command with that word
(defun bb/dict-lookup ()
(interactive)
(let ((word (read-from-minibuffer "Word? ")))
(async-shell-command (concat "dict " word))))
Sorry for the wrong indentation i can't fix it for now
Have you tried or do you intend to try out any of the aforementioned Emacs packages?
I skimmed for all packages but anyone seem like providing completion when looking for a word. Maybe i look poorly, i'm going to keep looking
Maybe you can complete the word that you want to lookup. Some times looking for "settings" don't get anything but "setting" get results
You mean completing all possible words in a particular language, such as in the following example? https://emacs.stackexchange.com/a/37446/15748
I created a function minutes before to prompt me for a word and call dict command with that word
You can use read-shell-command
instead of read-from-minibuffer
, if you prefer:
(defun bb/dict-lookup ()
"Read a word and pass it to dict(1)."
(interactive)
(async-shell-command (read-shell-command "Define word: " "dict ")
"*dict*"))
This allows editing the dict
program with completion, though that may be undesirable for its arguments.
Note, however, that reading arbitrary text from the minibuffer isn't completion, which requires a set of strings to pick from and is what Ivy helps with.
I'm currently switching to a terminal console to input "dict someword" to simply and fast get the meaning of someword.
Is posible to implement this with counsel? Something like counsel-dict?
Thank you