From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: CToID via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72089: [PATCH] Option to control Emacs' behaviour when invoked with file args. Date: Sat, 13 Jul 2024 03:18:04 +0800 Message-ID: <32450bf6-4672-4357-8632-a536c774b6ab@yahoo.com.tw> References: <32450bf6-4672-4357-8632-a536c774b6ab.ref@yahoo.com.tw> Reply-To: CToID Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------H2z0nIcnSOC2jJXDS7WqcQP8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 72089@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 13 05:23:54 2024 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 1sSTMY-0007rX-1a for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jul 2024 05:23:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSTLm-0004Gk-4J; Fri, 12 Jul 2024 23:23:06 -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 1sSTLj-0004Fi-1l for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 23:23:03 -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 1sSTLi-0006uJ-LP for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 23:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSTLi-0007vx-PS for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 23:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: CToID Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jul 2024 03:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72089 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172084097730471 (code B ref -1); Sat, 13 Jul 2024 03:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jul 2024 03:22:57 +0000 Original-Received: from localhost ([127.0.0.1]:54953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSTLc-0007vJ-Qc for submit@debbugs.gnu.org; Fri, 12 Jul 2024 23:22:57 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSLmm-0004vG-7F for submit@debbugs.gnu.org; Fri, 12 Jul 2024 15:18:29 -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 1sSLmi-0002RH-6U for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 15:18:25 -0400 Original-Received: from sonic307-21.consmr.mail.sg3.yahoo.com ([106.10.241.38]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSLmb-0002UG-Qt for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2024 15:18:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.tw; s=s2048; t=1720811888; bh=aNK1NlhUH12TeGmTx+9t6dogUMOvt4wktgA4OivrkQs=; h=Date:To:From:Subject:References:From:Subject:Reply-To; b=QlLD35I/doiM+zb1G7wOPMZ6WW1tlrIkiOVWxIQhAIken+J9Lt47nv32zIroMKajyhG/V9Du6pl8vkE+iVeCvU97c99ZV8RXIrauyNIqTXDnEQ2Y1ffK8I7qwm44IEQcrlu0XyPPWC/aq0/BZEXblNqt0fkli4bIKymA10fPawAgUK8tVWAkHLhN7AYSVnVYgSqH+EOecff6LPqJ8mCesLcUQj7hthg9hHJfY8/d4PdaN9Vc1L0yJ5Lrbkd12tv2UU9ootu/5jm6O4BS3HQ3kVppL39WL2GED9x+upkm7fcdv7V/VFafksThVCCQfBgfba9iI9IxP90GZPDI0WNqCQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1720811888; bh=7a+ZpVSvFJEjv9Dcy/WUjHo7FPCT+DwydMmQORr4jAd=; h=X-Sonic-MF:Date:To:From:Subject:From:Subject; b=PYKEXIYuUWtV39osoakYvwniFHtu/H19ir5Y62uBJBN1f60a7ecoBV947Q7mh3nftCPKXhxksSSZee/Xu30bazbWScXeT6Clur9eXQyD65I4dxZHPROo8aniJ+P/8LJLF/DOhTf/G32wU2QIGfzhJASX8UvnQfovvXewulb7eUX80NVaV0ap9vp1DhrWrS2L6LSaI2ld3sCZNY5HPYIutWIf7KhUc9jf9HXAceNqj913RwIdVK3w7kg0dnMtGVT3R2H4/Iukj9RhCF9jIOMN9ewkrQ6jUY8JTf53W6UXoHejrUfZSQ5ExmDvR9Gk/+kQE6MG7HvX1B/IMISZ10QQcQ== X-YMail-OSG: ds3QmgUVM1kF.0_MXiE8p2pzjr7HCkl0zs0MWot3sZ6DdjQB1WEyQlNy7iu23hc kaTUZQ5cyTn2lrABu67XgTvwOuNWFFgkjZuvdLcHGnsD5IcbjI4w6ZqfM2XcsCZW4GmgEJdM7xw5 rGOZwwn7KIIyq2gP1qGsCHIDLb1pJs.B1zxSkAlWQ__yO8C4IYaU6vveNiWMp6y7MT8QusFJ0UzK 91uxWXmSkyde1v8iKCR9cLOKGbWlwFUZH37jp0OytORGuA9qIRRLBiu9M0BAuiNiat6cTv6I5Ftf py8Gh2q6rKzoD_jeTTDj3FP_H2mGrt7plpRhb9cb9VrM4JSb0fgmzom9z2gH59jVLdVQ6p3OYrAm nktr.zGQ7MidgSQYVCaZCrsnPp24jINzYpUHmWBgNa100zsnihw3jCbyvrO2mrYdAECrkxCK.sdO 5kDQnLISmGxeePZ2hDxcsjhJx_LPYEV2OrhEUp8KUQi7ThUbg8gaSVJilIqEeRtj7HVGNBS12FQQ kV.4MsMk9hNMgoI9QDcEYuxS9WRnuqe7nYJ2yLoP.bomMirTOJyiBeGxVayJP5vcgqhP5cd9ZLYL TLmrqgqu62Ns3kLPUxsN.XiAak2zZ8tWIGDvOvgAGSynv5wyCqVK7RpSRDT9gq_MrhhUUZYZnCKX gvrnuXy7NKMlK58QyqmtmOQ5vePNjJXEferLvunKxtQIDUaFDiIatBMk5ABJ5v__Xsc9yq4qR.uT v2UAkvpONMqiolyoPX6KLYqd8kQ4xr0X2Xjf8t.hkW.bNvLGViluQsK00kj.RBFhaFBKkaYBxI8u kGeKpUCPCUQVi0hu4N2US.hwbdF7bJTkQldrPXFfsB X-Sonic-MF: X-Sonic-ID: fd2b5579-6978-4f0a-9672-f1437e6a2425 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.sg3.yahoo.com with HTTP; Fri, 12 Jul 2024 19:18:08 +0000 Original-Received: by hermes--production-sg3-85fdb5cfc8-qr5dd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6f946210fc023fdc741e67e9612c5884; Fri, 12 Jul 2024 19:18:05 +0000 (UTC) Content-Language: en-US X-Mailer: WebService/1.1.22501 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=106.10.241.38; envelope-from=funk443@yahoo.com.tw; helo=sonic307-21.consmr.mail.sg3.yahoo.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 12 Jul 2024 23:22:50 -0400 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:288786 Archived-At: This is a multi-part message in MIME format. --------------H2z0nIcnSOC2jJXDS7WqcQP8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello folks, So I have a discussion with Eli on help-gnu-emacs mailing list earlier (https://lists.gnu.org/archive/html/help-gnu-emacs/2024-07/msg00124.html) about Emacs' initial buffer behaviour when invoked with file arguments. Overall, I think it's benefitial to have a custom option for users to control this behaviour of Emacs, so I made some simple changes to accomplish this. In GNU Emacs 30.0.60 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-07-13 built on thinkpad-btw Repository revision: 8b1a0f8695a43e74daa5275559267e96c14aba03 Repository branch: bruh System Description: Ubuntu 24.04 LTS Configured using: 'configure --prefix=/home/id/.local --with-tree-sitter --with-native-compilation --with-pgtk 'CFLAGS=-O2 -march=native'' --- Best, ID --------------H2z0nIcnSOC2jJXDS7WqcQP8 Content-Type: text/x-patch; charset=UTF-8; name="initial-buffer-choice.patch" Content-Disposition: attachment; filename="initial-buffer-choice.patch" Content-Transfer-Encoding: base64 RnJvbSAxNjVjZTk1Mjg4YTBiMjY1MmYwMDliZjg1NzFiMDFkNDkxYjIyOWM2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDVG9JRCA8ZnVuazQ0M0B5YWhvby5jb20udHc+CkRh dGU6IFNhdCwgMTMgSnVsIDIwMjQgMDM6MDQ6MjYgKzA4MDAKU3ViamVjdDogW1BBVENIXSBP cHRpb24gdG8gY29udHJvbCBFbWFjcycgYmVoYXZpb3VyIHdoZW4gaW52b2tlZCB3aXRoIGZp bGUKIGFyZ3MuCgotLS0KIGxpc3Avc3RhcnR1cC5lbCB8IDEzICsrKysrKysrKysrKy0KIDEg ZmlsZSBjaGFuZ2VkLCAxMiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0t Z2l0IGEvbGlzcC9zdGFydHVwLmVsIGIvbGlzcC9zdGFydHVwLmVsCmluZGV4IGYxODc5NWEu LmVmMTM1ZWQgMTAwNjQ0Ci0tLSBhL2xpc3Avc3RhcnR1cC5lbAorKysgYi9saXNwL3N0YXJ0 dXAuZWwKQEAgLTYyLDYgKzYyLDE0IEBAIGluaXRpYWwtYnVmZmVyLWNob2ljZQogCSAgKGNv bnN0ICAgICA6dGFnICJMaXNwIHNjcmF0Y2ggYnVmZmVyIiB0KSkKICAgOnZlcnNpb24gIjIz LjEiKQogCisoZGVmY3VzdG9tIHNob3ctaW5pdGlhbC1idWZmZXItY2hvaWNlIG5pbAorICAi Q29udHJvbHMgdGhlIG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