[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #24 from avlas  ---
(In reply to Laurent Montel from comment #23)
> > Sorry, I think I didn't explain myself well. I was not talking here now
> > about the conversion from markdown to html, but about highlighting the email
> > body in the composer while writing (if/when the markdown button is
> > activated). In that case, it would be great to see how markdown keywords
> > written in plain text get automatically highlighted. This would help writing
> > markdown emails, e.g. to better structure the email or more easily visualize
> > markdown typos.
> 
> Ah ok. I don't know if it's possible but indeed I can look at it.

Great, thanks

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #23 from Laurent Montel  ---
(In reply to avlas from comment #22)
> (In reply to Laurent Montel from comment #21)
> > (In reply to avlas from comment #20)
> > > (In reply to Laurent Montel from comment #18)
> > > > Created attachment 119461 [details]
> > > > Screenshot
> > > 
> > > I had some ideas for further enhancement after seeing your screenshot (as
> > > well as this one http://25.io/mou/img/1...@2x.png):
> > > 
> > > 1) It would be great if Kmail composer would use KSyntaxHighlighting
> > > technology as well to ease writing emails in markdown format, so it gets
> > > automatically enabled when the markdown button in the composer is 
> > > activated.
> > 
> > KSyntaxHighlighting highlights only text, it can create a html code but not
> > for converting
> > markdown to html.
> 
> Sorry, I think I didn't explain myself well. I was not talking here now
> about the conversion from markdown to html, but about highlighting the email
> body in the composer while writing (if/when the markdown button is
> activated). In that case, it would be great to see how markdown keywords
> written in plain text get automatically highlighted. This would help writing
> markdown emails, e.g. to better structure the email or more easily visualize
> markdown typos.

Ah ok. I don't know if it's possible but indeed I can look at it.

> 
> > > 2) It would be so great to have a live preview (as shown in the link 
> > > above;
> > > please note that Kate has already something similar to this) instead of a
> > > pop-up window.
> > 
> > We can't do it as composer is a "QTextEdit" and we need a html viewer/editor
> > for showing
> > mardown result. QTextEdit is too limited for html.
> 
> I see. That's a pity, such a feature would probably attract users,
> especially KDE users using markdown-here in other email client applications
> or in the browser.

yep but in thunderbird they use a html editor directly...
It's not possible in Qt.

> 
> I know there is the option but never tried using an external editor for
> writing emails. I assume this would not be an option for writing emails in
> markdown either, right? Saying because perhaps one could use Kate for this...
> 
> > > 3) It would be nice if there could be an option to remember the status of
> > > the Markdown button in the composer.
> > 
> > We can do it. I will look at it.
> 
> Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #22 from avlas  ---
(In reply to Laurent Montel from comment #21)
> (In reply to avlas from comment #20)
> > (In reply to Laurent Montel from comment #18)
> > > Created attachment 119461 [details]
> > > Screenshot
> > 
> > I had some ideas for further enhancement after seeing your screenshot (as
> > well as this one http://25.io/mou/img/1...@2x.png):
> > 
> > 1) It would be great if Kmail composer would use KSyntaxHighlighting
> > technology as well to ease writing emails in markdown format, so it gets
> > automatically enabled when the markdown button in the composer is activated.
> 
> KSyntaxHighlighting highlights only text, it can create a html code but not
> for converting
> markdown to html.

Sorry, I think I didn't explain myself well. I was not talking here now about
the conversion from markdown to html, but about highlighting the email body in
the composer while writing (if/when the markdown button is activated). In that
case, it would be great to see how markdown keywords written in plain text get
automatically highlighted. This would help writing markdown emails, e.g. to
better structure the email or more easily visualize markdown typos.

> > 2) It would be so great to have a live preview (as shown in the link above;
> > please note that Kate has already something similar to this) instead of a
> > pop-up window.
> 
> We can't do it as composer is a "QTextEdit" and we need a html viewer/editor
> for showing
> mardown result. QTextEdit is too limited for html.

I see. That's a pity, such a feature would probably attract users, especially
KDE users using markdown-here in other email client applications or in the
browser.

I know there is the option but never tried using an external editor for writing
emails. I assume this would not be an option for writing emails in markdown
either, right? Saying because perhaps one could use Kate for this...

> > 3) It would be nice if there could be an option to remember the status of
> > the Markdown button in the composer.
> 
> We can do it. I will look at it.

Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #21 from Laurent Montel  ---
(In reply to avlas from comment #20)
> (In reply to Laurent Montel from comment #18)
> > Created attachment 119461 [details]
> > Screenshot
> 
> I had some ideas for further enhancement after seeing your screenshot (as
> well as this one http://25.io/mou/img/1...@2x.png):
> 
> 1) It would be great if Kmail composer would use KSyntaxHighlighting
> technology as well to ease writing emails in markdown format, so it gets
> automatically enabled when the markdown button in the composer is activated.

KSyntaxHighlighting highlights only text, it can create a html code but not for
converting
markdown to html.

> 2) It would be so great to have a live preview (as shown in the link above;
> please note that Kate has already something similar to this) instead of a
> pop-up window.

We can't do it as composer is a "QTextEdit" and we need a html viewer/editor
for showing
mardown result. QTextEdit is too limited for html.

> 
> 3) It would be nice if there could be an option to remember the status of
> the Markdown button in the composer.

We can do it. I will look at it.

> 
> Please let me know if these ideas make sense and if you would like me to
> open new bug reports for them, especially points 2 and 3 above, which are
> not about highlighting.
> 
> I can easily foresee myself in the near future writing all my emails in
> markdown format instead of plain text :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #20 from avlas  ---
(In reply to Laurent Montel from comment #18)
> Created attachment 119461 [details]
> Screenshot

I had some ideas for further enhancement after seeing your screenshot (as well
as this one http://25.io/mou/img/1...@2x.png):

1) It would be great if Kmail composer would use KSyntaxHighlighting technology
as well to ease writing emails in markdown format, so it gets automatically
enabled when the markdown button in the composer is activated.

2) It would be so great to have a live preview (as shown in the link above;
please note that Kate has already something similar to this) instead of a
pop-up window.

3) It would be nice if there could be an option to remember the status of the
Markdown button in the composer.

Please let me know if these ideas make sense and if you would like me to open
new bug reports for them, especially points 2 and 3 above, which are not about
highlighting.

I can easily foresee myself in the near future writing all my emails in
markdown format instead of plain text :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #19 from avlas  ---
(In reply to Laurent Montel from comment #18)
> Created attachment 119461 [details]
> Screenshot

Neat! (thank you)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #18 from Laurent Montel  ---
Created attachment 119461
  --> https://bugs.kde.org/attachment.cgi?id=119461=edit
Screenshot

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #17 from avlas  ---
(In reply to Laurent Montel from comment #16)
> Now we can hightlight block.
> I need to fix some little bugs but it's good now :)

Excellent!

[ If you'd have a chance and it's not too much trouble, please attach a
screenshot of an example. I'd love to see it in action :) ]

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

Laurent Montel  changed:

   What|Removed |Added

   Version Fixed In||5.12.0
 Status|REPORTED|RESOLVED
  Latest Commit||https://commits.kde.org/kde
   ||pim-addons/c162085500515502
   ||8cb1e88a739abe9adf066353
 Resolution|--- |FIXED

--- Comment #15 from Laurent Montel  ---
Git commit c1620855005155028cb1e88a739abe9adf066353 by Laurent Montel.
Committed on 17/04/2019 at 11:43.
Pushed by mlaurent into branch 'master'.

Fix Bug 406333 - Markdown addon: support syntax highlighting
FIXED-IN: 5.12.0

M  +2-1kmail/editorconvertertextplugins/markdown/CMakeLists.txt
M  +5-5   
kmail/editorconvertertextplugins/markdown/autotests/CMakeLists.txt
M  +23   -43   kmail/editorconvertertextplugins/markdown/markdownconverter.cpp
A  +87   -0   
kmail/editorconvertertextplugins/markdown/markdownhighlighter.cpp [License:
GPL (v2+)]
A  +42   -0kmail/editorconvertertextplugins/markdown/markdownhighlighter.h 
   [License: GPL (v2+)]
M  +2-2kmail/editorconvertertextplugins/markdown/tests/CMakeLists.txt

https://commits.kde.org/kdepim-addons/c1620855005155028cb1e88a739abe9adf066353

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-17 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #16 from Laurent Montel  ---
Now we can hightlight block.
I need to fix some little bugs but it's good now :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-16 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #14 from Laurent Montel  ---
Git commit b072aae3cb9e4e562b36ef852c6edbac8b630ba2 by Laurent Montel.
Committed on 16/04/2019 at 06:44.
Pushed by mlaurent into branch 'master'.

Start to implement highlighting

M  +10   -0kmail/editorconvertertextplugins/markdown/markdownconverter.cpp

https://commits.kde.org/kdepim-addons/b072aae3cb9e4e562b36ef852c6edbac8b630ba2

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-13 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #13 from Laurent Montel  ---
Yep I will test it for sure :)
But I am not sure to testing it this WE.
But for sure I will do next week :)

Thanks for motivating dev to implement it :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-12 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #12 from avlas  ---
(In reply to avlas from comment #11)
> (In reply to avlas from comment #10)
> > Laurent, Discount dev has finished implementing this and asks if you could
> > please test it:
> > 
> > "It Works For Me(tm) -- can the Kmail crew check it out for nontrivial
> > external formatting (I don't do any syntax highlighting in my little test
> > callback, I just wanted to make certain it works)?"
> 
> Forgot to say that the code is the master branch:
> https://github.com/Orc/discount

Laurent, it was quite easy to compile discount. If there would be an easy way
to check highlighting without compiling kmail (which seems scary!), I'd like to
give it a try...

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-12 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #11 from avlas  ---
(In reply to avlas from comment #10)
> Laurent, Discount dev has finished implementing this and asks if you could
> please test it:
> 
> "It Works For Me(tm) -- can the Kmail crew check it out for nontrivial
> external formatting (I don't do any syntax highlighting in my little test
> callback, I just wanted to make certain it works)?"

Forgot to say that the code is the master branch:
https://github.com/Orc/discount

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-12 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #10 from avlas  ---
> It's not necessary to use kpart. We have a lib for my highlighting.
> For sure if we have a code block callback I will be able to highlight it.

Laurent, Discount dev has finished implementing this and asks if you could
please test it:

"It Works For Me(tm) -- can the Kmail crew check it out for nontrivial external
formatting (I don't do any syntax highlighting in my little test callback, I
just wanted to make certain it works)?"

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-10 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #9 from avlas  ---
(In reply to Laurent Montel from comment #8)
> (In reply to avlas from comment #7)
> > Would "a code block callback so that an external function could apply syntax
> > highlighting" be useful for applying highlighting in Kmail via Kpart?
> 
> It's not necessary to use kpart. We have a lib for my highlighting.
> For sure if we have a code block callback I will be able to highlight it.

Awesome!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-10 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #8 from Laurent Montel  ---
(In reply to avlas from comment #7)
> Would "a code block callback so that an external function could apply syntax
> highlighting" be useful for applying highlighting in Kmail via Kpart?

It's not necessary to use kpart. We have a lib for my highlighting.
For sure if we have a code block callback I will be able to highlight it.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-10 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #7 from avlas  ---
Would "a code block callback so that an external function could apply syntax
highlighting" be useful for applying highlighting in Kmail via Kpart?

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-09 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #6 from avlas  ---
Discount dev replied this:

"Discount doesn't know about the structure of codeblocks, so it can't do it
natively. I could implement a code block callback so that an external function
could apply syntax highlighting, though?"
(https://github.com/Orc/discount/issues/203#issuecomment-481283980)

Laurent, could you please give your view on this? Thank you!

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-09 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #5 from avlas  ---
I submitted an issue to Discount to see if this could be implemented:
https://github.com/Orc/discount/issues/203

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-09 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #4 from avlas  ---
(In reply to Laurent Montel from comment #3)
> When I started to implement this feature, I looked at first markdown-here.
> But it was very hard to use js in kmail directly...

I see. Thanks for the info.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-08 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #3 from Laurent Montel  ---
When I started to implement this feature, I looked at first markdown-here.
But it was very hard to use js in kmail directly...

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-08 Thread avlas
https://bugs.kde.org/show_bug.cgi?id=406333

--- Comment #2 from avlas  ---
Thanks a lot for working on the Markdown plugin. It's very nice and useful!

> Yep indeed but "Discount" lib seems that it doesn't support style :(
(In reply to Laurent Montel from comment #1)

I see. I wonder how difficult would be to build upon markdown-here instead. I
guess very difficult...

-- 
You are receiving this mail because:
You are watching all bug changes.

[kdepim] [Bug 406333] Markdown addon: support syntax highlighting

2019-04-08 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=406333

Laurent Montel  changed:

   What|Removed |Added

 CC||mon...@kde.org

--- Comment #1 from Laurent Montel  ---
Yep indeed but "Discount" lib seems that it doesn't support style :(

-- 
You are receiving this mail because:
You are watching all bug changes.