[ESS] file completion anyone has it working? - yes

Jean Eid jeaneid at chass.utoronto.ca
Thu Feb 3 14:53:57 CET 2005


Hi Martin,

here I think is the relevant part of ess-inf.el for file name completion
after quotes: it starts on line 2076 of ess-inf.el


(defun ess-complete-filename nil
  ;; Do file completion only within strings, or when the ! call is being
used
  (if (comint-within-quotes
       (1- (process-mark (get-buffer-process (current-buffer)))) (point))
      ;; (- comint-last-input-start 1) (point))	 <- from S4 modeadds.
      ;; changed on 4/12/96 (dxsun)
      ;; This is sensible, but makes it hard to use history refs
      ;; (or
      ;;  (save-excursion
      ;;    (goto-char comint-last-input-start)
      ;;    (looking-at "\\s-*!"))
      ;;  (comint-within-quotes comint-last-input-start (point)))
      (progn
	(comint-replace-by-expanded-filename)
	;; always return t if in a string
	t)))




Jean,

On Thu, 3 Feb 2005, Martin Maechler wrote:

> >>>>> "Sebastian" == Sebastian Luque <sluque at mun.ca>
> >>>>>     on Wed, 02 Feb 2005 22:16:38 -0600 writes:
>
>     Sebastian> On Wed, 2 Feb 2005 11:55:45 -0500, Jean Eid
>     Sebastian> <jeaneid at chass.utoronto.ca> wrote: [...]
>
>     JeanE> i.e does esc-tab , or tab after quotes work for anyone??
>
>
>     Sebastian> I recently upgraded to ess 5.2.5 and noticed that
>     Sebastian> object name completion slowed down considerably
>     Sebastian> (compared to 5.2.3, my previous version)
>
> for R or S-plus ?
> For S-plus, it had to be slowed to in order to work (before, it
> only *seemed* to work, but the list of object names often was
> very incomplete.
> The  milliseconds spent "sleep"ing when the completion list is
> computed for S-plus shouldn't be spent at all when using R.
>
>     Sebastian> and file name completion is not working for me
>     Sebastian> either on GNU Emacs 21.3.1 (i386-pc-linux-gnu, X
>     Sebastian> toolkit, Xaw3d scroll bars) of 2004-10-16 on
>     Sebastian> raven, modified by Debian.
>
> can you be more specific?
>
> E.g. in a *R*  buffer, for me {with Liunx; same GNU emacs},
>
>   - object name completion works on [Tab]   whereas
>   - file   name completion works on M-[Tab] always,
>     and also works on [Tab] in obvious situtations, e.g.,
>     when trying to complete "/usr/" or "/home/"
>
> in a *.R buffer,
>
>   - [Tab]     is for indentation
>   - M-[Tab]   is for file name completion
> 	       {as in *R* --> use M-[Tab] for file names "always"}
>   - C-c [Tab] is for object name completion
>
> in the mini buffer, it depends on the context,
> [Tab] should always be used for the obvious.
> (e.g. object name completion after
> C-c C-v (help) or C-c C-d (dump object)
>
> ----------
>
> Jean also mentioned file name completion  ``after quotes''.
> Eehhm, ... I hadn't known about this at all and never made use
> of this.  So I assume this did work in older versions of ESS?
> [ Was it *documented* to work anywhere? ]
>
> Martin
>




More information about the ESS-help mailing list