SOLVED: Is code folding generally buggy?

Report issues, odd behaviors or submit a detailed bug report.
Post Reply
inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

SOLVED: Is code folding generally buggy?

Post by inspector71 »

Hi

Thank you so very much for what is an excellent editor. I do not want to be one of those people who just complains all the time.

RJTE is a very impressive editor but, as with all software, there's bugs. Some bigger than others :)

I've been sitting on the code folding buggyness for quite a while but feel maybe it's time to see if we can address it.

For me, working in Perl documents of late, code folding is rarely as reliable as it would ideally be. For example, it often just fails to present the fold here arrow for if clauses; while clauses and others. I'm unsure if it is related to any particular clauses or perhaps clause nesting depth. When I manually fold a section that was lacking the fold here arrow, it works fine.

I also am fairly sure it's not related to any one syntax highlighter or language as, in the past when I was working more consistently with JS files, the same unreliability seemed to be common.

Have been sitting on a few nice-to-have UX inconsistencies between SFTP and local files. Hoping that helps to free up your time for a shot at this code folding issue :)

Is there anything more I can try to do in order to help troubleshoot what appears to be a generic problem?

Are other people ever experiencing this code folding issue?

Thanks!
Last edited by inspector71 on 21 Jan 2020 02:58, edited 1 time in total.

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Is code folding generally buggy?

Post by pjj »

inspector71 wrote:
12 Jan 2020 03:54
Are other people ever experiencing this code folding issue?
I for one have never experienced problems with code folding (JS, PHP).
inspector71 wrote:
12 Jan 2020 03:54
Is there anything more I can try to do in order to help troubleshoot what appears to be a generic problem?
Something tells me that Rickard's answer would be more or less like this:
Code samples and screenshots would be very helpful, thanks.
8)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
Rickard Johansson
Site Admin
Posts: 5988
Joined: 19 Jul 2006 14:29

Re: Is code folding generally buggy?

Post by Rickard Johansson »

As pjj said - code samples and screenshots would be helpful :-D

If you can create a few example files containing all the issues you have found, that would be great. Then send them to me through email.

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

pjj wrote:
12 Jan 2020 12:21
inspector71 wrote:
12 Jan 2020 03:54
Are other people ever experiencing this code folding issue?
I for one have never experienced problems with code folding (JS, PHP).
That's really great. I'm glad that you are having that experience and thanks for posting because it's hopefully helpful to know that it is not necessarily a widespread issue.
inspector71 wrote:
12 Jan 2020 03:54
Is there anything more I can try to do in order to help troubleshoot what appears to be a generic problem?
pjj wrote:
12 Jan 2020 12:21
Something tells me that Rickard's answer would be more or less like this:
Code samples and screenshots would be very helpful, thanks.
8)
Yeah sorry about that. I think I was running a little short on time.

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

Rickard Johansson wrote:
12 Jan 2020 14:36
As pjj said - code samples and screenshots would be helpful :-D

If you can create a few example files containing all the issues you have found, that would be great. Then send them to me through email.
No worries, that makes sense. I guess the first query that comes to mind is what would be the best examples but I guess we can just start somewhere and see how we go if that's OK?

Sometimes I do try to debug myself by just looking through any oddities that may be in place between when folding works and when it doesn't.

That's possibly a point to bear in mind: often for me folding does not just break and stay broken for the rest of the file. It will tend to just fail to present the fold here arrow for a clause or two and then resume doing so further down the file. I don't know if that's helpful though?

Let's see if I still have your email address :) ... hmmm, seemingly not.

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Is code folding generally buggy?

Post by pjj »

inspector71 wrote:
13 Jan 2020 09:59
Let's see if I still have your email address :) ... hmmm, seemingly not.
May I suggest something? If you post your code samples here on the forum, other users would be able to try them in their different settings and find out if code folding works for them or not -- and it will help find the issue.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

pjj wrote:
13 Jan 2020 15:11
inspector71 wrote:
13 Jan 2020 09:59
Let's see if I still have your email address :) ... hmmm, seemingly not.
May I suggest something? If you post your code samples here on the forum, other users would be able to try them in their different settings and find out if code folding works for them or not -- and it will help find the issue.
As Rickard stated he preferred email, I chose to not post examples here.

I am also anxious about exposing the quality, or lack thereof, of my code to other eyes! :oops:

However, I do appreciate your willingness to help as such contributions would likely be valuable to all RJTE users.

Unfortunately, my vulnerability to criticism is just at an all time overloaded high ATM. I just emailed Rickard and hopefully if this first foray goes well, maybe I can post here in future.

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Is code folding generally buggy?

Post by pjj »

inspector71 wrote:
14 Jan 2020 03:42
Unfortunately, my vulnerability to criticism is just at an all time overloaded high ATM.
What if I promised I would only praised your code? :-D
inspector71 wrote:
14 Jan 2020 03:42
I just emailed Rickard and hopefully if this first foray goes well (...).
I keep my fingers crossed!
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

pjj wrote:
14 Jan 2020 09:43
inspector71 wrote:
14 Jan 2020 03:42
Unfortunately, my vulnerability to criticism is just at an all time overloaded high ATM.
What if I promised I would only praised your code? :-D
Haha, well that is very kind and as things have gone well with the first Perl example, maybe that will help.

