[ESS] Sweave Chunks
Vitalie Spinu
spinuvit at gmail.com
Fri Jan 13 19:40:07 CET 2012
My config for hideshow works up to folding chunks and {..} blocks (C-c
h to toggle):
(load-library "hideshow")
(add-hook 'ess-mode-hook 'hs-minor-mode)
(define-key ess-mode-map [(control ?c) (?h)] 'hs-toggle-hiding)
(setq hs-special-modes-alist
(cons '(ess-mode "{\\|\\(^<<[^>]+>>=\\)" "}\\|\\(^@\\)" nil
noweb-hs-forward-sexp-func nil)
hs-special-modes-alist))
(defun noweb-hs-forward-sexp-func (arg)
(if (looking-at "<<[^>\n]+>>=")
(re-search-forward "^@.*$" nil t)
(forward-sexp arg)
))
The problem is that noweb resets the whole buffer whenever the point
switches contexts and removes all hideshow overlays. Any ideas?
Vitalie.
On 8 January 2012 09:57, Laurent ESS <laurentESS at free.fr> wrote:
> Le 07/01/2012 16:06, Riccardo Romoli a écrit :
>
>> Hi, is there a way to collapse/expand the Sweave chunks in EMACS??
>>
>> Best
>> Riccardo
>>
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>
>>
> Hello,
>
> I had noticed this link in the past but I have not the answer (i.e. the
> lisp function)
>
> https://stat.ethz.ch/pipermail/ess-help/2006-July/003573.html
>
>
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
More information about the ESS-help
mailing list