From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: ox-html, top-row-p Date: Tue, 15 Dec 2015 00:05:31 +0100 Message-ID: References: <87lh8wzlwa.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ad118da57f00526e3b63e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8cBk-0006ZZ-MZ for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 18:05:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8cBj-00052U-K0 for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 18:05:52 -0500 Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:33295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8cBj-00052N-F5 for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 18:05:51 -0500 Received: by oigy66 with SMTP id y66so28293773oig.0 for ; Mon, 14 Dec 2015 15:05:50 -0800 (PST) In-Reply-To: <87lh8wzlwa.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Fabrice Popineau , "emacs-orgmode@gnu.org" --001a113ad118da57f00526e3b63e Content-Type: text/plain; charset=UTF-8 2015-12-14 23:49 GMT+01:00 Nicolas Goaziou : > Hello, > > Fabrice Popineau writes: > > > So the problem is due to lexical binding (I am using emacs 25 devel > branch). > > The following variables can't be dynamically bound anymore in ox-html: > > row-number, rowgroup-number, start-rowgroup-p, end-rowgroup-p, > > top-row-p, bottom-row-p > > . > > There are 2 options : > > - declare them with defvar > > - pass them to eval as an environment. > > Here is a patch for the second option, but I wonder if the first one > > wouldn't be better. > > Another option would be to remove that ugly `eval' hack altogether, and > instead use a function returning a string, called with 6 arguments (or > with 3 arguments: row-number, rowgroup-number, and list of symbols among > `top', `bottom', `start' and `end'). > > WDYT? > I am not fond of eval at all, at least not in this specific case. So yes, your way is at least as good as what I did. Fabrice --001a113ad118da57f00526e3b63e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


2015-12-14 23:49 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.f= r>:
Hello,

Fabrice Popineau <fabrice.= popineau@gmail.com> writes:

> So the problem is due to lexical binding (I am using emacs 25 devel br= anch).
> The following variables can't be dynamically bound anymore in ox-h= tml:
> row-number, rowgroup-number, start-rowgroup-p, end-rowgroup-p,
> top-row-p, bottom-row-p
> .
> There are 2 options :
> - declare them with defvar
> - pass them to eval as an environment.
> Here is a patch for the second option, but I wonder if the first one > wouldn't be better.

Another option would be to remove that ugly `eval' hack altogeth= er, and
instead use a function returning a string, called with 6 arguments (or
with 3 arguments: row-number, rowgroup-number, and list of symbols among `top', `bottom', `start' and `end').

WDYT?

I am not fond of eval at all, at = least not in this specific case.
So yes, your way is at least as = good as what I did.

Fabrice

--001a113ad118da57f00526e3b63e--