unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Yilkal Argaw <yilkalargawworkneh@gmail.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: set sgml-xml-mode to true in some modes derived from sgml-mode
Date: Thu, 4 Aug 2022 22:29:37 +0300	[thread overview]
Message-ID: <CAJddU=qsoeyfcVj=_1pCDwepFukUiBim9hxs5hc23k7=nc_8pA@mail.gmail.com> (raw)
In-Reply-To: <CAP_d_8UAAC1_GJ4nhXcAowp8U7wd=6se13OV9kXrDxxnkYQzSA@mail.gmail.com>

> Specifically, you[^*] want in your[^**] HTML all closing tags that are
> permitted by the HTML syntax. </p>, </li>, </dd>, but not </input> or
> </img>. (You[^*] also want quotes around all your[^**] attribute
> values.)
May be having a variable that contains an list of tags you want to
close in html (i.e. those that are permitted by the HTML syntax and
are enforced by some standards

> (To OP: You might like a different method of automation. E.g. my
> primary way of writing HTML is: I enter a tag name such as “li”, press
> Tab, and Yasnippet expands it into <li>|</li>. Or I mark a region,
> overwrite it with a tag name like “code”, press Tab, and it gets
> yanked back, surrounded with <code>…</code>.)

I used yasnippet and emmet but I'm currently experimenting with
vanilla emacs features and I was able to setup my own work flow by
using tempo and expand snippeting features. I'm now trying to
understand skeletons which really are not that bad (not-really optimal
either). I'm trying to understand and work on improving these features
in the future and the best place to  really use them and get annoyed
with them.

On Thu, Aug 4, 2022 at 7:56 PM Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
> On Thu, 4 Aug 2022 at 19:57, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> >
> > Yilkal Argaw <yilkalargawworkneh@gmail.com> writes:
> >
> > > While trying to use emacs to edit html files I noticed how the
> > > sgml-tag functions which uses skeletons to insert  tags does not
> > > insert a closing tag for some tags like "<li>" this behaviour changes
> > > by changing the variable "sgml-xml-mode" to a non nil value. Would it
> > > not be better to turn this variable to true some of the derived modes
> > > like html-mode and xml-mode.
> >
> > You don't want the skeleton to insert <li></li> in html-mode --
>
> For some values of “you”, you certainly do.
>
> Specifically, you[^*] want in your[^**] HTML all closing tags that are
> permitted by the HTML syntax. </p>, </li>, </dd>, but not </input> or
> </img>. (You[^*] also want quotes around all your[^**] attribute
> values.)
>
> [^*]: I.
> [^**]: my.
>
> > pretending that HTML is XML isn't recommended.
>
> Not arguing with that, although XHTML was a good idea and I’m sad it
> didn’t play out.
>
>
> (To OP: You might like a different method of automation. E.g. my
> primary way of writing HTML is: I enter a tag name such as “li”, press
> Tab, and Yasnippet expands it into <li>|</li>. Or I mark a region,
> overwrite it with a tag name like “code”, press Tab, and it gets
> yanked back, surrounded with <code>…</code>.)



  reply	other threads:[~2022-08-04 19:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 10:16 set sgml-xml-mode to true in some modes derived from sgml-mode Yilkal Argaw
2022-08-04 10:49 ` Yilkal Argaw
2022-08-04 11:59 ` Stefan Kangas
2022-08-04 12:55 ` Lars Ingebrigtsen
2022-08-04 16:56   ` Yuri Khan
2022-08-04 19:29     ` Yilkal Argaw [this message]
2022-08-05  4:28       ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJddU=qsoeyfcVj=_1pCDwepFukUiBim9hxs5hc23k7=nc_8pA@mail.gmail.com' \
    --to=yilkalargawworkneh@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).