#597785 gedit: Spellcheck overlooks misspelled words in PHP files

Package:
gedit
Source:
gedit
Description:
popular text editor for the GNOME desktop environment
Submitter:
acrocycle
Date:
2013-12-14 14:27:04 UTC
Severity:
important
#597785#5
Date:
2010-09-22 23:18:36 UTC
From:
To:
After doing a little testing, it looks like this only happens with PHP files.
The spellchecker will overlook every misspelled word, even ones that are
obviously, not words. The spellchecker works on Unsaved files but as soon as
you save the file as PHP, the spellchecker does not work.

This is true even after saving the file, then shutting down gedit and re-
opening the file.

#597785#10
Date:
2013-11-08 16:45:02 UTC
From:
To:
using php files, the default checkspeller just works inside of php code. I
mean <?php ?> and using php syntax.

Things outside of it are considered html.

To enable checkspeller outside of php code you must change in
/usr/share/gtksourceview-3.0/language-specs/php.lang to


   1. diff --git a/data/language-specs/php.lang
   b/data/language-specs/php.lang
   2. index f2ff713..ff826c8 100644
   3. --- a/data/language-specs/php.lang
   4. +++ b/data/language-specs/php.lang
   5. @@ -321,7 +321,7 @@
   6.        </match>
   7.      </context>
   8.
   9. -    <context id="php-block">
   10. +    <context id="php-block" class="no-spell-check">
   11.        <start><([?](php)?)</start>
   12.        <end>[?]></end>
   13.        <include>
   14. @@ -352,7 +352,7 @@
   15.
   16.      <replace id="html:embedded-lang-hook" ref="php-block"/>
   17.
   18. -    <context id="php" class="no-spell-check">
   19. +    <context id="php">
   20.        <include>
   21.          <context ref="php-block"/>
   22.          <context ref="html:html"/>

thanks to jessevdk for this code.

acrocycle can you still reproduce this issue ?

thanks

Regards
althaser
Debian Release: jessie/sid
  500 unstable        ftp.nl.debian.org
  500 stable          dl.google.com
    1 experimental    ftp.nl.debian.org
--- Package information. ---
Depends                           (Version) | Installed
===========================================-+-==============
python3:any                   (>= 3.3.2-2~) |
libatk1.0-0                     (>= 1.12.4) | 2.10.0-2
libc6                             (>= 2.14) |
libcairo-gobject2               (>= 1.10.0) |
libcairo2                        (>= 1.2.4) |
libenchant1c2a                   (>= 1.6.0) |
libgdk-pixbuf2.0-0              (>= 2.22.0) |
libgirepository-1.0-1            (>= 0.9.3) |
libglib2.0-0                    (>= 2.37.5) |
libgtk-3-0                      (>= 3.9.10) |
libgtksourceview-3.0-1          (>= 3.10.1) |
libpango-1.0-0                  (>= 1.14.0) |
libpangocairo-1.0-0             (>= 1.14.0) |
libpeas-1.0-0                    (>= 1.1.0) |
libx11-6                                    |
libxml2                          (>= 2.7.4) |
gedit-common                      (>= 3.10) |
gedit-common                      (<< 3.11) |
gnome-icon-theme-symbolic                   |
gsettings-desktop-schemas                   |
python3-gi                         (>= 3.0) |
python-gi-cairo                    (>= 3.0) |
gir1.2-peas-1.0                             |
iso-codes                                   |


Recommends      (Version) | Installed
=========================-+-===========
zenity                    | 3.8.0-1
yelp                      | 3.10.1-1


Suggests           (Version) | Installed
============================-+-===========
gedit-plugins                |
--- Output from package bug script --- /usr/bin/xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1' Active plugins: - 'docinfo' - 'spell' - 'modelines' - 'filebrowser' - 'time' No plugin installed in $HOME. Module versions: - glib 2.38.1 - gtk+ - gtksourceview - pygobject - enchant - iso-codes 3.48
#597785#15
Date:
2013-12-14 14:24:35 UTC
From:
To:
I forgot to mention acrocycle.