From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why does byte-compile-file copy the input file to a different buffer? Date: Sun, 17 Dec 2023 18:48:32 +0200 Message-ID: <83cyv4kc67.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36367"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 17 17:49:45 2023 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 1rEuKn-0009F9-6v for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Dec 2023 17:49:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rEuJv-0003DQ-9z; Sun, 17 Dec 2023 11:48:51 -0500 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 1rEuJt-0003DE-1D for emacs-devel@gnu.org; Sun, 17 Dec 2023 11:48:49 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEuJs-0006ff-0U; Sun, 17 Dec 2023 11:48:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=eytsXAprgH794VD5LeLbuzYGH7nxkFxR+ukVHQvDagA=; b=QnNFeY371siZ C5IaMontMKO1wMdWgRjbZlVZTvgPBMpBMrKOlyAAhHAtqM463qxxHnyWpSLP5CFmzJjPP2KAKKI/e pKdMmP+n9z3s755SNVA/pDtDj7fXzZCoLWjl3c+B2gsickah6aur7zYF8/eZ65aCIceUVrsN0235z NreXg1M55o2PlOuMqLG7w02yJogP86BhpwV/gH4VbQ+9AR3OGZWYPdb9+diJF8RfRFhmPlaRn6UGk JdUDetGbGF00K++yzP0ErkKb2DBwm0epvFDJdDt+ggbd1eaWVACQAuR5ukxXvySTm7qZM9ahWletW uz2Xi8h3LglnQ6vUFs6Dbg==; In-Reply-To: (message from Alan Mackenzie on Sun, 17 Dec 2023 16:06:44 +0000) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313931 Archived-At: > Date: Sun, 17 Dec 2023 16:06:44 +0000 > From: Alan Mackenzie > > On executing a byte-compile-file command, rather than working on the > file's buffer directly, the byte compiler first copies the buffer/file > into another buffer with a boring name like " *Compiler Input*" or " > *Compiler Input*-1". > > Why does it do this? It makes it difficult, in the reader, to determine > the identity of the actual source buffer. (Yes, I have reasons for > wanting to do this.) > > Would it not be simpler just to compile directly from the source buffer, > thus avoiding a needless copying and making it clear what the actual > source buffer is? The command uses insert-file-contents to insert the file into the input buffer, and works on that, so that looks very natural to me. I'm not sure what is bothering you in that, or why.