From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Carlos Pita Newsgroups: gmane.emacs.bugs Subject: bug#37826: Very annoying autoraise client/server behavior with -t option Date: Mon, 21 Oct 2019 17:14:32 -0300 Message-ID: References: <83tv84540m.fsf@gnu.org> <83v9si2y9u.fsf@gnu.org> <83a79u2oih.fsf@gnu.org> <83y2xe12ut.fsf@gnu.org> <83r23610oc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000009ba4f4059571551f" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="34844"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Juanma Barranquero , 37826@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 22:15:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMe58-0008to-Vt for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 22:15:11 +0200 Original-Received: from localhost ([::1]:47508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMe57-0002up-RA for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 16:15:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38021) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMe51-0002ui-CV for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 16:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMe4z-0001V8-Th for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 16:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49074) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMe4z-0001V1-QP for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 16:15:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMe4z-0006Fm-KV for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 16:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carlos Pita Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 20:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37826 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37826-submit@debbugs.gnu.org id=B37826.157168889324008 (code B ref 37826); Mon, 21 Oct 2019 20:15:01 +0000 Original-Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 20:14:53 +0000 Original-Received: from localhost ([127.0.0.1]:57895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMe4q-0006FA-QF for submit@debbugs.gnu.org; Mon, 21 Oct 2019 16:14:53 -0400 Original-Received: from mail-yw1-f68.google.com ([209.85.161.68]:44145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMe4p-0006Ev-6A for 37826@debbugs.gnu.org; Mon, 21 Oct 2019 16:14:51 -0400 Original-Received: by mail-yw1-f68.google.com with SMTP id m13so5364115ywa.11 for <37826@debbugs.gnu.org>; Mon, 21 Oct 2019 13:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U/t7k/GzTnTcZF7MZ+ZiuSXepeKOQv/+fsEtt/lM6nI=; b=EaM5Z0mYSjXXePRXaV01t6on6Du9VT6qU4fGpN4jxzwNmrTpSwQSYIT5/NPNnnu4YF tvmyPpOuDhjsj8WtKLw7xkAgjKPZrp37FzwTrXOH1uIUDpTEcNJ4DERymFyPeZidNvSK SQJaN0m3M0Dgdrv//bILOZbW6tjH1I2Xq1m5nJWt6V0zk8F1pDGZAxCAN1QfeC9FQDZn 8dGNSvA0jA3mWIWbp1TQAduP3n3UQzOMpWAjCBcFcP/3KzoNup+H2nYM2HphLV6Zq1hO 7OLlFKHezunwo/7Il++v01SDncosGsOURJk5WoEeC/0k+JV6S16ujk83HWAjFKF5CST2 NJ1Q== 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=U/t7k/GzTnTcZF7MZ+ZiuSXepeKOQv/+fsEtt/lM6nI=; b=SHvb6ELsjIiA8HnRMvvBI20hDxMEwNonjR2cyd4hwEMN/OU1mY51YS+E+92uyBgyxs skVihdCzifNiN0JHU+ut3mSMZrSsoRiJ6EbvqFXMaJAPfsCOBrgGikTSt3eAiI2V6VC5 8lUaxX9NSfqOL60WfMxDwTq2bb1n+v3D6sBw2HZGRsU4dbZ3b6vJh6QOw475Voj11Oi7 Czz8MqexOZruNB0sll5GCu+fsjIB81mqPzIkJ/gKcWw/yTtw8/zusG5HdTuqEXtmOIZY 7zerueyzShGqvj1EoqJ9KkhQa9rmLzFJj+dpT22HmVsrbmy7pbvrJkkniroYWZdJf03S bffQ== X-Gm-Message-State: APjAAAWwCWq4aGOqUeCuVQJQt2uimaeQciWepJ2cyNEvCtr40vPjuAWr FHPIs34Z1GOXZP/jBD2JhEgKPuA4A/A/A+LXi/Q= X-Google-Smtp-Source: APXvYqxUoestiMo7K9jVXFnP2cOyfnpoK+/t1icB/WSGlk9KpjtzGcnC1gp0ihDdqFkFRy44mTl8Mh4d0M7GppKYJN8= X-Received: by 2002:a81:254e:: with SMTP id l75mr529013ywl.90.1571688883645; Mon, 21 Oct 2019 13:14:43 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:169945 Archived-At: --0000000000009ba4f4059571551f Content-Type: text/plain; charset="UTF-8" > 1. Perhaps I'd have preferred to advice only around > find-file-noselect, but this would probably require using a global > variable to pass delayed messages from server-visit-files to > server-execute. Thus I wrapped the entire server-visit-files call and > keep the messages local to server-execute. Regarding this point I've changed my mind after more carefully inspecting server-visit-files. There are many hooks involved that might run arbitrary code and therefore show messages. We're pretty confident that any code requiring interaction will work anyway and all delayed messages are going to be shown afterwards, so even disregarding the global variable argument above, I still prefer the version wrapping the entire call to server-visit-files to a more selective one. > 2. Also I'd have liked that the mock message function returned the > formatted message (since it's part of the interface) but there are > some corner cases (nil, non-string, empty first parameter) that force > me to replicate much of the actual implementation (Fmessage), which I > dislike. I've addressed this point in the less sketchy patch I'm attaching, it was simpler than I'd though, I believe I'm covering all input cases. If you prefer to do minor reviews online, this is the commit in my fork of your mirror https://github.com/memeplex/emacs/commit/9d53e50848d9d8be758a21d0b5e078f82af25754. I could create a PR also, just for the sake of reviewing, but it seems like individual commits are also commentable (until my next forced push deletes all comments, at least :). Btw, here is another noisy case: when visiting a new file you get a "(New file)" message. --0000000000009ba4f4059571551f Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Avoid-auto-raising-minibufer-before-new-frame-is-cre.patch" Content-Disposition: attachment; filename="0001-Avoid-auto-raising-minibufer-before-new-frame-is-cre.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xheSBtZXNzYWdlcyB0byBhdm9pZCBhdXRvIHJhaXNpbmcg ZnJhbWUgKEJ1ZyMzNzgyNikuCisgICAgICAgICAgICAgICAobWVzc2FnZXMgbmlsKQorICAgICAg ICAgICAgICAgKGRlbGF5IChsYW1iZGEgKF8gZm10ICZyZXN0IGFyZ3MpCisgICAgICAgICAgICAg ICAgICAgICAgICAobGV0ICgobXNnIChhbmQgZm10IChhcHBseSAjJ2Zvcm1hdC1tZXNzYWdlIGZt dCBhcmdzKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FyIChwdXNoIG1zZyBtZXNz YWdlcykpKSkpCisgICAgICAgICAgICAgICAoYnVmZmVycyAodW53aW5kLXByb3RlY3QKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChhZHZpY2UtYWRkICMnbWVzc2FnZSA6YXJvdW5kIGRlbGF5KQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHNlcnZlci12aXNpdC1maWxlcyBmaWxlcyBwcm9jIG5vd2FpdCkpCisg ICAgICAgICAgICAgICAgICAgICAgICAgIChhZHZpY2UtcmVtb3ZlICMnbWVzc2FnZSBkZWxheSkp KQogICAgICAgICAgICAgICAgOzsgSWYgd2Ugd2VyZSB0b2xkIG9ubHkgdG8gb3BlbiBhIG5ldyBj bGllbnQsIG9iZXkKICAgICAgICAgICAgICAgIDs7IGBpbml0aWFsLWJ1ZmZlci1jaG9pY2UnIGlm IGl0IHNwZWNpZmllcyBhIGZpbGUKICAgICAgICAgICAgICAgIDs7IG9yIGEgZnVuY3Rpb24uCkBA IC0xMzI1LDYgKzEzMzQsMTAgQEAgc2VydmVyLWV4ZWN1dGUKICAgICAgICAgICAgICAgICAgICAg ICAgICAgOzsgU3dpdGNoIHRvIGluaXRpYWwgYnVmZmVyIGluIGNhc2UgdGhlIGZyYW1lIHdhcyBy ZXVzZWQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVuIGluaXRpYWwtYnVmZmVyCiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN3aXRjaC10by1idWZmZXIgaW5pdGlhbC1idWZm ZXIgJ25vcmVjb3JkKSkpKSkpCisgICAgICAgICAgOzsgU2hvdyBhbGwgZGVsYXllZCBtZXNzYWdl cyBpbiB0aGUgbmV3IGZyYW1lIChpZiBhbnkpLgorICAgICAgICAgICh3aXRoLXNlbGVjdGVkLWZy YW1lIChvciBmcmFtZSAoc2VsZWN0ZWQtZnJhbWUpKQorICAgICAgICAgICAgKGRvbGlzdCAobXNn IChucmV2ZXJzZSBtZXNzYWdlcykpCisgICAgICAgICAgICAgIChtZXNzYWdlIG1zZykpKQogCiAg ICAgICAgICAgKG1hcGMgIydmdW5jYWxsIChucmV2ZXJzZSBjb21tYW5kcykpCiAKLS0gCjIuMjAu MQoK --0000000000009ba4f4059571551f--