Re: URL hacks for efs

Jared_Rhine@hmc.edu
Wed, 14 Dec 1994 07:58:02 -0500


s == sandy  <sandy@gandalf.sissa.it>

  Jens> Something that might also be useful would be a simple analogue of
  Jens> w3-follow-url-at-point for dired (say dired-ftp-path-at-point)
  Jens> which would do a dired on the emacs/efs/ange-ftp type expression
  Jens> of a ftp-location written in a buffer (eg inside a mail message
  Jens> say). This would save some copying and pasting.

  s> Doesn't there exist a follow file name at point package already?

I use ffap.el, and am quite pleased.  The functional interface is just
providing a prefix argument to C-x C-f.

;; ffap.el: $Modified: Mon Dec  6 15:02:59 1993 by mic $
;; find-file-at-point, interactive replacement for find-file
;; By: Michelangelo Grigni <mic@cs.ucsd.edu>

;; This package defines find-file-at-point (and dired-dir-at-point).
;; Without a prefix, these behave just like find-file and dired.  With
;; a prefix, they try to guess the default filename based on the text
;; around the point.
;; 
;; If you have loaded the ange-ftp package, the function will also
;; fetch and recognize common variants of remote filenames.
;; Assuming you usually use this function to connect to anonymous-ftp
;; archives, you should either have a detailed .netrc file or have
;; (setq ange-ftp-default-user "anonymous") in your ~/.emacs file.
;;
;; If you have loaded (or autoloaded) the w3 package of William Perry,
;; (see cs.indiana.edu:/pub/elisp/w3/README), the function will also
;; recognize and fetch URL's.
;;
;; If you use the hyperbole package, you probably do not need this
;; package.  On the other hand, this is much simpler.

;; Suggested .emacs contents:
;;  (require 'ffap)
;;  (global-set-key "\C-x\C-f" 'find-file-at-point)
;;  (global-set-key "\C-xd" 'dired-dir-at-point)

;; Some test examples (try find-file-at-point in this text):
;;    ~/.emacs, ffap.el, /usr/lib   -- find local files
;;    (load "ffap")                 -- try inside the quotes
;;    (require 'ffap)               -- similarly, in the symbol
;;    #include <stdio.h>            -- should work in c-mode, c++-mode
;; These need ange-ftp:
;;    cs.ucsd.edu                   -- in this case, does a "ping"
;;    cs.ucsd.edu:/pub              -- in other cases, no "ping" is done
;;    ftp.x.org:README              -- a nice recursive example
;;    ftp.x.org://README, /anonymous@ftp.x.org:/README -- synonyms
;; These URL's need w3:
;;    ftp://ftp.x.org:/README       -- another synonym
;;    http://cs.indiana.edu:80/elisp/w3/docs.html
;;    http://info.cern.ch:80/default.html 
;;    news:news.newusers.questions

;; Todo:
;;    make machine-p and remote-filename-p more robust, or eliminate
;;    comp.sources.unix/volume4/   --  go to an archive site?
;;    ftp://site:/path             -- bypass w3, convert to ange-ftp?
;;    dired-dir-at-point is nearly useless, delete it?
;;    if foo.bar.boz is not a file or machine, try as a newsgroup?
;;       could first check news-path, second pass to nntp.el
;;    handle <messageid>'s, using nntp.el
;;    for info files, search Info-directory (or Info-directory-list)

-- 
Jared_Rhine@hmc.edu | Harvey Mudd College | http://www.hmc.edu/~jared/home.html

"If you've always done it that way, it's probably wrong."
        -- attributed to Edward Kettering