* Web mode warts - help ...
@ 2022-01-31 14:08 Skip Montanaro
2022-02-01 20:14 ` Lele Gaifax
0 siblings, 1 reply; 6+ messages in thread
From: Skip Montanaro @ 2022-01-31 14:08 UTC (permalink / raw)
To: Help GNU Emacs
I installed web-mode a few days ago to help me more easily develop some
Jinja2 templates for my website. When a template is largely made up of
Jinja2 blocks and HTML tags it seems to work admirably. It doesn't seem to
flow text the way I'd expect in the presence of inline tags. The biggest
problem is that it when I add <a>...</a> tags around a chunk of text in a
paragraph it reflows the rest of the text after that so it's indented with
the beginning of the href attribute. Here's a snippet:
than a static collection of emails. The current incarnation
was built with <a href="https://nginx.org/">NGINX</a>,
<a href="https://gunicorn.org/">Gunicorn</a>, and <a href="
https://flask.palletsprojects.com/">Flask</a>. It
includes
a bit
different
presentation
and
navigation
That weird bit of text was reflowed as soon as I closed the <a> tag on the
Flask reference. (I've also seen it when typing "/" within the href.) In
addition to creating a bunch of extra work to get things properly
structured again, the automatic reflow weirdness only highlights my second
complaint, that it seems to refuse to wrap text at the fill-column as I
type. I'm constantly having to manually fill the paragraph.
A third gripe. I enter <ul>, hit return. I enter <li> then type the text
for that list item. I type </ and instead of closing the list item, it
closes the unordered list. What's up with that?
I didn't see anything on the web-mode website which would suggest how to
fix these problems. Can someone explain how to get it to change (any of)
these behaviors?
Thanks,
Skip Montanaro
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Web mode warts - help ...
2022-01-31 14:08 Web mode warts - help Skip Montanaro
@ 2022-02-01 20:14 ` Lele Gaifax
2022-02-02 2:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-02 16:02 ` Skip Montanaro
0 siblings, 2 replies; 6+ messages in thread
From: Lele Gaifax @ 2022-02-01 20:14 UTC (permalink / raw)
To: help-gnu-emacs
Skip Montanaro <skip.montanaro@gmail.com> writes:
> I enter <ul>, hit return. I enter <li> then type the text for that list
> item. I type </ and instead of closing the list item, it closes the
> unordered list. What's up with that?
Strange, can't replicate the problem here, and never occurred to me, IIRC.
What version are you using? Mine is "17.0.4".
With regards to the reflow, yes, that's sometime very annoying. I'm used to
set web-mode-enable-auto-indentation to nil, and that seems to alleviate the
problem. Does that help in your case?
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it | -- Fortunato Depero, 1929.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Web mode warts - help ...
2022-02-01 20:14 ` Lele Gaifax
@ 2022-02-02 2:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-02 16:15 ` Skip Montanaro
2022-02-02 16:02 ` Skip Montanaro
1 sibling, 1 reply; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-02 2:17 UTC (permalink / raw)
To: help-gnu-emacs
Lele Gaifax wrote:
>> I enter <ul>, hit return. I enter <li> then type the text
>> for that list item. I type </ and instead of closing the
>> list item, it closes the unordered list. What's up
>> with that?
>
> Strange, can't replicate the problem here, and never
> occurred to me, IIRC. What version are you using? Mine is
> "17.0.4".
CHAOS AND DISHARMONY IN THE GALAXY!
Some people say you don't have to close list item tags because
they are closed implicitly either by the next list item tag or
by the end of the list.
Other people disagree ...
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Web mode warts - help ...
2022-02-01 20:14 ` Lele Gaifax
2022-02-02 2:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-02 16:02 ` Skip Montanaro
1 sibling, 0 replies; 6+ messages in thread
From: Skip Montanaro @ 2022-02-02 16:02 UTC (permalink / raw)
To: Lele Gaifax; +Cc: Help GNU Emacs
> > I enter <ul>, hit return. I enter <li> then type the text for that list
> > item. I type </ and instead of closing the list item, it closes the
> > unordered list. What's up with that?
>
> Strange, can't replicate the problem here, and never occurred to me, IIRC.
> What version are you using? Mine is "17.0.4".
web-mode-version is reported as 17.0.0. (You'd think after all these
years using open source software I'd understand that every bug report
needs details about the software being run, but noooooo...)
> With regards to the reflow, yes, that's sometime very annoying. I'm used to
> set web-mode-enable-auto-indentation to nil, and that seems to alleviate the
> problem. Does that help in your case?
Thanks, Lele, yes that does seem to have a positive impact on
paragraph flow. Will stick that in my init.el.
Skip
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Web mode warts - help ...
2022-02-02 2:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-02-02 16:15 ` Skip Montanaro
2022-02-02 19:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 6+ messages in thread
From: Skip Montanaro @ 2022-02-02 16:15 UTC (permalink / raw)
To: Emanuel Berg, Help GNU Emacs
> CHAOS AND DISHARMONY IN THE GALAXY!
>
> Some people say you don't have to close list item tags because
> they are closed implicitly either by the next list item tag or
> by the end of the list.
>
> Other people disagree ...
Thanks, yeah I'm aware (despite my absence from the front end of the web
for a couple decades) that closing <li> (and <p>) has often been deemed
optional. Still, you'd expect a tool intended to support construction of
HTML(-derived) documents would do the consistent thing, especially since it
seems to close paragraphs as expected. This brings to mind Postel's Law
<https://en.wikipedia.org/wiki/Robustness_principle> ("be conservative in
what you do, be liberal in what you accept") and the Zen of Python
("Special cases aren't special enough to break the rules. Although
practicality beats purity."). I'm not sure which of those clauses applies
here. <wink>*
crawling-back-into-my-hole-ly yr's,
Skip
* For those not familiar with Python (does anybody fall into that camp
nowadays?) and its history, in addition to many other technical
contributions to the language and its C implementation, Tim Peters wrote
the Zen of Python many years ago (maybe 25?). You can view it by executing
"import this" at a Python prompt. Instead of the more familiar ";-)"
emoticon, Tim winks (when necessary) using "<wink>". He also signed off
with a specifically styled phrase which I tried to replicate above. (In
case you haven't figured this out by now, I hold Tim in high regard.)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Web mode warts - help ...
2022-02-02 16:15 ` Skip Montanaro
@ 2022-02-02 19:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-02-02 19:20 UTC (permalink / raw)
To: help-gnu-emacs
Skip Montanaro wrote:
> For those not familiar with Python (does anybody fall into
> that camp nowadays?) and its history, in addition to many
> other technical contributions to the language and its
> C implementation, Tim Peters wrote the Zen of Python many
> years ago (maybe 25?).
22y 7m 29d 0h 0min 0s (8279 days) [198696 hours] ago
https://mail.python.org/pipermail/python-list/1999-June/001951.html
https://dataswamp.org/~incal/conf/.zsh/time
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-02 19:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31 14:08 Web mode warts - help Skip Montanaro
2022-02-01 20:14 ` Lele Gaifax
2022-02-02 2:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-02 16:15 ` Skip Montanaro
2022-02-02 19:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-02 16:02 ` Skip Montanaro
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).