Ahhh, what the heck, here's the annotated screenshot I made to document things for Rickard:

Image

Looks like that may just fit into this forum format which is a handy coincidence!
pjj wrote:
14 Jan 2020 09:43
inspector71 wrote:
14 Jan 2020 03:42
I just emailed Rickard and hopefully if this first foray goes well (...).
I keep my fingers crossed!
Well, it's gone well. Turns out Perl syntax file had not yet been updated and the Perl use of curly braces to access scalar variables in hashref variables was problematic.

Great news is Rickard has fixed it with just a syntax file change!

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Is code folding generally buggy?

Post by pjj »

inspector71 wrote:
15 Jan 2020 02:12
Ahhh, what the heck, here's the annotated screenshot I made to document things for Rickard:
(in my most authoritarian voice) Well, what a fine piece of computer code we see here! Well done!

...Also my cat approves! :wink:
inspector71 wrote:
15 Jan 2020 02:12
Great news is Rickard has fixed it with just a (...)
I'm not surprised a bit! :lol:
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

pjj wrote:
15 Jan 2020 07:03
inspector71 wrote:
15 Jan 2020 02:12
Ahhh, what the heck, here's the annotated screenshot I made to document things for Rickard:
pjj wrote:
15 Jan 2020 07:03
(in my most authoritarian voice) Well, what a fine piece of computer code we see here! Well done!

...Also my cat approves! :wink:
LOL, that's sincerely so very much appreciated pjj. Thank you for that humanity. And feline support! I love cats but have not had one in my life for a very long time.

Can't begin to describe how scared I was to post in here as my headspace felt like it was just another potential source of online abuse, of which I've suffered too much for an entire lifetime already. Very relieved to feel the opposite.
inspector71 wrote:
15 Jan 2020 02:12
Great news is Rickard has fixed it with just a (...)
I'm not surprised a bit! :lol:
[/quote]

Indeed, I suspected / hoped as well that it might be fixable via syntax editor rather than a new compilation. Would have attempted it myself but whilst I am hugely impressed that Rickard has gone to the effort to build a separate syntax editor, I am yet to be able to use it's functionality just yet. This process has helped me get close though. Perl has those quick quote

Code: Select all

my $scalar = qq[multi-line strings here];
delimiters that I use make SQL a little more readable, amongst other uses. I'm trying to get that working with folding and Rickard pointed me in the right direction which is superb.

Please give your cat a good scratch for me. Purring would be the ideal result :)

A code-astute cat is an invaluable companion!

User avatar
pjj
Posts: 1784
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: Is code folding generally buggy?

Post by pjj »

inspector71 wrote:
16 Jan 2020 04:12
Please give your cat a good scratch for me. Purring would be the ideal result
Done! And yes, she purred, as if giving you her best regards (as I mentioned it was from you).
inspector71 wrote:
16 Jan 2020 04:12
A code-astute cat is an invaluable companion!
She's not that code-astute, I'm afraid, but since you mentioned cats in your code, I mentioned mine in my reply ;)
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: Is code folding generally buggy?

Post by inspector71 »

pjj wrote:
16 Jan 2020 12:37
inspector71 wrote:
16 Jan 2020 04:12
Please give your cat a good scratch for me. Purring would be the ideal result
Done! And yes, she purred, as if giving you her best regards (as I mentioned it was from you).
Awwwh, that's truly beautiful and I thank you graciously for sharing.

Just this once, I do not even think it is reasonable for anyone else reading this in future to mention that we're getting off topic. So I hope nobody does!
pjj wrote:
16 Jan 2020 12:37
inspector71 wrote:
16 Jan 2020 04:12
A code-astute cat is an invaluable companion!
She's not that code-astute, I'm afraid, but since you mentioned cats in your code, I mentioned mine in my reply ;)
Ah yes, that's short for eBay categories. It's taken me a very long time to get the eBay category system into some sort of semi-usable shape. I usually can procrastinate or obsess with naming of functions or variables as a bit of a delaying tactic or something. Then, when I get the naming correct, I realise it was important to get it right because I have to look at it all the time thereafter! In this case, I shortened categories to cat because the naming of the function was long enough. I like long and literal names but there's a limit, hehe.

That sub is still a work in progress. It was getting a touch unwieldy but not necessarily due to poor coding structure or verbosity. More the somewhat tricky nature of reverse recursing up to six levels of hierarchical data. I still need to do some more work on it. Any time a sub gets larger than one screen height, I find it tricky to focus on so code folding becomes very important which is why I'm super grateful to Rickard for weaving his magic once again!

Also, don't worry, every time I see the three letters 'cat' I often literally "meow", or say "puddy taaat" whether people are in earshot or not. LOL. So great minds ... I guess. Heheh.

I imagine if your cat sits with you while you code, she may well be conscious of all sorts of developer intricacies. Just unable to communicate them. At least, that's fun to ponder :)

inspector71
Posts: 129
Joined: 22 Sep 2017 07:59

Re: SOLVED: Is code folding generally buggy?

Post by inspector71 »

Hi

Unsure if this is of much use other than to hopefully prove my initial title for this thread was not completely false :)

Here's another example that just happened now.

Image

Kinda interesting how the brace match highlighting keeps going strong but the folding not so much.

Will email Rickard the file in question.

Post Reply