* elisp: set-register
@ 2004-11-15 18:09 Dan Elliott
2004-11-15 19:06 ` Kevin Rodgers
2004-11-15 23:13 ` V. L. Simpson
0 siblings, 2 replies; 7+ messages in thread
From: Dan Elliott @ 2004-11-15 18:09 UTC (permalink / raw)
Hello,
I am having difficulty understanding the set-register function. When I try:
(set-register ?p (current-window-configuration))
in a function run by my .emacs file, it does not appear to work, nor does it
appear to cause an error.
I want to set the current window config to 'p'.
Am I going about this the wrong way?
Thank you,
dan elliott
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
2004-11-15 18:09 elisp: set-register Dan Elliott
@ 2004-11-15 19:06 ` Kevin Rodgers
2004-11-15 19:51 ` Dan Elliott
2004-11-15 23:13 ` V. L. Simpson
1 sibling, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2004-11-15 19:06 UTC (permalink / raw)
Dan Elliott wrote:
> I am having difficulty understanding the set-register function. When
I try:
> (set-register ?p (current-window-configuration))
>
> in a function run by my .emacs file, it does not appear to work, nor
does it
> appear to cause an error.
>
> I want to set the current window config to 'p'.
,----[ C-h k C-x r w ]
| C-x r w runs the command window-configuration-to-register
| which is an interactive compiled Lisp function in `register'.
| (window-configuration-to-register REGISTER &optional ARG)
|
| Store the window configuration of the selected frame in register REGISTER.
| Use C-x r j to restore the configuration.
| Argument is a character, naming the register.
`----
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
2004-11-15 19:06 ` Kevin Rodgers
@ 2004-11-15 19:51 ` Dan Elliott
2004-11-15 22:57 ` Kevin Rodgers
0 siblings, 1 reply; 7+ messages in thread
From: Dan Elliott @ 2004-11-15 19:51 UTC (permalink / raw)
"Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
news:2vsd2fF2p4vs9U1@uni-berlin.de...
> Dan Elliott wrote:
> > I am having difficulty understanding the set-register function. When
> I try:
> > (set-register ?p (current-window-configuration))
> >
> > in a function run by my .emacs file, it does not appear to work, nor
> does it
> > appear to cause an error.
> >
> > I want to set the current window config to 'p'.
>
> ,----[ C-h k C-x r w ]
> | C-x r w runs the command window-configuration-to-register
> | which is an interactive compiled Lisp function in `register'.
> | (window-configuration-to-register REGISTER &optional ARG)
> |
> | Store the window configuration of the selected frame in register
REGISTER.
> | Use C-x r j to restore the configuration.
> | Argument is a character, naming the register.
> `----
>
> --
> Kevin Rodgers
I apologize for being so ignorant, but how does one read the line:
(window-configuration-to-register REGISTER &optional ARG)?
This is quite confusing to me to have both REGISTER and ARG. Does ARG stand
for an input the method and REGISTER is the name of that input as used in
the function?
Thank you for the help, by the way.
- dan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
2004-11-15 19:51 ` Dan Elliott
@ 2004-11-15 22:57 ` Kevin Rodgers
2004-11-16 18:07 ` Dan Elliott
0 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2004-11-15 22:57 UTC (permalink / raw)
Dan Elliott wrote:
> "Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
> news:2vsd2fF2p4vs9U1@uni-berlin.de...
>>,----[ C-h k C-x r w ]
>>| C-x r w runs the command window-configuration-to-register
>>| which is an interactive compiled Lisp function in `register'.
>>| (window-configuration-to-register REGISTER &optional ARG)
>>|
>>| Store the window configuration of the selected frame in register
REGISTER.
>>| Use C-x r j to restore the configuration.
>>| Argument is a character, naming the register.
>>`----
>
> I apologize for being so ignorant, but how does one read the line:
> (window-configuration-to-register REGISTER &optional ARG)?
It means the function takes 1 required argument (REGISTER) and 1
optional argument (ARG).
> This is quite confusing to me to have both REGISTER and ARG. Does
ARG stand
> for an input the method and REGISTER is the name of that input as used in
> the function?
Indeed, the doc string does not explain ARG, nor do the Emacs and Emacs
Lisp manuals. But if you follow the link to the source, you can see
that it is bound to the raw prefix argument when called interactively
and then ignored.
So you probably just want: (window-configuration-to-register ?p)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
2004-11-15 22:57 ` Kevin Rodgers
@ 2004-11-16 18:07 ` Dan Elliott
0 siblings, 0 replies; 7+ messages in thread
From: Dan Elliott @ 2004-11-16 18:07 UTC (permalink / raw)
This did it, thank you.
"Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
news:2vsqi7F2puu99U1@uni-berlin.de...
> Dan Elliott wrote:
> > "Kevin Rodgers" <ihs_4664@yahoo.com> wrote in message
> > news:2vsd2fF2p4vs9U1@uni-berlin.de...
> >>,----[ C-h k C-x r w ]
> >>| C-x r w runs the command window-configuration-to-register
> >>| which is an interactive compiled Lisp function in `register'.
> >>| (window-configuration-to-register REGISTER &optional ARG)
> >>|
> >>| Store the window configuration of the selected frame in register
> REGISTER.
> >>| Use C-x r j to restore the configuration.
> >>| Argument is a character, naming the register.
> >>`----
> >
> > I apologize for being so ignorant, but how does one read the line:
> > (window-configuration-to-register REGISTER &optional ARG)?
>
> It means the function takes 1 required argument (REGISTER) and 1
> optional argument (ARG).
>
> > This is quite confusing to me to have both REGISTER and ARG. Does
> ARG stand
> > for an input the method and REGISTER is the name of that input as used
in
> > the function?
>
> Indeed, the doc string does not explain ARG, nor do the Emacs and Emacs
> Lisp manuals. But if you follow the link to the source, you can see
> that it is bound to the raw prefix argument when called interactively
> and then ignored.
>
> So you probably just want: (window-configuration-to-register ?p)
>
> --
> Kevin Rodgers
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
2004-11-15 18:09 elisp: set-register Dan Elliott
2004-11-15 19:06 ` Kevin Rodgers
@ 2004-11-15 23:13 ` V. L. Simpson
1 sibling, 0 replies; 7+ messages in thread
From: V. L. Simpson @ 2004-11-15 23:13 UTC (permalink / raw)
>>>>> "Dan" == Dan Elliott <dan_elliott_at_cox_dot_net@noSpam.org> writes:
> Hello, I am having difficulty understanding the
> set-register function. When I try: (set-register ?p
> (current-window-configuration))
> in a function run by my .emacs file, it does not appear to
> work, nor does it appear to cause an error.
After playing around I came up with this:
(set-register ?p
(list (current-window-configuration) (point)))
'set-register' wants a list: the window config and a buffer
position
'C-h v register-alist' for some other values you can pass along to
set-register.
Good question. I've been wanting to do something with
set-register myself but never futzed with it until now.
vls
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: elisp: set-register
@ 2004-11-16 5:58 Joe Corneli
0 siblings, 0 replies; 7+ messages in thread
From: Joe Corneli @ 2004-11-16 5:58 UTC (permalink / raw)
You could use (string-to-char "p") to figure out what REGISTER to
use. Referring to the source, it doesn't appear that ARG is
actually used in the function `window-configuration-to-register', so
for that argument just use nil (or nothing, since it is optional).
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-11-16 18:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 18:09 elisp: set-register Dan Elliott
2004-11-15 19:06 ` Kevin Rodgers
2004-11-15 19:51 ` Dan Elliott
2004-11-15 22:57 ` Kevin Rodgers
2004-11-16 18:07 ` Dan Elliott
2004-11-15 23:13 ` V. L. Simpson
-- strict thread matches above, loose matches on Subject: below --
2004-11-16 5:58 Joe Corneli
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.