From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.help Subject: `batch-byte-compile' for directories? Date: Fri, 19 Jun 2015 20:19:04 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1434737970 30749 80.91.229.3 (19 Jun 2015 18:19:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jun 2015 18:19:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 19 20:19:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z60sq-0002DX-5w for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Jun 2015 20:19:20 +0200 Original-Received: from localhost ([::1]:59562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z60sp-0003FK-Fk for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Jun 2015 14:19:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z60se-0003Ep-Vn for help-gnu-emacs@gnu.org; Fri, 19 Jun 2015 14:19:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z60se-0002sN-3i for help-gnu-emacs@gnu.org; Fri, 19 Jun 2015 14:19:08 -0400 Original-Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:34915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z60sd-0002s2-Tv for help-gnu-emacs@gnu.org; Fri, 19 Jun 2015 14:19:08 -0400 Original-Received: by wgbhy7 with SMTP id hy7so95994579wgb.2 for ; Fri, 19 Jun 2015 11:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=WtQ2Ga/5QvERgqEwKoWcEcYVLAV54P0W5Tct9yD7+4M=; b=wsFuDhl/le67JJ82kW+QnRnsq+opoLMSdMM5DchPRb4/SFeh/MBPLXYhzRigmtBg17 GopvSkpbiOLvXFMMfHGZRfByycTYceNpKQXXQJjhVDUWhmU2Tlwx9UAett1YyLun45zn NW0E9WHsCNZWvUW8Hguu50lSI9dA6qek9z+p2ZbQbPSsWEZRp/YrXmZCJUzb5qR1WYcf CxzEig25mJYXhmHoMwhukS+Rc1pO8Uu3OBpWajMdb8FbinYK6BwNvIpC4lo4VZWgwJSG 9ZMw5yVbhZ/l/YX27C42XdUOlCZly+ZMk56jyYMCUB3rdA/1Y+5wLeEbya06XM0UnBGP WyXA== X-Received: by 10.180.149.240 with SMTP id ud16mr8888939wib.7.1434737946607; Fri, 19 Jun 2015 11:19:06 -0700 (PDT) Original-Received: from phst2.muc.corp.google.com ([2620:0:1046:0:51b0:1835:ede2:753b]) by mx.google.com with ESMTPSA id df1sm4793830wib.12.2015.06.19.11.19.05 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jun 2015 11:19:05 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105050 Archived-At: Hi, the function `batch-byte-compile' supports directories. The code for this is: (let (source dest) (dolist (file (directory-files (car command-line-args-left))) (if (and (string-match emacs-lisp-file-regexp file) (not (auto-save-file-name-p file)) (setq source (expand-file-name file (car command-line-args-left)= )) (setq dest (byte-compile-dest-file source)) (file-exists-p dest) (file-newer-than-file-p source dest)) (if (null (batch-byte-compile-file source)) (setq error t))))) What I find weird is the condition that the destination file has to exist for the compilation to be performed. I would expect logic similar to the explicit file case (don't check destination file by default, and if NOFORCE is set check for either nonexistent or old destination file). Is the current behavior intended? Thanks, Philipp --=20 Google Germany GmbH Dienerstra=C3=9Fe 12 80331 M=C3=BCnchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Gesch=C3=A4ftsf=C3=BChrer: Graham Law, Christine Elizabeth Flores Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und l=C3= =B6schen Sie die E-Mail und alle Anh=C3=A4nge. Vielen Dank. =20=20=20=20=20=20=20 This e-mail is confidential. If you are not the right addressee please do = not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.