From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Compilation warnings of ELisp seem wrong and misleading Date: Thu, 02 Apr 2015 01:08:20 +0200 Organization: Aioe.org NNTP Server Message-ID: <87pp7n8n17.fsf@debian.uxu> References: <87iodij8cf.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1427929531 1188 80.91.229.3 (1 Apr 2015 23:05:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2015 23:05:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 02 01:05:23 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 1YdRhI-0006Ix-Sz for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Apr 2015 01:05:21 +0200 Original-Received: from localhost ([::1]:55322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdRhH-0001Gf-TT for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Apr 2015 19:05:19 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 52 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:GLxcJzLjnMaHAOlmQKkSvxggfKM= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:211212 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:103494 Archived-At: "Ludwig, Mark" writes: >> As for "should you compile your code?": one of the >> reasons to do that apart from the supposed but >> seldom noticed gains is that you can improve the >> quality of your code and become a better lisper. >> It is automatized feedback. And, because of that, >> it is even more important that the error/warning >> messages are understandable. > > In spite of pointing to the wrong source lines, the > warnings were basically correct. > > Is there a way to get the warnings without writing > a .elc file? Interesting idea, if you are only concerned with having the compiler tell you how to improve your code it can be an alternative. I don't know if there is a built-in way to do such dry-runs, but if there is not, you can do a Makefile which simply removes the .elc files immediately when compilation is done. However, there might be a better idea if the problem is just the warning that the .emacs is newer than the .elc, and that is to make a shell function that starts Emacs and instead of just starting it, it will first compile, only then start it. If there has been no changes, with a Makefile, there will be no recompilation, and if there have been changes, those will be compiled first which is what you want. So the shell function can look like this, if the Makefile is in ~/.emacs.d/emacs-init: make -C ~/.emacs.d/emacs-init emacs Here is the Makefile I use [1]. It has grown a bit complicated by now, which is mostly a consequence of me using separate files in a directory structure, not just the ~/.emacs file. If you only have that file, it should be ten times the more simple a Makefile, but it should solve this issue nonetheless. [1] http://user.it.uu.se/~embe8573/emacs-init/Makefile -- underground experts united http://user.it.uu.se/~embe8573