GNU bug report logs - #36009
[PATCH] Use lexical-binding in textmodes/page.el and add tests

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 30 May 2019 18:33:02 UTC

Severity: wishlist

Tags: patch

Done: Simen Heggestøyl <simenheg <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36009 in the body.
You can then email your comments to 36009 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Thu, 30 May 2019 18:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 30 May 2019 18:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Use lexical-binding in textmodes/page.el and add tests
Date: Thu, 30 May 2019 20:31:59 +0200
[Message part 1 (text/plain, inline)]
I've written unit tests and added the lexical-binding header to
textmodes/page.el.  Please let me know if you have any comments.

Thanks,
Stefan Kangas
[0001-Use-lexical-binding-in-textmodes-page.el-and-add-tes.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Sun, 02 Jun 2019 01:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36009 <at> debbugs.gnu.org,
 Simen Heggestøyl <simenheg <at> gmail.com>
Subject: Re: [PATCH] Use lexical-binding in textmodes/page.el and add tests
Date: Sat, 1 Jun 2019 18:58:02 -0700
Stefan, the patch you proposed here:

https://debbugs.gnu.org/36009

conflicts with the more-recent patch installed by Simen here:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f2a7acdde7207f92de53352f17dd7f506e15a851

My guess is that the Bug#36009 patch is now moot (or at least mootish); Simen is 
more qualified than I to judge.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Sun, 02 Jun 2019 10:26:01 GMT) Full text and rfc822 format available.

Message #11 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 36009 <at> debbugs.gnu.org, stefan <at> marxist.se
Subject: Re: [PATCH] Use lexical-binding in textmodes/page.el and add tests
Date: Sun, 02 Jun 2019 12:25:04 +0200
Oh, sorry Stefan, what a coincidence! I chose that file at random
yesterday. I should do a Debbugs search in advance next time.

Regarding the tests they look almost identical, except that I left out
tests for `count-lines-page' and `what-page', because I was unsure
whether they would be too dependent on the format of the user messages.

Maybe it would be good to factor out the meat of `count-lines-page'
and `what-page' into two internal functions returning just the raw
numbers, test those, and turn the interactive functions into
interfaces for them?

-- Simen




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Thu, 13 Jun 2019 22:03:02 GMT) Full text and rfc822 format available.

Message #14 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 36009 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#36009: [PATCH] Use lexical-binding in textmodes/page.el and
 add tests
Date: Fri, 14 Jun 2019 00:02:21 +0200
[Message part 1 (text/plain, inline)]
Simen Heggestøyl <simenheg <at> gmail.com> writes:
> Oh, sorry Stefan, what a coincidence! I chose that file at random
> yesterday. I should do a Debbugs search in advance next time.

No worries -- this fruit was clearly ripe for the taking. :)

> Regarding the tests they look almost identical, except that I left out
> tests for `count-lines-page' and `what-page', because I was unsure
> whether they would be too dependent on the format of the user messages.
>
> Maybe it would be good to factor out the meat of `count-lines-page'
> and `what-page' into two internal functions returning just the raw
> numbers, test those, and turn the interactive functions into
> interfaces for them?

Thanks for your input.

I did an experiment in your suggested direction, but it didn't come
out very successful.  In particular, I felt like I had to make this
simple and straightforward code ugly and convoluted.  I could attach
the final result of that experiment here, but I don't think it's very
helpful.

Based on this, I'm instead suggesting the attached simple patch for
installation.  It depends on the message string, but this should be
easy to update in the future if the format changes.

Thanks,
Stefan Kangas
[0001-Add-tests-for-count-lines-page-and-what-page.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Sat, 22 Jun 2019 10:56:02 GMT) Full text and rfc822 format available.

Message #17 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36009 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#36009: [PATCH] Use lexical-binding in textmodes/page.el and
 add tests
Date: Sat, 22 Jun 2019 12:55:17 +0200
[Message part 1 (text/plain, inline)]
How about something along these lines?

-- Simen
[Message part 2 (text/html, inline)]
[0001-Split-up-and-add-tests-for-two-page.el-functions.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Sat, 22 Jun 2019 21:33:02 GMT) Full text and rfc822 format available.

Message #20 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Simen Heggestøyl <simenheg <at> gmail.com>
Cc: 36009 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#36009: [PATCH] Use lexical-binding in textmodes/page.el and
 add tests
Date: Sat, 22 Jun 2019 23:32:08 +0200
Simen Heggestøyl <simenheg <at> gmail.com> writes:
> How about something along these lines?

Indeed, that's better than what I could come up with.
+1 from me.

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36009; Package emacs. (Sat, 22 Jun 2019 23:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 36009 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stefan Kangas <stefan <at> marxist.se>, Simen Heggestøyl
 <simenheg <at> gmail.com>
Cc: 36009 <at> debbugs.gnu.org
Subject: Re: bug#36009: [PATCH] Use lexical-binding in textmodes/page.el and
 add tests
Date: Sat, 22 Jun 2019 16:57:06 -0700
Stefan Kangas wrote:
> Simen Heggestøyl <simenheg <at> gmail.com> writes:
>> How about something along these lines?
> Indeed, that's better than what I could come up with.
> +1 from me.

Thanks. Simen, would you please install this?




Reply sent to Simen Heggestøyl <simenheg <at> gmail.com>:
You have taken responsibility. (Sun, 23 Jun 2019 05:30:02 GMT) Full text and rfc822 format available.

Notification sent to Stefan Kangas <stefan <at> marxist.se>:
bug acknowledged by developer. (Sun, 23 Jun 2019 05:30:02 GMT) Full text and rfc822 format available.

Message #28 received at 36009-done <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Stefan Kangas <stefan <at> marxist.se>, 36009-done <at> debbugs.gnu.org
Subject: Re: bug#36009: [PATCH] Use lexical-binding in textmodes/page.el and
 add tests
Date: Sun, 23 Jun 2019 07:29:38 +0200
[Message part 1 (text/plain, inline)]
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> Simen, would you please install this?

Done!

-- Simen
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 21 Jul 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.