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

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

RE: "grouping" buffers


From: Drew Adams
Subject: RE: "grouping" buffers
Date: Sun, 31 May 2020 03:49:09 +0000 (UTC)

> The utilities for manipulating frames and buffers within frames
> are extremely limited.  There does not seem to be a way to "name" a
> given frame, 

In `frame-cmds.el' you have command `rename-frame'.  Doc:

 Rename a frame named OLD-NAME to NEW-NAME.
 Prefix arg non-nil means rename all frames named OLD-NAME to NEWNAME.
 OLD-NAME may be a frame, its name, or nil.  Default is `selected-frame'.
 NEW-NAME is a string or nil.  Default NEW-NAME is current `buffer-name'.

The code is about 7 lines long.  Ultimately it uses
standard function `modify-frame-parameters'.

> or to call a frame to the front for example, like I'd call
> a buffer to the front. 

By "call to the front", do you mean select the frame,
giving it focus?  That's standard command `select-frame' or
`select-frame-by-name' (or function `select-frame-set-focus').

Or do you mean change its z-order value (bring it
forward)?  That's standard command `raise-frame'.

(Use `i frame z-order' in the Elisp manual.  That takes
you to node `Raising, Lowering and Restacking Frames'.)

> On macos ... I can access the name of a given frame,

Function `get-frame-name' from library `frame-fns.el'.
Essentially (cdr (assq 'name (frame-parameters frame)).

Many of the functions and commands in `frame-fns.el'
and `frame-cmds.el' have simple, short, definitions.

> I change its name, 

`rename-frame' - see above.

> I can call it to the front or to the back, I can modify its
> contents, I can rearrange the size and placement of each frame, etc.

Dunno what you mean by modify its contents.

But repositioning and resizing aren't hard.
`frame-cmds.el' has several commands for such things,
including incremental movement (e.g. `move-frame-up)
and incremental resizing (e.g. `enlarge-frame').

The latter is just this:
(set-frame-height frame (+ (frame-height frame) increment))

> I can't work on "buffers" because the concept does not exist, but I
> think you see what I mean.

No, I'm not sure I do.

> I can't seem to be able to do that in emacs for emacs frames.

Most frame changes are done ultimately with
`modify-frame-parameters'.  The Elisp manual is
pretty good on this subject.  Start with node
`Frames'.
___

https://www.emacswiki.org/emacs/download/frame-cmds.el

https://www.emacswiki.org/emacs/download/frame-fns.el




reply via email to

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