From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: File for minor mode not found Date: Sun, 9 Jan 2022 17:50:19 +0100 Message-ID: References: <878rvpeyek.fsf@gmx.net-MszOZsb----2> <874k6cgap3.fsf@gmx.net-MszaWDg----2> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="szjqQgpqJHNcae6G" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="941"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 09 17:52:03 2022 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 1n6bQJ-000AXT-Pr for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 Jan 2022 17:52:03 +0100 Original-Received: from localhost ([::1]:60714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6bQI-0001pW-Hs for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 Jan 2022 11:52:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6bOl-0000RS-GK for help-gnu-emacs@gnu.org; Sun, 09 Jan 2022 11:50:27 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:36190) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6bOh-0003AQ-Gp for help-gnu-emacs@gnu.org; Sun, 09 Jan 2022 11:50:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=idAIeC+W9pZATCERgMRilLLvM13UDLYNKrwJfW2XbnM=; b=GNr8PT3NmFpZJ5Qfyw5M5gzoUK gp2n+KIIpFUdFqNHBbp6UmYAU0ZQEFhkKyCNJiLc67mDqgznt8ja8ns5Arr24kitoC0eq1PHQbaIR rjJvqsOMQHLvwGGyb+aDKPB+TCKH6Gv04frImQK09E4+cIXUZeK8befo4MGD+h9fCshOdt6vDBtV8 sfIRb8yNvkJXR1L6ybrItZjdT1gwkYceOEnrT9hjml49uNvNTj8dBzdtjLXG3atW96AHscbjpb7qP G6O7bFzIPZpytwLX/46bq+dNW1BOeoSqQAvBFEQjTYkLD4i01rh42y9XoAoPI5mkQy66/tVRhGuuN 2Chs27ZQ==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1n6bOd-0002Fc-Hg for help-gnu-emacs@gnu.org; Sun, 09 Jan 2022 17:50:19 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de 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, 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" Xref: news.gmane.io gmane.emacs.help:135158 Archived-At: --szjqQgpqJHNcae6G Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 09, 2022 at 05:37:49PM +0100, fatiparty--- via Users list for t= he GNU Emacs text editor wrote: [...] > I have difficulty about the utility of 'provide'.=C2=A0 You have pointed = out that (provide 'daph) > simply announces that daph is a feature of the current emacs.=C2=A0 Can i= t be any name?=C2=A0 The=20 > manual states that "calling 'provide' adds 'feature' tothe front of 'feat= ures' if it is not already > in that list".=C2=A0 This suggests that provide should also use=C2=A0 (p= rovide 'daph-ideograms).=C2=A0=20 That depends on how you want to call your feature. Note that once a feature is `provide'd, a `require' of that feature does nothing. Quoting =66rom the docs: require is a built-in function in =E2=80=98C source code=E2=80=99. (require FEATURE &optional FILENAME NOERROR) If feature FEATURE is not loaded, load it from FILENAME. If FEATURE is not a member of the list =E2=80=98features=E2=80=99, then t= he feature is not loaded; so load the file FILENAME. > I guess that one could define the feature as 'daph' when using 'provide'.= =C2=A0 And use the feature 'daph' > when calling 'require'.=C2=A0 In this way, the 'daph' will be recognise t= he 'daph' feature in the features variable, > but use the optional filename "daph-ideograms" Yes, that'd be a way to do it (in theory you could have one file providing several features, for example). > Thus >=20 > daph-ideograms.el > ********************** > =C2=A0 (provide 'daph) >=20 > test.el > *******=20 > =C2=A0 (add-to-list > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 'load-path "~/Admin/bin/gadi-1.0/typex/zig= gurat-protowrit/daph-ideograms") > =C2=A0=C2=A0 ;; Load the Daph Package if it has not already been loaded. > =C2=A0=C2=A0 (require 'daph "daph-ideograms") >=20 > -------- >=20 > My load path is quite long, and wonder how this can be shortened by stori= ng in some other variable > before passing to 'add-to-list'. I don't quite understand your last sentence. What is it you are trying to shorten -- and how? Cheers --=20 t --szjqQgpqJHNcae6G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCYdsSRAAKCRAFyCz1etHa Rko6AJ9+6YX3Emh8wcZLiSO/OC2fBL0jJwCfV6ltWVh1BaeRWU42N0kKHTxrkoE= =ysO+ -----END PGP SIGNATURE----- --szjqQgpqJHNcae6G--