🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188849

Re: How to yank into a string variable

#188849
From: Earl Stutes
Date: Mon, 17 Jun 1991 19:41
35 lines
2179 bytes
In article <1991Jun14.182614.23627@uai.com>, mrl@uai.com (Mark R. Ludwig) writes:
|> In article <fredb.676836751@uther>, fredb@uther (Fred H. Bremmer) writes:
|> >mathys@dover.sps.mot.com (Yves Mathys) writes:
|> >
|> >>I would like to read a region and save it into a string variable. 
|> >
|> >Once you have the region in the kill ring, use the command M-x set-variable,
|> >tell it which variable you want to set, then use C-y to plug in the value
|> >that you want the variable to have.
|> 
|> That's right if you want to do it from the keyboard.  If you want to
|> do it in an ELisp program, the function you want buffer-substring.$$
|> -- 
This may be another approach to the problem that might be of interest to you.
^H apropos register
append-to-register	      
  Function: Append region to text in register REG.
copy-rectangle-to-register    
  Function: Copy rectangular region into register REG.
copy-to-register	      C-x x
  Function: Copy region into register REG.
insert-register		      C-x g
  Function: Insert contents of register REG.  REG is a character.
point-to-register	      C-x /
  Function: Store current location of point in a register.
prepend-to-register	      
  Function: Prepend region to text in register REG.
register-to-point	      C-x j
  Function: Move point to location stored in a register.
view-register		      
  Function: Display what is contained in register named REGISTER.

Register names are single CHARS. and any elisp code needs to be aware of that!

-eas-
Technical Details
Message-ID: <4408@jethro.Corp.Sun.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!elroy.jpl.nasa.gov!lll-winken!sun-barr!newstop!jethro!wonderer!estutes
References: <1031@nddsun1.sps.mot.com> <fredb.676836751@uther> <1991Jun14.182614.23627@uai.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,b5296808d1547c71
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-06-17 22:14:32 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!elroy.jpl.nasa.gov!lll-winken!sun-barr!newstop!jethro!wonderer!estutes
From: estutes@wonderer.Objy.COM (Earl Stutes)
Newsgroups: gnu.emacs.help
Subject: Re: How to yank into a string variable
Message-ID: <4408@jethro.Corp.Sun.COM>
Date: 17 Jun 91 19:41:07 GMT
References: <1031@nddsun1.sps.mot.com> <fredb.676836751@uther> <1991Jun14.182614.23627@uai.com>
Sender: news@jethro.Corp.Sun.COM
Reply-To: estutes@Corp.Sun.Com
Lines: 35