Olivier Sessink | 3 Sep 23:28 2008
Picon

advancements with new editor widget

Hi all,

just an update about the experimenting with a new editor widget.

The new editor widget in the 'testcode' repository is improving quickly. 
Right now it can do:

- scanning/highlighting in multiple runs so it won't lock the GUI
- restart/resume scanning in any location, with a correct block and 
context stack
- context sensitive autocompletion, for example the valid html 
attributes within a certain html tag
- block begin/end highlighting (when you move your cursor over the 
begin, the end is highlighted)

what needs to be done:
- memory management, it has many memory leaks
- when rescanning an area that has been scanned before it should first 
remove all tags and blocks in that area
- if during rescanning a new end-of-block or end-of-context is found, 
the region after the changed area should be marked for rescanning
- a pattern compiler from a language file. right now the test patterns 
are hardcoded.

if you want more details on the design, check
http://bluefish.cvs.sourceforge.net/bluefish/testcode/bftestview2/bftextview2.h?revision=1.9&view=markup

regards,
	Olivier
(Continue reading)

Denis S | 7 Sep 16:59 2008
Picon

Character Encoding Idea

Hi everyone,

I was just changing site encoding for site in Russian from UTF8 to
CP1251 and spot interesting thing, currently if you change encoding in
Bluefish in HTML document it set charset to cp1251, and all browsers
seems to understand this except IE6 running under Wine(I'm developing
sites under Linux only). When you change charset to windows-1251 which
is commonly recommended to use, this problem gone away.

I see that there are two instances in "Character Encoding" menu for
CP1251 and CP1251(Russian) which seems to be identical, maybe it's worth
to replace CP1251 for example for CP1251 (Windows)? And this option
would generate string like this:
---------------------------------------------------------------------------------------------------------------------------------
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
---------------------------------------------------------------------------------------------------------------------------------

Best regards,
Denis
http://forum.weblamp.net
http://www.pharos-search.com

Olivier Sessink | 9 Sep 09:38 2008
Picon

Re: Character Encoding Idea

> Hi everyone,
>
> I was just changing site encoding for site in Russian from UTF8 to
> CP1251 and spot interesting thing, currently if you change encoding in
> Bluefish in HTML document it set charset to cp1251, and all browsers
> seems to understand this except IE6 running under Wine(I'm developing
> sites under Linux only). When you change charset to windows-1251 which
> is commonly recommended to use, this problem gone away.
>
> I see that there are two instances in "Character Encoding" menu for
> CP1251 and CP1251(Russian) which seems to be identical

on every file that is openened that has a new character encoding bluefish
will add this as an item to the menu. You can edit your encodings in
~/.bluefish/encodings

>, maybe it's worth
> to replace CP1251 for example for CP1251 (Windows)? And this option
> would generate string like this:

I think Jim just added windows-1251 to the default character set in cvs.

regards,
   Olivier

--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
the body of a message to listar@...
List Web Page: http://www.ems.ru/cgi-bin/listargate.cgi
Main Web Page: http://bluefish.openoffice.nl/
(Continue reading)

Thanos Chatziathanassiou | 9 Sep 12:07 2008
Picon

File save problem

Hello,

First off all, thanks for the new highlighting engine, it is leaps and 
bounds better and faster than the 1.0.7 one.

Now about a (minor ?) problem:
I cannot save a file to a FUSE mounted smbnetfs mount. The original file 
gets turned into a ``file.c~'' backup correctly, but the newly written 
file does not ever become ``file.c''. Instead, I'm left with something 
of the form ``.goutputstream-RANDOM'' which does contain the new file.
The same thing works as expected in 1.0.7

Any ideas where to start debugging this issue/anything I can do to help 
track it down ?

Side notes:
- bluefish-unstable seems to ignore the ``Create backup file during file 
save'' preference and a ``file.c~'' file always gets created.
- Would it be possible to have an option to create a new file as backup 
and overwrite the original ? New files do not necessarily have the same 
permissions as existing ones.

Best Regards,
Thanos Chatziathanassiou
Olivier Sessink | 9 Sep 12:29 2008
Picon

Re: File save problem


> Now about a (minor ?) problem:
> I cannot save a file to a FUSE mounted smbnetfs mount. The original file
> gets turned into a ``file.c~'' backup correctly, but the newly written
> file does not ever become ``file.c''. Instead, I'm left with something
> of the form ``.goutputstream-RANDOM'' which does contain the new file.
> The same thing works as expected in 1.0.7

which version are you using? 1.1.7 or a recent cvs checkout? current cvs
is ported to GIO/GVFS as backend, 1.1.7 uses GnomeVFS.

> Side notes:
> - bluefish-unstable seems to ignore the ``Create backup file during file
> save'' preference and a ``file.c~'' file always gets created.

could you add that to bugzilla so we won't forget about it?

> - Would it be possible to have an option to create a new file as backup
> and overwrite the original ? New files do not necessarily have the same
> permissions as existing ones.

that *should* be the implementation indeed (1.0.7 and 1.1.7 do this), I
haven't looked at the GIO code to see if GIO implements this in the same
way.

regards,
  Olivier

--

-- 
To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
(Continue reading)

Thanos Chatziathanassiou | 9 Sep 12:57 2008
Picon

Re: File save problem

