For quite a while, have been annoyed by homophone selection (specifically phones word) not working in emacs. I finally tracked this down to the following issue: the call to selected_text inside of user.homophones_show_selection actually clears the selection. As a consequence, "choose" appends the selected homophone to the original word, instead of replacing it.
Clearing the selection is the expected behavior when copying in emacs, but this changes selected_text to restore the selection after copying.
Note: This still requires enabling delete-selection-mode, but I would deem that acceptable when editing natural language text.
I just realized that this by itself will not solve the issue. In fact, the change that I proposed causes issues with dictation mode. I will have to investigate this further.
For quite a while, have been annoyed by homophone selection (specifically
phones word
) not working inemacs
. I finally tracked this down to the following issue: the call toselected_text
inside ofuser.homophones_show_selection
actually clears the selection. As a consequence, "choose" appends the selected homophone to the original word, instead of replacing it.Clearing the selection is the expected behavior when copying in
emacs
, but this changesselected_text
to restore the selection after copying.Note: This still requires enabling
delete-selection-mode
, but I would deem that acceptable when editing natural language text.Context: