Excerpts from mail: (02-Mar-99) rcp.el 1.48: name change, defaults change by Kai 
Grossjohann
> And I made that big name change which was already hinted at in the
> naming of this mailing list: I moved from rssh.el to rcp.el. This is
> because RMS said he won't be able to include something in Emacs which
> works with non-free software. Therefore, I changed this from ssh/scp to
> rsh/rcp (but haven't tested that!) -- you will have to twiddle the
> variables to get it to use ssh/scp again.

Boo hiss, regarding the name change. rssh.el has a certain allure that rcp.el
just doesn't have. I agree that the defaults should be for rsh and rcp
because of what RMS said, but I don't see the name change as particularly
warranted.

I heard a rumor that someone was working on GPL'ed version of ssh? Anyone
have details?

> Please feel free to flame me for the naming change, and for the
> rsh change :-)

See above. :-)

Dare I mention that the "/s:" prefix doesn't really relate to the new name,
rcp.el, at all? (No, I am *not* advocating changing it to "/r:" or "/rcp:"!)

On an unrelated topic, does anyone here use complete.el (which comes with
Emacs 19.3x and higher, I think) to be able to `find-file' on file names like
"*.[ch]"? I do this *all* the time, so I implemented a replacement for
`PC-expand-many-files' that works with rssh files and allows complete.el to
work transparently with rssh.el/rcp.el. The thing is I'm not sure what to do
with it. `file-name-handler-alist' won't allow me to override
`PC-expand-many-files' since it's not an I/O primitive. I was thinking about
using `defadvice', but I'm not exactly savvy when it comes to advice.el and
my meager attempts at doing so have failed. Any suggestions? Kai, would you
be interested in including something like this in rcp.el?

(defun rssh-handle-expand-many-files (name)
  "Like `PC-expand-many-files' but also for rssh files."
  ;; If NAME is not an rssh file, run the real handler.
  (if (not (rssh-rssh-file-p name))
      (PC-expand-many-files name)
    (if (or (string-match "\\*" name)
            (string-match "\\?" name)
            (string-match "\\[.*\\]" name))
        ;; Dissect NAME.
        (let* ((v (rssh-dissect-file-name name))
               (user (rssh-file-name-user v))
               (host (rssh-file-name-host v))
               (path (rssh-file-name-path v))
               (comint-file-name-quote-list (set-difference
                                             rssh-file-name-quote-list
                                             '(?\* ?\? ?[ ?])))
               bufstr)
          ;; you'll need to change "echo %s" to "/bin/csh -fc \"echo %s\""
          ;; if your remote shell is sh or if your ksh doesn't support
          ;; glob expansion
          (rssh-send-command user host (format "echo %s" path))
          (rssh-wait-for-output)
          (setq bufstr (buffer-substring (point-min)
                                         (progn (end-of-line) (point))))
          (goto-char (point-min))
          (if (string-equal path bufstr)
              nil
            (insert "(\"")
            (while (search-forward " " nil t)
              (delete-backward-char 1)
              (insert "\" \""))
            (goto-char (point-max))
            (delete-backward-char 1)
            (insert "\")")
            (goto-char (point-min))
            (mapcar
             (function (lambda (x)
                         (rssh-make-rssh-file-name user host x)))
             (read (current-buffer)))))
      (list (rssh-handle-expand-file-name name)))))

Reply via email to