XML/HTML insert/propose matching close tag acts weird

this is what HTML snippet looks like:

<p> textextext...<span class="some_class">textextextex</span>textextextext...
[] <-carret is here at this moment

Now, I want to close <p> block. I start typing “</” and at this moment editor proposes sometimes SPAN, sometimes SPA and sometimes A.! My HTML document is validated, ok, no mixed or unclosed tags.

It’s Komodo Edit, version 8.5.3, build 14067, platform win32-x86. Built on Tue Nov 19 03:15:22 2013.

Why you don’t use Emmet for HTML editing?

I type a lot of XML/HTML text per day. Emmet won’t help me in this particular situation. Or wili it? I simply need editor to propose correct closing tag if it goes proposing anything :slight_smile:

For HTML will can.
You can transform div.class#id{Content}>span#id.spanclass{Title}+div.div>div to
`

Content
    Title
   

       

   
` just for example.

Ok, nice catch. Tnx.

But, that won’t change the fact that something inside comodo edit does not work as it should and it is plain visible in any ever so simple html example. Say I work with complex XML config file and I somehow depend on editor to help me not make a mistake (open/close tags) and it actualy introduce mistake on its own? What can I do but leave such editor at rest and look for something else? That is not nice since I realy love comodo and want to use it but … eh

sudo cast @nathanr, @toddw
Also for me I don’t have same bug.
AlsoAlso: Komodo. Not Comodo. Comodo - company that created security stuff.

Ok, tnx.
I’ll investigate further.

And yes, it’s Komodo. Not Comodo. :slight_smile:

I don’t see the issue either @dailborp. I see you’re using Komodo 8.5.3 though. I’m using the latest Komodo Edit nightly. Could you try that?

Also, there is an undocumented feature (other than in the commands list) that I added last year that can help with this. The key binding is Ctrl + Shift + z. If you’re inside or at the start of a tag or comment the command will highlight and select the tag. You can then keep pressing the binding to skip over words or other tags to get it where you want. Or click in the doc where you want the tag and press the binding again.

So say you have a paragraph that you haven’t wrap a ‘p’ tag around yet. Start the tag at the beginning of the paragraph and accept the completion from Komodo and the closing tag it adds. Then press Ctrl+Shift+z. You now have the END tag selected. Click at the end of the paragraph and press Ctrl+Shift+z again. You end tag is now at the end of the paragraph.

You could also use it to skip the 2 words you want to hop over with your closing ‘SPAN’ tag. Try it out.

It comes in handy some times. I don’t do much html but I use this binding almost every time I do.

Any way, lets get your bug sorted out too :wink:

  • Carey

@careyh - tnx, nice advice :slight_smile:
But problem stands; see the picture;

Trying to close P tag and Komodo offers to close SPAN.
Once again, file is without any error, no badly placed tags or something.

Oop i thought I asked for this before…

Could you provide a small snippet code that shows the issue? Try to reproduce it with a new file and mininmal code then send us that.

Couldn’t hurt to get the Help > Troubleshooting > View Log File but i doubt that will be anything helpful there as is not “breaking”, it’s just doing the wrong thing.

  • Carey

@careyh,

In the header of topic.

<!DOCTYPE html>
<html>

<head>
    <title>Test</title>
</head>

<body>

<p>
    <span class="rbr">(31)</span>&nbsp;Zlodusi ga zaklinjahu: "Ako nas istjeraš, pošalji nas u ovo krdo svinja." 
    <span class="rbr">(32)</span>&nbsp;On im reče:
    <span class="besjeda-inline">"Idite!"</span> Oni iziđoše i uđoše u svinje. I gle,
        sve krdo jurnu niz obronak u more i podavi se u vodama.


<a id="test_id"></a>


</body>

</html>

Try to close P tag in line 15. Now it offers me with A (link!) to close!
If you delete line 11 (and leave it empty) and try to close P tag on line 15 - it will offer nothing …
In general - it’s pretty erratic, I can’t figure any pattern involved. Simply changing text in this example - various and any scenario can be observed.

P.S. if any wrapping happens to this post - every line between P and A tags should start with SPAN tag except last line (before A) which starts with word “sve” and it is indented as shown. Every line not starting with SPAN should be added to line before as it is wrapped. Again, except last line (before A)

P.P.S. encoding is windows-1250 (windows central European)

Hm, for me it’s shows “a>”. Bad…
PS: Your file open normal in UTF-8 encoding.
Seems like bug with tag nesting.
If type “</” after

<a id="test_id"></a> - works normal.

Yes, I can see that @defman. I don’t think that was an actual reproduction sample. It was just a visual to tell us what is wrong. I bet if he pastes that code into an empty doc it won’t repro but i might be wrong.

  • Carey

Odd, I’m not seeing any thing @daliborp. All tags close properly.

Couldn’t hurt to reset you code intel.

Was there anything interesting in the error logs I mentioned?

  • Carey

my log:

