ess-mode; suggestion for... -- new pre-version available

Martin Maechler maechler at stat.math.ethz.ch
Tue Apr 4 12:14:18 CEST 2000


>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch> writes:

>>>>> "Rich" == Rich Heiberger <rmh at surfer.sbm.temple.edu> writes:
    Rich> I would like this new function as an additional function, not as
    Rich> a replacement for the present capability.  Here's why.


    Rich> I frequently want to create a transcript of a session in which
    Rich> vertical spacing and structured comments appear where I placed
    Rich> them.  At present, empty lines do not get sent over to the S
    Rich> process by C-c C-n and friends.  I find that I must use the mouse
    Rich> to pick up the relevant code, sometimes the entire buffer, and
    Rich> drop it into the S+4 commands window.

    MM> I see that that's a pain.

    Rich> Here is my recommendation.  Take Stephen's proposal and put it on
    Rich> C-c C-n.
    MM> done [not yet committed].

    Rich> Take the current version of the function and advertise
    Rich> that it is available on C-c C-e C-n (which it has been for some time).

    MM> Adding a new prefix argument to ess-eval-line-and-next-line (which
    MM> is the function we are talking about) *automatically* makes C-u C-c
    MM> C-n provide the old way (no skipping over comments and new lines).


    Rich> Change the current function so that it does send over
    Rich> blank lines.
    MM> not yet done.
Now done!

    MM> Reason : All(!) eval-..-.. functions use the basic building block
    MM> (ess-eval-visibly ...)  {the name of which is ridiculous since that
    MM> function has an argument INVISIBLY which toggles if the evaluation
    MM> is visible or invisible ....}

    MM> and it is currently builtin side this basic building block that
    MM> blank lines are somehow not sent at all.

    MM> __Before__ you start -- I am currently looking at hacking
    MM> ess-eval-visibly and make it provide "send-empty-lines as well" ...

now done.
I.e.
	 C-c C-n    now skips all empty lines and comments
     C-u C-c C-n    sends one line to process, even comments and empty lines.

    MM> ---------------

    MM> Another "Problem":  We currently (and in the new version for C-u C-c C-n)
    MM> just call (next-line 1).

    MM> Now Emacs online help on [next-line] says.

    EmacsHelp> If you are thinking of using this in a Lisp program, consider
    EmacsHelp> using `forward-line' instead.  It is usually easier to use
    EmacsHelp> and more reliable (no dependence on goal column, etc.).

    MM> If I use  (forward-line 1) instead of (next-line 1)
    MM> everything continues to work {of course} --
    MM> -- only if someone was "crazy" enough to use a goal column in ESS mode
    MM> the behaviour would change
    MM> -- *and* the current function name "...-and-next-line"
    MM> (a misnomer anyway) should probably be change when next-line isn't used
    MM> anymore ...

I'm now using forward-line instead of next-line and have renamed  
 ess-eval-line-and-next-line to 
 ess-eval-line-and-step    

( and ess-eval-visibly to ess-eval-linewise )

and added a new variable "ess-eval-empty" which when set to true will make
ess-eval-linewise even send empty lines to the ESS process.
 
    Rich> With this set of revisions, the new C-c C-n will send only
    Rich> executable lines and the new C-c C-e C-n will send all
    Rich> lines---including comments and blanks (which to me function as
    Rich> comments since they demark sections of the code).
    MM> good idea; 
    MM> I think it would just be more natural to use standard Emacs prefix  C-u
    MM> for this functionality
    MM> {{I would actually vote for dropping all of C-c C-e C-<.> completely  ...}}

(not done).

---

With all my (and Stephen's) recent changes and improvements,
I think it would be time to release 5.1.14  real-soon-now.

I'd appreciate if a few of you could test this a little bit,
(and provide feedback to ess-bugs at stat.math.ethz.ch).

I've put it up (temporarily) in
     ftp://stat.ethz.ch/U/maechler/ESS/  as ESS-5.1.13-patch2.tar.gz (or .zip)

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the ESS-help mailing list