From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bruno Barbier Newsgroups: gmane.emacs.help Subject: Re: Locating file via load-path Date: Thu, 08 Aug 2024 20:38:53 +0200 Message-ID: <66b510bf.050a0220.192660.7c75@mx.google.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4212"; mail-complaints-to="usenet@ciao.gmane.io" To: Heime , Heime via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 08 20:39:24 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sc82l-0000vH-35 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Aug 2024 20:39:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sc82P-0004yf-Tw; Thu, 08 Aug 2024 14:39:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sc82O-0004yS-EH for help-gnu-emacs@gnu.org; Thu, 08 Aug 2024 14:39:00 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sc82M-0003ax-UH for help-gnu-emacs@gnu.org; Thu, 08 Aug 2024 14:39:00 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3683f56b9bdso829704f8f.1 for ; Thu, 08 Aug 2024 11:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723142336; x=1723747136; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wLHiDCEVUHBNOQ0PrsRyRc6EWtOPrNsdbkbPagXJUpk=; b=jJjkBqPKY9mqJ8t01wAcxozZ+6T8m5knQFd3m4T2n93VvDj85Zotlql/ZN4zwv4rdV HhC5818uchcXAuyVCtX2V22LZwQZgJT6kdbTYaWWeZEbZI7RywStAxIYjbaCx/ojZH8e X1F8q7mGSQkfnSYyHeNiUaR+fjUHTjisKsRD5Cu4vDKkcAk5BWQY98j7OvnOUx3sfUQ9 Yu9/ejqKeLC8ABUHsUWooWHWOYv2SRFqqmVYfauL9vQF5uKl6taTTid6bHZDiAKu6mCR CEJsESAXElVhUYjqWMSKF4S7cxRa38ckYZqlj2PJrFNQkTnk+MJypq1jxCzfRE2sBA4V 3reQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723142336; x=1723747136; h=mime-version:date:references:in-reply-to:subject:to:from:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wLHiDCEVUHBNOQ0PrsRyRc6EWtOPrNsdbkbPagXJUpk=; b=kvUd2tzAA4PphKsIVhvgb/KMqPdU38wnYxh+bbQh6C91dJcUJtpkdEfJJpK/UMg81+ V48xr6BZuEDQUCkK1pLtJoz7USAV5jvK4Un47M5JDO6i8HdfAaLrx7rEbk+l15AFRB9A evHonK4UNevXcqSCIDhRBPNI2UxPNj2Y3kWWNuYIT2o1wE3tF+e7uqrU3N2mM43kLTah ssUXujz2tgbkr13e599qeKiWS30t0GWDV22jDa6u3dC6UzZaMn2Ap2r4aDoEfZyg6Sl5 LRBvXPpSeD9Ng2Ddlnl3f5K+nj3teMoFDKpQZnzhKNCR62jo8SdshZdmSGCGqOfTqXX1 VdgQ== X-Forwarded-Encrypted: i=1; AJvYcCV4pMWpRFa09zsVfSNPZPmHVqmoP+9WTzhYGLOlzrfQgnDDFgAhY07R882pTlW+t7Q+cFLiO4B1wy0lkVXPpDVPm7m66MTf X-Gm-Message-State: AOJu0YxCxul2vWKutwkIYMJJu2vxVB/H5rDLmJ8+5wQcScdy5K4rJ66K J+BrFBt5xRH4OZPbN70lFim70YP0Sbe+XqdHYaUauO0oEqiMWcbj X-Google-Smtp-Source: AGHT+IGOzA+PN7KV/nh5ON+O7sQZg4/spRZfHDfYsmP2ognFG/HBmSrQ1RWOAko+0sCBx+AOVd8hOQ== X-Received: by 2002:a5d:4448:0:b0:367:99fd:d7bb with SMTP id ffacd0b85a97d-36d2758e158mr1795503f8f.63.1723142335849; Thu, 08 Aug 2024 11:38:55 -0700 (PDT) Original-Received: from localhost ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429059719ebsm88566335e9.18.2024.08.08.11.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 11:38:55 -0700 (PDT) Original-Received: by localhost (sSMTP sendmail emulation); Thu, 08 Aug 2024 20:38:53 +0200 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=brubar.cs@gmail.com; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147552 Archived-At: Heime writes: > Is this the way to see if a file is accessible via load-path ? > Or do I need 'load-path or similar ? > > (if (locate-file "tema.el" load-path) Maybe. But 'load-path' is for libraries. Its documentation refers to the info node (info "(elisp)Library Search") and that info node documents 'locate-library'. So, maybe, depending on your goal, 'locate-library' is more appropriate. Note that, from the description of 'locate-library', you can jump to its source code, and, thus see how it's implemented relying on 'locate-file'. HTH, Bruno