From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Loading a package applies automatically to future sessions? Date: Sun, 4 Feb 2018 23:15:00 -0500 Message-ID: References: <76b1fb81-54c0-c213-a542-dc7b9838c473@gmail.com> <2df2ff0a-6bbd-4d39-c830-ce2891909418@gmail.com> <0322c9de-6882-83f3-39ee-66bbb692579a@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1517804035 3574 195.159.176.226 (5 Feb 2018 04:13:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2018 04:13:55 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 05:13:50 2018 Return-path: Envelope-to: ged-emacs-devel@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 1eiYA3-0000F5-CL for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2018 05:13:43 +0100 Original-Received: from localhost ([::1]:50220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiYC4-0000T7-DO for ged-emacs-devel@m.gmane.org; Sun, 04 Feb 2018 23:15:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiYBL-0000ST-Dw for emacs-devel@gnu.org; Sun, 04 Feb 2018 23:15:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eiYBK-0003Ii-Ij for emacs-devel@gnu.org; Sun, 04 Feb 2018 23:15:03 -0500 Original-Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:46348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eiYBK-0003Gy-D9 for emacs-devel@gnu.org; Sun, 04 Feb 2018 23:15:02 -0500 Original-Received: by mail-qt0-x229.google.com with SMTP id h4so10316131qtn.13 for ; Sun, 04 Feb 2018 20:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:cc:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=hoaRNS1jGLYDOw/AMKh0n0y5TjaeAVAalnSIz84XEKo=; b=WgqfMONArwIuksP4tb7spahWhWD/Ryz+EGxDeEW0DxftMpHMFIMvf2rjUnNSmcRcUM YTFNYC/Kh2eXdF1H/YkfPxkyNQFO4OVvvgQnT+o25Jy/UOgxeUIqWDvu0U+f56RwJ+4R 0dgCRhxlPvGbu9TMpFkheUFfN4d1gtYHDWtBG+VIj8z5LodxkdqOfcUlKG61w56ydXYN 9jYNJ6h13yCoLlo8/8UvsE0eZhI2BEOygqbtO2G59kSMMsy1unpQDjDWp7Uzhgxd6YFS dq/AUNPIDOvoszT4MTZwb4uD2roO9uiJulK3ft4NgpoV8z56MZ2nsrD+ylWfKkuwoeX5 /osw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hoaRNS1jGLYDOw/AMKh0n0y5TjaeAVAalnSIz84XEKo=; b=bKBrw7gO7Gr6kywNgBvKNX17DHM7eNjLVEwheEM8ZwbHLcaVEDKtymjikR4WCcU9ph mXy2MSht2f53/G/S4NPlO4/to2MwusZwkOuEX4rE1My+WufNbc2CaNS4HEGyH/R7iJHN k+K8MLEQxDwpFPfZgrW0QZh7E52qR5vVM5SpbD0irqipm53MWmT/yplvLYVZbmmQxV+o 74QRu0x1ai8Ly1NrfptS5utbe4VhV8WzeA2MggKIDeWTeMfGgDXAi2HRlWiUX2cvwqZn zb6K5ueNSYtVfECvIMdLuoL8PRVFXCVzOLxa0Wy9F7bjODKq10i2zWV23K2xXedCKrZ3 IEeg== X-Gm-Message-State: AKwxytd+fEKmSsFjlhkB++B1xIsF9gI7z0bFbqgleUCndEsLydOYO/Aq tUO/tsYjlEKxU8Eub7SMOYc+eIwZ X-Google-Smtp-Source: AH8x224/s+HfH/7zBey3AB2WhtBmI/6I0tkvTBHgiSI7f0jOv5oWG6Ya8mEmkKmYqVD7XGEGEGlItw== X-Received: by 10.200.62.1 with SMTP id z1mr25930627qtf.113.1517804101706; Sun, 04 Feb 2018 20:15:01 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:b907:8a2e:155c:3c44? ([2601:184:4180:66e7:b907:8a2e:155c:3c44]) by smtp.gmail.com with ESMTPSA id d20sm5279646qtn.61.2018.02.04.20.15.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Feb 2018 20:15:01 -0800 (PST) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222536 Archived-At: On 2018-02-04 20:08, Richard Stallman wrote: > > > Does Python have autoloads? I would expect not. > > > Yes, in two senses: > > > * Installing a package with 'pip' commonly installs small binaries in your path, so you can call the program from the command line. > > * Python has .pth files that work essentially like Emacs autoloads. These aren't used very commonly. > > How do these autoload-like constructs in Python interact with > the usual need to 'import' a package to make its entry points accessible? They're the first thing the interpreter runs when it starts. You can write 'import foo' on a separate line, and then python imports 'foo' before running your actual program. The code in 'foo' can then introduce new global names by modifying the builtins dictionary (this isn't a very common practice)