🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #9571

Re: minibuffer questions

#9571
From: Joe Wells
Date: Sat, 10 Feb 1990 23:05
23 lines
1363 bytes
In article <1998@osc.COM> jgk@osc.COM (Joe Keane) writes:
   I have two questions about using read-from-minibuffer in my Emacs Lisp
   routines.  First, is there any way to specify where to put the point in
   the minibuffer?  It always starts at the end of the default response,
   which is not what i want.

Try something like this:

(defun minibuffer-adjust-point-kludge ()
  (interactive)
  (goto-char minibuffer-point)
  (define-key minibuffer-local-map "\C-a" nil))

(let ((minibuffer-local-map minibuffer-local-map)
      (unread-command-char ?\C-a)
      (minibuffer-point 5))
  (define-key minibuffer-local-map "\C-a" 'minibuffer-adjust-point-kludge)
  (read-from-minibuffer "Prompt: " "initial contents"))

-- 
Joe Wells <jbw@bu.edu>
jbw%bucsf.bu.edu@bu-it.bu.edu
...!harvard!bu-cs!bucsf!jbw
Technical Details
Message-ID: <JBW.90Feb10180553@bucsf.bu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!yale!mintaka!bloom-beacon!bu.edu!bu-cs!nntp-read!jbw
References: <186@nimbus3.UUCP> <1990Feb5.022103.3394@ddsw1.MCS.COM> <1998@osc.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!yale!mintaka!bloom-beacon!bu.edu!bu-cs!nntp-read!jbw
From: jbw@bucsf.bu.edu (Joe Wells)
Newsgroups: comp.emacs
Subject: Re: minibuffer questions
Message-ID: <JBW.90Feb10180553@bucsf.bu.edu>
Date: 10 Feb 90 23:05:53 GMT
References: <186@nimbus3.UUCP> <1990Feb5.022103.3394@ddsw1.MCS.COM>
 <1998@osc.COM>
Sender: news@bu.edu.bu.edu
Organization: Boston University Computer Science Department
Lines: 23
In-reply-to: jgk@osc.COM's message of 6 Feb 90 01:09:04 GMT