GNU bug report logs -
#36009
[PATCH] Use lexical-binding in textmodes/page.el and add tests
Previous Next
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.
Full log
View this message in rfc822 format
[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)]
This bug report was last modified 6 years and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.