xwem-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XWEM]: Re: Fun with frames


From: Zajcev Evgeny
Subject: Re: [XWEM]: Re: Fun with frames
Date: Tue, 11 May 2004 11:18:30 +0400
User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.5 (celery, berkeley-unix)

Steve Youngs <address@hidden> writes:

> * Zajcev Evgeny <address@hidden> writes:
>
[...]
>   >   NOTE:
>
>   >   After today commit, which i will performe in few hours, really big
>   >   commit which even changes core things in xwem a little, so will need
>   >   testing, it will be possible to write something like:
>
>   >     (define-xwem-command my-xwem-switch-frame (name)
>   >       "Switch to xwem frame named by NAME."
>   >       (xwem-interactive (list (xwem-completing-read "XWEM Frame: "
>   >                                 (mapcar (lambda (f) (list 
> (xwem-frame-name f)))
>   >                                    xwem-frames-list))))
>       
>   >       (let ((frame (xwem-frame-find 'name name)))
>   >          (when (xwem-frame-p frame)
>   >             (xwem-frame-select frame))))
>
> This works great.  Consider it tested. :-)
>

Only one problem is that there no frame names unification, i.e.  if
you have two frames named 'default' this stuff will take first frame
named 'default'.

>   > Hehe, your investigations really great!, do you dig in code :)?  
>
> Yes.  I may not always understand it, but that doesn't stop me. :-)
>
>   >  *XWEM FRAMES*:
>
>   >    General function to create frames is `xwem-make-frame-1'.  It takes
>   >    all arguments needed to change any parameter of xwem frame at
>   >    creation time.  Arguments are:
>      
>   >      o EMBEDDED-P - non-nil if creating embedded frame, i.e. which is
>   >        frame and client at the same time.
>
> I'm not sure I understand the concept of a "embedded" frame.  Would
> the initial XEmacs/xwem frame be an embedded frame?  Can you give me
> an example?

Embedded frame looks like that(really old screenshot, but concept is
shown) - http://lgarc.narod.ru/xwem/xwem-frames.png.

Frame marked [5] at the right-bottom is embedded frame it is handled
as normal client in [4]'s frame window.

To create embedded frame try `H-u H-x 5 5'

>
>   >      o PARAMS     - frame's parameters.  List in form '(:token1 val1
>   >        :token2 val2 ..  ), where token is one of:
>   >            :name - Frame's name.
>   >            :state - Frame's state.
>   >            ... others not really used.
>
> (xwem-make-frame-1 nil (list :name "foo"))
>
> Perfect!
>
>   >      o PROPS      - frame's properties, plist, known keys are:
>   >            'inner-border-width
>   >            'otter-border-width
>   >            'title-height
>   >            'title-thickness
>
> Can different frames have different border/title colours?

Actually yes, but there no really user interface for this, you can
install `xwem-frame-creation-hook' to change params, but I'm not sure
it will work.

> [...]
>
>   >       H-x 5 n         xwem-frame-set-name
>   >        This answers question about renaming frame without accesing
>   >        XEmacs frame.
>
> Thank you very much.  Just what I was looking for.  And in fact I
> found it earlier today with `H-x 5 H-h'.
>
>   >  *XWEM WINDOWS*:
>
>   >      Expectance is special window mark, which is used to manage
>   >      particular clients in this window.  For example you want to start
>   >      xterm application but do not want to manage it in current
>   >      window.  So you install expectance in some other window and just
>   >      start xterm.  xwem will catch xterm application, find window
>   >      which has xterm expectance installed in manage xterm in this
>   >      window.  If no such window found - manage xterm in current
>   >      window.
>
> Sounds like it could be quite useful.
>
>   >      To show how expectances works, just try: H-o r xterm RET
>
> Or lazy people (or people who can't spell "xterm") could do 
> `H-o H-a x'  :-)

Great!  I did not know abouth this :)

>
>   >   Here is windows oriented keyboard bindings:
>
> The thing that I've noticed, and really appreciate is that a lot of
> the xwem key bindings mimic the equivalent XEmacs bindings, just use
> hyper instead of meta or control.  I have found learning the xwem key
> bindings to be quite easy because of this.  I just think "if I wanted
> to do this in ordinary XEmacs what would I do... `C-x 2', lets try
> `H-x 2'."

Yes, i tried to keep XEmacses way of binding default keybindings, so
XEmacs users can start with xwem on intuitive manner.  And there no
need to overload memory with new keybindings :)

>
>   >   Here also support for window configurations.  i.e.  if using
>   >   `xwem-register' addon, here is bindings to work with window
>   >   configurations:
>
> I have never done anything with XEmacs registers, so maybe this'll
> prompt me into learning.

For me registers are pretty usefull, I use them everyday when doing
editing in XEmacs, and quite often in xwem(esp H-x /), but not that
often as in XEmacs.

[... win expectances ...]
>   >  *XWEM CLIENTS*:
>
>   >   xwem client is normal X application, such as xterm, xclock, etc.
>   >   They manages according to entries in manage database.
>
> Is it possible to alter the entries in the manage database?  I can't
> think of a reason to do so, but you never know. :-)

Yes, there no need to change it, but sometimes it is usefull add new
ones, for example xwem-special, xwem-rooter do it this way.

>
>   >    H-x r <cmd> RET - very generic way to create new client.
>
> This is what I do the vast majority of the time.
>
>   >    Once you started some applcation you can use H-x 7 2 - run copy
>   >    command.  This will examine current client and try to run another
>   >    instance of this application, f.i.:
>
>   >       H-x r xterm RET .. wait client mapping .. H-x 7 2
>
> Is there any benefit to doing that rather than just starting another
> instance of the app with `H-x r' ?

A little benefit.  For example you run application with some
parameters, like 'xterm -fg orange -bg black' or just want another
intance of program which you run much time ago and dont remember how
you have run it.

>
>   >    When some client already managed, and you have lost where it was
>   >    managed, but remeber its name, you can try using `H-x 7 p' - this
>   >    command will find where client managed and switch to its frame,
>   >    window, and client, so it is one of fastest way to find losted
>   >    client.
>
> Hey, that's a nice command.  I'll be using that one a lot.
>
>   >    xwem client can be marked, just like you can mark position in
>   >    XEmacs buffer.  H-@ - mark current client.  Then you can switch to
>   >    last marked client using H-u address@hidden
>
> I've found that it is handy to have the main XEmacs window
> marked... no matter where I am, I can always get back to it.  A
> question though, how do I unmark a client?

:)) oh, not binded by default, so - H-M-x xwem-client-unset-mark RET

>
>   >    If using xwem-register addon.  You can push client to some register
>   >    H-x / <reg> - push current client to register <REG>, then using
>   >    H-x j <reg> - pop to client in <REG>.
>
> What is "<reg>"?  Is it a character, a string, an integer, a symbol,
> or something else?

It is a character, so pressing `H-x / p' or `H-x / H-p' will not
differ, because only 'p' character considered.

[...about help subsystem]

>
> It's much less of a fight these days. :-)

Great!  How do you think when it will be possible to start with xwem
for ordinary XEmacs users? :)

-- 
lg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]