-
Notifications
You must be signed in to change notification settings - Fork 165
Outline styles #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Outline styles #1328
Conversation
Replace ess-r-outline-regexp with a new user option ess-r-outline-style (RStudio or stars). Add ess-r-outline-style-alist, regex and level helpers, a dispatcher for outline-level, and ess-r-set-outline-style to apply the chosen style buffer-locally (hack-local-variables aware). Update ess-r-mode initialization, docs, and ChangeLog.
|
Shouldn't the "stars" style rather be called "Org-like"? It is Org syntax with an R comment prefix |
|
I have no opinion on this. If you prefer that, I will do the change tomorrow. |
|
For RStudio-style sections |
|
It might be worth asking @kurthornik if he has a preferred name for this outline style: ### * File utilities.
### ** file_ext"stars" or "Org-like"? |
Good point, I will update the info file and the docstrings to add this precision. |
Explain handling of single-hash comments and recommend setting ess-indent-with-fancy-comments to nil or ess-style to 'RStudio. Update manual and ess-r-outline-style docstring to describe behavior and examples.
|
I have adjusted the info and docstrings to warn about the interaction with the indentation style. Regarding the naming of the stars/Org-like style, I will wait for the end of the Christmas break. In the absence of other comments, I will move it to "Org-like". |
|
I have changed the name of the style from stars to Org-like. Let me know if you want other changes. |
|
Thank you, Christophe (@christophe-gouel). I have not yet tried your proposal, but browsed a bit the changes. It's good you've added more documentation. As mentioned, I'm not often actively using outline style in R scripts, but I think the current proposal relatively strongly not back compatible, as it uses
Neither of the two is desirable for me (nor @kurthornik I think). |
|
Wouldn't the best option be to add a third outline style, which would be no outline? This would be the default option, which is what we had up to now. Then there is no backward compatibility issue. Remains the compatibility issue between the RStudio outlining and the indent styling. For this one, either we let users manage the issue, or I can add to the function |
Yes, I think this should be the way to go.
I also agree with the idea. However, it should possibly happen "smartly": |
Add support for various outline styles.