From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.help Subject: Re: Bug when compiling elc code? Date: Wed, 08 Aug 2007 18:45:22 +0200 Message-ID: <87ejieotzx.fsf@gmx.de> References: <87y7gmqkzn.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186591362 7186 80.91.229.12 (8 Aug 2007 16:42:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 16:42:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Hadron Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 08 18:42:40 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IIocJ-0003NW-DL for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 18:42:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIocI-000873-Sn for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 12:42:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IIoc3-00086f-KM for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 12:42:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IIoc2-00085u-2o for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 12:42:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIoc1-00085q-VF for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 12:42:21 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1IIoc1-0006fe-EE for help-gnu-emacs@gnu.org; Wed, 08 Aug 2007 12:42:21 -0400 Original-Received: (qmail invoked by alias); 08 Aug 2007 16:42:19 -0000 Original-Received: from p548653E4.dip.t-dialin.net (EHLO debian) [84.134.83.228] by mail.gmx.net (mp025) with SMTP; 08 Aug 2007 18:42:19 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1/CqL5shiHCFMkIsVJjVtUIDo/UJ5C2H8XQzxJBYD l1iaImGAYwD9FJ In-Reply-To: (Hadron's message of "Wed\, 08 Aug 2007 14\:47\:55 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:46413 Archived-At: [Please keep this topic on-list. Thanks.] Hadron writes: > The problem is that even if personal.elc exists in 600 mode, then a > recompile puts it back to 644. This is surely a bug? Maybe, but other compilers (gcc, for instant) behave similarly: they remove the target before they write to it. And Emacs has a good reason to do this, as can be seen from this comment in the byte-compile-file function in bytecomp.el: ,---- | (when (file-exists-p target-file) | ;; Remove the target before writing it, so that any | ;; hard-links continue to point to the old file (this makes | ;; it possible for installed files to share disk space with | ;; the build tree, without causing problems when emacs-lisp | ;; files in the build tree are recompiled). | (delete-file target-file)) | (write-region (point-min) (point-max) target-file)) `---- Regards, Sven