Wed 18 Jan 2017 09:29:01 PM UTC, comment #13:
OK, also verified on qt5 (fine) and pushed here:
http://hg.savannah.gnu.org/hgweb/octave/rev/bd8ea9e44230
Closing report.
Abhinav, thanks for your contribution
|
Tue 17 Jan 2017 09:38:18 PM UTC, comment #12:
@Philip: Sure. If you've reviewed it and it both works and conforms to Octave coding conventions then go ahead and push it.
|
Tue 17 Jan 2017 09:30:36 PM UTC, comment #11:
I tried the patch some time now. Works good.
Can this cset be pushed?
|
Sun 08 Jan 2017 08:01:51 PM UTC, comment #10:
Works good in Windows as well.
|
Sun 08 Jan 2017 02:20:21 PM UTC, comment #9:
Sorry for the delay.
Patch looks good and works good (on Linux) w. Qt4.
Did you try building with Qt5 as well?
|
Tue 22 Nov 2016 05:33:37 AM UTC, comment #8:
Hi, could anyone familiar with GUI review the patch I attached in my previous comment please?
|
Tue 08 Nov 2016 06:38:57 AM UTC, comment #7:
Hi, I am attaching a patch for this. It makes "##" as default comment string and user can change this from the preferences settings dialog. This is my first patch to core octave so I might have missed a few coding guidelines, please review it.
(file #38900)
|
Tue 27 Sep 2016 06:52:03 PM UTC, comment #6:
I think the intent was always to have this be a std::string option. The user can then set this to single character ('%', '#') or multi-character ("##") comment strings. But for the default, why not go with the Octave coding guideline?
|
Tue 27 Sep 2016 06:15:51 PM UTC, comment #5:
You certainly have the freedom to make this change and submit it to be included in a future version of Octave.
|
Tue 27 Sep 2016 05:49:34 PM UTC, comment #4:
I would like to opt for the coice between "%" and "#" in this case (no "##"), because it feels more like FREEDOM.
Reasoning:
- The "##" for line comments is in the Octave coding guideline, i.e. something you should follow in order to CONTRIBUTE to the Octave SOURCE CODE. But there are probably many more people around, who use Octave, but do not contribute to its source code.
- Any number of "#" is officially allowed by the Octave LANGUAGE (and any number of "%" as well).
- If the GUI editor would insist on "##" instead of "#", then we would keep people who are using "#" for this purpose from using the Ctrl+R shortcut.(Just imaging you remove many #s with Shift-Ctrl-R, and when you try to restore them with Ctrl-R then use realise that this is "forbidden" by the editor. Not so nice a feeling, no freedom.)
- On the other side, if the GUI editor uses "#", then anyone who wants "##" instead, can still press Ctrl+R twice.
Just my penny.
|
Tue 27 Sep 2016 04:29:17 PM UTC, comment #3:
I slightly agree with Rik, yet I can't imagine having to press <Ctrl>-r twice to be a big deal ;-)
|
Mon 26 Sep 2016 07:17:11 PM UTC, comment #2:
<Ctrl>-R is used for commenting out whole lines. So, for Octave, it would be convenient to make this "##".
|
Mon 26 Sep 2016 07:11:46 PM UTC, comment #1:
This looks easy to change, and probably easy to hook up to a preference setting should someone familiar with Qt wish to do that.
The comment prefix is configured here:
http://hg.savannah.gnu.org/hgweb/octave/file/d16d38338077/libgui/src/m-editor/file-editor-tab.cc#l775
It's already file-type dependent, so just needs a switch to set the user's preference to be Matlab-compatible or not. Any preference for "##" vs a single "#"?
|
Sun 25 Sep 2016 06:53:17 PM UTC, original submission:
AFAIK the GUI editor can only insert "%" as a comment character e.g., when invoking <Ctrl>-R. That is, I haven't been able to find a relevant setting to change it into "#".
I think it should at least be possible to set it to "#" to be "Octave-compatible"; or maybe even "//" for editing .cc & .cpp files.
|