6 The original TODO list (nothing fixed there yet):
7 ===========================================================
9 The following things need to be fixed. In a very rough order of priority.
11 * (DS) M-RET in *S* doesn't work properly with multi-line inputs.
13 * (DS) Typing C-c C-d in an S-mode buffer can read the wrong file
14 (apparently the wrong value of S-directory is used.)
16 * (DS) Maybe S-eval-region should do S-view-at-bottom, too
18 * (DS) It would be nice to interpret a nil value of S-directory as the
21 * (DS) Add a predicate to control when S-object-list is dumped. It would
22 be nice to dump this only if an assignment has taken place or the
23 search list has changed.
25 * (DS) C-u -1 C-c C-x C-c C-o produces odd results
27 * (DS) Automate inferior-S-send-input to delay sending to the S process
28 until a complete command has been typed. (I.e. when presented with
29 an incomplete command, RET behaves like LFD). If this is done,
30 multi-line commands will always get into the history as one entry.
32 * (DS) The menus need finetuning, and a binding to a keyboard key.
34 * (DS) Need to decide on a sensible policy on csh-like history references.
35 At the moment, expanding such references is only possible from the
38 * (DS) Need a keystroke to kill an edit buffer *and* the associated file.
40 * (DS) Need a function to copy an object to a new object *and* copy
41 it's source file to a new source file, modifying the target of
44 * (DS) Debugging support, through trace() and tprint()
46 * (DS) Modify S-beginning-of-function so that, with arg n, will move out
47 n layers of nested functions. Wiht C-u arg, move to outermost
50 * (DS) Rewrite the S-command and S-eval-visibly functions to use
51 transaction queues (so that we can really have S running in the
52 background) This is a big job.
54 =============================================================
55 Here is the new set (a start for S-mode 5.0).
56 NOTE: Not all of these are clean OR are even consistent.
57 --------------------------------------------
59 * (KH) Fix indentation for "{" in the GNU style...
61 Kurt> * What I also find frustrating is that the GNU style does
62 Kurt> not get the indentation of `{' in:
63 Kurt> fun <- function(x, y, z) {
64 Kurt> right (in fact, the results of hitting TAB on the second
65 Kurt> line seem to vary). But it is not important.
67 * (KH) It may be worth while replacing
68 ("^[>+]" . font-lock-keyword-face)
69 in R-inf-font-lock-keywords by
70 ("^[RS]?[>+]" . font-lock-keyword-face)
71 (or perhaps something even better assuming the coexistence of processes
72 called R, S, S<something> on a system with the corresponding prompts.
74 (MM) Yes, add "S4" to this list to get something like
76 ("^[RS]?[1-9.]?[>+]" . font-lock-keyword-face)
78 is not quite correct, since it includes ".3>" buth should rather
81 * (KH) In R at least, asking for deletion of a file after loading it with C-c
82 C-l does not make sense.
84 (MM) Yes! -- this has been a real pain, especially when the file was
85 version-controlled, it sometimes has just been deleted w/o asking !
87 * (KH) Also, there is no support for an Emacs-specific startup file. This is
88 not really important right now, I think, but anything based on comint
89 and term should support that.
91 (Tony, if you look at my R-inf.el, you'll notice that some effort goes
92 into doing the right thing with output from startup args and files.)
94 * (KH) The function S-complete-object-name() in S-inf.el currently
97 (or (comint-dynamic-simple-complete pattern components) 'none)
99 with the comment `always return a non-nil value to prevent history
100 expansions'. Do you have an idea what that means?
102 Is there any good reason to break the Emacs/Comint convention that a
103 completer should return a non-nil value only if it did successfully
106 The specific reason why I ask is the following:
110 (setq comint-dynamic-complete-functions
111 '(S-complete-filename
112 S-complete-object-name
113 comint-replace-by-expanded-history))
115 I don't care about the last and prefer
117 (setq comint-dynamic-complete-functions
118 '(S-complete-object-name
119 comint-dynamic-complete-filename))
121 Note the reversed order of filename and object name completions. I
122 think it makes more sense that way, because if I have the file
123 `anthony.dat' in my current dir and do
125 anthony <- read.table("anthony.dat")
127 then typing `ant TAB' at the R prompt should complete to `anthony'
128 as an object name, as I can always force the filename in the current
131 However, as S-complete-object-name() always returns a non-nil value,
132 the comint file name completion simply does not happen (well
133 ... that's at least what I think is the case ... but then also, what
134 is the point to have comint-replace-by-expanded-history() in the
135 list of completers, when it definitely will never be called
138 Please let me know what you think. My suggestion would be to simply
139 change the last 2 lines of the code for S-complete-object-name() to
141 (comint-dynamic-simple-complete pattern components))))
143 and set comint-dynamic-complete-functions as I do :-)
145 Well ... what I said was not quite right, as S-complete-object-name
146 also tries to do something about `./ant RET'. In any case, please
147 let me know what you think.
149 * (AJR) Need an AUTOCONF for configuring Makefile, etc...
151 * (AJR) Move S-extras into the mainstream distribution files and as an
154 * (KH) So, need a "create-debian" entry in the Makefile.
156 * (KH) MINOR REMARK: Currently, we have American and English spelling
157 together. If we want to change this, please add it to the TODO list.
159 * (KH) MINOR REMARK: Some of the doc strings are not o.k. (first
160 sentence longer than one line ). We eventually need to fix this,
161 but perhaps not for 4.9.
163 * (KH) Btw, why not have `M-x vista' too?
165 * (KH) MAJOR REMARK I:
167 The code for getting the `right' history file does not work. E.g.,
168 when I start R and XLS in the same directory, they both use
171 For a possible solution, see the novel below.
173 * (KH) MAJOR REMARK II:
178 (load S-object-name-db-file)
180 (message "%s does not exist. Consider running S-create-object-name-db."
181 S-object-name-db-file)
185 in S.el causes several problems.
187 First, it produces an error in the byte-compilation process. I
188 noticed that you put an empty S-namedb.el in the distribution, but
189 that does not help if `nil' is not in the default load path
190 (because then the current directory is not searched), which I think
193 Second, there should obviously be different namedb for R and S.
194 (What I really mean is that the setting of S-object-name-db must be
195 a function of the implementation [have we officially decided on
196 using `dialect'?] used. Hence, the right thing most likely is to
197 execute the code not when loading S.el, but when it is clear which
198 process is started (assuming we have different namedb's for each
201 This could probably be as late as before inferior-S-mode-hook, but I am
204 (Note: currently this is not a problem for me, because I only have R,
205 but what does Martin do?)
209 So I spent several hours yesterday trying to figure out the right way of
210 solving our problems with local variables, in particular because Martin
211 explicitly asked me to do (only to find that the next morning Tony had
212 already done something about it ...).
214 I think it is important to distinguish two kinds of variables that need
217 ** One group is those variables which need to be known when the inferior
218 process is started (i.e., before the process and hence also its buffer
222 *) dialect (currently transmitted through S-proc-prefix)
223 *) program name (`R' might be on the load path)
224 *) program args (such as for `-v 10' for R)
225 *) program startup file (currently unused)
226 *) program history file (???)
228 ** The other group consists of those which are not needed for startup,
229 but need to have the right buffer-local values in the interaction
232 inferior-S-help-command
233 inferior-S-objects-command
237 The problem we have is that there is NO WAY of passing non-global
238 values to buffer-local variables in Emacs. Something like
241 (let ((inferior-S-var value))
244 does not set inferior-S-var to value in the interaction buffer if it is
245 local there. (Sort of static scoping.)
247 There are several possible solutions:
249 ** Keep manipulating the global name space using setq-default, as b4
250 did. Of course, this is terrible, because it overrides defaults.
252 ** Have one function which does something like
262 after calling make-local-variable() on the relevant variables, and wrap
263 the code into a function.
265 To add a dialect, users would need to to this in there inferior-S-mode
266 hook, or to advise/change this function.
268 ** Have a list similar to S-style-alist with settings for the variables,
269 and a function which sets them. This is similar to the above, but keeps
270 the code for the function and the variables separate.
272 ** Have a dialect specific hook, e.g.
274 inferior-S-<dialect>-mode-hook
276 ** Keep manupulating a non-dialect-specific hook in the global name
277 space. This is what we currently do, and not `optimal' for the same
278 reason that using setq-default was not: If we think of inferior-S as
279 user function and S and R as simple wrappers, then calling these should
280 not modify the behavior of the generic function.
282 I think the KEY to a clean solution lies in the observation that there
283 is really only ONE variable needed in both steps (i.e., cranking up the
284 process and setting local variables in the interaction buffer), and that
285 is the information about the CURRENT DIALECT (which I think is currently
286 kept in `S-proc-prefix'. We need to ensure that this variable has the
287 right local value to be able to run a specific hook (or a simpler hook
288 as explained above), and that it starts the right process in the right
291 To get that, we could either create a global variable, KEEP IT GLOBAL,
292 use let() in the wrappers, and assign to a local variable afterwards, or
293 (and I think this is the right thing to do) PASS THE DIALECT INFORMATION
294 AS AN ARGUMENT. I.e., we would have
296 (defun inferior-S (&optional dialect n)
299 [NOTE: I am not sure about the optional `n', and whether this is used.
300 I think that users might want to have
302 (defun R (&optional n) ...)
303 (defun S (&optional n) ...)
305 and we are safe to give inferior-S the interface we want because it is a
306 NEW function anyway. We could also have it prompt for all relevant
307 variables if given a prefix ...]
311 (defun R (&optional n)
315 Now the function inferior-S has the information it needs. It can figure
316 out the `right' startup settings (history file, program name and args)
317 based on the dialect information in the generic pre-run hook and perhaps
318 a dialect-specific pre-run-hook, and PASS THE DIALECT INFORMATION ON to
319 the function S-multi() [or whatever it will be called]. I.e., it could
322 (defun S-multi (name &optional buffer dialect) ...)
326 (make-local-variable 'S-dialect)
327 (setq S-dialect (or dialect S-default-dialect))
329 and go on with the buffer-specific settings, again using the dialect
330 information as described above.
332 [Yes, there should be a default dialect which is used when inferior-S is
333 used directly. Perhaps naming would be better with global S-dialect and
334 inferior-S-dialect as the local one ...]
337 I'm using ess-eval-region and friends very often.
339 If the region has leading TAB, I think the readline feature of R,
340 does a huge 'completion ...'
341 which can completely destray the whole evaluation.
343 ((Try C-c C-f from within a function that has a bit of indentation,
344 and therefore leading TABS (unless you 'untabified' it).
347 Yes, I'll have to 'untabify' things before I send it to *R*, but it's a
349 One could do 'untabify' in ess-eval-region & ess-eval-visibly
351 But actually this is not quite correct,
352 since I may have real TABs in a string
354 nchar(" ") #-> 1 because it has one TAB
356 which should not be converted to spaces.
359 Write a function 'untabify-leading-white-space'
360 and apply it to the regions in ess-eval-region and ..-visibly.
366 63 ;;(if (string= ess-version-running "S3")
367 This comment seems inconsistent with ess-version-running. I think it should be
368 ;;(if (string= ess-version-running "S+3")
371 7. ess-object-name-db-file
372 ess.el line 775. Why is this EVIL? A nuisance I understand, but EVIL?
373 Does the database get built automatically when ess-mode is installed?
374 That would be the right thing to do. Then individual users wouldn't need
375 to know about it all.
378 10 ess.el lines 254-270
379 This is one of the things I put in my site-start.el. I think this is
380 too complicated. I think that when item 2 of this note is corrected (that is
381 run the ess-pre-run-hook before the things that depend on it) then the nil
382 value will work as advertised and the comment beginning with the word
383 " Alternatively," will become completely unnecessary.
385 (defvar ess-directory (file-name-as-directory (getenv "HOME"))
386 "*The directory ess is run from. It must end in a slash.
387 Provided as a default if ess-ask-for-ess-directory is non-nil.
388 A nil value means use the current buffer's default directory.
389 Buffer-local: in process buffers, this contains the directory ess was
391 ;; You can put something like:
392 ;; (setq ess-directory (file-name-as-directory (concat (getenv "HOME") "/ess/")))
393 ;; in your ~/.emacs file and ess will always start up in your ~/ess directory.
396 ;; (setq ess-directory nil)
397 ;; in your ~/.emacs file and ess will always start up in your current buffer's
398 ;; default directory.
402 ;; Alternatively, you can get ess to start up in the current buffer's directory
403 ;; by putting this in your .emacs
404 ;; (setq ess-pre-run-hook '((lambda () (setq ess-directory default-directory))))
405 ;; Better (more correct) version:
406 ;; (defun ajr:ess-set-directory ()
407 ;; "Set ess-directory to current directory."
408 ;; (setq ess-directory default-directory))
409 ;; (add-hook 'ess-pre-run-hook 'ajr:ess-set-directory)
412 * (RMH) From smode.cmt (from the S4 package):
414 <-- AJR: some of these HAVE been done. -->
418 Working data will be in /usr/people/rmh/.Data
424 .Data has not yet been created in /disk5/rmh/smode
427 quit S, mkdir .Data, start again
428 Recommendation 1. Tell users in README to create .Data first.
429 Recommendation 2. Tell users in README about Info item
430 - User Option: S-directory
431 I for one always want the current buffer's working directory.
435 S-help does the following:
436 (S-command (format inferior-S-help-command object) tbuffer)
437 which seems to going through more work than is often necessary. When the
438 .Cat.Help subdirectory exists, why not just M-x find-file the help file?
445 e. S-inf-font-lock-keywords
446 In inferior-S-mode the expressions below are in the indicated faces:
447 > tmp <- 1:3 # > is in font-lock-keyword-face
448 # rest is font-lock-variable-name-face
450 tmp <- 1:3 # <- is in font-lock-reference-face
453 I don't understand why.
454 >From the definitions in S-inf.el, I expected that there would be
455 no dependence on the presence or absence of the leading prompt ">".
456 In particular, I anticipated that <- would be in font-lock-reference-face
457 with or without the prompt.
460 f. S-inf-font-lock-keywords
461 I recommend adding several keywords to S-inf-font-lock-keywords
462 for S3 and Splus 3.3 as noted in the attached s3.el and splus.el.
465 g. Interesting glitch
466 While fixing C-c C-l for S4, I found the following:
467 >From the *scratch* buffer, both the commands
468 (S-command "source(\"junk.s\")\n" (get-buffer "*S-errors*"))
469 (S-command "source(\"junk.s\")\n")
470 work correctly when junk.s is ok.
472 The first one puts an error message in "*S-errors*" when junk.s has a
473 problem. But the second one loses the error message. I chose not to
474 investigate this further, since S-load-file uses the first form, and I
475 doubt any person would consider using the second.
480 a. S-mode.el [C-c C-l S-load-file]
482 ;;; The S4 requires the fixes to
486 ;;; in my s4.el in order to respond correctly to syntax errors
487 ;;; during S-load-file.
488 ;;; Without these changes the system will freeze.
489 ;;; (^G will clear the freeze, and ^XB *S-errors* will
490 ;;; display the error message).
493 b. S.el and S-site.el
494 The variable S-version-running, defined in S.el, with the option to
495 revise in S-site.el, needs to be redefined to identify version 4.
496 Some of the items coded by S-version-running differ in Version 4.
499 (setq inferior-S-search-list-command "searchPaths()\n")
500 ;;; This variable needs to depend on S-version-running.
501 ;;; the function inferior-S-search-list-command should probably use
502 ;;; inferior-S-search-list-command, but it actually has "search()\n"
505 ;;; inferior-S-objects-command is the same for version 4 as for version 3
509 ;;; inferior-S-help-command
510 ;;; inferior-S-search-list-command
513 ;;; inferior-S-objects-command
517 ;;; S-submit-bug-report needs to know about version 4 for a bug report
521 c. Other changes in s4.el respond to changes in S4:
523 Errors are now Problems
524 "Dumped" messages now become offers to Debug
525 Additional keywords should be fontified
528 d. I have placed S-namedb.el in $SHOME in my s4.el file. On further
529 reflection it should probably be in the $SHOME/library/emacs/
530 directory. Question, does it make sense for S-namedb.el to be
531 distributed in $SHOME/library/emacs as part of binary.*.tar.gz ?
535 Rather than have the site installer change the name of the directory,
536 it should be possible to find it out automatically. Here is the
537 relevant code from my spread.frame package. It assumes the user
538 started up spread.frames by typing
539 M-x load-file "/path/name"
540 It then finds the directory associated with that path and goes from
541 there. Some similar trick should be doable when the user does a
542 M-x load-library "name"
545 (defun find-spread-frame-directory nil
546 "Locate directory in which spread.frame functions are stored."
547 (list-command-history)
548 (set-buffer "*Command History*")
549 (goto-char (point-min))
550 (search-forward "(load-file ") )
551 (goto-char (1+ (match-end 0)))
554 (search-backward "/")
555 (goto-char (match-end 0))
556 (setq spread-frame-directory
557 (expand-file-name (buffer-substring beg (point))))
558 (kill-buffer "*Command History*"))
560 * (daven@stille.llnl.gov (David Nelson))
562 Transcript mode is delightful, with one possible improvement. Quite
563 often, when I'm in the middle of a session, I'd like to insert a
564 comment in the transcript, preferably with a distinctive type face
565 like those provided by "font lock". Is there an easy way to do this
566 that I'm just missing?
570 I'm writing to you rather than directly to daven@stille.llnl.gov
571 (David Nelson) because I'm not sure how to tell him to do the
572 following fix in .emacs or S-site.el because of the local variable
573 issue or if it even is the right fix.
575 I think the permanent answer should be for you to add the lines
577 (make-local-variable 'comment-start)
578 (setq comment-start "#")
579 (make-local-variable 'comment-start-skip)
580 (setq comment-start-skip "#+ *")
582 copied from S-mode.el to the files S-trans.el and S-inf.el (4.8
583 notation). But when I tried it out with M-x eval-expression in the
584 *S* buffer it didn't have the effect I anticipated.
586 I can't figure out the intent or meaning of the line
587 ("^\\*\\*\\\*.*\\*\\*\\*\\s *$" . font-lock-comment-face) ; S-mode msg
588 from S-inf.el and S-trans.el
590 * (KH, 010897) Can we combine the inferior-ess font-lock-patterns for prompt
591 and input into one regexp? I.e., use
593 ("^\\([a-zA-Z0-9 ]*[>+]\\)\\(.*$\\)"
594 (1 font-lock-keyword-face) ; prompt
595 (2 font-lock-variable-name-face keep t)) ; input
598 * (KH, 010897) Perhaps one could have an option to install the Info
599 files gzipped (as is default for e.g. Debian GNU/Linux).
602 I loaded ess-site from *shell* in directory ~/
603 Then I M-x S from that buffer. It asked me about starting S in ~/
604 The with in *shell* I cd /disk05/rmh and M-x S from *shell* again.
605 I think it should have attempted to start S from /disk05/rmh, but instead it
606 again asked me about starting S in ~/
608 * (AJR/RMH) make sure that font-lock stuff is properly set. (look into
609 file order, for example).
611 * (AJR) Kurt> * When first starting R and then XLS, we have
613 Kurt> ess-history-file's value is ".Rhistory" Local in
614 Kurt> buffer *R*; global value is ".XLShistory"
616 Kurt> Why is there a non-nil global value?
618 > Because of the nature of buffer-local variables. It doesn't really
619 > matter, since I'm ALWAYS ignoring the global value (at least that is
622 * (MM) Date: Fri, 22 Aug 1997 09:11:25 +0200
624 >>>>> "Kurt" == Kurt Hornik <hornik@ci.tuwien.ac.at> writes:
626 >> * Questions: 1. I don't understand why ess-customize-alist is not
627 >> buffer-local (This definition is from ess-vars.el.): (defvar
628 >> ess-customize-alist nil "Variable settings to use for proper
629 >> behavior. Not buffer local!") ;;(make-variable-buffer-local
630 >> 'ess-customize-alist) ;;(setq-default ess-customize-alist nil)
632 Kurt> Personally, I think that most of the (make-variable-buffer-local
633 Kurt> ...) and (setq-default ...) will have to be replaced eventually
634 Kurt> by making the variables local when needed and passing them not in
635 Kurt> the global environment but rather as explicit arguments to the
636 Kurt> caller functions.
640 Kurt> (ess-start-process NAME BUF FILE ARGS ALIST)
642 This is cleaner from a programming point of view,
643 however is n't this much less CPU efficient ??
645 >> 3. Should ess-proc-prefix be renamed to ess-language? I glanced at
646 >> the result of 'grep ess-proc-prefix *.el' and don't immediately see
649 Kurt> Yes, good idea. Could we then have
651 Kurt> ess-language ess-dialect
653 Yes, this looks like the thing to aim at !!
654 Together with what Kurt wrote in the last e-mail's PS:
656 Kurt>>> PS. We should decide on a scheme for languages (S, XLS, ...)
657 Kurt>>> and what we call ``dialects'' (for S: S3, S4, S+, ..., R).
658 Kurt>>> This would allow us to have a general mechanism for dealing
659 Kurt>>> with the above, such as
661 Kurt>>> * In the caller function (M-x S, M-x R, ...) set language and
664 Kurt>>> * Then, we don't explicitly have to assign all variables which
665 Kurt>>> should be local (such as font-lock-keywords) anyway, but could
666 Kurt>>> figure them out by
668 Kurt>>> looking for <language>-font-lock-keywords looking for
669 Kurt>>> <language>-<dialect>-font-lock-keywords
671 Kurt>>> Hooks could be organized similarly
672 Kurt>>> ... (ess-inf-S-S4-mode-hook?)
675 * (RMH 31 Jul 1997 07:22:10 -0400 or earlier)
677 * what it doesn't do 1. The effect of the second line is to prevent
678 * font-lock information from happening on input lines. The prompt
679 * is highlighted, the rest of the line is not. The effect is to
680 * cancel the usefulness of syntax highlighting on user-typed
681 * commands. Syntax marking is only in effect when the system types
682 * a function back to us.
684 2. I can't figure out what the ess-mode msg line is doing.
685 ("^\\*\\*\\\*.*\\*\\*\\*\\s *$" . font-lock-comment-face) ; ess-mode msg
687 3. comments (beginning with #) are syntactically ignored by
688 highlighting. In ess-mode, comments are not picked up with this
689 table (actually ess-mode-font-lock-keywords). They are picked up by
690 ess-mode-syntax-table on line 733 of ess-vars.el.
692 4. what are the < > characters doing in this line:
693 ("\\<\\(TRUE\\|FALSE\\|T\\|F\\|NA\\|NULL\\|Inf\\|NaN\\)\\>"
694 . font-lock-type-face) ; keywords
699 1. I think I want ess-mode-font-lock-keywords to be effective in
700 inferior-ess and in ess-transcript. That means to the user, the <-
701 and function and T and F will be highlighted as commands are typed
704 2. That means to the ess-mode designer that the line
705 ("^[a-zA-Z0-9 ]*[>+]\\(.*$\\)"
706 (1 font-lock-variable-name-face keep t)) ; input
707 is deleted from inferior-ess-font-lock-keywords.
709 3. Further it means that inferior-ess-font-lock-keywords should be
710 defined by adding additional definitions to
711 ess-mode-font-lock-keywords.
716 1. these keywords are hardwired. They should probably be put into
717 the *-customize-alist. In particular, S4 uses different keywords
718 for errors (problems) and so forth. It also uses different keywords
719 for the Help file (__Help instead of .Help). These are functional
720 differences, not just cosmetic differences where the font would be
721 wrong. See the comments in essd-s4.el (based on my original s4.el).
722 (just noticed, the current essd-s4.el has two ending pages.) It is
723 easy to make ess-mode work for S4 by overriding all the differences
724 (which is how s4.el works). It is harder to do it cleanly so the
725 same emacs session can be used for S4 and S3. Lots of currently
726 hardwired variables need to be moved to the *-customize-alist first.
727 xlispstat is quite differently structured, so I am sure that the
728 keywords and highlighting here will be either irrelevant or harmful
729 if applied directly. customization is needed for that generality as
734 I'm confused? I've always gotten comment highlighting in
735 inferior-ess/S-mode. Or do you mean that it's not done in the right
738 correct, it is not done where you think it is done (right place or
739 not). It is done by ess-mode-syntax-table for inferior and
740 transcript mode. It is not done at all for ess-mode. The font-lock
741 settings seems to be irrelevant.
744 Richard> 4. what are the < > characters doing in this line:
745 Richard> ("\\<\\(TRUE\\|FALSE\\|T\\|F\\|NA\\|NULL\\|Inf\\|NaN\\)\\>"
746 Richard> . font-lock-type-face) ; keywords
748 using the typeface for the inequalities, for boolean statements/tests.
750 Not so. The < > do not appear in font-lock-type-face.
752 * Hmm... I think that was the font that was to be used for the prompt.
754 Not so. The previous line is used for the prompt. This line seems
755 to be used to suppress font-lock control for all characters
756 following the prompt. Note that the (1 ...) is in the position
757 normally taken by the "." . I assume the keep makes it stay that
758 way for the rest of the line. I haven't bothered to read font.el to
763 . text.st 0 ESS Transcript /disk05/rmh/text.st
764 test.r 0 ESS[R] /disk05/rmh/test.r
765 test.s 0 ESS[S] /disk05/rmh/test.s
768 Note that the *.r and *.s files include the [R] and [S]. The
769 inferior processes do not include the ess-version-running, I wish
770 they would. The corresponding modelines are
772 (ESS Transcript [] Font)
775 (Inf-ESS [S4]: run Font)
777 I don't know the original intent of the [] and [none], but I would
778 love to see the name of the buffer to which ^C^N is sending stuff.
781 * ^C^N goes to the wrong inferior process.
783 I opened test.r in the same directory as *R* and sent a line. It
784 went to the *S* buffer in a different directory and running the
785 wrong program. There needs to be a way for the system to ask me
786 which process to use. Also, it's default guessing system should
787 have guessed *R* based on the file name test.r.
793 in ess-vars.el, line 317 and following, some of the hooks are
794 initialized to '() and others to nil. Is there a difference?
797 * ess-source-modes in ess-vars.el line 382
798 Is this obsolete now that auto-mode-alist has the suffix information?
801 * (AJR, via MM, RMH, DB): distinguish between files of dumped objects
802 and files of loading objects.
806 Richard> SAS-log-mode
808 Richard> As present, SAS-log-mode doesn't do anything but be
809 Richard> human-readable. My intent in basing it on
810 Richard> ess-transcript-mode rather than on fundamental-mode is
811 Richard> that when sas-clean-region and related functions are
812 Richard> figured out, then the log file can be used to re-enter
813 Richard> commands back to *SAS:1*. We will look for all numbered
814 Richard> lines between a
815 Richard> 34 PROC abcd;
818 Richard> pair, sas-clean-region them and send them over to
819 Richard> *SAS:1*. This is NOT an exercise for 5.0. But because
820 Richard> it is intended, I feel (weakly, not strongly) that it
821 Richard> would be better to base SAS-log-mode on
822 Richard> ess-transcript-mode. This plan should be formally
823 Richard> entered into the TODO list.
825 I would agree with this. I'd also like to make sure that we have a
826 means of easily going between linked buffers. Added into the TODO
829 Richard> While we are entering things in the TODO list, I would
830 Richard> like to consider setting up *SAS:n* as a unix pipe,
831 Richard> rather than as a unix buffer/file. I don't know how to
832 Richard> tell emacs to do that. The idea is to mimic the behavior
833 Richard> of the SAS edit window where, once the Submit menu item
834 Richard> has been clicked, the window is emptied.
836 No, I think that using as a buffer would be better (especially for
837 debugging any weird problems). Hiding it, though, will be desirable.
839 Richard> I can also see a case for leaving the *SAS:n* buffer as a
840 Richard> buffer. We should consider making it read-only to force
841 Richard> the user to do all thinking in the ex123.sas buffer. The
842 Richard> only reason I can currently think of for letting the user
843 Richard> write directly in the *SAS:n* buffer is to enter the
848 Richard> I can't think of any reason to save the *SAS:n* buffer
849 Richard> and would like to know if there is any way to prevent the
850 Richard> user from saving it.
852 and not even that, since that should be the result of C-c C-q, so
853 that we get a nice, uniform means of exiting.
855 (RS1) I don't believe the sas-log-mode suggestions were ever implemented.
856 In fact, sas-log-mode is not a default option anymore since there
857 are so many different applications that create .log files.
858 Instead, a few changes were made to sas-mode based on requests for syntax
859 highlighting of the .log. This feature can be toggled on and off
860 by F10. This temporarily turns on sas-mode for .log files so you will
861 not experience permanent extension collisions with other .log file
862 generating applications. Also, performance may be an issue.
863 Extremely long .log files (particularly those generated by macros
864 that involve alot of code-generation) can be extremely time-consuming
865 to fontify and lazy-locking is usually not an option due to the
866 complexity of the SAS regular expressions. Fast-locking may help a
867 bit, but font-locking of several minutes is not unheard of.
868 Also, the font-lock code was re-written to properly highlight either
869 a .sas or a .log file. See ess-sas-run-make-regexp below.
871 (RS2) Rich re-did sas-log-mode to use the font-locking from ESS[SAS] and
872 it seems to be working. The only caveat is that I found that
873 fast-lock is very slow for big .logs and I switched to lazy-lock
874 and it is much faster, however, I have problems toggling; usually,
875 after I turn it on, I can't turn it off; but, that's not so bad
876 with lazy-lock. Also, a new function creates transcript from
877 your .log, ess-sas-transcript
879 * (KH) Font-lock needs to be more intelligent about recognizing
880 reserved words in non-reserved contexts (such as in "strings").
881 (RS1) If this was a SAS problem, then problem has been fixed.
882 To turn on the new functionality,
883 (setq ess-sas-run-make-regexp nil)
885 (RS2) This is now the default and most known issues have been addressed;
886 even hanging then statements!
888 * (AJR) SAS indenting needs to be fixed.
890 (RS) I don't know if this was fixed, but I haven't had any problems
891 with indenting recently.
893 * (AJR) SAS fontlocking of comments needs to be fixed.
894 (RS) I believe this is done. We made a few changes, but the biggest
895 problem was that Emacs 19.34 was misbehaving.
896 See ess-sas-run-make-regexp above.
898 * (KH) explicit statement:
900 I have only one remark (one of my usual ones). I'd like to be able to
901 pass command line arguments to the inferior process when it is started.
902 This is currently not supported, and poses some difficulties with an
903 interactive prompt mechanism. (Also rules out my suggestion of using
904 C-u to force prompting for command line args.)
906 Hmm ... Perhaps we should have a variable (ess-inf-always-prompt-...)
907 to get around this problem?
910 graphics are possible in two ways:
911 a. proc gplot; plot a*b / vpos=25;
912 b. goptions device=psfile;
913 filename gsasfile 'temp.ps';
914 and then use ghostview from another *shell* buffer.
916 autoexec.sas defines the departmental printers and turns off
917 overprinting. My autoexec.sas file is:
919 libname gdevice0 '/home/public/stat/gdevice0' ;
922 * (RMH - SAS) I have another proposal for font-lock in SAS-mode. I
923 think it will be easy, but I would like discussion first. My new
930 and maybe a few others (including both the keyword and name of the
931 dataset or proc) be in font-lock-function-name-face
933 %include will be in font-lock-reference-face
935 Any other FIRST word in a statement will be in
936 font-lock-keyword-face
938 My reasoning is that the current laundry list is too long, and still
939 misses many keywords. The structure of the SAS language is
940 essentially keyword and arguments, so let's follow that.
941 (RS) Essentially done. The following statements are in
942 font-lock-reference-face: macro statements, PROC ...,
943 DATA, RUN, ENDSAS, and QUIT.
944 See ess-sas-run-make-regexp above.
946 * (Tobias Laatsch - SAS)
947 There seem to be some problems fontifying SAS Comments in ESS 5.0
948 Pre1. (I'm running xemacs 20.2 on AIX .)
949 Currently I recognized following problems:
950 1) Multi-line-comments are not fontified. (open comment "/*", some
951 lines of code, close comment "*/")
952 2) When typing / , " or ' in a comment-area, ESS fontifies the
953 whole line as normal code instead of comment.
954 3) Typing a '* in a comment-area fontifies the rest of the line as
956 (RS) Fixed for /* */ style comments which are now handled by grammar
957 only. * ; and %* ; are still broken since they can't be
958 specified by grammar.
961 Richard> I think of S-transcript-mode as identical to
962 Richard> inferior-S-mode except that the transmission is to the
963 Richard> same buffer in inferior-S-mode and to a different buffer
964 Richard> in transcript-mdoe. So I expect ^M (enter) to behave
965 Richard> normally for lines that begin with "> command" and "+
966 Richard> continuation".
968 Which is what my proposal does (send command, move to next prompt).
970 What needs to be modified is that currently, it moves to any next
971 prompt, including "+ ", rather than just to the next primary prompt --
972 it is smart enough to strip the "+ " as well from the whole command,
973 and collect the rest of the command line.
975 Richard> I haven't tried eval-region commands from either *S* or
976 Richard> from a filename.st. I think both ^C^N and ^C^R should
977 Richard> make sense and work if the region is valid input. Both
978 Richard> modes should strip leading ">" and "+" characters. I
979 Richard> think that a region which is a subset of a line, or which
980 Richard> doesn't begin with the standard prompt sequences, should
981 Richard> send it over literally.
983 So, C-c C-r would only send lines beginning with
984 inferior-ess-primary-prompt (up to the last consecutive
985 inferior-ess-secondary-prompt), strip off the prompt, and ignore lines
986 which do not begin with prompts. Does this sound correct
989 C-c C-n should be correct (comint-next-prompt).
992 I see. This is what the "help(\"%s\")\n" does.
994 Well, we have the following problem. The `new' interface to help()
997 help(topic, package = .package(), library = .lib.loc)
999 This allows you to get help on a topic (R object, ie fun or var or
1000 whatever else is documented) in a package without loading it, via
1002 help(topic, p = PKG)
1004 I've eliminated the help(data = ) part, but there may soon be
1005 another argument to search for keys ...
1007 If we want people to be able to use the extended forms, we can
1009 * use "help(%s)\n" for the format, which means they have to quote
1010 special things as they would need to from the command line
1012 * or do something smarter, such as
1013 quote only if object does not contain ","
1014 which appears to be the right thing.
1018 > How about this 3rd alternative?
1020 > C-c C-v works as usual
1021 > C-u C-c C-v prompts for the extra arguments (a "wizards
1024 > Completion will only work with the prompt for the command, and will be
1025 > turned off for the others?
1027 > If not, we'll go with the "right thing" (option 2).
1029 The alternative sounds good. We might still want to quote the help
1030 string in case it does not contain a `,', so that C-c C-v +
1031 continues to work ...
1033 * (RMH) His (Tom Cook's) sas-get-dataset is a very good idea and was
1034 not in my proposal. I would do it using the same mechanism that
1035 S-help uses to put the results of ?function into *help(function)*
1036 buffer. It is a relative of ess-dump-object-into-edit-buffer. The
1037 major difference is that there is no sense of editing the object and
1038 sending it back to S. It is also a relative of the display of a
1039 spred.frame, with the difference again that there is no sense of
1042 I like the switch-to-sas* functions. I would like to generalize
1043 them back to S. I think switch-to-S-source when entered from the
1044 *S* buffer should go to the filename.s that was the most recent
1045 sender of ^C^N or ^C^R.
1047 Here is cook's sas-mode-map and how it fits with my essd-sas.el
1049 "\C-c\C-i" 'indent-sas-statement) \t use recommended conventions
1050 "\C-c\C-a" 'beginning-of-sas-statement) use
1051 "\e\C-a" 'beginning-of-sas-proc) \M-\C-a
1052 "\e\C-e" 'next-sas-proc) \M-\C-e
1053 "\C-cs" 'switch-to-sas-source) use
1054 "\C-cS" 'switch-to-sas-source-other-window) use
1055 "\C-cg" 'switch-to-sas-log) use
1056 "\C-cG" 'switch-to-sas-log-other-window) use
1057 "\C-cl" 'switch-to-sas-lst) use
1058 "\C-cL" 'switch-to-sas-lst-other-window) use
1059 "\C-cr" 'run-sas-on-region) ^C^R
1060 "\C-c\C-l" 'submit-sas) ^C^B or ^C^L
1061 "\C-cd" 'sas-get-dataset) use
1062 "\C-c\C-c" 'switch-to-sas-process-buffer) ^C^Z or ^C^Y
1064 (RS) Can't comment on the S aspects, but you can now browse/edit a permanent
1065 SAS dataset (provided the library definition appears in autoexec.sas)
1068 * (AJR) REWRITE INFERIOR-ESS (AJR, for 5.1 series).
1070 * (RMH) Add explicit directions on installing or using dir for info.
1072 line 96 of pre5/Makefile included dir.
1073 dir does not appear in lastpre/Makefile.
1074 dir does not appear at all in the directory.
1075 You did include instructions on line 194 on editing dir.
1076 dir is needed for the info system to get ess into its menu.
1077 Please include the sample dir (below) and instructions on
1078 editing site-start.el.
1079 I have the following in my site-start.el
1081 (defun add-info-path (newpath)
1082 (setq Info-default-directory-list
1083 (cons (expand-file-name newpath)
1084 Info-default-directory-list)))
1086 (add-info-path "/disk05/local/teTeX/info/") ; stat dept
1087 (add-info-path "/disk05/local/emacs/S-mode/") ; stat dept
1088 (add-info-path "/disk05/local/info/") ; stat dept
1091 Here is my 5 line dir file from S-mode 4.8. It needs to be
1092 updated to 5.0. The first line is blank. I think the blank
1093 line is required, although it might be there only for
1094 appearance when the info menu comes up.
1097 File: dir Node: Top This is the top of the INFO tree
1098 * Menu: The list of major topics begins on the next line.
1099 * S-mode: (S-mode). S-mode Version 4.8
1102 This works correctly in Emacs 19.29. My memory says that when
1103 I was playing with XEmacs a few months ago, the add-info-path
1104 didn't work correctly in XEmacs. Only the first and last
1105 items on the Info-default-directory-list actually got
1108 * (RMH) >From here on is NOT for 5.0
1110 ess-create-object-name-db and ess-load-object-name-db-file
1111 1. e-load-* doesn't ding if not there. good
1112 2. I entered e-create-* manually and it did its job, creating
1114 in my home directory. Then I did a name completion and ESS
1115 redid the entire set of searching the directories.
1116 3. mv ess-s+3-namedb.el to ESS-5.0/
1117 4. Quit emacs and start over
1118 5. Then I did a name completion and ESS redid the
1119 entire set of searching the directories.
1120 6. Quit emacs and start over
1121 7. Manually M-: (ess-load-object-name-db-file)
1122 8. Then I did a name completion and ESS redid the
1123 entire set of searching the directories.
1125 * (RMH) buffer choice (questions for 5.1)
1126 I opened lots of simultaneous processes.
1129 XLS came up in the *R* buffer
1131 Tried it again. This time I C-c q() from *S4*.
1133 S+3:3 came up in *S4* buffer.
1135 This is obscure stuff. What really should happen?
1137 Problem in inferior-ess: logic states that if the current buffer is
1138 iESS or ESS-trans, and doesn't have an active process, use it,
1139 instead of creating a new buffer. (AJR).
1142 * iESS [S+3] 5.0? 5.1?
1143 'single quotes' are in regular font
1144 "double quotes" are in quote font
1145 This differs from ESS[S] mode in which both kinds of
1146 quotes are in quote font.
1148 Should be fixed in 5.0 if easy. Not obvious to me where
1149 the problem is. The identical S-syntax-table is in use
1150 in both iESS [S+3] and ESS[S]. The font-lock-keywords
1151 don't seem to me to be the problem.
1155 Dumped problem in S+3
1156 Here is an example of the Dumped font problem in S+3:
1158 > "trellis.settings" + "x + z + abcdefghij + klmnopqrstuv"
1159 Error in "trellis.settings" + "x + z + abcdefghij ..: Non-numeric first operand
1163 Note that the Error description from S+3 truncates the command and
1164 adds the ".." to indicate the truncation. Part of what gets
1165 truncated is the closing quotation mark. Hence everything from that
1166 point on is still inside the opening quotation mark. Everything
1167 includes the rest of the error description, the word "Dumped", the
1168 prompt on the next line, and all succeeding commands. I normally go
1169 back and edit the line by adding the closing quote in front of the
1175 I would love for iESS [S+3] to monitor the word "^Dumped" and make sure the
1176 font is back to regular.
1179 * On the Dumped ".. font problem
1180 I have an answer that I am uncomfortable with.
1182 Error in "trellis.settings" + "x + z + abcdefghij ..: Non-numeric
1187 a. Look for the pair "Error in" and "Dumped"
1188 b. Verify the number of uses of '"'.
1189 c. Insert an extra '"' if needed after the ".." and before the ":", thus
1190 Error in "trellis.settings" + "x + z + abcdefghij ..": Non-numeric
1193 My discomfort is that we are then modifying the output, not just
1196 * (BR) Scripts in S-PLUS 4.x provide quite similar functionality to
1197 the ESS front-end, and are worth investigating.
1199 * (Duncan Murdoch, on IDEs):
1201 I don't understand the details of what you're saying, but for an
1202 example of a very good IDE, you should look at Borland Delphi,
1203 version 3. It has some very nice features:
1205 - at any point, you can ask to see a list of legal identifiers to
1206 insert. These are presented in order from most to least local, so
1207 usually the one you want is near the top. The IDE knows enough
1208 about the syntax of the current line to only suggest things that
1209 would be legal there.
1210 - when you type a dot (more or less equivalent to $ in S), you're
1211 presented with a list of fields and methods for the object or record
1212 you're working with.
1213 - you can point at any identifier and hit a key for the help for that
1214 identifier. Because it's an object oriented system, there are often
1215 multiple different methods with the same name; the IDE picks the
1216 appropriate one by the context.
1218 Other unrelated things that Delphi does nicely which Splus would do
1221 - you can ask for a new object of a specific type, and it will insert
1222 appropriate skeleton code for it.
1223 - the object browser is quick and convenient to use! Of course, the
1224 objects in Delphi tend to be quite different from the objects in
1226 - it has lots of nice visual design tools for writing user interface
1229 * Bob_Dorazio@usgs.gov (Bob Dorazio) on IDEs:
1231 I have no experience with emacs, but in response to your question
1232 take a look at Watcom's IDE for C++. This IDE is the best I have
1233 ever seen! The source code editor is fantastic and the level of
1234 integration between the source code editor, the compiler, the
1235 debugger, and the utility for "building" executables or libraries
1236 surpasses that of any other IDE I have used.
1238 * From: Sandy Weisberg <sandy@stat.umn.edu>
1239 Subject: Re: ESS 5.1.14 supports ARC
1240 To: rossini@biostat.washington.edu
1241 Date: Thu, 6 Jul 2000 09:42:19 -0500 (CDT)
1243 The name of the program is Arc, capitalized because it is a proper name, but
1244 otherwise a normal English language word.
1248 > Thanks to Doug Bates' prodding, ESS 5.1.14 (Emacs Stat interface)
1249 > released an hour ago, works with ARC).
1251 > Should it be referred to by "ARC" or "Arc" (or?) in the ESS
1252 > documentation (which still needs to be written)?
1255 * From: Sven Garbade[SMTP:garbade@psy.uni-muenchen.de]
1256 Subject: Delete forward key
1258 I donĀ“t like it that the delete-forward key deletes backwards in
1259 ESS-mode. My default option is, delete-forward deletes forward, but
1260 ess-mode ignore this. Is there a simple way to change this?
1261 (RS) Put this line in your .emacs file after you have loaded ESS:
1262 (define-key ess-mode-map [delete] 'delete-char)
1264 * (RMH) Stata question: delimiter
1266 I noted that the command lines are duplicated. You might need
1267 (setq comint-process-echoes t)
1272 Date: Tue, 15 Jun 2004 01:11:33 -0400
1273 From: "Richard M. Heiberger" <rmh@temple.edu> Add To Address Book | This is Spam
1274 Subject: Re: change in ESS with edit() in R
1275 To: rossini@u.washington.edu
1276 Cc: Stephen Eglen <stephen@anc.ed.ac.uk>, ess-core@stat.math.ethz.ch
1280 I think Tony spotted the source of the problem. I think I did it.
1282 The goal in ess-iw32.el was to change the behavior of
1283 ess-eval-linewise and ess-eval-region to call the Windows S-Plus GUI
1284 through the DDE protocol. This was successful. I and others have used it daily
1285 for the past 6 years.
1287 I intended to restrict the change to the S-Plus
1288 GUI. My thinking at the moment is that I didn't do that restriction well enough.
1290 I get an emacs freeze in both R and Sqpe on Windows. An initial look at emacs
1291 variables makes me think that the "if" tests in ess-iw32.el for the substitute
1297 ess-dump-object-into-edit-buffer
1298 ess-display-help-on-object
1301 aren't precise enough to detect that R and Sqpe should not be sent to ddeclient.
1303 This note goes on the master "To DO" list. Do we have one?
1304 Taking it off the list is not a high priority for me because the work around of