#17 no % command in PIPE mode

closed
None
5
2007-01-23
2006-11-13
Marot
No

In pipe mode, % is not recongnised as a command
for "Exit terse mode". This ispell compatibility
command is needed, for example, be emacs' ispell.el.

current behavior:
-----------------------------------------
echo "%" | hunspell.exe -a
@(#) International Ispell Version 3.2.06 (but really
Hunspell HUNSPELL_VERSION)1
.1.4 - Magyar 1.1.1
*

-----------------------------------------

expected behavior:
-----------------------------------------
echo "%" | hunspell.exe -a
@(#) International Ispell Version 3.2.06 (but really
Hunspell HUNSPELL_VERSION)1
.1.4 - Magyar 1.1.1
-----------------------------------------

Here is a patch that might solve the problem:
diff -c hunspell.cxx~ hunspell.cxx
-----------------------------------------
*** hunspell.cxx~ Mon Nov 13 14:13:00 2006
--- hunspell.cxx Mon Nov 13 14:19:02 2006
***************
*** 314,319 ****
--- 314,320 ----
pos = -1;
switch (buf[0]) {
case '!': { break; }
+ case '%': { break; }
case '+': {
delete parser;
parser = new LaTeXParser(wordchars);
-----------------------------------------

Discussion

    • assigned_to: nobody --> nemethl
     
  • Logged In: YES
    user_id=726595
    Originator: NO

    Many thanks for the report and the patch! I am very glad of it.
    There was a lot of problem with Emacs Ispell.el compatibility, it seems, it was not an accident. :)
    Next release of Hunspell will support terse mode.

     
  • Marot
    Marot
    2006-11-21

    Logged In: YES
    user_id=1432027
    Originator: YES

    Thanks.

    To actually make it work with emacs I had to modify the "-vv" switch as well. It should print HUNSPELL_PIPE_HEADING instead of HUNSPELL_HEADING. ("-v" can report HUNSPELL_HEADING, that does not matter).

    After that hunspell and emacs work together perfectly. I use GNU Emacs 22.0.50.1 (i386-mingw-nt5.1.2600) of 2006-05-14 on NEUTRINO

     
  • Logged In: YES
    user_id=726595
    Originator: NO

    Thank you very much. I will fix -vv, too. Laci

     
    • status: open --> closed
     
  • Logged In: YES
    user_id=726595
    Originator: NO

    Resolved with implementing terse mode.