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

 
 

patch #6858: port weechat to enchant instead of aspell

Submitted by:  Caolan McNamara <caolan>
Submitted on:  Tue 30 Jun 2009 04:39:29 PM UTC  
 
Category: aspell pluginPriority: 3 - Low
Status: DonePrivacy: Public
Assigned to: Sebastien Helleu <flashcode>Open/Closed: Closed
IRC nick: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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:

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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

Attached Files
file #28217:  weechat-0.4.1-enchant.patch added by stingray (19kB - application/octet-stream)
file #18702:  weechat-gitHEAD.enchant.patch added by caolan (27kB - 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
  • -unavailable- added by stingray (Updated the item)
  • -unavailable- added by seschwar
  • -unavailable- added by flashcode (Posted a comment)
  • -unavailable- added by caolan (Submitted the item)
  • -unavailable- added by caolan
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 06 Oct 2013 07:48:51 AM UTCflashcodeOpen/ClosedOpen=>Closed
    Fri 07 Jun 2013 07:07:54 PM UTCflashcodeStatusIn Progress=>Done
    Fri 07 Jun 2013 05:48:56 AM UTCflashcodeStatusNeed Info=>In Progress
    Sun 02 Jun 2013 01:27:19 PM UTCstingrayAttached File-=>Added weechat-0.4.1-enchant.patch, #28217
    Sat 02 Jun 2012 05:24:33 PM UTCseschwarCarbon-Copy-=>Added seschwar
    Sat 12 Sep 2009 04:43:59 PM UTCcaolanAttached File-=>Added weechat-gitHEAD.enchant.patch, #18702
    Wed 01 Jul 2009 04:50:15 PM UTCflashcodeStatusPostponed=>Need Info
    Wed 01 Jul 2009 12:14:55 PM UTCflashcodeCategoryNone=>aspell plugin
      Priority5 - Normal=>3 - Low
      StatusNone=>Postponed
      Assigned toNone=>flashcode
    Tue 30 Jun 2009 04:39:30 PM UTCcaolanAttached File-=>Added weechat-0.2.6.3.enchant.patch, #18346
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup