home *** CD-ROM | disk | FTP | other *** search
-
- >>Is there a way to load files from the directory that
- >>emacs was started from, without, in general, having to type the
- >>whole leading path name?
- >
- >I'm not a lucid expert, so I can't answer your question directly, but one
- >suggestion I can make is to use unix links. I frequently visit our site's
- >
-
- this is another suggestion rather than a solution. i used to use this
- occasionally in emacs18.59 and haven't tried in in lemacs.
-
- and i know it's ugly, but it works more or less ...
- --psb
-
- (message "MINIBUFFER behaviour: special char inserts") (sit-for T)
- (define-key minibuffer-local-completion-map "~" 'minibuffer-insert-home-dir)
- (define-key minibuffer-local-completion-map "$" 'minibuffer-insert-mail-spool)
- (define-key minibuffer-local-completion-map ";" 'minibuffer-insert-lisp-dir)
- (define-key minibuffer-local-completion-map "\\" 'minibuffer-insert-TeX-dir)
- (define-key minibuffer-local-completion-map "!" 'minibuffer-insert-src-dir)
- (define-key minibuffer-local-completion-map "+" 'minibuffer-insert-Academics)
- (define-key minibuffer-local-completion-map "=" 'minibuffer-insert-News)
-
- ;; idea from: Denis Howe <dbh@doc.ic.ac.uk> H558A Imperial College London
- ;; Whenever you hit ~ in the minibuffer it clears the current contents
- ;; and inserts ~/ . If you want a real ~ you can use C-q ~ of course.
- ;; (obviates need for find-file-from-home/el-directory --psb)
- (defun minibuffer-insert-home-dir ()
- "Replace the minibuffer contents with \"~/\"."
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "~/"))
-
- ;; some copy-cat functions
- (defun minibuffer-insert-mail-spool ()
- "Replace the minibuffer contents with $mail.
- \(actually, hardcoded, replace with \(getenv $mail\)\) etc."
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "/usr/spool/mail/psb"))
-
- (defun minibuffer-insert-lisp-dir ()
- "Replace the minibuffer contents with $emacslispdir."
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "~/emacs/el/"))
-
- (defun minibuffer-insert-TeX-dir ()
- "mini-buffer hack"
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "~/TeX/"))
-
- (defun minibuffer-insert-src-dir ()
- "mini-buffer hack"
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "/usr3/src/"))
-
- (defun minibuffer-insert-Academics ()
- "mini-buffer hack"
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "~/Academics/"))
-
- (defun minibuffer-insert-News ()
- "mini-buffer hack"
- (interactive)
- (beginning-of-line)
- (or (eobp) (kill-line))
- (insert "~/News/"))
-
-
-