From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: hector Newsgroups: gmane.emacs.help Subject: Re: (require 'filename) doesn't find the file Date: Fri, 10 Mar 2017 11:26:31 +0100 Message-ID: <20170310102631.GA4107@workstation> References: <20170310091737.GA3727@workstation> <20170310093749.GC29132@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1489141928 30051 195.159.176.226 (10 Mar 2017 10:32:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 10 Mar 2017 10:32:08 +0000 (UTC) User-Agent: Mutt/1.5.20 (2009-06-14) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 10 11:32:05 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmHq2-0006f8-9t for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Mar 2017 11:31:58 +0100 Original-Received: from localhost ([::1]:38378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmHq6-0006zB-Kb for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Mar 2017 05:32:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmHoS-0006Sq-1l for help-gnu-emacs@gnu.org; Fri, 10 Mar 2017 05:30:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmHoN-00089s-4f for help-gnu-emacs@gnu.org; Fri, 10 Mar 2017 05:30:20 -0500 Original-Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:33065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmHoM-00088j-VD for help-gnu-emacs@gnu.org; Fri, 10 Mar 2017 05:30:15 -0500 Original-Received: by mail-wm0-x242.google.com with SMTP id n11so1559128wma.0 for ; Fri, 10 Mar 2017 02:30:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/QSMdfib45uupRTwsfl4kqmCgUmJG49a3+h/o8OqOnw=; b=KTwBJXrskwc+TEcUG1g1pUbBXi8l8kKFmQ3u7eNAdfxEThW7CMVQg+41+kb6tHE1+i iQTBDKo6+VVIRa2OfZAoUm3rYvfL24Ew6ZO/41oe94cLqOFAEVCL3Fn4JF74gB+7vzl5 fFywmzN5jSOSWfHbv/a0rqsUVlESc9oi2j48g2ogyVxi3Djk85aqrPY9cJGpZp12yqU5 YfWu5G6kjul5ELTXkNFYf3S22FP+IgeMNTK/HoKcuuMwl0wCt2Uz95LMd/OXMS/OqpH0 7BENE0lhfRFz+31RaLL3aMrw2HL8SGRy3rlANAtzG7dySMcMjcl7h3lrcMjjmfpBt3Bt ywwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/QSMdfib45uupRTwsfl4kqmCgUmJG49a3+h/o8OqOnw=; b=n7M4aBeTLK5NFm5epDh2aEoCzjJuoU3yiTJzbVCPtIiy+S8hxQ/ZGb/Fq32SvpTi8E KqjZMpbNCbl0j9bF5NE9yOe4OFauACYeaDl1BByoVTHQZscZ1XnJ0WmTfcYVhVp3Woff sWQ7gOd15XP3dTCTjr3tZLAu3fI3YATMRy/E2CxiC8wTMsg8Ep25CAdclt4mQLaUHe6P C5/yMTzgr2kPu8+8CB9mpA3pZi1sJZo+J2nf6RUmOCCNfaq8JBs/79eF1hO+4UvbbiXl L1lFmSrlxbL923xl/jAWepghcd0lDs0Jvj2NdJf7mcQkKug6E/tYAHhsUFUjnTElo2TC dCuA== X-Gm-Message-State: AFeK/H2C1lnOi/l43+3n7jezKEIxrpqdCz0cVLZ4tMmFTMlwgXif9Rb5+G//CTTg6Z/Cmg== X-Received: by 10.28.212.79 with SMTP id l76mr1749038wmg.6.1489141813598; Fri, 10 Mar 2017 02:30:13 -0800 (PST) Original-Received: from workstation ([148.3.93.202]) by smtp.gmail.com with ESMTPSA id m186sm2664183wmd.21.2017.03.10.02.30.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 Mar 2017 02:30:12 -0800 (PST) X-Google-Original-From: hector Content-Disposition: inline In-Reply-To: <20170310093749.GC29132@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112513 Archived-At: On Fri, Mar 10, 2017 at 10:37:49AM +0100, tomas@tuxteam.de wrote: > It finds the file. But the file doesn't keep its promise of "providing" > the feature. > > See it this way: a "require"d file might find out that something is > broken. Then it would return without "provide"-ing the feature, to > signal that sorry, this feature isn't available after all. > > In short: just end your file with (provide 'basename), as you noticed > up there. Or do you see a problem with that? No problem at all. But I see a problem in that function require doesn't behave as its documentation says it does. Or I just don't understand it, which is worse. OK, let's widen the picture frame. I have 2 files: required.el and requiring.el. required.el contains: (defvar var1 "Value" "This variable is used by \"requiring.el\"") Them, since requiring.el uses this variable, I write: (require 'required) expecting that "required.el" to be loaded at run time. I'm afraid this is not the right approach. Perhaps both files should be put together. Or use (load "required.el") instead. I just don't know.