emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Greg Minshall <minshall@umich.edu>
Cc: 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 00:48:52 -0400	[thread overview]
Message-ID: <87o8fe4eh7.fsf@kyleam.com> (raw)
In-Reply-To: <352069.1616171012@apollo2.minshall.org>

Greg Minshall writes:

> hi.  i just upgraded to
> : Org mode version 9.4.4 (9.4.4-27-gb712b9-elpa @ /home/minshall/.emacs.d/elpa/org-20210315/)
>
> and, have also just started playing with
> (org-babel-map-inline-src-blocks), the documentation for which says
> ----
> During evaluation of BODY the following local variables
> are set relative to the currently matched code block.
> ...
> ----

Is there a specific error/misbehavior that you're seeing?

The patch in this thread switched only one file, lisp/org-agenda.el,
over to lexical binding.  org-babel-map-inline-src-blocks is in ob-core,
and that file has used lexical binding since 6cefae163 (ob-core: Use
lexical binding, 2016-06-20).

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

org-babel-map-inline-src-blocks is a macro, and these variables are
defined in its expansion.  Try:

  (pp-macroexpand-expression
   '(org-babel-map-src-blocks nil
      (message "%d %s %s" beg-block lang body)))


  parent reply	other threads:[~2021-03-20  4:49 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
2021-03-20  4:48                   ` Kyle Meyer [this message]
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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87o8fe4eh7.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=marcowahlsoft@gmail.com \
    --cc=minshall@umich.edu \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).