From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eliza Velasquez via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#25547: 25.1.91; emacsclient -c creates frames on the wrong display Date: Wed, 4 Nov 2020 18:00:14 -0800 Message-ID: References: Reply-To: Eliza Velasquez Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37578"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25547@debbugs.gnu.org, Alex Hutcheson To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 05 03:01:21 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 1kaUaV-0009dn-8Y for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 03:01:19 +0100 Original-Received: from localhost ([::1]:54438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaUaT-0005d6-NA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 21:01:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaUaE-0005cy-SA for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2020 21:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaUaE-0004p9-I7 for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2020 21:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kaUaE-0006St-GF for bug-gnu-emacs@gnu.org; Wed, 04 Nov 2020 21:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eliza Velasquez Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2020 02:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25547 X-GNU-PR-Package: emacs Original-Received: via spool by 25547-submit@debbugs.gnu.org id=B25547.160454163424805 (code B ref 25547); Thu, 05 Nov 2020 02:01:02 +0000 Original-Received: (at 25547) by debbugs.gnu.org; 5 Nov 2020 02:00:34 +0000 Original-Received: from localhost ([127.0.0.1]:51160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaUZm-0006S0-1Q for submit@debbugs.gnu.org; Wed, 04 Nov 2020 21:00:34 -0500 Original-Received: from mail-il1-f179.google.com ([209.85.166.179]:39511) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaUZi-0006Rn-TW for 25547@debbugs.gnu.org; Wed, 04 Nov 2020 21:00:32 -0500 Original-Received: by mail-il1-f179.google.com with SMTP id q1so245549ilt.6 for <25547@debbugs.gnu.org>; Wed, 04 Nov 2020 18:00:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G/4wzl1YlWmFmD/xuxezS3YMG0MGZiFylc/JPqRiG+g=; b=lREqJ/kM55XR1lRQS4iFghFEEfIKJB+GIcZalrQq9p75Jc93vPpgpWZnof/oWN7nML O9lsgA2o2m2CrtYR5CpA1/soZNtWosHZOIKHOzYHYTJdz4yQet4gDZsiELJG71E1QoSM 9weNeZYeKyehYGMOdCT+kWrBRe3S3sQniYBOdKd/KVE0YFJ4vpS2AJg097II9Ok1b6Po wOhdyRgLItRvIAku7UFyCwdNQRGUP6c+2JFhVQqPPvkm8vrH2hK6J2KjwqBIbhAWBbXh xSt3KXKRNiP55f03+Qtz1q6z2Xy1k5nWAMOeDLR/UuBXKgXGSQqJE3+WyVfQRuQb6I1I yk9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G/4wzl1YlWmFmD/xuxezS3YMG0MGZiFylc/JPqRiG+g=; b=ZELilljr9jBwnWO3oD9UvkgQJqVvigDYS65Td9TXMbF3ZGL1qF01VM7acLGdhlZHX0 phcEy7AR36kbB5ismm3E23xKI+t63IkNDAOmFu1lPN4pI4lLQm1sFp1MKuzGJdRseQWs UVYdSAN9lCmvFGzbBTgxJ220e/BaBChf4FMa4JnK1n0fDtY+9U/Fu3gyimulMxQOs8qh uJDLtPPakXrl6wsn9uhqULMIIiJ3y+eKVskHU3AJqerP5cWfasrgxeWO3+z68xd//Ze4 vbdLmM4GJxQk7Ka9cIypmgLC0sxXc1+hXgPalRhWJwUtNi7ocFX4KvwmODqjZO7VZy9n On4w== X-Gm-Message-State: AOAM532S/S9cXsoCbWNuZM71ZiKkm18tez+3BPaYhP+7ocr7AHRpU7PD kaW2l3qwuru7tb+KokzWR66oEG1WeheaewjzcS/o0A== X-Google-Smtp-Source: ABdhPJwctFguPzNxkCOfzGs3hk3pgy4/75gppyklsSxO+IIvrGXzMxDiAF/KLgUttzLnWyhW18DaEnD+hCN22vDWGn0= X-Received: by 2002:a92:ddc6:: with SMTP id d6mr227319ilr.99.1604541624991; Wed, 04 Nov 2020 18:00:24 -0800 (PST) In-Reply-To: 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:192696 Archived-At: It looks like I was able to make progress today. Just by modifying server.el, I've gotten `emacsclient -ce "..."` to create a new frame based on the currently selected frame's terminal when called in a dumb terminal. Unfortunately, the command for calling ediff is still very unpleasant: emacsclient -ucF "((delete-frame-on-ediff-quit . t))" \ -e "(ediff-merge-with-ancestor \"${local}\" \"${other}\" \"${base}\" nil \"${output}\")" \ -e "(add-hook 'ediff-quit-hook (lambda () (when (frame-parameter nil 'delete-frame-on-ediff-quit) (delete-frame))))" So perhaps introducing a wrapper script for ediff merges would still be useful. It's getting late today, so tomorrow morning I'll look into how to actually submit this as a patch. On Tue, Nov 3, 2020 at 10:36 AM Eliza Velasquez wrote: > > Okay, I'll try to work on this today and see if I can get anywhere with it. > > On Mon, Nov 2, 2020 at 4:56 PM Stefan Monnier wrote: > > > > > This seems like it might be tricky to solve properly. My guess from > > > looking at the emacsclient source is that a new option would be > > > required in order to maintain backwards compatibility, maybe something > > > like `--smart-create-frame` or `-C`, which would behave as in the > > > expected behavior of the bug report. > > > > Maybe we don't need a special option: we should be able to detect this > > situation when `-c` is passed from an emacsclient running in a "dumb > > tty". > > > > IOW it might be a simple matter of tweaking server.el for the case where > > `tty-type` is `dumb` and the `selected-frame` is a non-GUI frame, in > > which case we'll just want to create a new tty frame in the same > > terminal as that of the `selected-frame`. > > > > > > Stefan > >