From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8911: bs-cycle-next deletes window in some cases. Date: Mon, 27 Jun 2011 16:01:12 +0200 Message-ID: References: <4E009EB0.1050903@gmx.at> <181538AC4C8B4765A99060E0425B9AB5@us.oracle.com> <9170F33E41584E0B8D96DD5EFC84599E@us.oracle.com> <8E864413162C4814BE8EFFD0C1FA1989@us.oracle.com> <4E06FBF8.9040205@gmx.at> <4E082AA8.3010807@gmx.at> <4E087B9B.8070608@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1309187159 8057 80.91.229.12 (27 Jun 2011 15:05:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2011 15:05:59 +0000 (UTC) Cc: 8911@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 27 17:05:51 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QbDNm-0007Zi-6y for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2011 17:05:50 +0200 Original-Received: from localhost ([::1]:46663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbDNk-00082O-L9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jun 2011 11:05:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:43206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbCO7-0007p6-Aw for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 10:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbCO4-0000Ng-Pz for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 10:02:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbCO4-0000NZ-Bk for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2011 10:02:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QbCO2-0005Hr-Tk; Mon, 27 Jun 2011 10:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2011 14:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8911 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8911-submit@debbugs.gnu.org id=B8911.130918332020315 (code B ref 8911); Mon, 27 Jun 2011 14:02:02 +0000 Original-Received: (at 8911) by debbugs.gnu.org; 27 Jun 2011 14:02:00 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbCO0-0005Hc-AD for submit@debbugs.gnu.org; Mon, 27 Jun 2011 10:02:00 -0400 Original-Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QbCNx-0005HP-Pr for 8911@debbugs.gnu.org; Mon, 27 Jun 2011 10:01:58 -0400 Original-Received: by qwc23 with SMTP id 23so2342368qwc.3 for <8911@debbugs.gnu.org>; Mon, 27 Jun 2011 07:01:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=ic/RuHp5d+mtAupFcEAIKiXy4FQVShvBOqMD3TCojOw=; b=fdLsq62LBtd6aacGC0suLjqUUbaTn/8+UgS4zct0NvwbLrbk7CfFLZ7B0H+8WMOFZP MKgOp7p0F9ZbHk76ww/iJUSjcS7SbVAo36jvi6hqNPKTwhVWsfVVcLdaC6UzTmOBZNLz gWY3MsD5YmvDq2GbtXnJP/ikkBCRDXfE/7da8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Ei439qNS9kl4dod3FUgjcvj8HvYfpCMC786GXaGIZ/haYMC8rahxrQXWp4qrbhnCBT dJ/tkANaL2AOKLuxV9l2wlrR3E3Bt46PBl8AJE8ey+bKtdEmbD4cstx9V1GYGj3fx5he Dm+3y/qhEkPR3RBxQCUGLqAt/Pmuicdqmgc18= Original-Received: by 10.229.63.229 with SMTP id c37mr4700031qci.212.1309183312083; Mon, 27 Jun 2011 07:01:52 -0700 (PDT) Original-Received: by 10.229.40.131 with HTTP; Mon, 27 Jun 2011 07:01:12 -0700 (PDT) In-Reply-To: <4E087B9B.8070608@gmx.at> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 27 Jun 2011 10:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47534 Archived-At: On Mon, Jun 27, 2011 at 14:46, martin rudalics wrote: > If the user wants to change the default behavior, yes. Ah. Current documentation for display-buffer-alist is less than clear to me= . > I'm not sure whether we want to do that. Well, I'm not sure whether *we* want, either, but I'm definitely sure I want (locally, I mean). > If so, there are two ways. > Either, in `bs-cycle-next' write something like: > > =C2=A0(if (and (window-dedicated-p) (not (eq (window-buffer) next))) > =C2=A0 =C2=A0 =C2=A0(error "Selected window is dedicated to its buffer") > =C2=A0 =C2=A0(display-buffer-same-window next)) > > which gives the user no choice wrt what to do when the selected window > is dedicated I supose this is a no-no. > or write > > (defun reuse-same-window-unless-dedicated (buffer &rest args) > =C2=A0"..." > =C2=A0(if (and (window-dedicated-p) (not (eq (window-buffer) next))) > =C2=A0 =C2=A0 =C2=A0(error "Selected window is dedicated to its buffer") > =C2=A0 =C2=A0(display-buffer-same-window buffer))) > > (display-buffer > =C2=A0next '((fun-with-args reuse-same-window-unless-dedicated)) 'bs-cycl= e-next) > > and allow the user to specify her own deviant behavior when the selected > window is dedicated. I don't follow you. reuse-same-window-unless-dedicated is throwing an error unconditionally. How would the user specifiy her own behavior? =C2=A0 =C2=A0 Juanma