From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hadron Newsgroups: gmane.emacs.help Subject: Re: Bug when compiling elc code? Date: Wed, 08 Aug 2007 19:21:30 +0200 Organization: http://en.wikipedia.org/wiki/Quark Message-ID: <26ejiej61x.fsf@googlemail.com> 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 1186594886 19604 80.91.229.12 (8 Aug 2007 17:41:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Aug 2007 17:41:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 08 19:41:24 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 1IIpX8-0006Mk-Ty for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 19:41:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IIpX8-0001uj-FF for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Aug 2007 13:41:22 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsserver.news.garr.it!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 Original-X-Trace: individual.net TtSxIkbSw9FmaJjs5QPeFA+wyW8bv2ODs0DFahS5uojXA8AEY9 X-Orig-Path: news.individual.net!news Cancel-Lock: sha1:qoNOPG9Xa4Rzo5WFmSlvQul5sDI= sha1:Up0xMfn8dHqwnpHGKfTz5cCaAT8= Original-Xref: shelby.stanford.edu gnu.emacs.help:150841 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:46417 Archived-At: Sven Joachim writes: > [Please keep this topic on-list. Thanks.] Better not to copy on email then - I thought I had replied to the group. Sorry, about that. > > 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: As I said in private email, this is not the same thing. passwords etc tend not to be hard coded into C/C++ files - they are in external resource/config files which can be cleartext but are hidden by the linux file permissions in many cases (or even gnupg encrypted). At the very least I would think that the compile should maintain the read/access modes of the original .el file. Either that or something as happened to me might well happen to others without them realising it. I can see no drawback to keeping the mode of the elc file as the same as that of the source. Or? > > ,---- > | (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 > > --