From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Javier Newsgroups: gmane.emacs.help Subject: Re: How to get the new frame? Date: Thu, 23 Jul 2015 09:01:43 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1437642354 13367 80.91.229.3 (23 Jul 2015 09:05:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jul 2015 09:05:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 23 11:05:54 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZICRu-0004WM-3w for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2015 11:05:54 +0200 Original-Received: from localhost ([::1]:40087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZICRt-00043A-GM for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jul 2015 05:05:53 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: 6vJ9bD1ekW8t4acxAcHFJw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.18.6-1-ARCH (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:213641 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105927 Archived-At: Javier wrote: > Ian Zimmerman wrote: >> Is there a neat way in Lisp code to get at the frame which >> find-file-other-frame just has created? > > (defun other-frame-dec () "" (interactive) (other-frame '+1)) > (defun other-frame-inc () "" (interactive) (other-frame '-1)) > > I think the function other-frame-inc would just do what you want > (change to the freshly created frame) > > Emacs labels the frames as F1, F2, F3... and it just increases the > number each time you create a frame (if you delete an old frame F2, > its number does not get reused, emacs just keeps increasing the number > in the label: F10, F11... ). Ups, sorry. No, I was wrong, it would change to the newly created frame only in the case that one is in the highest number frame. To change to newly created frame in the general case one needs to see which is the frame with the highest number.