From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Drew Adams <drew.adams@oracle.com>
Newsgroups: gmane.emacs.devel
Subject: RE: Byte compilation without writing the .elc file
Date: Sun, 23 Jun 2019 08:49:36 -0700 (PDT)
Message-ID: <f7667b12-aefa-44a5-8efe-1082f91bf700@default>
References: <m3o92ov7p5.fsf@gnus.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="172345"; mail-complaints-to="usenet@blaine.gmane.org"
To: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 23 17:49:52 2019
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Envelope-to: ged-emacs-devel@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 <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1hf4kZ-000ii2-QW
	for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 17:49:51 +0200
Original-Received: from localhost ([::1]:45338 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.86_2)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>)
	id 1hf4kY-0006sm-Fi
	for ged-emacs-devel@m.gmane.org; Sun, 23 Jun 2019 11:49:50 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48689)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <drew.adams@oracle.com>) id 1hf4kT-0006sg-1W
 for emacs-devel@gnu.org; Sun, 23 Jun 2019 11:49:46 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@oracle.com>) id 1hf4kS-0006GL-40
 for emacs-devel@gnu.org; Sun, 23 Jun 2019 11:49:44 -0400
Original-Received: from userp2130.oracle.com ([156.151.31.86]:46596)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@oracle.com>)
 id 1hf4kR-0006AN-RC
 for emacs-devel@gnu.org; Sun, 23 Jun 2019 11:49:44 -0400
Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5NFnKxZ079494;
 Sun, 23 Jun 2019 15:49:39 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=ijd3NwEJs15SXqD/6uNsZy8Vnsa7yGRCD+eaC8EgKnM=;
 b=cu8cH0SI59vtJNluuzEF1J6bsHC0UrFnYd075+Tnrlq4IZTgbp9PZpVtVdr4sB9eJR3Q
 s2FyN7kqvwljySQ/zQ/cVh5XRvosGnW/68pM4O7MDJCjr3rp5cd4b60UE50z3TZVdr6n
 g/noF/5V7Qz9cHgvCnpkOO2sD6tMehLmpuXMMWGDkBAiU1FGEmYY2EXmG3VPWH1mjIiQ
 1hstArDLiC5UNaVXLSDcFEgQTafDqpnUL6TyPqMfY+45yYA2wU6KesfqkDsyyU1cFfz8
 m4oCj1JhNrnqOzlANs/VUEhSMXTdIZEWfJYJQO7ru5Wq7Clpw+Ph6U63lbNfP+WYJ3Q6 1A== 
Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by userp2130.oracle.com with ESMTP id 2t9brstytn-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 23 Jun 2019 15:49:39 +0000
Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5NFndOR045109;
 Sun, 23 Jun 2019 15:49:39 GMT
Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserp3030.oracle.com with ESMTP id 2t9acb5n8f-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 23 Jun 2019 15:49:38 +0000
Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x5NFnbZJ018623;
 Sun, 23 Jun 2019 15:49:37 GMT
In-Reply-To: <m3o92ov7p5.fsf@gnus.org>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4861.0 (x86)]
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=954
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1810050000 definitions=main-1906230137
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9297
 signatures=668687
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1906230137
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic]
X-Received-From: 156.151.31.86
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org
Original-Sender: "Emacs-devel" <emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.devel:238067
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/238067>

> Often when I'm working on an out-of-tree Emacs Lisp file, I want to do
                                                      ^^^^
> byte compilation to see whether what I've done generates any warnings --
> but I don't want the .elc file, because I want to run it from .el.
>=20
> So I `M-x byte-compile-file' and then delete the .elc file.  This seems
> kinda sub-optimal, and surely others must also have this problem.
>=20
> The internal `byte-compile-from-buffer' function almost does the right
> thing, but it doesn't set things up properly, so it doesn't quite work.
>=20
> So I think it would be a good idea if Emacs had a command called, say,
> `byte-compile-buffer' that does the same thing as `byte-compile-file',
                ^^^^^^
> but for the current buffer and without outputting anything.  Does that
> sound OK?

I too do that sometimes: byte-compile a file, then
delete the *.elc.  I'm in favor of a new command to
do that (but of course avoiding creating and then
deleting the file).

However, I think the command should be available
from outside any buffer visiting the file, and it
should take a file, not a buffer, as its argument.

There should be no reason to have to visit the file
in a buffer to be able to get the desired effect.

For example, when I do this I often do it in Dired,
using `B' to compile, followed by `D'.