bug#72952: 30.0.90; Want way to break out of Eshell for loop

2024-09-08 Thread Jim Porter

On 9/2/2024 1:26 AM, Sean Whitton wrote:

X-debbugs-cc: jporterb...@gmail.com

I am trying to run a series of tests like this:

 % for test in tests/tests/tagupl* { tests/using-intree $test }

I want the command to give up as soon as one of the tests fails.  But I
don't think there is any way to break out of the loop?  In POSIX sh, you
could use 'break'.


I actually have a patch sitting in my pile of branches that does this, 
but it needs a fair bit more work to get right. The main thing it needs 
is to keep 'break' from bubbling up too far (e.g. if you run an Eshell 
script from inside a loop, 'break' at the top level of the script 
shouldn't break out of the parent loop).


Another way to do something like this would be to embrace the Lispy-ness 
of Eshell and add a command-form for 'throw' and 'catch'. Something like:


  catch my-tag {
for i in *.el {
 do-stuff
 if something-or-other { throw my-tag }
}
  }

Or even support both 'throw'/'catch' *and* 'break'...





bug#73133: 29.2; EWW fails to render some webpages

2024-09-09 Thread Jim Porter
On 9/8/2024 1:52 PM, Ganimard via Bug reports for GNU Emacs, the Swiss 
army knife of text editors wrote:

I have recently discovered the website gastonle.ru, however it does not
render with Emacs Web Wowser.  It appears to be a relatively simple
website and I cannot see what would prohibit it from rendering.


Checking that page via curl, it appears that it doesn't return a 
Content-Type header. In the absence of that header, EWW assumes that the 
page is plain text.



I have also tried it on an Ubuntu 22.04.4 LTS distro running Emacs 28.1
but it also fails to render.  This therefore appears to be a bug in EWW.


From my reading of RFC9110[1], this is *technically* a bug (we should 
assume application/octet-stream, not text/plain), but that wouldn't fix 
the rendering here; it would probably make things worse. However, per 
the RFC, EWW would be within its rights to guess that the page is HTML, 
e.g. by checking for "". It also recommends having that 
be an option that can be disabled, which is reasonable (and in keeping 
with Emacs's design principles anyway).


[1] https://www.rfc-editor.org/rfc/rfc9110#section-8.3-5