From: Fischlin A. <afi...@us...> - 2021-01-14 11:18:24
|
--- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** open **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Thu Jan 14, 2021 11:18 AM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Bernard D. <bde...@us...> - 2021-01-15 13:26:20
|
Hi Andreas, thank you for reporting this. I am not the author of the sh mode in Alpha but I had a look at the code. Could you explain exactly what you would expect regarding file marking in sh mode ? We are speaking here of the sh mode (shell scripts mode). Note that there is also a bash mode and a zsh mode in Alpha: their marking scheme is less complex than what sh mode does. --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** open **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Thu Jan 14, 2021 11:18 AM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Fischlin A. <afi...@us...> - 2021-01-15 15:36:15
|
Dear Bernard, I guess an excerpt should demonstrate what I mean: ____________________ BEGIN OF shell script EXCERPT ____________________ echo " Hint: Use command 'switch2using -v' to learn about RASS environment variables" fi fi # end of big if for se-server #### 4.7 - Done? if [ "$onlyInfo" = TRUE ]; then # only info wanted CleanupAndExit 0 fi #============================================================================== ### 5. Test preconditions for possible switching #============================================================================== #### 5.0 - Option consistency optionsConsistent=TRUE # Compiler (P1 9.0.x is to be favored over 8.2, which is to be favored over 8.3 and 8.4) if [ "${useP190}" = TRUE ]; then if [ "$useP182" = TRUE ]; then if [ "${onlyInfo}" = FALSE ] && [ ${verboseMode} = TRUE ]; then ____________________ END OF shell script EXCERPT ____________________ Under AlphaX with mode pref 'mark headers only' the mode did mark ____________________ BEGIN OF expected Marking ____________________ #### 4.7 - Done? ### 5. Test preconditions for possible switching #### 5.0 - Option consistency ____________________ END OF expected Marking ____________________ and I could easily jump to any of these locations. Under Alpha the very same mode does either produce nothing (mark headers only checked) ____________________ BEGIN OF actual Marking ____________________ ____________________ END OF actual Marking ____________________ or merely junk, i.e. all top level statements. In above case for the excerpt: ____________________ BEGIN OF actual Marking ____________________ if [ "$onlyInfo" = TRUE ]; then optionsConsistent=TRUE if [ "${useP190}" = TRUE ]; then ____________________ END OF actual Marking ____________________ So for pref 'mark headers only’ the marking seems broken (it should also include headers of course) and for pref setting ‘mark headers only’ off, it should mark the headers. I need the latter for my very long shell scripts to get an overview and to be able to jump to the wanted section. Note, I do not use automark. The reported behavior is the result of any manual request to mark the file. I rarely use automark, if at all. Merci. Andreas ETH Zurich Prof. em. Dr. Andreas Fischlin IPCC Vice-Chair WGII Systems Ecology - Institute of Biogeochemistry and Pollutant Dynamics CHN E 24 Universitaetstrasse 16 8092 Zurich SWITZERLAND and...@en...<mailto:and...@en...> www.sysecol.ethz.ch/people/andreas.fischlin.html<http://www.sysecol.ethz.ch/people/andreas.fischlin.hml> +41 44 633-6090 phone +41 44 633-1136 fax +41 79 595-4050 mobile Make it as simple as possible, but distrust it! ________________________________________________________________________ On 15/01/2021, at 14:26, Bernard Desgraupes <bde...@us...<mailto:bde...@us...>> wrote: Hi Andreas, thank you for reporting this. I am not the author of the sh mode in Alpha but I had a look at the code. Could you explain exactly what you would expect regarding file marking in sh mode ? We are speaking here of the sh mode (shell scripts mode). Note that there is also a bash mode and a zsh mode in Alpha: their marking scheme is less complex than what sh mode does. ________________________________ [tickets:#244]<https://sourceforge.net/p/alphacocoa/tickets/244/> Marking in sh mode fails completely or is useless Status: open Labels: Mark Created: Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas Last Updated: Thu Jan 14, 2021 11:18 AM UTC Owner: nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. ________________________________ Sent from sourceforge.net<http://sourceforge.net> because you indicated interest in https://sourceforge.net/p/alphacocoa/tickets/244/ To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** open **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Fri Jan 15, 2021 01:26 PM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Bernard D. <bde...@us...> - 2021-02-03 14:34:45
|
Hi Andreas, I just had a look at this marking issue. There is a silly error in the proc sh::MarkFile (in file shScriptsMode.tcl). At line 680, replace ``` set pat {^(###{3,4}[\t ]+} ``` by ``` set pat {^(#{3,4}[\t ]+} ``` and everything is back in order. By the way, I agree with you that marking all the statements of a script (when *Mark Headers Only* is not checked) is absurd and useless. I'll try to find a more useful marking policy (maybe only the flow control keywords like `if`, `for`, `until`, `while` which correspond to a logical organization of the code). What do you think ? --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** open **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Fri Jan 15, 2021 01:26 PM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Bernard D. <bde...@us...> - 2021-02-25 11:35:28
|
This is fixed now. Changes committed to the repository ([rev. 1995](https://sourceforge.net/p/alphacocoa/code/1995/)). --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** open **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Wed Feb 03, 2021 02:34 PM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Bernard D. <bde...@us...> - 2021-02-25 11:35:42
|
- **status**: open --> fixed --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** fixed **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Thu Feb 25, 2021 11:35 AM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |
From: Bernard D. <bde...@us...> - 2021-03-07 09:38:54
|
- **status**: fixed --> closed - **Version**: 9.2 --> 9.2.2 --- ** [tickets:#244] Marking in sh mode fails completely or is useless** **Status:** closed **Labels:** Mark **Created:** Thu Jan 14, 2021 11:18 AM UTC by Fischlin Andreas **Last Updated:** Thu Feb 25, 2021 11:35 AM UTC **Owner:** nobody The sh mode does no longer mark my shell scripts properly. If sh mode pref "Mark Headers Only" is false, lines starting at the leftmost position are listed, but all actual headers are ignored. If sh mode pref "Mark Headers Only" is true, nothing is marked, while my files are full of headers, also at various hierarchical levels. I am not sure whether this annoying behavior of the mode is a bug or not. I use no sh mode specific tcl file. I am working basically with default settings. --- Sent from sourceforge.net because alp...@li... is subscribed to https://sourceforge.net/p/alphacocoa/tickets/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/alphacocoa/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |