patchWeeChat - Patches: patch #6858, port weechat to enchant instead of...

 
 

patch #6858: port weechat to enchant instead of aspell

Submitter:  Caolan McNamara <caolan>
Submitted:  Tue 30 Jun 2009 04:39:29 PM UTC
   
 
Category:  aspell plugin Priority:  3 - Low
Status:  Done Privacy:  Public
Assigned to:  flashcode Open/Closed:  Closed
IRC nick: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 08 Jun 2013 10:15:50 AM UTC, comment #9: 

Thank you for doing the integration.
From the first glance, it looks like the only params that are defined are:
/uspell/uspell_provider.cpp:           config_dirs = enchant_get_dirs_from_param (broker, "enchant.uspell.dictionary.path");
./myspell/myspell_checker.cpp:          config_dirs = enchant_get_dirs_from_param (broker, "enchant.myspell.dictionary.path");
./ispell/ispell_checker.cpp:            config_dirs = enchant_get_dirs_from_param (broker, "enchant.ispell.dictionary.path");

I'll continue digging, maybe fixing the enchant in the process.

Paul Komkoff <stingray>
Fri 07 Jun 2013 07:07:54 PM UTC, comment #8: 

Thanks for the patch, it is now committed, with some improvements and some bugs fixed.

Enchant is NOT enabled by default, you have to enable it with -DENABLE_ENCHANT=ON (cmake) or --enable-enchant (configure).

One thing is missing compared to aspell: I don't know how to set options.
For example with aspell you can do that:


/set aspell.option.ignore-case "true"


This enables case-insensitive spell checking.
With enchant, I don't know how to set such options.

I tried with function "enchant_broker_set_param" with no luck (see the TODO in weechat-aspell-speller.c).
If you have an idea for how to do that, it is welcome.

Thank you!

Sebastien Helleu <flashcode>
Group administrator
Fri 07 Jun 2013 05:48:56 AM UTC, comment #7: 

OK.

Then I'll apply the patch and add an option to disable enchant, something like that in cmake:

ENABLE_ENCHANT: ON by default, to auto search for enchant, and fallback to aspell if not found, OFF to turn off enchant (use only aspell, if found)
ENABLE_ASPELL: ON to compile aspell plugin (with enchant or aspell), OFF to disable the plugin (no changes on this option).

Would that be OK for you?

Sebastien Helleu <flashcode>
Group administrator
Thu 06 Jun 2013 10:50:07 PM UTC, comment #6: 

Hi.

It actually applies if you do patch -p1, and does it cleanly.
The real question would probably be is that it unconditionally uses enchant, which is a good thing for fedora but there might be other setups/distros over there that don't want that.

So, I don't know what you'd decide. It's really hard to track all of the upstream changes with this, and going back to aspell is not a good option because of the whole integration.

Paul Komkoff <stingray>
Thu 06 Jun 2013 06:01:55 PM UTC, comment #5: 

Hi Paul,

Thanks for the patch, but it does not apply on 0.4.1, neither git version.
Could you please attach a new patch that applies fine on current git head? (if possible a patch made with git, so that it can be committed as-is)

Sebastien Helleu <flashcode>
Group administrator
Sun 02 Jun 2013 01:27:19 PM UTC, comment #4: 

Hi Sebastien,

Can we resurrect this? I have attached the patch we're currently using in fedora. Thanks.

(file #28217)

Paul Komkoff <stingray>
Sat 12 Sep 2009 04:45:50 PM UTC, comment #3: 

As an aside, you could use "iso-codes" library to convert the lang/territory ids to the (optionally translated) language/territory names

Caolan McNamara <caolan>
Wed 01 Jul 2009 04:50:16 PM UTC, comment #2: 

Hmm... I didn't notice something important: your patch is against WeeChat 0.2.6.3, you'll have to rewrite it against last devel version (devel version is very different from 0.2.6.x branch).

Sebastien Helleu <flashcode>
Group administrator
Wed 01 Jul 2009 12:14:55 PM UTC, comment #1: 

Hi,

Thank you for patch.

Would it be possible to add another patch for cmake stuff? (cmake is now recommended way to compile weechat, even if there is still autotools).

Moreover, this patch will be used in version 0.3.1 (I hope, or later, I don't know), because new features are freezed for 0.3.0.

Sebastien Helleu <flashcode>
Group administrator
Tue 30 Jun 2009 04:39:29 PM UTC, original submission:  

As described at http://fedoraproject.org/wiki/Releases/FeatureDictionary in fedora for some time we've been trying to unify dictionary support so that all apps use the same spelling dictionaries by default. (other distros have similar efforts)

In that vein attached is a patch that prefers enchant to aspell as the spell-checker for weechat, which gives the same spelling dictionaries by default as used by OpenOffice.org/Firefox/GNOME/KDE etc.

Little bit tricky is that the spelling plugin and command is called "aspell" in weechat, so rather than add another one, or rename the current one, the patch retains /aspell etc and just default to implementing it with enchant when available

Caolan McNamara <caolan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #28217:  weechat-0.4.1-enchant.patch added by stingray (19KiB - application/octet-stream)
file #18702:  weechat-gitHEAD.enchant.patch added by caolan (27KiB - text/x-patch - update for against git HEAD)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by stingray (Updated the item)
  • -email is unavailable- added by seschwar
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by caolan (Submitted the item)
  • -email is unavailable- added by caolan
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-06 flashcode Open/ClosedOpen Closed
    2013-06-07 flashcode StatusIn Progress Done
    2013-06-07 flashcode StatusNeed Info In Progress
    2013-06-02 stingray Attached File- Added weechat-0.4.1-enchant.patch, #28217
    2012-06-02 seschwar Carbon-Copy- Added seschwar
    2009-09-12 caolan Attached File- Added weechat-gitHEAD.enchant.patch, #18702
    2009-07-01 flashcode StatusPostponed Need Info
    2009-07-01 flashcode CategoryNone aspell plugin
        Priority5 - Normal 3 - Low
        StatusNone Postponed
        Assigned toNone flashcode
    2009-06-30 caolan Attached File- Added weechat-0.2.6.3.enchant.patch, #18346
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code