[ESS] Re: how to disable auto-fill-mode for editing R / S

Jing Zhou jyzz88 at gmail.com
Wed Apr 6 05:34:40 CEST 2005


I just tried the second method again. Yes, it works. Thanks, Andreas. 

But it is not a perfect way since you have to put those four lines to
every R files. These four lines also make people confused when they
read your code.

-Jing

On Mar 29, 2005 8:20 PM, Kiermeier, Andreas (PIRSA - SARDI)
<Kiermeier.Andreas at saugov.sa.gov.au> wrote:
> Jing,
> 
> at least the second method, using a file variable, works for me - note that
> Emacs does prompt me whether I would like evaluate the expression as the
> default value for enable-local-eval is set to the value maybe. Setting this
> variable to t (in your .emacs file) will cause local file expressions to be
> evaluated.
> 
> Hope this helps.
> 
> Cheers,
> 
> Andreas
> 
> -----Original Message-----
> From: ess-help-bounces at stat.math.ethz.ch
> [mailto:ess-help-bounces at stat.math.ethz.ch]On Behalf Of Jing Zhou
> Sent: Wednesday, 30 March 2005 04:51
> To: ess-help at stat.math.ethz.ch
> Subject: [ESS] Re: how to disable auto-fill-mode for editing R / S
> 
> I tried the two methods but they didn't work. Hope that next ESS
> version can have a modification on this issue.
> 
> Thanks,
> 
> -Jing
> 
> -----Original Message-----
> Kiermeier, Andreas (PIRSA - SARDI) Kiermeier.Andreas at saugov.sa.gov.au
> Tue Mar 29 10:10:08 CEST 2005
> 
>     * Previous message: [ESS] Re: how to disable auto-fill-mode for
> editing R / S
>     * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 
> Martin,
> 
> wouldn't the following mode hook work?
> 
> (add-hook 'ess-mode-hook
>           (lambda ()
>             (auto-fill-mode 0)))
> 
> In addition, I know how turn a mode on using a local variable, but could you
> not use somthing similar to turn it off? Maybe the following (of course, you
> should be careful with using eval as a local file variable and you require
> enable-local-eval to be true or it probably won't work).
> 
> ### Local Variables:
> ### comment-start: "## "
> ### eval: (auto-fill-mode 0)
> ### End:
> 
> I'm not quite sure whether they work as I currently can't try it out, but
> Jing, you might like to experiment with it.
> 
> Cheers,
> 
> Andreas
> 
> -----Original Message-----
> From: ess-help-bounces at stat.math.ethz.ch
> [mailto:ess-help-bounces at stat.math.ethz.ch]On Behalf Of Martin Maechler
> Sent: Tuesday, 29 March 2005 17:27
> To: Jing Zhou
> Cc: ESS-help at stat.math.ethz.ch
> Subject: [ESS] Re: how to disable auto-fill-mode for editing R / S
> 
> Dear Jing,
> 
> (You should have posed this question to the ESS-help mailing
>  list; since the following should be of interest for other
>  ESS-help subscribers, I'm cc-ing the mailing list.)
> 
> >>>>> "Jing" == Jing Zhou <usazhoujing at hotmail.com>
> >>>>>     on Tue, 29 Mar 2005 02:05:00 -0500 writes:
> 
>     Jing> Dear Martin, I want to disable the auto-fill-mode in
>     Jing> ess-5.2.6 when edition R codes. It seems that the
>     Jing> auto-fill-mode is turned on automatically. How to turn
>     Jing> it off in initial file?
> 
> it is an Emacs concept, not at all particular to ESS.
> 
>     Jing> I googled the answer for several hours and didn't find
>     Jing> the answer.
> 
> In Emacs
>    C-h f auto-fill-mode
> 
>   (C-h := help;  C-h f := help on function )
> 
> will tell you ``all'' about it {well, it's not trivial to read
> unless you are a bit familiar with emacs and maybe even emacs-lisp}.
> 
> However, as I just found, adding
>   (auto-fill-mode 0)
> in your ~/.emacs initialization file is not enough.
> We currently turn on auto-fill mode for *.R buffers anyway.
> 
> You can quickly turn it off with   M-x auto-fill-mode
> (using command completion, you only need to type
>   M-x au <ENTER> -f <ENTER>
> )
> 
> and that's what I would use myself when for some rare reason, I
> would not want auto-filling.
> Note that I'd very much recommend you not to use very long lines
> in your source files, and then auto filling is very useful in my
> experience.
> 
> OTOH, I wonder if ESS shouldn't have it's own configuration
> option which would keep auto-filling the current default, but
> easily allows turning it off.
> 
>     Jing> Is there any mailing list archive?
> 
> Yes: Doesn't the footer at the end of every ess-help message
> contain a URL?  From there, you'll find the archives.
> Even though they are not searchable directly,
> you can use "mighty Google" specifying the "site:" and mailing
> list name :
> 
>    site:stat.ethz.ch ess-help auto-fill
> 
> Regards,
> Martin Maechler, ETH Zurich
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list