Hello Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
Regards Liviu
Am Donnerstag, den 14.04.2011, 22:29 +0200 schrieb Liviu Andronic:
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
This is intended behavior as far as I know, yes.
Regards, Dominic
On 15 April 2011 06:51, Dominic Hopf dmaphy@googlemail.com wrote:
Am Donnerstag, den 14.04.2011, 22:29 +0200 schrieb Liviu Andronic:
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
This is intended behavior as far as I know, yes.
Regards, Dominic
You can force the open by setting the encoding to none, but as Scintilla takes a null terminated string of text to display, what is shown stops at the first zero byte in the file. As Scintilla is a text editing widget, and because changing it would break the interface to all the users of Scintilla, this behavior is unlikely to change.
Cheers Lex
-- Dominic Hopf dmaphy@googlemail.com http://dominichopf.de/
Key Fingerprint: A7DF C4FC 07AE 4DDC 5CA0 BD93 AAB0 6019 CA7D 868D
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Am 14.04.2011 22:29, schrieb Liviu Andronic:
Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
As already mentioned, this is intended behavior due Scintilla. But maybe this could be a cool feature for Scintilla in general.
Cheers, Frank
On 19 April 2011 16:50, Frank Lanitz frank@frank.uvena.de wrote:
Am 14.04.2011 22:29, schrieb Liviu Andronic:
Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
As already mentioned, this is intended behavior due Scintilla. But maybe this could be a cool feature for Scintilla in general.
I don't think that there would be enough demand for Scintilla to break clients, but there is nothing stopping a Geany plugin converting a file to hex codes before loading it into Scintilla and converting it back again when saving (well except someone has to write it :-).
Cheers Lex
Cheers, Frank
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On 04/19/11 00:12, Lex Trotman wrote:
On 19 April 2011 16:50, Frank Lanitzfrank@frank.uvena.de wrote:
Am 14.04.2011 22:29, schrieb Liviu Andronic:
Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
As already mentioned, this is intended behavior due Scintilla. But maybe this could be a cool feature for Scintilla in general.
I don't think that there would be enough demand for Scintilla to break clients, but there is nothing stopping a Geany plugin converting a file to hex codes before loading it into Scintilla and converting it back again when saving (well except someone has to write it :-).
I thought about writing such a plugin before, but not using Scintilla directly, I think I even might've wrote a little code for it. I was looking at using GtkHex[1] and messing with the main documents tab like the Devhelp plugin does. Getting a hex viewing widget into Geany is pretty easy, but hooking it in to handle different filetypes and whatnot would probably be a little harder.
[1] http://git.gnome.org/browse/ghex/tree/src
Cheers, Matthew Brush
[...]
I thought about writing such a plugin before, but not using Scintilla directly, I think I even might've wrote a little code for it. I was looking at using GtkHex[1] and messing with the main documents tab like the Devhelp plugin does. Getting a hex viewing widget into Geany is pretty easy, but hooking it in to handle different filetypes and whatnot would probably be a little harder.
Not sure what you mean by handle filetypes, I thought the point of something like this would be to handle it as hex, no matter what the file was?
Cheers Lex
On 04/19/11 02:30, Lex Trotman wrote:
[...]
I thought about writing such a plugin before, but not using Scintilla directly, I think I even might've wrote a little code for it. I was looking at using GtkHex[1] and messing with the main documents tab like the Devhelp plugin does. Getting a hex viewing widget into Geany is pretty easy, but hooking it in to handle different filetypes and whatnot would probably be a little harder.
Not sure what you mean by handle filetypes, I thought the point of something like this would be to handle it as hex, no matter what the file was?
My idea was for viewing/editing binary files only, but it could be any file really. But mostly I was referring to things like tying in with the document open signal, figuring out if it's a binary file, hijacking the "document open" so it's displayed in GHex/GtkHex, preventing Geany from trying to display it in Scintilla, integration with all the other features like fonts, zooming, printing, etc. That was the point when I decided to just use an external hex viewer for binary files :)
Cheers, Matthew Brush
I am using Scite every day at work to open files containing NULL characters (that Geany can't open). Scite is based on Scintilla, and it doesn't stop at the first NULL character. I guess it should be possible to open binary files in Geany too ...
2011/4/19 Matthew Brush mbrush@codebrainz.ca
On 04/19/11 02:30, Lex Trotman wrote:
[...]
I thought about writing such a plugin before, but not using Scintilla directly, I think I even might've wrote a little code for it. I was looking at using GtkHex[1] and messing with the main documents tab like the Devhelp plugin does. Getting a hex viewing widget into Geany is pretty easy, but hooking it in to handle different filetypes and whatnot would probably be a little harder.
Not sure what you mean by handle filetypes, I thought the point of something like this would be to handle it as hex, no matter what the file was?
My idea was for viewing/editing binary files only, but it could be any file really. But mostly I was referring to things like tying in with the document open signal, figuring out if it's a binary file, hijacking the "document open" so it's displayed in GHex/GtkHex, preventing Geany from trying to display it in Scintilla, integration with all the other features like fonts, zooming, printing, etc. That was the point when I decided to just use an external hex viewer for binary files :)
Cheers, Matthew Brush
Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On 10 May 2011 00:33, Johann SAUNIER jsaunier.devel@gmail.com wrote:
I am using Scite every day at work to open files containing NULL characters (that Geany can't open). Scite is based on Scintilla, and it doesn't stop at the first NULL character. I guess it should be possible to open binary files in Geany too ...
Depends on the interface between Scite and Scintilla, most of the functions from Scintilla accept null terminated text so they stop. There are a few that use lengths and will accept NUL characters. It would mean re-writing all the Geany interface to Scintilla to use only those functions, but for little gain and much pain (probably a period of many bugs).
In general reading binary files isn't a common part of development workflow (or we would have lots of requests for it) so adding it to Geany would not be a priority.
Cheers Lex
Am 19.04.2011 09:12, schrieb Lex Trotman:
On 19 April 2011 16:50, Frank Lanitzfrank@frank.uvena.de wrote:
Am 14.04.2011 22:29, schrieb Liviu Andronic:
Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
As already mentioned, this is intended behavior due Scintilla. But maybe this could be a cool feature for Scintilla in general.
I don't think that there would be enough demand for Scintilla to break clients, but there is nothing stopping a Geany plugin converting a file to hex codes before loading it into Scintilla and converting it back again when saving (well except someone has to write it :-).
Which feature should such a plugin have?
Cheers, Frank
Am 19.04.2011 08:50, schrieb Frank Lanitz:
Am 14.04.2011 22:29, schrieb Liviu Andronic:
Does Geany have a hex mode, that is can I open files in hex mode?
And a bit more OT, Geany refuses to force-open a PDF file. Nano, for example, opens the PDF. Is it normal?
As already mentioned, this is intended behavior due Scintilla. But maybe this could be a cool feature for Scintilla in general.
Scintilla can handle this just fine. In my repo[1] there's a patch[2] which enables opening binary files. I'm using it since ages. It was originally posted here[3].
[1] http://repo.or.cz/w/geany-mirror/kugel-geany.git [2] http://repo.or.cz/w/geany-mirror/kugel-geany.git/commit/3897013973c2b49b0671... [3] http://lists.uvena.de/pipermail/geany-devel/2010-February/001699.html