help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: launch a program in an arbitrary frame


From: Vaidheeswaran C
Subject: Re: launch a program in an arbitrary frame
Date: Sat, 18 Jul 2015 09:42:52 +0530
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.3.0

On Saturday 18 July 2015 08:51 AM, Hikaru Ichijyo wrote:
> A newbie question (getting more hooked on Emacs):
> 
> I often run ERC to connect to IM services via a local Bitlbee daemon.
> It works best running in its own frame, so I know when people are
> talking to me without having to flip through all my buffers.  (A window
> doesn't seem to be sufficient, since Gnus keeps changing the window
> layout to its Summary/Article split, and the only way I've found to deal
> with that is to keep programs whose layout I care about in separate
> frames.)
> 
> Anyway, it's redundant to have to manually put ERC in its own frame
> every time I launch it.
> 
> I have somethink like this bound to a key:
> 
>   (erc :server "localhost")
> 
> Some programs have the ability to launch in a new frame built into them,
> but shouldn't you be able to do that with almost any program?  If I
> wanted to run the above in an 80x24 frame at a particular X coordinate,
> how would I say that in Elisp?
>

I don't use erc or frames.  But this is how I would go about exploring
more on the topic.

----------------------------------------------------------------

Did you try #emacs on irc.freenode.net?  They are likely to have a
ready solution for you.

    http://www.emacswiki.org/emacs?ErcBasics

----------------------------------------------------------------

    M-x load-library erc
    M-x apropos erc frame

I get

    Type RET on a type label to view its full documentation.

    erc-frame-alist
      User option: Alist of frame parameters for creating erc frames.
      Properties: standard-value custom-type custom-requests
                  variable-documentation
    erc-frame-dedicated-flag
      User option: Non-nil means the erc frames are dedicated to that
                   buffer.
      Properties: standard-value custom-type custom-requests
                  variable-documentation
    erc-reuse-frames
      User option: Determines whether new frames are always created.
      Properties: standard-value custom-type custom-requests
                  variable-documentation
    supercite-frames
      Properties: custom-loads

----------------------------------------------------------------

1. Create a new frame.
2. Open erc there.

Or use the following which more or less does the same thing.


    (defun erc-other-frame (&optional server)
      (interactive (list "irc.freenode.net"))
      (switch-to-buffer-other-frame (erc :server server)))

M-x erc-other-frame

----------------------------------------------------------------

Once you have hand-adjusted the new frame, get it's configuration.

If you do

    M-x pp-eval-expression RET (current-frame-configuration) RET

it tells you about your current frame.  You may want to steal top,
left, width, height and name parameters.

----------------------------------------------------------------

Once you have obtained the configuration, plug those values in to erc
frame alist.

----------------------------------------------------------------

You can also experiment with what are called framesets.  Try doing
what these nodes tell you

    C-h k C-x r f
    C-h K C-x r f

(Note the case of letter `k')

----------------------------------------------------------------



reply via email to

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