O/H Olivier Sessink έγραψε:
>> Now about a (minor ?) problem:
>> I cannot save a file to a FUSE mounted smbnetfs mount. The original file
>> gets turned into a ``file.c~'' backup correctly, but the newly written
>> file does not ever become ``file.c''. Instead, I'm left with something
>> of the form ``.goutputstream-RANDOM'' which does contain the new file.
>> The same thing works as expected in 1.0.7
>>     
>
> which version are you using? 1.1.7 or a recent cvs checkout? current cvs
> is ported to GIO/GVFS as backend, 1.1.7 uses GnomeVFS.
>   
current CVS.
It still reports ``bluefish-unstable 1.1.7'' though.
Where do I get the 1.1.7 version which uses GnomeVFS (which presumably 
works as the stable version) ?
http://www.bennewitz.com/bluefish/devel/source/ stops at 1.1.6 and 2 CVS 
versions dated 2006-05-06 and 2006-11-09.
What other differences do they have ?
Is there a maintained changelog somewhere ? CVS stops on 2005-06-20.
>   
>> Side notes:
>> - bluefish-unstable seems to ignore the ``Create backup file during file
>> save'' preference and a ``file.c~'' file always gets created.
>>     
>
>
> could you add that to bugzilla so we won't forget about it?
>   
Done.
(Continue reading)

Denis S | 9 Sep 17:16 2008
Picon

Re: Character Encoding Idea


> on every file that is openened that has a new character encoding bluefish
> will add this as an item to the menu. You can edit your encodings in
> ~/.bluefish/encodings
>   
Thanks for info, Olivier, if I knew about this file before I would 
probably not write such suggestion :)
>> , maybe it's worth
>> to replace CP1251 for example for CP1251 (Windows)? And this option
>> would generate string like this:
>>     
>
> I think Jim just added windows-1251 to the default character set in cvs.
>   
Thanks a lot to Jim, he drop me a message about this, and I've tested 
CVS code already, it's working very well IMHO.
Regards,
Denis S.
http://forum.weblamp.net/denis
Denis S. | 9 Sep 17:27 2008
Picon

Re: experiment: *real auto* completion in cvs

> some changes in cvs: autocompletion is automatically activated if you 
> pause typing for 0.5 seconds.
> 
Hi Olivier, I know it's old topic but I'm interested in it and wish to help if
possible. 
Have you totally disable autocompletion for now?

> not sure if we should keep it this way, but it's a nice experiment how 
> it feels.
Personally I believe that activating it after 0.5 seconds pause is irritating
and I would prefer some sort of hotkey to activate it, e.g. pressing TAB+ALT or
something like this or maybe let user choose combination.
But if after 0.5 delay user see dropdown menu with options of possible code
completition than it's sounds like a good idea too.

If it's not disabled can you tell where else it's triggered, as the only place
I've seen it is in CSS files where it complete word after one letter.

Also I'm very new to GTK programming and can hardly understand BlueFish code for
now, I'm using CVS and would appreciate if you can tell me where
autocompletition dictionary and mechanism is located, maybe I'll be able to fill
dictionary with options or it's done automatically? 

Regards,
Denis S.
http://www.weblamp.net

Thanos Chatziathanassiou | 9 Sep 18:36 2008
Picon

Re: File save problem

Attached patch works but
a) is really ugly (think of it as proof of concept/workaround/whatever)
b) when the normal save would work, it just takes a little more time (I 
tried the _async variant of g_file_replace_contents() and it still 
wouldn't work), but when it wouldn't, the resulting 
``.goutputstream-RANDOM'' files get left behind, at least along with the 
normal saved file.
I really don't know how one would go about removing those, as GIO thinks 
that the file was saved to the actual file/uri given and I haven't found 
a way to get the temp filename assigned.
c) I tried using g_file_replace_contents() in place of 
g_file_replace_contents_async(), but bluefish would hang forever saying 
that ``A file save is in progress''. Obviously I missed something there...

My experience with GIO is limited to say the least, so don't count on 
anything being correct. It just works for me.

Best Regards,
Thanos Chatziathanassiou

Attachment (file.c.patch): text/x-diff, 796 bytes
Attachment (smime.p7s): application/x-pkcs7-signature, 4375 bytes
Olivier Sessink | 9 Sep 20:12 2008
Picon

Re: experiment: *real auto* completion in cvs

Denis S. wrote:
>> some changes in cvs: autocompletion is automatically activated if you 
>> pause typing for 0.5 seconds.
>>
> Hi Olivier, I know it's old topic but I'm interested in it and wish to help if
> possible. 
> Have you totally disable autocompletion for now?

no, it's bound to a key now.

but in cvs in a branch 'testcode' we're working on a totally new editor
widget that borrows concepts from the 1.0, the 1.1 and the gtksourceview
widget.

> Also I'm very new to GTK programming and can hardly understand BlueFish code for
> now, I'm using CVS and would appreciate if you can tell me where
> autocompletition dictionary and mechanism is located, maybe I'll be able to fill
> dictionary with options or it's done automatically? 

bf-textview.c and autocomp.c

but if you're interested in the new development it might be more
interesting to look at the bftextview2 directory in 'testcode', it is
much easier to understand (because it is only the editor widget) and
since it is improving every day I think it will become the next editor
widget for bluefish.

Olivier

Gmane