wucuo icon indicating copy to clipboard operation
wucuo copied to clipboard

Question: wucuo don't show dialog to insert words into dictionary. Why?

Open poulpoulsen opened this issue 4 years ago • 14 comments

Hello, i try your program and it seems, that is really faster then flyspell. But why isn't it open the usual dialog from ispell or others, to change a wrong word or insert it in my wordlist? If i press M-$ for ispell-word the menu opens. Should i configure anything for that?

Regards Poul

poulpoulsen avatar Jun 11 '20 18:06 poulpoulsen

What's the command to open the usual dialog? Could you show me the screenshot of this dialog? I never use it before.

wucuo is just a minor mode to replace flyspell-mode but it's still using flyspell api and data.

redguardtoo avatar Jun 12 '20 01:06 redguardtoo

hello, the command is flyspell-correct-word-before-point.

here is a screenshot: Screenshot_20200612_192237

If the word is not known, i can save it in my personal dictionary.

Hope it helps Regards Poul

poulpoulsen avatar Jun 12 '20 17:06 poulpoulsen

... the key is C-c $ in flyspell-mode.

poulpoulsen avatar Jun 12 '20 17:06 poulpoulsen

Good idea. Now wucuo re-uses flyspell key bindings.

728fa8e add wucuo-mode which uses flyspell-mode-map (Chen Bin)

redguardtoo avatar Jun 13 '20 10:06 redguardtoo

hello, thanks for the quick commit! Now C-c $ works. But unfortunately, if i leave a wrong spelled word in my text and save the file, the following error pops up: wucuo-start called. Saving file /home/held/org-roam/Bewässerung/Gartenbewässerung.org... Wrote /home/held/org-roam/Bewässerung/Gartenbewässerung.org Wrong type argument: symbolp, (prop)

Hmmh ?

poulpoulsen avatar Jun 13 '20 14:06 poulpoulsen

I can't reproduce, Please M-x toggle-debug-on-error, reproduce the bug and send me all the details.

redguardtoo avatar Jun 14 '20 02:06 redguardtoo

hello, here is the output from the debugger. Hope it helps:

Debugger entered--Lisp error: (wrong-type-argument symbolp (prop)) symbol-name((prop)) #f(compiled-function (source) #<bytecode 0x51f2b71>)((prop)) mapcan(#f(compiled-function (source) #<bytecode 0x51f2b71>) ((prop) (all-directories))) org-roam--extract-tags() org-roam-db--update-tags() org-roam-db--update-file() run-hooks(after-save-hook) basic-save-buffer(t) save-buffer(1) funcall-interactively(save-buffer 1) call-interactively(save-buffer nil nil) command-execute(save-buffer)

poulpoulsen avatar Jun 14 '20 17:06 poulpoulsen

Looks you the org-roam version you upgraded too has some bug.

I double checked the code of flyspell and wucuo, there is no function which uses a variable like prop except below code,

(defun flyspell-properties-at-p (pos)
  "Return t if there is a text property at POS, not counting `local-map'.
If variable `flyspell-highlight-properties' is set to nil,
text with properties are not checked.  This function is used to discover
if the character at POS has any other property."
  (let ((prop (text-properties-at pos))
	(keep t))
    (while (and keep (consp prop))
      (if (and (eq (car prop) 'local-map) (consp (cdr prop)))
	  (setq prop (cdr (cdr prop)))
	(setq keep nil)))
    (consp prop)))

But in this code prop is always valid because it's only converted from position. So it's very possible the bug is in org-roam. I suggest you use stable version of org-roam instead.

redguardtoo avatar Jun 15 '20 00:06 redguardtoo

Oh i see. After i wrote these lines, i recognized that also something other seems strange. Will check with disabled org-roam  and come back. Regards Poul

Von: Chen Bin [email protected] An: redguardtoo/wucuo [email protected] Kopie: poulpoulsen [email protected], Author [email protected] Empfangen: 15.06.2020 02:41:19 Betreff: Re: [redguardtoo/wucuo] Question: wucuo don't show dialog to insert words into dictionary. Why? (#7)

Looks you the org-roam version you upgraded too has some bug.

I double checked the code of flyspell and wucuo, there is no function which uses a variable like prop except below code,

(defun flyspell-properties-at-p (pos) "Return t if there is a text property at POS, not counting local-map'. If variable flyspell-highlight-properties' is set to nil, text with properties are not checked. This function is used to discover if the character at POS has any other property." (let ((prop (text-properties-at pos)) (keep t)) (while (and keep (consp prop)) (if (and (eq (car prop) 'local-map) (consp (cdr prop))) (setq prop (cdr (cdr prop))) (setq keep nil))) (consp prop)))But in this code prop is always valid because it's only converted from position. So it's very possible the bug is in org-roam. I suggest you use stable version of org-roam instead.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub[https://github.com/redguardtoo/wucuo/issues/7#issuecomment-643847617], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ACAFDKYC25GGAJEQYN6AHOLRWVU23ANCNFSM4N3UPDZA]. [https://github.com/notifications/beacon/ACAFDK6KHGCZIMTRGHEXIL3RWVU23A5CNFSM4N3UPDZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZQFLQI.gif]

poulpoulsen avatar Jun 15 '20 14:06 poulpoulsen

hello, thank you your answer, but i do not understand it in full depth. I disabled org-roam and now the result with wucuo is the same as before: Message is Starting new Ispell process /usr/bin/hunspell with de_DE_frami dictionary... Checking region... Spell Checking...100% [Qwertz] Spell Checking completed.

.. but unfortunately no Dialog for changing the wrong word (Qwertz) or save it in my personal dictionary. Like with command C-c $, that works.

poulpoulsen avatar Jun 15 '20 15:06 poulpoulsen

I'm not sure about "Dialog for changing the wrong word (Qwertz) or save it in my personal dictionary".

When you say dialog, you mean the right side of below screenshot? If answer is yes, could you move focus into right side, run C-h v major-mode? What's the output?

image

redguardtoo avatar Jun 15 '20 22:06 redguardtoo

Hello, no unfortunately it is not the popup. I can't hardcopy it, because it is a popupframe inside emacs. I don't know how to copy it. If you know a way, pls tell me :-)

But you could see yourself, if you press C-c $ for check the word at point with flyspell.

Regards Poul

poulpoulsen avatar Jun 16 '20 18:06 poulpoulsen

Hello, did you find out anything related? Is it possible? Any help appreciated.

poulpoulsen avatar Jun 23 '20 17:06 poulpoulsen

Can you add a word to the dictionary without the graphical popup?

ParetoOptimalDev avatar Mar 14 '22 06:03 ParetoOptimalDev