I solved this bug. I do not know if my workaround create other issues,
but it works properly so far.
The problem is about the way 'ord()' deals with special characters in the final
'while' of
/usr/lib/gedit/plugins/joinlines.py
It seems to be a known issue in python.
You can try it out in python:
>>> char='è'
>>> ord(char)
fails, while
>>> char=u'è'
>>> ord(char)
works.
I did not managed to rewrite a working definition of 'char' in
joinlines.py, but I believe that the call 'ord(char)' is only a test for
'while' to check is a character is found. Therefore, if a "string of
length" >1 is given as 'char', in this case, it does not matter what
character is, but only that 'char' contains a character.
As a newby of python, I solved this bug for the split/join-lines plugin
replacing the two calls 'while ord(char)' with
'while ord(char[:1])' in the final lines of the file
/usr/lib/gedit/plugins/joinlines.py,
it works!
** Also affects: gedit-plugins (Debian)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gedit-plugins in Ubuntu.
https://bugs.launchpad.net/bugs/880267
Title:
join/split lines not working
Status in “gedit-plugins” package in Ubuntu:
Confirmed
Status in “gedit-plugins” package in Debian:
New
Bug description:
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System ->
About Ubuntu
Description: Ubuntu 11.10
Release: 11.10
2) The version of the package you are using, via 'apt-cache policy pkgname'
or by checking in Software Center
gedit:
Installiert: 3.2.1-0ubuntu1
Kandidat: 3.2.1-0ubuntu1
Versionstabelle:
*** 3.2.1-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ oneiric-proposed/main amd64
Packages
100 /var/lib/dpkg/status
3.2.0-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
gedit-plugins:
Installiert: 3.2.0-0ubuntu1
Kandidat: 3.2.0-0ubuntu1
Versionstabelle:
*** 3.2.0-0ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ oneiric/universe amd64 Packages
100 /var/lib/dpkg/status
3) What you expected to happen
Lines should be joined or split if I use the plugin
4) What happened instead
Noting happens it doesn't work.
This is the error that I get, if I start gedit in an terminal.
Traceback (most recent call last):
File "/usr/lib/gedit/plugins/joinlines.py", line 79, in <lambda>
lambda a, w: split_lines(w))],
File "/usr/lib/gedit/plugins/joinlines.py", line 171, in split_lines
forward_to_word_end(current_word_end)
File "/usr/lib/gedit/plugins/joinlines.py", line 218, in forward_to_word_end
while ord(char) and (not (char in (' ', '\t', '\n', '\r'))):
TypeError: ord() expected a character, but string of length 2 found
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit 3.2.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-13.21-generic 3.0.6
Uname: Linux 3.0.0-13-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
CheckboxSubmission: 13741649d6b2dd56d757d58c3d964436
CheckboxSystem: da9af3b901b5569a389df6337f3d812f
Date: Sun Oct 23 11:35:19 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110906)
SourcePackage: gedit
UpgradeStatus: Upgraded to oneiric on 2011-09-30 (23 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gedit-plugins/+bug/880267/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp