all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: Kyle Meyer <kyle@kyleam.com>,
	Marco Wahl <marcowahlsoft@gmail.com>,
	emacs-orgmode@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Using lexical-binding
Date: Sat, 20 Mar 2021 06:34:19 +0300	[thread overview]
Message-ID: <536059.1616211259@apollo2.minshall.org> (raw)
In-Reply-To: Your message of "Fri, 19 Mar 2021 19:23:32 +0300." <352069.1616171012@apollo2.minshall.org>

> but, iiuc, that relies on dynamic binding.  so, as =lexical-binding= is
> =t=, i don't have access to those appealing variables.

from reading the elisp manual, it seems that one could define those
variables to be "special variables", and, iiuc, one can achieve this by
using a =defvar= without a value, previous to the =let= where values are
assigned.  something like (for just full-block):

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index af2c9912e..a0528bb06 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1121,6 +1121,7 @@ end-body --------- point at the end of the body"
 	 (while (re-search-forward org-babel-src-block-regexp nil t)
 	   (when (org-babel-active-location-p)
 	     (goto-char (match-beginning 0))
+	     (defvar full-block)
 	     (let ((full-block (match-string 0))
 		   (beg-block (match-beginning 0))
 		   (end-block (match-end 0))

i could do a patch in this style, for all these variables.

cheers, Greg


  reply	other threads:[~2021-03-20  3:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 21:11 Using lexical-binding Stefan Monnier
2021-02-24  0:26 ` Kyle Meyer
2021-02-24  3:44   ` Kyle Meyer
2021-02-24  4:01     ` Samuel Wales
2021-02-24  4:33   ` Stefan Monnier
2021-02-25  5:42     ` Kyle Meyer
2021-02-25  5:41 ` Kyle Meyer
2021-03-04  6:03   ` Kyle Meyer
2021-03-04  9:11     ` Marco Wahl
2021-03-06 16:10     ` Stefan Monnier
2021-03-06 17:08       ` Kyle Meyer
2021-03-06 22:33         ` Stefan Monnier
2021-03-09  5:35           ` Kyle Meyer
2021-03-09 14:09             ` Stefan Monnier
2021-03-10  4:16               ` Kyle Meyer
2021-03-10 16:32                 ` Stefan Monnier
2021-03-19 16:23                 ` Greg Minshall
2021-03-20  3:34                   ` Greg Minshall [this message]
2021-03-20  4:48                   ` Kyle Meyer
2021-03-20  5:33                     ` Greg Minshall
2021-03-21 16:04                       ` Kyle Meyer
2021-03-21 17:14                         ` Greg Minshall

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=536059.1616211259@apollo2.minshall.org \
    --to=minshall@umich.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=marcowahlsoft@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.