From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Achim Gratz Newsgroups: gmane.emacs.bugs Subject: bug#12592: 24.2; optional arguments NOSUFFIX MUSTSUFFIX to the load function Date: Sun, 07 Oct 2012 14:18:34 +0200 Message-ID: <87sj9qbhlx.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349612389 11958 80.91.229.3 (7 Oct 2012 12:19:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2012 12:19:49 +0000 (UTC) To: 12592@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 07 14:19:51 2012 Return-path: Envelope-to: geb-bug-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 1TKppn-0006Sz-Be for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Oct 2012 14:19:51 +0200 Original-Received: from localhost ([::1]:55844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKpph-0004Ke-Db for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Oct 2012 08:19:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKppe-0004IK-C8 for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:19:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKppd-00054l-8b for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:19:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKppd-00054h-4R for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:19:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TKppy-0000WK-JZ for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Achim Gratz Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Oct 2012 12:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12592 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13496123621947 (code B ref -1); Sun, 07 Oct 2012 12:20:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2012 12:19:22 +0000 Original-Received: from localhost ([127.0.0.1]:59190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKppJ-0000VK-Nz for submit@debbugs.gnu.org; Sun, 07 Oct 2012 08:19:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59024) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TKppG-0000V8-GP for submit@debbugs.gnu.org; Sun, 07 Oct 2012 08:19:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKpoo-0004eB-8q for submit@debbugs.gnu.org; Sun, 07 Oct 2012 08:18:51 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:36556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKpoo-0004e7-5X for submit@debbugs.gnu.org; Sun, 07 Oct 2012 08:18:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKpom-0003vn-FN for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:18:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKpok-0004dZ-Fx for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:18:48 -0400 Original-Received: from mail-in-08.arcor-online.net ([151.189.21.48]:39042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKpok-0004d2-5i for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2012 08:18:46 -0400 Original-Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mx.arcor.de (Postfix) with ESMTP id 6F8D53AE89F for ; Sun, 7 Oct 2012 14:18:43 +0200 (CEST) Original-Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id 6E0486F2465 for ; Sun, 7 Oct 2012 14:18:43 +0200 (CEST) Original-Received: from Rainer.invalid (pD9EB56F6.dip.t-dialin.net [217.235.86.246]) (Authenticated sender: stromeko@arcor.de) by mail-in-04.arcor-online.net (Postfix) with ESMTPSA id 36448AA418 for ; Sun, 7 Oct 2012 14:18:43 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-04.arcor-online.net 36448AA418 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nexgo.de; s=mail-in; t=1349612323; bh=3dMsB9gj0BTPcEFFQyU4yXGcX3qltS9dP3yBDBDISUg=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=B3jExSe4ee9YLxqddjN/xQSnW8UJuZ3SsVeYuFOQC/ujMY9OYzlx7cNlUMCkEFrgV h9+WSYy8THyAqc0cqNL5g4vJHbkEB62wEQ/2nuDC9Mi5JWt25ReS6EKAGCiIQ5sD9m 7/xYhAlaoALLIr5kOXVes4lvGEvmwCWaWxDll64I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65327 Archived-At: In GNU Emacs 24.2.1 (i686-suse-linux-gnu, GTK+ Version 3.4.4) of 2012-09-30 on Rainer Windowing system distributor `The X.Org Foundation', version 11.0.11203000 There appears to be a mismatch between documentation and implementation of the optional arguments NOSUFFIX and MUSTSUFFIX to the load function. The behaviour is as described when both NOSUFFIX and MUSTSUFFIX are nil, or when NOSUFFIX is nil and MUSTSUFFIX is non-nil. However, with NOSUFFIX non-nil, MUSTSUFFIX is not at all evaluated and no extensions are tried, contrary to what the documentation says: If this function fails to find a file, it may look for different representations of that file before trying another file. It does so by adding the non-empty suffixes in `load-file-rep-suffixes' to the file name. Emacs uses this feature mainly to find compressed versions of files when Auto Compression mode is enabled. The exact suffixes that this function tries out, in the exact order, are given by the value of the variable `load-file-rep-suffixes' if NOSUFFIX is non-nil and by the return value of the function `get-load-suffixes' if MUST-SUFFIX is non-nil. If both NOSUFFIX and MUST-SUFFIX are nil, this function first tries out the latter suffixes and then the former. Both the documented and the implemented behaviour might be intended, but they should be made consistent. If following the documentation, then it seems that fd = openp (Vload_path, file, - (!NILP (nosuffix) ? Qnil + (!NILP (nosuffix) ? Vload_file_rep_suffixes : !NILP (must_suffix) ? Fget_load_suffixes () : Fappend (2, (tmp[0] = Fget_load_suffixes (), tmp[1] = Vload_file_rep_suffixes, tmp))), &found, Qnil); should correct the implementation. However, the behaviour has been implemented from the very beginning to not affix anything to the filename when NOSUFFIX is non-nil, so maybe the documentation should be corrected instead. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf microQ V2.22R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada