From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alessandro Bertulli Newsgroups: gmane.emacs.help Subject: Re: Unicode characters for transcribing to pdf Date: Mon, 05 Sep 2022 00:16:31 +0200 Message-ID: <87fsh6hjgj.fsf@gmail.com> References: <874jxsqehn.fsf@fastmail.fm> <87edwve99q.fsf@gmail.com> <86y1v38fnn.fsf@gnu.org> <87o7vwk9g0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37283"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.9; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 05 00:19:25 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 1oUxxc-0009bD-UI for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 00:19:24 +0200 Original-Received: from localhost ([::1]:46104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUxxc-00080K-1z for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 04 Sep 2022 18:19:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUxwv-0007tU-Lt for help-gnu-emacs@gnu.org; Sun, 04 Sep 2022 18:18:41 -0400 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:44919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUxwt-0002YN-T9 for help-gnu-emacs@gnu.org; Sun, 04 Sep 2022 18:18:41 -0400 Original-Received: by mail-ej1-x631.google.com with SMTP id kk26so13644783ejc.11 for ; Sun, 04 Sep 2022 15:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date; bh=WfYGNE2yOnNrOYKYM8XAIQO67nEBViLB6alK1HhxRaA=; b=M8LkDhurLtNeD9kG8k1+Ug0q9FAJS6KA9TLr6f6GRoNKQyZ8IRmlSqGtCh9Ee4IclH DTmmmrxbN6PEAL7LeFvE7M6p0HMiUzxAG37wwLckuaXV6puthg49sKIp9KwtoDD/CIv2 G/AwcKtI79fuWXYWB3xNsWfaGcmIBsdSe29ktNMeMWn8NrLdjYH+GSp1y1ZqAHo8VBqn M/fIPqo6ibOaQty4NxA/VQGZpzuAGB7wsoCkXk/NK2vQwBRVq3KPWNfzJ9K8uYfYUjFJ tlciCzmKo6uSJ5133ILjzhPLzCBywy6DdRcg8P1abpeTQlV/GqRojCOYnA0B1OyYzmgt D+7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date; bh=WfYGNE2yOnNrOYKYM8XAIQO67nEBViLB6alK1HhxRaA=; b=eCgMIOHiPy63jxrlQDBfqZg89ELmHGrvx3WEdF9ji7R3SA0j4xADiXtvPVq9KKEeeH HW7XtmYCcNXArYWqlEOI4LTZYJQNW5md+z2KoYGts3W0jKZOKalPkGfRw60RxBSDzBaO 7wWV3hNPGKb4kXjOS82luJ89586x5NI2kh/BpFSBi4yVKZZl/48JWlUIC02haSHlGPkw gFMdFED/eYCBxMGemmXl1aK5LKy9A6y66CFnVgSlFiIaeqhSon+Qwuyd16v6g+oFPoz+ u0sMbQWv4zPaHEyjrlSqfsvaaiJXwM7jCNdw/jGr5eNTR9lH+mJMTHHo+aXqma5Mk1WP PcVQ== X-Gm-Message-State: ACgBeo29rTHfokGO4Jlp7PexvOLMmyrW3Tn154Fk8GmQ0mwph1jb7enX T8LL9TW+jjOsOZnClD0JAqIghjQjo/E= X-Google-Smtp-Source: AA6agR6WBaBL1FRC8Gm5TBQl8jbmr/m4wWOiCElpCVGqn4kp8yP/+kb3G/hlaMNbCgdZHK5OwEM4zw== X-Received: by 2002:a17:906:c150:b0:751:288b:671d with SMTP id dp16-20020a170906c15000b00751288b671dmr8968300ejc.549.1662329918080; Sun, 04 Sep 2022 15:18:38 -0700 (PDT) Original-Received: from commodoroII (2-235-154-9.ip228.fastwebnet.it. [2.235.154.9]) by smtp.gmail.com with ESMTPSA id f18-20020a17090631d200b007336c3f05bdsm4264883ejf.178.2022.09.04.15.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 15:18:37 -0700 (PDT) In-reply-to: Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alessandro.bertulli96@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:139240 Archived-At: Stefan Monnier via Users list for the GNU Emacs text editor writes: > `LaTeX-mode-map`, like most package variables, is only defined once > its package is actually loaded, which is done lazily in response to the > use of the package (e.g. opening a LaTeX file). > > So it's normal that `LaTeX-mode-map` is not defined when your init file > is loaded. This is on purpose to try and speed up Emacs's startup. > > You can use things like: > > (with-eval-after-load 'latex > (define-key LaTeX-mode-map (kbd "C-c a") #'my-bar) > (define-key LaTeX-mode-map (kbd "C-c b") #'my-foo)) You honestly opened a world to me. I have long wondered the difference between require and with-eval-after-load (of course I could have read the docs, but I never found time). :-) > or > > (defun my-latex-setup () > (define-key LaTeX-mode-map (kbd "C-c a") #'my-bar) > (define-key LaTeX-mode-map (kbd "C-c b") #'my-foo)) > (add-hook 'LaTeX-mode-hook #'my-latex-setup) > > in order to delay the customization to after the variable is defined. Isn't this redundant? You call the function every time a LaTeX file is loaded. The first method is preferrable, right? Alessandro