ess-mode; suggestion for ess-eval-line-and-next-line

Martin Maechler maechler at stat.math.ethz.ch
Fri Mar 31 18:26:08 CEST 2000


>>>>> "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.
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.
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).
Adding a new prefix argument to  ess-eval-line-and-next-line
(which is the function we are talking about) *automatically*  
makes   C-u C-c 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.
not yet done.

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

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

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

---------------

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

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.).

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


    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).
good idea; 
I think it would just be more natural to use standard Emacs prefix  C-u
for this functionality
{{I would actually vote for dropping all of C-c C-e C-<.> completely  ...}}
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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