[ESS] Some annoyances with ESS >= 24.x + polymode
Vincent Goulet
V|ncent@Gou|et @end|ng |rom @ct@u|@v@|@c@
Mon Aug 26 22:06:19 CEST 2024
Hi all,
As many of you will know, I have been a very long time user of ESS. For my literate programming needs, I also stuck mostly to Sweave and .Rnw files. Therefore, Rmarkdown and knitr are neither a priority nor an answer for me.
ESS 24.01.1 marked an important transition in ESS life with what is now a strong reliance on polymode to edit noweb files and help pages. I must say that transitioning as an end user proved much smoother than I thought it'd be. Kudos to the developers! Polymode is also *much* better than noweb-mode (ess-noweb-mode?) at keeping track of whether the point is in a code or a documentation chunk. Nice.
That said, a stumbled on a few annoyances when working with .Rnw and man pages, and I'd like to either report them or get workarounds (when a feature rather than a bug). In no particular order:
- [noweb files] With older ESS, M-n C-n would allow to reach a code chunk by its name, a la iswitch-buffer. Is there something equivalent in Polymode? (No, 'M-s <<chunk-name' is not as convenient.)
- [noweb files] fill-paragraph in (LaTeX) documentation does not respect a code chunk that is not separated by a blank line as the older ESS would do. In other words M-q in
lorem ipsum
<<>>=
2 + 3
@
with the point in "lorum ipsum" results in
lorem ipsum <<>>= 2 + 3 @
- I found that when editing code inside a code chunk, comment-column is not respected. Reusing the previous example, M-; on the '2 + 3' line results in
lorem ipsum
<<>>=
2 + 3 #
@
even though comment-column is 40. [I don't know why it is 40, by the way. C-h v comment-column RET yields
comment-column is a variable defined in ‘newcomment.el’.
Its value is 40
Original value was 32
Local in buffer tri.Rnw[R]; global value is 32
I didn't set the value to 40 anywhere. Beats me.]
- [noweb files] I use plain vc-mode for version control. Running vc-diff on a .Rnw file does highlight the changes, but it brings a useless buffer named *diff syntax* in front of the *vc-diff* buffer. If one kills the latter buffer and moves within the *vc-diff* buffer with n or b, moving past a code chunk brings back the *diff-syntax* buffer. In other words, vc-diff is pretty unusable on .Rnw files.
- [noweb files] This is more a convenience thing not necessarily related to ESS. When visiting files, how can I get .Rnw at the beginning of the list of files, even before .R or .tex files? I'm using ido-mode.
- [R man pages] It used to be that all navigation in a man page used nifty one- or two-letter combinations. This still works, except in examples, where the standard R mode gets activated. I understand that this may be convenient to edit the examples, but it makes it no longer makes it possible to exit a man page from the Examples section using x or q. Is there a toggle somewhere to get the old behavior? What do you guys do? C-x k every time?
This is all with my latest Emacs Modified for macOS distribution: Emacs 29.4, ESS 24.01.1.
If I should file bug reports, please tell me.
Thanks in advance!
v.
Vincent Goulet
Professeur titulaire
École d'actuariat, Université Laval
More information about the ESS-help
mailing list