From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MEVZMUh1/2EszQAAgWs5BA (envelope-from ) for ; Sun, 06 Feb 2022 08:14:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CEQqKkh1/2EoCgAAG6o9tA (envelope-from ) for ; Sun, 06 Feb 2022 08:14:16 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1A3E9D8AB for ; Sun, 6 Feb 2022 08:14:16 +0100 (CET) Received: from localhost ([::1]:54752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGbkV-0007Zg-2X for larch@yhetil.org; Sun, 06 Feb 2022 02:14:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGXW4-0005uA-Iq for emacs-orgmode@gnu.org; Sat, 05 Feb 2022 21:43:04 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGXVz-0002RJ-Ib for emacs-orgmode@gnu.org; Sat, 05 Feb 2022 21:43:04 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3E1945C010E for ; Sat, 5 Feb 2022 21:42:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 05 Feb 2022 21:42:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tianshu.me; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=IyiieANjrLe1Tq NlsPS0opL8w4kQU0qjulk4klPAoQc=; b=CL+HxcMXHewXLu6qVA+9Nd1nEKpxZg 922vNQtfVemw0cqpJdoOg/ryBnYdCiocZlh1b3UVbp4MbJ9n838OY2ngEZeuqpqa ACm+Obh7Rvzaj0Gytz3h+03L79to2jClmoiKc94YyJIGuFZ865jh0Pf/Y3R6w795 rO3FipV+l6/5jtL+YlTePUgqTW0wcw2fGkFawneX1G3MB4twuk+/bnyNbNbf4Nx2 2t5d1bcdK7LhmRhvNdyQGe4zbTEYuv+dUiNbZHDipUvWyE5Cymk+/u1U5UO9nQ/N ykNGM4daqs9uu3u3/ZA6EiLvP63AtEOV2qhU8o6HVSBM18/UbONBKPUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=IyiieANjrLe1TqNlsPS0opL8w4kQU0qjulk4klPAoQc=; b=hHYF3g9+ DYEts3MAHdwpw2aDGMVPc+ArASS0mr/20eco211Hdb5j5wuoOf38bRC7pnqmNg7E 51elpVXSn6oXZES/a+izna94a2jfkTpZp1c6C2UZCpR0jBnmMS7jPsIa6qj5eiER gmEBucxS8lHT3fnNQA0AXAU+ZTigY2S+kf0HZygP3fckFH8yp+cnbb14K+wPhqnt 2RxXIHOyv8ns56KmMNHHPh3suLpHvUX7TKCVxhyBjbHbgztm1nddWSRzBsPc1BHz 0xfgVr4YGLlEVrXBLtz+9zuq+uMfNnnk1YR3Rm1WrgWk8mf+KXdJUgqmGMIT2ibf A/LBSu7K8JDiKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrhedvgdeglecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufffjgfkgggtgfesthhqre dttderjeenucfhrhhomhepvfhirghnshhhuhcuhggrnhhguceofigrnhhgsehtihgrnhhs hhhurdhmvgeqnecuggftrfgrthhtvghrnhepvdeutefhteehveffteffffetiefhtdfhhf etteehgffhhedvjeetteeujeehiedtnecuffhomhgrihhnpehgnhhurdhorhhgpdhorhhg mhhouggvrdhorhhgpdhmshihshdvrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepfigrnhhgsehtihgrnhhshhhurdhmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 5 Feb 2022 21:42:56 -0500 (EST) References: User-agent: mu4e 1.6.10; emacs 28.0.90 From: Tianshu Wang To: emacs-orgmode@gnu.org Subject: Re: Lazy load of org-protocol (Max Nikulin) Date: Sun, 06 Feb 2022 10:40:24 +0800 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=66.111.4.28; envelope-from=wang@tianshu.me; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 06 Feb 2022 02:06:29 -0500 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644131656; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IyiieANjrLe1TqNlsPS0opL8w4kQU0qjulk4klPAoQc=; b=KZdft9alR7wZa9G6s9vQs5ZnTrpgK8E9zN3/8HaQABnkARQZD7CsKhElbuy0WyxDzZmoOD 0VFeZmotr+db5Y3mSM5B+PafB9YiNe/qBzwosQh04JnDJp393T06LbFp9zT3z1L6vu21Lm 6+Qqdw0IYtPfzTLTPiUYx7tbHGSeinw+Y1ZjHRIEyFnIfUdffsg5D3+nYwefbB3dh2Q3Oi lvDCvvtDAllBQsWmp2G5w43dcWx0y6MoSZvZFQ0P/fF1Ef/UL1B8HeC2eALyaU1I+/SVU8 0s7mOTd9psOxwAC4mJrnq4Hlk6OMVeV0sIyJ6KXm/8Y2oJICGsiPEbc67tpzUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644131656; a=rsa-sha256; cv=none; b=slsN0dWX93s3nC/0dHJ/TW3bg1ExQ6myUWPybRCwl5zh8aGnb9ejQ/LYkO56EK0W165yQe 9uQwLmMKUqfjjblMG0asgsPc+K8zfgYbebaSBt5mUXWnfKvONTdcAoNORhzVElvKvelyXK Xcdzf0kws5LP/DucHu379O2xNlQwr8kRDycv7+OiraHssx6kcOVaNWLhTBPkRY4ICH3Rxn +El/AH0Jru2vXkydUkxZtztnff473XGdF6zLAQDljV47I996+Ba5t/jsGl5UkqgXci+Q+e rK/unizazEvrfB6hTti9zsdRlX19h5qrH7Rbwr+CJpkr5RNyBfwbldIUQKoeEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tianshu.me header.s=fm3 header.b=CL+HxcMX; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=hHYF3g9+; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tianshu.me header.s=fm3 header.b=CL+HxcMX; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=hHYF3g9+; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1A3E9D8AB X-Spam-Score: -3.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: odEuNuBAv2VC I have a similar demand that I implemented through the following and it is currently working well. (defadvice server-execute (before enable-org-protocol activate) (unless (featurep 'org-protocol) (require 'org-protocol))) emacs-orgmode-request@gnu.org writes: > Send Emacs-orgmode mailing list submissions to > emacs-orgmode@gnu.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.gnu.org/mailman/listinfo/emacs-orgmode > or, via email, send a message with subject or body 'help' to > emacs-orgmode-request@gnu.org > > You can reach the person managing the list at > emacs-orgmode-owner@gnu.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Emacs-orgmode digest..." > > > Today's Topics: > > 1. Re: [BUG] loading ol-gnus returns an error [9.5 > (release_9.5-194-gdb302d @ > /home/oub/emacs/site-lisp/packages/org/)] (Ihor Radchenko) > 2. [SOLVED] (was: [BUG] loading ol-gnus returns an error [9.5 > (release_9.5-194-gdb302d @ > /home/oub/emacs/site-lisp/packages/org/)]) (Uwe Brauer) > 3. Re: [BUG] org-bibtex-yank does not recognise bibtex entry > [9.6 (9.6-??-e7ea951 ] (Ihor Radchenko) > 4. Re: Problem with org-babel and geiser (Ihor Radchenko) > 5. Lazy load of org-protocol (Max Nikulin) > 6. Re: Shell SRC blocks under Windows (H. Dieter Wilhelm) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 05 Feb 2022 17:37:01 +0800 > From: Ihor Radchenko > To: Uwe Brauer > Cc: emacs-orgmode@gnu.org > Subject: Re: [BUG] loading ol-gnus returns an error [9.5 > (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)] > Message-ID: <87tudd64ea.fsf@localhost> > Content-Type: text/plain > > Uwe Brauer writes: > >> Running a more or less recent master commit of org-mode and GNU emacs >> when loading the ol-gnus file I receive the following error >> >> >> Debugger entered--Lisp error: (void-variable file) >> (load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") >> eval((load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") n= il) >> elisp--eval-last-sexp(nil) >> eval-last-sexp(nil) >> funcall-interactively(eval-last-sexp nil) >> call-interactively(eval-last-sexp nil nil) >> command-execute(eval-last-sexp) > > When does the error occur? Judging from the backtrace, you tried to > evaluate some kind of elisp expression manually with eval-last-sexp. The > expression appears to be > (load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") > > Indeed, file is undefined. I am not sure what Org has to do with the > error. > > Best, > Ihor > > > > ------------------------------ > > Message: 2 > Date: Sat, 05 Feb 2022 11:30:08 +0100 > From: Uwe Brauer > To: emacs-orgmode@gnu.org > Subject: [SOLVED] (was: [BUG] loading ol-gnus returns an error [9.5 > (release_9.5-194-gdb302d @ /home/oub/emacs/site-lisp/packages/org/)]) > Message-ID: <87y22pk3m7.fsf_-_@mat.ucm.es> > Content-Type: text/plain; charset=3D"utf-8" > >>>> "IR" =3D=3D Ihor Radchenko writes: > >> Uwe Brauer writes: >>> Running a more or less recent master commit of org-mode and GNU emacs >>> when loading the ol-gnus file I receive the following error >>> >>> >>> Debugger entered--Lisp error: (void-variable file) >>> (load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") >>> eval((load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") ni= l) >>> elisp--eval-last-sexp(nil) >>> eval-last-sexp(nil) >>> funcall-interactively(eval-last-sexp nil) >>> call-interactively(eval-last-sexp nil nil) >>> command-execute(eval-last-sexp) > >> When does the error occur? Judging from the backtrace, you tried to >> evaluate some kind of elisp expression manually with eval-last-sexp. The >> expression appears to be >> (load file "/home/oub/emacs/site-lisp/packages/org/ol-gnus.el") > > Shame on me: it should be load-file > > I am very sorry. Forget it > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: smime.p7s > Type: application/pkcs7-signature > Size: 5673 bytes > Desc: not available > URL: > > ------------------------------ > > Message: 3 > Date: Sat, 05 Feb 2022 19:22:59 +0800 > From: Ihor Radchenko > To: G=C3=BCnter Lichtenberg > Cc: emacs-orgmode@gnu.org > Subject: Re: [BUG] org-bibtex-yank does not recognise bibtex entry > [9.6 (9.6-??-e7ea951 ] > Message-ID: <87r18h5zho.fsf@localhost> > Content-Type: text/plain; charset=3Dutf-8 > > G=C3=BCnter Lichtenberg writes: > >> In short: >> Expected: Bibtex text is yanked as an orgmode entry >> Actually Happening: Error thrown, nothing yanked > > Thanks for the report! > Fixed on bugfix via 7543da99. > > Best, > Ihor > > > > ------------------------------ > > Message: 4 > Date: Sat, 05 Feb 2022 19:39:16 +0800 > From: Ihor Radchenko > To: Bob Heffernan > Cc: emacs-orgmode@gnu.org > Subject: Re: Problem with org-babel and geiser > Message-ID: <87o83l5yqj.fsf@localhost> > Content-Type: text/plain; charset=3D"utf-8" > > Bob Heffernan writes: > >> Thank you for your response. >> The patch you linked does seem to be intended to fix this issue. >> >> However, I have no experience with applying a patch (to Emacs or anythin= g else). >> On my system, ob-scheme.el.gz can be found at >> /usr/share/emacs/27.2/lisp/org >> can I uncompress the file, patch that, then compress again? >> >> Or, would I need to download the Emacs source, apply the patch and then = recompile? > > It's not a good idea to modify Org packaged together with Emacs. For > testing, you can just use the attached version of ob-scheme.el. Load > your Emacs and Org mode, open the attached ob-scheme.el, and run M-x > eval-buffer. That should be sufficient to test the proposed patch on > your side. > > If the patch solves the problem you are experiencing, let us know. I > will then apply the proposed patch upstream. > > Note that even if I apply the patch, it will only be available on the > latest version of Org mode (Org 9.5.2). It is _not_ what is shipped > together with your Emacs. You will need to upgrade your Org mode using > M-x package-install. See > https://orgmode.org/manual/Installation.html#Installation for details. > > Best, > Ihor > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: ob-scheme.el > URL: > > ------------------------------ > > Message: 5 > Date: Sat, 5 Feb 2022 18:54:37 +0700 > From: Max Nikulin > To: emacs-orgmode@gnu.org > Subject: Lazy load of org-protocol > Message-ID: > Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed > > Hi. > > I would prefer to avoid > (require 'org-protocol) > in emacs init file and to postpone loading till invocation of > emacsclient with org-protocol URI. > > The problem is a hack in org-protocol. URIs are actually treated as > (relative) file names and magic is achieved in an advice for > `server-visit-files' function. So the advice must be installed in advance. > > My first idea was to avoid such magic and to create autoload function > org-protocol-from-argv with body similar to that advice. If it were > possible to get arguments from `command-line-args-left' then invocation > would look like > > emacsclient --eval '(org-protocol-from-argv)' > 'org-protocol:/store-link?url=3Du1&title=3Dt1' > > Unfortunately it is against design of emacs server protocol. If --eval > option is given than everything other is considered as independent > expressions. At the lower level there is no way to transfer `argv` as a > list from client to server process. > > It seems, it works if I add another advice to init.el that loads > org-protocol on demand: > > (defadvice server-visit-files (before org-protocol-lazy-load activate) > (and (not (featurep 'org-protocol)) > (memq nil > (mapcar (lambda (loc) > ;; loc: (file-name . (line . column)) > (not (string-match-p "\\(?:^\\|[/\\\\]\\)org-protocol:" (car > loc)))) > (ad-get-arg 0))) > (progn > (require 'org-protocol) > ;; copy of org-protocol-detect-protocol-server advice, > ;; move to a dedicated function > (let ((flist (if org-protocol-reverse-list-of-files > (reverse (ad-get-arg 0)) > (ad-get-arg 0))) > (client (ad-get-arg 1))) > (catch 'greedy > (dolist (var flist) > ;; `\' to `/' on windows. FIXME: could this be done any better? > (let ((fname (expand-file-name (car var)))) > (setq fname (org-protocol-check-filename-for-protocol > fname (member var flist) client)) > (if (eq fname t) ;; greedy? We need the t return value. > (progn > (ad-set-arg 0 nil) > (throw 'greedy t)) > (if (stringp fname) ;; probably filename > (setcar var fname) > (ad-set-arg 0 (delq var (ad-get-arg 0)))))))))))) > > I hope, copy of original advice may be avoided by moving its body to a > separate function in org-protocol. > > Do you have have better ideas how to avoid eager loading of org-protocol > from init file? > > > > > ------------------------------ > > Message: 6 > Date: Sat, 05 Feb 2022 16:48:02 +0100 > From: "H. Dieter Wilhelm" > To: Michael Powe > Cc: emacs-orgmode@gnu.org > Subject: Re: Shell SRC blocks under Windows > Message-ID: > Content-Type: text/plain > > Michael Powe writes: > >> On 2/4/2022 15:15, H. Dieter Wilhelm wrote: >>> Hello >>> >>> I installed the software distribution MSYS2 https://www.msys2.org/. And >>> I'd like to call its various shells in org src blocks. First I tried to >>> set explicit-shell-file-name but then my LaTeX exports don't work any >>> longer. >>> >>> Is is it possible to extend org-mode's src blocks with >>> org-babel-shell-names to use either MSYS2 or MinGW shells (instead of >>> cmd.exe)? Unfortunately ob-shell.el doesn't guide me further and I >>> can't find examples or the respective lisp files on how to define the >>> execution functions. >>> >>> GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, >>> cairo version 1.15.10) of 2022-01-14 >>> >>> Org mode version 9.4.6 (9.4.6-13-g4be129-elpaplus @ >>> /home/dieter/.emacs.d/elpa/org-plus-contrib-20210920/) >> >> I'm not aware that I did anything special to get these results, except >> add `(shell . t)` to `org-babel-load-languages`. I mean, it is entirely >> possible that I did, in some other context. I think it's just a matter >> of having bash in your path. > > Yes, you are right, when using > >> #+begin_src sh > > It seems that I'm also running some bash shell! :-) Previously I was > using the src block in this way: > > #+begin_src shell > > and here the shell seems to be com.exe. > > But I'm not sure if I'm halfway there with "sh"? I need to run the > following MSYS2 command AND switch between two arguments (for building > Emacs). > > \MSYS2\msys2_shell.cmd -mingw64 > > and > > \MSYS2\msys2_shell.cmd -msys. > > How could I achieve this within a src block? > > Thanks > > > > End of Emacs-orgmode Digest, Vol 192, Issue 6 > ********************************************* -- Tianshu Wang