From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#43645: 26.3; emacsclient -c does not open to correct window Date: Tue, 29 Sep 2020 16:09:42 +0200 Message-ID: <87zh58d68p.fsf@gnus.org> References: <87r1qmujmn.fsf@gnus.org> <837dsem2yv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1097"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: bluetrack121@gmail.com, 43645@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 29 16:13:46 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNGO1-00008U-FK for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 16:13:45 +0200 Original-Received: from localhost ([::1]:50472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNGO0-0003ZA-Hv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Sep 2020 10:13:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNGKQ-00070T-Vz for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 10:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNGKQ-0005hG-Jz for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 10:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNGKQ-0000fL-DJ for bug-gnu-emacs@gnu.org; Tue, 29 Sep 2020 10:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Sep 2020 14:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43645 X-GNU-PR-Package: emacs Original-Received: via spool by 43645-submit@debbugs.gnu.org id=B43645.16013885982545 (code B ref 43645); Tue, 29 Sep 2020 14:10:02 +0000 Original-Received: (at 43645) by debbugs.gnu.org; 29 Sep 2020 14:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:56781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNGKM-0000ez-FA for submit@debbugs.gnu.org; Tue, 29 Sep 2020 10:09:58 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:34166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNGKK-0000em-8l for 43645@debbugs.gnu.org; Tue, 29 Sep 2020 10:09:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iiHzdIHaB9nC20bVcN4xFQ2uOVLhABxnGqrleUAhaMQ=; b=kSIyVtHgr4bqkZDsw2rjW+xY1f XXiCxLnVZfTkOj5jlOYBqk9POedaS2UjuY5Z179U4exHw5pDiONv3RZMheixKQksfxw60Jrx7RQ5d socYT8saDGCWsNBoJMbabzLa8z40I/GG+0X+++S9pHZZxjpxjcpfCYPpmZDcbLTqzXYs=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNGK7-0007bt-BK; Tue, 29 Sep 2020 16:09:49 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXqrHHxuHeOV0n/ //+Q3bmOAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJHQ4HBdvXUUUAAAGoSURBVCjPPZLBiqNAEIZ/ g+7Bkz2k95DTZmFA+ylM0CXkpFIVlj3NceJTyBBhN8cFL3OKgtBTT7mlMFsnv67+q/+qEoHlV3ti Yg0EzG3fWraWCkTMrhebByYsoVnpxJxFxMAypxDTrqAZv5HDklmvAWm5QKFAwBWf1wi/M/sJFUQO VUE1L5lucmyMLbQAPY0K23qpxJddJjIcw+6Pan7FqZP5OHnRTBtnTsajf6zQevk7M9eFPpq+Zu59 4LUfztLs+3lgyqEF5tTH7QCNAKTgnH1YtYjL8OKdZ2yBGMQvcv9YvT+pt6v4fc0UBzsYvqbiS27k 8g6KFMSy8z/uKDd7Jx2T807Au771oNiJwjYWeaBx2raAdC4dINMC0LPbZuq/LpAo+HPf7P7DiTar plIYOXdverZCRNhXIrN6FenzmeJJkvUdLZD7eNROF+mu/nJzt1q9KXDjklGnY8O7ilx/7LkArIrG jGLLBodV9Gw8K5Ss65FTMxoqAVL4qBrdumqarchev0qbABWn6U9mu2iQcxQlukZDtc40jL6FupHl R9IwSBAWRRL+A9HYwN1lk68TAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA5LTI5VDE0OjA3OjA1 KzAwOjAwNsraCAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOS0yOVQxNDowNzowNSswMDowMEeX YrQAAAAASUVORK5CYII= X-Now-Playing: 23 Skidoo's _Seven Songs_: "Mary's Operation" In-Reply-To: (martin rudalics's message of "Mon, 28 Sep 2020 17:02:13 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189255 Archived-At: martin rudalics writes: >>> - (let ((win (get-buffer-window next-buffer 0))) >>> + (let ((win (get-buffer-window next-buffer))) >>> (if (and win (not server-window)) >>> ;; The buffer is already displayed: just reuse the >>> ;; window. If FILEPOS is non-nil, use it to replace the >>> >> >> Martin, any comments on this? > > Wouldn't the "0" make sense when invoking emacsclient without an option > like -c or -t? IIUC, in that case we should try to reuse some existing > visible or iconified window. But ... I never use emacsclient. Hm, yes... The behavioural change would be if you already have two frames open, with the buffer showing in a window on frame A, but frame B currently has focus, then "emacsclient test.txt" would pop up that buffer in frame B, too. So the 0 should be there in the "emacsclient test.txt" case, but not in the "emacsclient -c test.txt" (and -t) cases. I'll see if I can come up with a fix... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no