From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Org release 7.8.07 (BUGFIX-only release) Date: Sun, 01 Apr 2012 12:39:01 +0200 Message-ID: <87r4w7pwhm.fsf@Rainer.invalid> References: <87ty15ulqc.fsf@altern.org> <87ehs8kir5.fsf@Rainer.invalid> <87ehs7hmqb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEIBw-00074A-Ir for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 06:39:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEIBt-0004a6-E0 for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 06:39:24 -0400 Received: from plane.gmane.org ([80.91.229.3]:40307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEIBt-0004Zr-6r for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 06:39:21 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SEIBp-0002D3-Hg for emacs-orgmode@gnu.org; Sun, 01 Apr 2012 12:39:17 +0200 Received: from pd9eb438e.dip.t-dialin.net ([217.235.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Apr 2012 12:39:17 +0200 Received: from Stromeko by pd9eb438e.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Apr 2012 12:39:17 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: >> In org-find-library-name: >> org-compat.el:341:14:Warning: find-library called with 3 arguments, but >> accepts only 1 > > Well, this is the culprit compatibility defun: > > (defun org-find-library-name (library) > (if (fboundp 'find-library-name) > (file-name-directory (find-library-name library)) > ; XEmacs does not have `find-library-name' > (flet ((find-library-name-helper (filename ignored-codesys) > filename) > (find-library-name (library) > (find-library library nil 'find-library-name-helper))) <<<<< > (file-name-directory (find-library-name library))))) > > I don't know how to circumvent this warning and btw I don't have this > warning in Emacs 24.0.94.1. I also do not have this warning when compiling org-compat.el in isolation, but I do have this warning when I do a batch-byte-recompile-directory. That is never a good sign... Anyway, I think that most if not all these defuns in org-compat.el should really be macros (although careful quoting has to be applied) so that the byte-compiler only needs to compile whatever is appropriate. (defmacro org-find-library-name (library) (if (fboundp 'find-library-name) `(file-name-directory (find-library-name ,library)) ; XEmacs does not have `find-library-name' `(flet ((find-library-name-helper (filename ignored-codesys) filename) (find-library-name (library) (find-library library nil 'find-library-name-helper))) (file-name-directory (find-library-name ,library))))) I also don't think an flet macro should be used here (or it should also be expanded at compile time, which I can't see how to do easily), maybe replace with a lambda expression? Looking at the definition of find-library in XEmacs makes me a bit queasy, but I think it needs three arguments to tell it not to display the file in a window... (defmacro org-find-library-name (library) (if (fboundp 'find-library-name) `(file-name-directory (find-library-name ,library)) ; XEmacs does not have `find-library-name' `(file-name-directory (find-library ,library nil (lambda (lib ignore) lib))))) Anyway, something to do after Emacs 24.1 is out. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables