From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: henry atting Newsgroups: gmane.emacs.help Subject: Re: two windows switch buffer Date: Sat, 18 Jan 2014 18:07:52 +0100 Organization: LiteraturLateNight Message-ID: <87eh45z09j.fsf@bye.fritz.box> References: <87a9et611s.fsf@bye.fritz.box> <66752281-c034-4962-a08d-e24a2f7a9aab@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390065011 27680 80.91.229.3 (18 Jan 2014 17:10:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jan 2014 17:10:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 18 18:10:19 2014 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 1W4ZPV-0004sJ-RS for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jan 2014 18:10:17 +0100 Original-Received: from localhost ([::1]:43740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4ZPV-0004uE-3q for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jan 2014 12:10:17 -0500 X-Received: by 10.112.219.71 with SMTP id pm7mr1348502lbc.23.1390064891102; Sat, 18 Jan 2014 09:08:11 -0800 (PST) Original-Path: usenet.stanford.edu!hk7no4843481wib.1!news-out.google.com!o10ni542wia.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: port-92-195-38-15.dynamic.qsc.de Original-X-Trace: online.de 1390064890 32674 92.195.38.15 (18 Jan 2014 17:08:10 GMT) Original-X-Complaints-To: abuse@einsundeins.com Original-NNTP-Posting-Date: Sat, 18 Jan 2014 17:08:10 +0000 (UTC) Cancel-Lock: sha1:I7UetZr6Hu9cp7yH3YTfXlStwb4= Original-Xref: usenet.stanford.edu gnu.emacs.help:203212 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:95481 Archived-At: > (defun my-find-file-delete-other-windows () > "" > (interactive) > (prog1 > (call-interactively 'find-file) > (delete-other-windows))) Thanks! I changed it slightly (defun my-buffer-switch () "" (interactive) (prog1 (call-interactively 'switch-to-buffer) (delete-other-windows))) When I want my two windows back I think I have to use register which you already pointed out. Unfortunately I do not like register, I will not use it. Thanks anyway!