[2014-07-31 22:19:49,972] [WARNING] ko.widgets: DEPRECATED: [object XULElement].tabbox, use [object XULElement].containerPane
    DOMViewManager.prototype.isVisible@chrome://domviewer/content/pane.js:209

[2014-07-31 22:19:54,468] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 1067>
  log:
[2014-07-31 22:22:32,714] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tag-attrs' at 1119>
  log:
[2014-07-31 22:22:34,786] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tag-attrs' at 1120>
  log:
[2014-07-31 22:22:35,506] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tag-attrs' at 1119>
  log:
[2014-07-31 22:22:36,925] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tag-attrs' at 1120>
  log:
[2014-07-31 22:23:13,491] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tag-attrs' at 1074>
  log:
[2014-07-31 22:23:16,454] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-attr-enum-values' at 1078>
  log:
[2014-07-31 23:24:06,990] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 1886>
  log:
[2014-07-31 23:24:07,063] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-tag-names' at 1886>
  log:
[2014-07-31 23:24:07,120] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-tag-names' at 1886>
  log:
[2014-07-31 23:24:07,453] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-class-names' at 1887>
  log:
[2014-07-31 23:24:44,098] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 1695>
  log:
[2014-07-31 23:24:44,559] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-tag-names' at 1695>
  log:
[2014-07-31 23:24:45,422] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-class-names' at 1696>
  log:
[2014-07-31 23:27:02,710] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 1>
  log:
[2014-07-31 23:27:02,867] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 2>
  log:
[2014-07-31 23:27:04,565] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-at-rule' at 1>
  log:
[2014-07-31 23:27:05,934] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 11>
  log:
[2014-07-31 23:27:07,734] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-names' at 17>
  log:
[2014-07-31 23:27:08,412] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 30>
  log:
[2014-07-31 23:27:12,446] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 53>
  log:
[2014-07-31 23:27:12,956] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-names' at 53>
  log:
[2014-07-31 23:27:13,726] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 66>
  log:
[2014-07-31 23:27:14,907] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 78>
  log:
[2014-07-31 23:27:15,056] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-names' at 78>
  log:
[2014-07-31 23:27:15,904] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 92>
  log:
[2014-07-31 23:27:20,066] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-names' at 78>
  log:
[2014-07-31 23:27:21,088] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 90>
  log:
[2014-07-31 23:27:22,486] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 102>
  log:
[2014-07-31 23:27:23,118] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-names' at 102>
  log:
[2014-07-31 23:27:23,653] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 107>
  log:
[2014-07-31 23:27:23,762] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 107>
  log:
[2014-07-31 23:27:38,295] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 150>
  log:
[2014-07-31 23:27:39,056] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 301>
  log:
[2014-07-31 23:27:40,227] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 452>
  log:
[2014-07-31 23:27:43,049] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 217>
  log:
[2014-07-31 23:27:50,237] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 363>
  log:
[2014-07-31 23:27:51,913] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 363>
  log:
[2014-07-31 23:27:54,902] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 387>
  log:
[2014-07-31 23:28:00,110] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 509>
  log:
[2014-07-31 23:28:02,970] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 531>
  log:
[2014-07-31 23:30:37,788] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 635>
  log:
[2014-07-31 23:30:39,035] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'css-complete-property-values' at 634>
  log:
[2014-07-31 23:41:51,907] [ERROR] koFTPConnection: FTP CLOSE ERROR: 421 No transfer timeout (600 seconds): closing control connection
[2014-07-31 23:45:51,915] [ERROR] koFTPConnection: FTP CLOSE ERROR: 421 No transfer timeout (600 seconds): closing control connection
[2014-08-01 00:19:58,443] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2014-08-01 00:19:59,271] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 399>
  log:
[2014-08-01 00:19:59,494] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 400>
  log:
[2014-08-01 00:20:05,344] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 400>
  log:
[2014-08-01 00:20:12,509] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 400>
  log:
[2014-08-01 00:21:45,001] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 400>
  log:
[2014-08-01 00:25:42,607] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 405>
  log:
[2014-08-01 00:25:42,910] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 406>
  log:
[2014-08-01 00:25:50,572] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 294>
  log:
[2014-08-01 00:25:50,843] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 295>
  log:
[2014-08-01 00:25:52,026] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 295>
  log:
[2014-08-01 00:25:54,095] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 298>
  log:
[2014-08-01 00:25:54,321] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 299>
  log:
[2014-08-01 00:25:55,393] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 299>
  log:
[2014-08-01 00:25:59,826] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-tags-and-namespaces' at 317>
  log:
[2014-08-01 00:26:00,108] [ERROR] codeintel.oop.controller: error evaluating completions:
  trigger: <Trigger 'html-complete-end-tag' at 318>
  log:
[2014-08-01 00:37:17,960] [ERROR] koFTPConnection: FTP CLOSE ERROR: 421 No transfer timeout (600 seconds): closing control connection