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

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

Re: Frame numbering


From: Javier
Subject: Re: Frame numbering
Date: Sun, 20 Apr 2014 08:18:00 +0000 (UTC)
User-agent: tin/2.2.0-20131224 ("Lochindaal") (UNIX) (Linux/3.13.6-1-ARCH (x86_64))

I navigate frames like in screen, but don't access them by number.
I just press Shit+Left/Right arrow to move between them.

;; navigate frames with Shift + arrows
(defun other-frame-dec () "" (interactive) (other-frame '+1))
(defun other-frame-inc () "" (interactive) (other-frame '-1))
(global-set-key [S-left] 'other-frame-dec)
(global-set-key [S-right] 'other-frame-inc)

;;Some usefuld keybindings for dealing with frames:
(global-set-key [f4] 'delete-frame)  ;originally bound to call-kbd-macro (also 
accessible with C-x e)
(global-set-key [C-f4] 'delete-frame)
; Kill frames instead of hiding them by pressing q (completition buffers, ...)
(setq frame-auto-hide-function 'delete-frame)


Joshua Studen <address@hidden> wrote:
> Number 1 is what I do now, it's just a lot a bit of a slow-down to have to
> do it multiple times if I have multiple frames.
> 
> #2 is very close. The ONLY issue is that I use emacs both via GUI locally
> and on a remote machine, I do emacs --daemon.  When I leave the remote
> session, and come back and create a new Emacs client, the frame numbers do
> NOT start back at F1,
> 
> I need a combination of your #2 and the suggested M-x set-frame-name. Maybe
> next emacs, there will be a way to set a frame name :).
> 
> Thanks, all.
> 
> 
> On Fri, Apr 18, 2014 at 9:07 PM, Drew Adams <address@hidden> wrote:
> 
>> > Is there an easy way to have numbered frames in Emacs? I guess, I'd like
>> to
>> > setup my environment similar to what screen/tmux offer. I've found
>> > elscreen, but after using it for a while, I find it more of a distraction
>> > rather than an aid.
>> >
>> > Like with Tmux or screen, I can do C-b (or C-a) and then a number and it
>> > will switch to that screen/tmux pane. I think it COULD be possible with
>> > Emacs, but I don't know how to do it.
>> >
>> > Any advice or suggestions?
>>
>> This might be some help, though it does not seem to be exactly what you
>> are requesting.
>>
>> 1. `C-x 5 o' cycles among the available frames.  This is true even if you
>> use Emacs in a terminal (i.e., without a graphic display) - see the Emacs
>> manual, node `Non-Window Terminals'.
>>
>> 2. Command `select-frame-by-name' raises and selects a frame by name,
>> providing completion.  Again, this works also without a graphic display.
>> Frame names in a terminal are simple by default: FN1, FN2, etc.
>> Bind the command to a key, e.g., `C-a' as you suggested.  Then
>> `C-a TAB 3' takes you to frame FN3.
>>


reply via email to

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