From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lin Sun via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65346: 30.0.50; *lisp/net/eww.el: new function 'eww-open-in-new-buffer-background' Date: Thu, 17 Aug 2023 22:51:04 +0000 Message-ID: References: <1181651021.466162.1581309285621.ref@mail.yahoo.com> <1181651021.466162.1581309285621@mail.yahoo.com> <83350i6rcy.fsf@gnu.org> Reply-To: Lin Sun Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000e5a32e0603263faa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65346@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 18 00:52:22 2023 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 1qWlqn-0002nJ-42 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Aug 2023 00:52:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWlqW-0004Sv-0Z; Thu, 17 Aug 2023 18:52:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWlqU-0004Sm-VN for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 18:52:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWlqU-0000J6-Ms for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 18:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWlqU-00027e-Cx for bug-gnu-emacs@gnu.org; Thu, 17 Aug 2023 18:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Aug 2023 22:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65346 X-GNU-PR-Package: emacs Original-Received: via spool by 65346-submit@debbugs.gnu.org id=B65346.16923126928119 (code B ref 65346); Thu, 17 Aug 2023 22:52:02 +0000 Original-Received: (at 65346) by debbugs.gnu.org; 17 Aug 2023 22:51:32 +0000 Original-Received: from localhost ([127.0.0.1]:45719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWlpz-00026t-T7 for submit@debbugs.gnu.org; Thu, 17 Aug 2023 18:51:32 -0400 Original-Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:41277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWlpt-00026Z-Ni for 65346@debbugs.gnu.org; Thu, 17 Aug 2023 18:51:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1692312678; bh=NVln2Z8xlA7rBZhdrzEM60dcC6jycxDqXAVlIxAe5G4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From:Subject:Reply-To; b=YaY87QdnHowwTxYkr2ML7wmXQJp+JRGGc9ffVCe42Qx13qk135vwqYfLqRc9oS0vKMghYybIZhoKwyOiB3JJymsrOayUg4kgliUXQsDS8crvheFOrlyOdrAARUH2NkMxw48gMYah103UDh65mE/0ndp+uMfLXnBi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4qUnhKIp4NO1Aa.sCkeWMow0b5qwosXThp0OItA4mMjphMwc5i4OGpBcp9XECbPlWc 91gzq.yfzXYcF2ARIawPsLAHVVK59wxsPmn7_OCTPaf2UWWae8hMJx4mbnxSJ1eAMhvfqDWeMqJH Jruh6tlpyvGjr24AMPhn.Eefl43yaTjAZwE4b5glQvNKyGh4uFW_6mdwzo9cfoaaHOzuNUSDgcAh G0OxMmKie4wuPtIi5jdxW7uLkwWVlI9cvM5U9FTecTBldAt5CQiO.srjmdh6VrwjFBO_M0dTPk7t zY_j5.OQHBlQOgHi.yO6dRvJskGTaNQ4Lh640yJK074_nVbS4PDND7Asn.YJkLo.fGKEiAMBUHDL WZb0eJNWiof5XVs7FMtXfJqij1bAIxGU.DFdjslDSM1l6WazTTdpNMEuD8r.eemYo7R_Ns3_q5rF yKzWr_J3.ffdMOKNz_qNst8Oc8ysXL64wYyst1s7Ts X-Sonic-MF: X-Sonic-ID: d372471b-babd-4546-a5e2-391e87b19283 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 17 Aug 2023 22:51:18 +0000 Original-Received: by hermes--production-ir2-5cc57b9c45-xh7tc (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ffd50233cf2550ab3d1b8e0d70a8f4de; Thu, 17 Aug 2023 22:51:17 +0000 (UTC) Original-Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5257e2b5d12so331255a12.2 for <65346@debbugs.gnu.org>; Thu, 17 Aug 2023 15:51:17 -0700 (PDT) X-Gm-Message-State: AOJu0Yy5c4E4BEH5CN4X+dEO6f9qb7RQpmTBQi4qQIpqClnKceC8DJgt ugj6veMlLS9jOWEXj9GTJJVjyWoAkydF24UP+d4= X-Google-Smtp-Source: AGHT+IGPbkRPmVxItTmHllJcIpPG3RUpHAJTZXUVigxHwW6/feJkPoMjgwSIWqjkPyAyzoAOPHjztVNYJxhuN1HGmxk= X-Received: by 2002:a17:906:5a50:b0:99c:7301:4d69 with SMTP id my16-20020a1709065a5000b0099c73014d69mr579770ejc.20.1692312675899; Thu, 17 Aug 2023 15:51:15 -0700 (PDT) In-Reply-To: <83350i6rcy.fsf@gnu.org> X-Gmail-Original-Message-ID: X-Mailer: WebService/1.1.21732 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267697 Archived-At: --000000000000e5a32e0603263faa Content-Type: text/plain; charset="UTF-8" Hi Eli, > "Background" is a problematic word for this, since that's not what you > mean: you mean not to select the window displaying the URL. > > And I don't think we need a separate command for that: how about doing > this in eww-open-in-new-buffer instead, if the user invokes it with a > prefix argument C-u? > > And finally, what happens if the following condition, tested by > eww-open-in-new-buffer, is fulfilled: > > (when (or (eq eww-browse-url-new-window-is-tab t) > (and (eq eww-browse-url-new-window-is-tab 'tab-bar) > tab-bar-mode)) > > In this case, AFAIU the URL is opened in a new tab. Thank you for the comment, and agree with you, so I rewrote the function `eww-open-in-new-buffer' with "C-u" support (also with an optional argument "url"), then there is no "background" description. I also tested the new patch with tab-bar-mode on and off, it works for both scenarios. Please help review again. Thanks. Best regards Lin --000000000000e5a32e0603263faa Content-Type: text/x-patch; charset="US-ASCII"; name="0001-lisp-net-eww.el-eww-open-in-new-buffer-able-to-stay-.patch" Content-Disposition: attachment; filename="0001-lisp-net-eww.el-eww-open-in-new-buffer-able-to-stay-.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_llfr8je50 RnJ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V3dyoiKSkKKyAgICAodW5s ZXNzIChlcXVhbCB1cmwgKGV3dy1jdXJyZW50LXVybCkpCisgICAgICAoZXd3LW1vZGUpCisgICAg ICAoZXd3IChpZiAoY29uc3AgdXJsKSAoY2FyIHVybCkgdXJsKSkpKSkKKworKGRlZnVuIGV3dy1v cGVuLWluLW5ldy1idWZmZXIgKHN0YXkgJm9wdGlvbmFsIHVybCkKKyAgIkZldGNoIFVSTCBpbiBh IG5ldyBFV1cgYnVmZmVyLgorCitJZiB0aGUgU1RBWSBpcyBub3QgYG5pbCcsIHRoZSBmb3JjdXMg d2lsbCBzdGF5IG9uIGN1cnJlbnQgYnVmZmVyLgorCitJZiB0aGUgVVJMIGlzIGBuaWwnLCBpdCB3 aWxsIHRyeSBgZXd3LXN1Z2dlc3RlZC11cmlzJyB1bmRlciBjdXJyZW50IGN1cnNvci4iCisgIChp bnRlcmFjdGl2ZSAiUCIpCisgIChpZi1sZXQgKCh1cmwgKG9yIHVybCAoZXd3LXN1Z2dlc3RlZC11 cmlzKSkpKQorICAgICAgKGlmIChvciAoZXEgZXd3LWJyb3dzZS11cmwtbmV3LXdpbmRvdy1pcy10 YWIgdCkKKyAgICAgICAgICAgICAgKGFuZCAoZXEgZXd3LWJyb3dzZS11cmwtbmV3LXdpbmRvdy1p cy10YWIgJ3RhYi1iYXIpCisgICAgICAgICAgICAgICAgICAgdGFiLWJhci1tb2RlKSkKKyAgICAg ICAgICAobGV0ICgodGFiLWJhci1uZXctdGFiLWNob2ljZSB0KSkKKyAgICAgICAgICAgICh0YWIt bmV3KQorICAgICAgICAgICAgKGV3dy0tb3Blbi11cmwtaW4tbmV3LWJ1ZmZlciB1cmwpCisgICAg ICAgICAgICAod2hlbiBzdGF5CisgICAgICAgICAgICAgICh0YWItYmFyLXN3aXRjaC10by1wcmV2 LXRhYikpKQorCisgICAgICAgIChpZiBzdGF5CisgICAgICAgICAgICAoc2F2ZS13aW5kb3ctZXhj dXJzaW9uIChld3ctLW9wZW4tdXJsLWluLW5ldy1idWZmZXIgdXJsKSkKKyAgICAgICAgICAoZXd3 LS1vcGVuLXVybC1pbi1uZXctYnVmZmVyIHVybCkpKQorICAgICh1c2VyLWVycm9yICJObyBhdmFs aWFibGUgbGluayIpKSkKIAogKGRlZnVuIGV3dy1odG1sLXAgKGNvbnRlbnQtdHlwZSkKICAgIlJl dHVybiBub24tbmlsIGlmIENPTlRFTlQtVFlQRSBkZXNpZ25hdGVzIGFuIEhUTUwgY29udGVudCB0 eXBlLgotLSAKMi4yMC41Cgo= --000000000000e5a32e0603263faa--