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: Thu, 5 Nov 2020 15:41:08 -0800 Message-ID: References: Reply-To: Eliza Velasquez Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000ff64ab05b364a1a4" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23473"; 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 Fri Nov 06 00:42:28 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 1kaotg-0005yr-4y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Nov 2020 00:42:28 +0100 Original-Received: from localhost ([::1]:34156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaotd-000724-3J for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Nov 2020 18:42:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaotG-00071l-O0 for bug-gnu-emacs@gnu.org; Thu, 05 Nov 2020 18:42:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaotG-0005Bi-6H for bug-gnu-emacs@gnu.org; Thu, 05 Nov 2020 18:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kaotG-0008Ch-2x for bug-gnu-emacs@gnu.org; Thu, 05 Nov 2020 18:42: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 23:42: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.160461968731491 (code B ref 25547); Thu, 05 Nov 2020 23:42:02 +0000 Original-Received: (at 25547) by debbugs.gnu.org; 5 Nov 2020 23:41:27 +0000 Original-Received: from localhost ([127.0.0.1]:54495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaosg-0008Bq-OY for submit@debbugs.gnu.org; Thu, 05 Nov 2020 18:41:26 -0500 Original-Received: from mail-il1-f180.google.com ([209.85.166.180]:33831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaosf-0008Be-BQ for 25547@debbugs.gnu.org; Thu, 05 Nov 2020 18:41:25 -0500 Original-Received: by mail-il1-f180.google.com with SMTP id p2so2986762ilg.1 for <25547@debbugs.gnu.org>; Thu, 05 Nov 2020 15:41:25 -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=eJpVhSZ5+IUh/jNWIxc7EoAofQgXNuwSWAlZws9iMCo=; b=nIgDa8NUakhL4FUDcR5gfyRvHRisFvNhh2VOeQdQyDynX3EtQJmw5SSPa/jRzY6sXp 6nfeeuJxxEm5fvuboRYxog8dw/rHVB+njWCBqqObOWIEvD+GgYsgi3XVmCb3NTee442d gEnnTVEpdchaYd1ucqpKFM86OLa7sPhG9bfcLSMGsyGSwL2x/7DVjP/FGW03d/Cj4+PF nwPnkM9QBDVSXgBQCeyDkXyRSXVf2WNbBZNgXSa6yLGCFbMXBctGRCH8u143hWGXfSXw nOaPzs8uDvLlRcsAcaFMBkQuF9nsnVEnZIOA0k6YAKzFOMplRiPe2ARIbkVzOSBAbZhc H7CA== 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=eJpVhSZ5+IUh/jNWIxc7EoAofQgXNuwSWAlZws9iMCo=; b=NdiKKsrPij26y7yBUt4H+mK/rKz0R2xaYlzYecDI02LTsNxF/Nr+qCIYHlKHzOlb+a gBSSwBqIQOYGEXjiM+sGpoQl0gUGS2Zu0d9RbPsaixNapSRTT0gTL+i4AaqqWOlzgdkk Pw04g1kblm7fq2T6cV41qzd5FWdxK94Dm+kE9XROF1+tfLjGOv9zQBM+zx1Ept9t63fO UM8ouGr1VQuQfpaVR2lTuAHO/y+mxQeFFVT7NLUuLdWLhUfYGDxW1iKFN6IwzATg7QMw OhI/EkZAEnpEtvxFFFJCLe4ogXKi2vKqaSpVM8J6KGkMyy1kyHMfkTS9zWtLAZo5kTqp PrDQ== X-Gm-Message-State: AOAM533DRcI8W7xSAzZtqk3gtczZXfR8jRfd2Pwki0exXDXOYaip7qkE wJSDjtFbcHBWGMor9PW9IwvJSxuvwuU9+ixofphG0w== X-Google-Smtp-Source: ABdhPJypVqJ0AgSYXbELASuDIF57tMEwzBjfVbWKHwptqCsPaHJDDLunTpNbddnUSeZxiaG0ymq7TIpwnH1Wx9gN7PI= X-Received: by 2002:a92:7c04:: with SMTP id x4mr3772246ilc.36.1604619679481; Thu, 05 Nov 2020 15:41:19 -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:192761 Archived-At: --000000000000ff64ab05b364a1a4 Content-Type: text/plain; charset="UTF-8" Oops, forgot to reply all on my last message. Attached is the patch. On Wed, Nov 4, 2020 at 8:44 PM Stefan Monnier wrote: > > > 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. > > Great! > > > 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))))" > > I think the problem is that emacsclient lacks the equivalent of `-f`, > i.e. calling a particular ELisp function where the remaining arguments > can be consumed by that function. That would solve the problem of > quoting (your above script will stumble when encountering > a file name with quotes in it or with a final backslash). > > > So perhaps introducing a wrapper script for ediff merges would still be useful. > > We should be able to add a convenience `batch-ediff-merge-with-ancestor`. > Bonus points if you manage to make it work with `emacs --batch -f` as > well as with `emacsclient --`. > > > Stefan > --000000000000ff64ab05b364a1a4 Content-Type: application/octet-stream; name="25547.patch" Content-Disposition: attachment; filename="25547.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kh5h44gy0 ZGlmZiAtLWdpdCBhL2xpc3Avc2VydmVyLmVsIGIvbGlzcC9zZXJ2ZXIuZWwKaW5kZXggYTY2MGRl YWI4ZS4uYjZkMDEzNmQ1MSAxMDA2NDQKLS0tIGEvbGlzcC9zZXJ2ZXIuZWwKKysrIGIvbGlzcC9z ZXJ2ZXIuZWw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