all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Locating file via load-path
Date: Thu, 08 Aug 2024 21:59:25 +0000	[thread overview]
Message-ID: <UrKx-9HV_VLIwsNkymmTbUk5GX6jduusTCwQVBacu2z8PK2QT1SLrG30lyq7J5PaKayGO7XcU5bq1R-pGMPgQtZWYI0dxXnrxj6vfgrXXt8=@protonmail.com> (raw)
In-Reply-To: <DS7PR10MB523233B5F43170D4D4328BCBF3B92@DS7PR10MB5232.namprd10.prod.outlook.com>

On Friday, August 9th, 2024 at 9:25 AM, Drew Adams <drew.adams@oracle.com> wrote:

> > On Friday, August 9th, 2024 at 7:51 AM, Drew Adams wrote:
> > 
> > > > a test is made, so it is added if required
> > > > 
> > > > (if (locate-file "tema.el" load-path)
> > > > (require 'tema)
> > > 
> > > (require 'tema nil t)
> > > loads it if available, and returns nil otherwise.
> > > 
> > > > (progn
> > > > (add-to-list 'load-path tema-path)
> > > > (require 'tema)))
> > > 
> > > You might as well just add it to `load-path'
> > > unconditionally, unless it's already there:
> > > 
> > > (cl-pushnew tema load-path)
> 
> 
> (I meant tema-path, not tema.)
> 
> > That would be a good thing.
> > 
> > (add-to-list 'load-path tema-path) should add tema-path only if it isn't
> > there yet. Why cl-pushnew ?
> 
> 
> Either is OK. The doc of `add-to-list' says: you are usually better off using` push' or `cl-pushnew'. It doesn't say why, and neither does the Elisp manual. Some people get confused over the args to` add-to-list',
> in particular, that it's a function, so it evaluates its
> args, so if you want to provide a variable literally
> then you need to quote it.

Are you referring to quoting LIST-VAR ? add-to-list expects the first 
argument to be the symbol of a list variable, not the list itself.



  reply	other threads:[~2024-08-08 21:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 16:59 Locating file via load-path Heime
2024-08-08 18:33 ` Eli Zaretskii
     [not found]   ` <DDYXKsMNq=5FPzC2iDOfz6ETUaC7H-vuOcAXfNk2GimDjscOHbeHzG6k=5FZi7IY3HMwckcFmb=5FFSBn9rYaDxKDD5OSzLlcq7SJksWLI=5FczwUvc=3D@protonmail.com>
     [not found]     ` <Q1xAU81Xn9UZt8V95EDVRqwUvUNfmlk3rU-arBrbQ8CMmh7IpXd3xgEt4qZwH3zJ7l989GxHrEb=5F3R9eJ-sd1SoofwcnBVpnYWjxU5ni1TE=3D@protonmail.com>
2024-08-08 19:09   ` Heime
2024-08-08 19:15     ` Heime
2024-08-08 19:42       ` Heime
2024-08-08 19:51         ` [External] : " Drew Adams
     [not found]           ` <dfOBGQnGfe22rKYsEePcBLU2WWYEt5JBoyDuis=5FJnnmM90x5w2lHn6cWlp61yG63OxKWTfWP0=5FBk9F6-836xfAfBbbx6gOHzOTAvMzxhnL8=3D@protonmail.com>
     [not found]             ` <DS7PR10MB5 23233B5F43170D4D4328BCBF3B92@DS7PR10MB5232.namprd10.prod.outlook.com>
     [not found]               ` <UrKx-9HV=5FVLIwsNkymmTbUk5GX6jduusTCwQVBacu2z8PK2QT1SLrG30lyq7J5PaKayGO7XcU5bq1R-pGMPgQtZWYI0dxXnrxj6vfgrXXt8=3D@protonmail.com>
2024-08-08 20:07           ` Heime
2024-08-08 21:25             ` Drew Adams
2024-08-08 21:59               ` Heime [this message]
2024-08-08 22:30                 ` Drew Adams
2024-08-08 22:35                   ` Heime
2024-08-09  5:31               ` Eli Zaretskii
2024-08-09 16:19                 ` Drew Adams
2024-08-09 16:51                   ` Christopher Dimech
2024-08-09 17:39                   ` [External] : " Eli Zaretskii
2024-08-09 19:52                 ` Arash Esbati
2024-08-10  5:39                   ` Eli Zaretskii
2024-08-11 13:35                     ` Arash Esbati
2024-08-11 14:11                       ` Eli Zaretskii
2024-08-11 19:49                         ` Arash Esbati
2024-08-11 21:07                           ` [External] : " Drew Adams
2024-08-11 21:24                             ` Christopher Dimech
2024-08-09  5:28           ` [External] : " Eli Zaretskii
2024-08-09  5:21       ` Eli Zaretskii
2024-08-09  5:20     ` Eli Zaretskii
2024-08-08 18:38 ` Bruno Barbier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='UrKx-9HV_VLIwsNkymmTbUk5GX6jduusTCwQVBacu2z8PK2QT1SLrG30lyq7J5PaKayGO7XcU5bq1R-pGMPgQtZWYI0dxXnrxj6vfgrXXt8=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.