Hello. When creating or editing html documents, Geany only shows headings h1, h2 and h3 in the sidebar. When viewed in a web browser, h4 headings show in the documents (and in a dynamically created table of contents in the documents).
Is there any way to configure Geany to show the h4 headings in the sidebar?
tjn
Hey there,
Terry N via Users wrote:
Hello. When creating or editing html documents, Geany only shows headings h1, h2 and h3 in the sidebar.
Interesting. I tried creating an HTML file with these very basic contents:
<html> <head> <title>Headings</title> </head> <body> <h1>Level 1 heading</h1> <h2>Level 2 heading</h2> <h3>Level 3 heading</h3> <h4>Level 4 heading</h4> <h5>Level 5 heading</h5> <h6>Level 6 heading</h6> </body> </html>
I opened it in Geany and looked in the Symbols tab in the sidebar. You're right. Only levels 1, 2, and 3 are shown in the sidebar. And if I open the file in Firefox, all 6 headings are displayed properly.
The ctags parser used by Geany only parses 3 levels https://github.com/universal-ctags/ctags/blob/master/parsers/html.c.
Feel free to post a pull request on the Universal Ctags to improve it https://github.com/universal-ctags/ctags
Cheers Lex
On Wed, 9 Aug 2023 at 10:18, Little Girl via Users users@lists.geany.org wrote:
Hey there,
Terry N via Users wrote:
Hello. When creating or editing html documents, Geany only shows headings h1, h2 and h3 in the sidebar.
Interesting. I tried creating an HTML file with these very basic contents:
<html> <head> <title>Headings</title> </head> <body> <h1>Level 1 heading</h1> <h2>Level 2 heading</h2> <h3>Level 3 heading</h3> <h4>Level 4 heading</h4> <h5>Level 5 heading</h5> <h6>Level 6 heading</h6> </body> </html>
I opened it in Geany and looked in the Symbols tab in the sidebar. You're right. Only levels 1, 2, and 3 are shown in the sidebar. And if I open the file in Firefox, all 6 headings are displayed properly.
-- Little Girl
There is no spoon. _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Hey there,
Lex Trotman via Users wrote:
The ctags parser used by Geany only parses 3 levels https://github.com/universal-ctags/ctags/blob/master/parsers/html.c.
I'm not a C programmer at all, but I could give editing this file a whirl if you like. It seems like it would mostly be some quick busy-work of playing "Follow the Leader" with the code for the existing headings. Except for this part: When it comes to playing "Follow the Leader" to add the necessary lines to this section, would it be okay to use 'k' and 'l' and 'm' for "heading4", "heading5", and "heading6"?
https://github.com/universal-ctags/ctags/blob/master/parsers/html.c#L72-L74
Feel free to post a pull request on the Universal Ctags to improve it https://github.com/universal-ctags/ctags
Last, but not least, since this would be a "Will this work?" PR and not a "Yep, this works!" PR, would you babysit my work big-time to make sure I don't break anything?
On Wed, 9 Aug 2023 at 12:48, Little Girl via Users users@lists.geany.org wrote:
Hey there,
Lex Trotman via Users wrote:
The ctags parser used by Geany only parses 3 levels https://github.com/universal-ctags/ctags/blob/master/parsers/html.c.
I'm not a C programmer at all, but I could give editing this file a whirl if you like.
Brave!! :-)
It seems like it would mostly be some quick busy-work of playing "Follow the Leader" with the code for the existing headings. Except for this part: When it comes to playing "Follow the Leader" to add the necessary lines to this section, would it be okay to use 'k' and 'l' and 'm' for "heading4", "heading5", and "heading6"?
https://github.com/universal-ctags/ctags/blob/master/parsers/html.c#L72-L74
Feel free to post a pull request on the Universal Ctags to improve it https://github.com/universal-ctags/ctags
Last, but not least, since this would be a "Will this work?" PR and not a "Yep, this works!" PR, would you babysit my work big-time to make sure I don't break anything?
Please note that the parser PR needs to be submitted to Universal ctags, not Geany. Except for a couple of historical parsers Geany does not carry changes that are not in uctags, we have just finished a lot of effort to remove differences between Geany's parsers and upstreams. Therefore your parser "babysitter" would probably be best someone from uctags.
The Geany parsers are usually updated from upstream uctags in bulk, although a Geany PR updating a single parser from upstream would probably be accepted.
There will be changes to Geany as well to use the new information the parser produces. Note that there are limited experts on this (not me) and so response to questions might be a bit slow, best to ask in an issue on Geany github not email.
Cheers Lex
-- Little Girl
There is no spoon. _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Hey there,
Lex Trotman via Users wrote:
Little Girl via Users wrote:
I'm not a C programmer at all, but I could give editing this file a whirl if you like.
Brave!! :-)
Some might call it foolish or crazy, but I'll go with brave.
Please note that the parser PR needs to be submitted to Universal ctags, not Geany.
Yep.
Except for a couple of historical parsers Geany does not carry changes that are not in uctags, we have just finished a lot of effort to remove differences between Geany's parsers and upstreams. Therefore your parser "babysitter" would probably be best someone from uctags.
Okay.
The Geany parsers are usually updated from upstream uctags in bulk, although a Geany PR updating a single parser from upstream would probably be accepted.
I'm not sure what that means for Geany, but it's good that you do.
There will be changes to Geany as well to use the new information the parser produces. Note that there are limited experts on this (not me) and so response to questions might be a bit slow, best to ask in an issue on Geany github not email.
I decided to try email first, but will make an issue if that doesn't work. Now to wait and see if there's a response.
Hello. Does the GeanyCtags plugin for Geany (version 2.0) fix this issue (h4 headings in html documents not visible in Geany sidebar?)
On Thu, 10 Aug 2023 at 00:44, Little Girl via Users users@lists.geany.org wrote:
Hey there,
Lex Trotman via Users wrote:
Little Girl via Users wrote:
I'm not a C programmer at all, but I could give editing this file a whirl if you like.
Brave!! :-)
Some might call it foolish or crazy, but I'll go with brave.
Please note that the parser PR needs to be submitted to Universal ctags, not Geany.
Yep.
Except for a couple of historical parsers Geany does not carry changes that are not in uctags, we have just finished a lot of effort to remove differences between Geany's parsers and upstreams. Therefore your parser "babysitter" would probably be best someone from uctags.
Okay.
The Geany parsers are usually updated from upstream uctags in bulk, although a Geany PR updating a single parser from upstream would probably be accepted.
I'm not sure what that means for Geany, but it's good that you do.
There will be changes to Geany as well to use the new information the parser produces. Note that there are limited experts on this (not me) and so response to questions might be a bit slow, best to ask in an issue on Geany github not email.
I decided to try email first, but will make an issue if that doesn't work. Now to wait and see if there's a response.
-- Little Girl
There is no spoon. _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On Tue, 2 Jan 2024 at 07:25, Terry N via Users users@lists.geany.org wrote:
Hello. Does the GeanyCtags plugin for Geany (version 2.0) fix this issue (h4 headings in html documents not visible in Geany sidebar?)
The plugin has nothing to do with the OP, and nobody has contributed the changes needed first to upstream uctags then to Geany.
Cheers Lex
On Thu, 10 Aug 2023 at 00:44, Little Girl via Users users@lists.geany.org wrote:
Hey there,
Lex Trotman via Users wrote:
Little Girl via Users wrote:
I'm not a C programmer at all, but I could give editing this file a whirl if you like.
Brave!! :-)
Some might call it foolish or crazy, but I'll go with brave.
Please note that the parser PR needs to be submitted to Universal ctags, not Geany.
Yep.
Except for a couple of historical parsers Geany does not carry changes that are not in uctags, we have just finished a lot of effort to remove differences between Geany's parsers and upstreams. Therefore your parser "babysitter" would probably be best someone from uctags.
Okay.
The Geany parsers are usually updated from upstream uctags in bulk, although a Geany PR updating a single parser from upstream would probably be accepted.
I'm not sure what that means for Geany, but it's good that you do.
There will be changes to Geany as well to use the new information the parser produces. Note that there are limited experts on this (not me) and so response to questions might be a bit slow, best to ask in an issue on Geany github not email.
I decided to try email first, but will make an issue if that doesn't work. Now to wait and see if there's a response.
-- Little Girl
There is no spoon. _______________________________________________ Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
Greetings:
I'm trying to do a very simple regex: search for 'n_' followed by any character and preceded by any character except 'n'. I'm no expert but I'm expecting this to work:
[.^n]n_.
... but it don't.
BTW, possible bug: If I click 'Match only a whole word' then click 'Use regular expressions', I can no longer unclick the former, I have to unclick the latter, then unclick the former, then reclick the latter. Not exactly a big problem but still, it seems like a bug.
Thanks guys.
On Sun, 7 Jan 2024 at 04:49, Ray Andrews via Users users@lists.geany.org wrote:
Greetings:
I'm trying to do a very simple regex: search for 'n_' followed by any character and preceded by any character except 'n'. I'm no expert but I'm expecting this to work:
[.^n]n_.
... but it don't.
https://developer-old.gnome.org/glib/stable/glib-regex-syntax.html
BTW, possible bug: If I click 'Match only a whole word' then click 'Use regular expressions', I can no longer unclick the former, I have to unclick the latter, then unclick the former, then reclick the latter. Not exactly a big problem but still, it seems like a bug.
"Match whole word", "Match from start of word" and "Use escape sequences" do not apply to regexes, so those settings are made insensitive (greyed out) when regex is set. Insensitive UI items cannot be changed which is why it behaves the way you observed. It is not a bug, its the way the toolkit works.
Cheers Lex
Thanks guys.
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On 2024-01-06 16:19, Lex Trotman via Users wrote:
https://developer-old.gnome.org/glib/stable/glib-regex-syntax.html
Thanks ... but I was hoping to have my homework done form me ;-)
"Match whole word", "Match from start of word" and "Use escape sequences" do not apply to regexes, so those settings are made insensitive (greyed out) when regex is set. Insensitive UI items cannot be changed which is why it behaves the way you observed. It is not a bug, its the way the toolkit works.
Yeah, I know the "Match ... " is incompatible, but I was expecting it to wink out, or something. Looking closely I see what you mean, the tick turns subtly grey but it's really hard to notice. Again, it's hardly important, but maybe if the whole icon turned red or something it would be noticeable. Nevermind!
Oh, and I did my homework :-)
Thanks Lex.
On Sun, 7 Jan 2024 at 10:53, Ray Andrews via Users users@lists.geany.org wrote:
On 2024-01-06 16:19, Lex Trotman via Users wrote:
https://developer-old.gnome.org/glib/stable/glib-regex-syntax.html
Thanks ... but I was hoping to have my homework done form me ;-)
"Match whole word", "Match from start of word" and "Use escape sequences" do not apply to regexes, so those settings are made insensitive (greyed out) when regex is set. Insensitive UI items cannot be changed which is why it behaves the way you observed. It is not a bug, its the way the toolkit works.
Yeah, I know the "Match ... " is incompatible, but I was expecting it to wink out, or something. Looking closely I see what you mean, the tick turns subtly grey but it's really hard to notice. Again, it's hardly important, but maybe if the whole icon turned red or something it would be noticeable. Nevermind!
How "grey" it becomes is set by your GTK theme and thats outside Geanys control, but you can customise it with Menu->Tools->Configuration Files->geany.css" (if it _really_ matters, you would have to learn GTK CSS;-)
Oh, and I did my homework :-)
As the proverb said "Give a man a regex and you feed him for a day, teach him to regex and you feed him for life" ... or something like that ;-)
Thanks Lex.
Users mailing list -- users@lists.geany.org To unsubscribe send an email to users-leave@lists.geany.org
On 2024-01-06 17:09, Lex Trotman via Users wrote:
How "grey" it becomes is set by your GTK theme and thats outside Geanys control, but you can customise it with Menu->Tools->Configuration Files->geany.css" (if it _really_ matters, you would have to learn GTK CSS;-)
No no, far from it. A trivial matter, and hardly worth the bother. I just thought it might have actually been a bug.
Oh, and I did my homework :-)
As the proverb said "Give a man a regex and you feed him for a day, teach him to regex and you feed him for life" ... or something like that ;-)
I was just about to say exactly that in almost exactly the same words -- beat me to it.