From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master f2d2fe6fc8: server-execute: Initialize the *scratch* buffer Date: Wed, 04 May 2022 08:47:53 -0400 Message-ID: References: <165162665935.26821.8964921720746152690@vcs2.savannah.gnu.org> <20220504011059.9F667C009A8@vcs2.savannah.gnu.org> <87levhdfeh.fsf@athena.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3828"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Sean Whitton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 04 14:50:13 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nmESK-0000lH-DJ for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 14:50:12 +0200 Original-Received: from localhost ([::1]:49770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmESJ-00075S-39 for ged-emacs-devel@m.gmane-mx.org; Wed, 04 May 2022 08:50:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmEQH-0005xg-J5 for emacs-devel@gnu.org; Wed, 04 May 2022 08:48:06 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21299) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmEQE-0002di-G0 for emacs-devel@gnu.org; Wed, 04 May 2022 08:48:03 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3FF81441028; Wed, 4 May 2022 08:48:00 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C170544106F; Wed, 4 May 2022 08:47:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1651668474; bh=hwZtWu/VKgdtaukBTwieBl1wqrcLgPO+AWf5xky8qLE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=iHc5vgfX7eH1fBPcok3+ND8E1vNLMjw4qUkr3i04JCmUzUMuJT5Yd51XSKtCyP43g FbkkXeZn414xMRvy+3W0+9wSoxSTmzJTXgpeo8cu19oBzOC67PTmc+HmvnFb3vPquX NpqfL1VxLfdze3x91x6ten/oMs4U2BIL8UBZRO42GqdtW2vxjEY+NP4fvMswc6u315 SAUbAUMyNBPK0uDa3mUQcOnoyrENrugyovQ4pp+kbYvH7lR8k/39UYea0KNEbWl6Cy 8tIKopNJV4mtjNwIoR4MBnCZhJTklI46BGc6DU+LuhopjQgQC3eA1hAwwcNKsrz+Ih AO0c9mtKehizQ== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9279112077D; Wed, 4 May 2022 08:47:54 -0400 (EDT) In-Reply-To: <87levhdfeh.fsf@athena.silentflame.com> (Sean Whitton's message of "Tue, 03 May 2022 22:40:22 -0700") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:289166 Archived-At: >> Could we put that code in a function so we don't need to duplicate it >> (and sync it)? > There's a similar thing in a lot of different places in C, too. > My own inclination is that it's simple, and in fact slightly different > in different places, so not worth factoring out, but YMMV. If you could factor out the commonality (and remove the gratuitous differences along the way), I'd be grateful. In my experience, it's always worth it in the long run (and it's generally an opportunity to improve the code, because once it only exists at a single place, it's much easier to add functionality and customizability to it). Stefan