all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 35517@debbugs.gnu.org
Subject: bug#35517: 27.0.50; Small improvements to HTML mode
Date: Sun, 23 Jun 2019 10:33:46 -0700	[thread overview]
Message-ID: <87sgs0tddx.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m3y31s5iju.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 23 Jun 2019 19:16:05 +0200")


On 06/23/19 19:16 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Here's an updated patch -- "div" elements should always have "span" and
>> "id" offered as attributes.
>
> This made me confused until I read the code -- which is "class" and
> "id", which makes more sense.  :-)

Oops!

> But...
>
>
> [...]
>
>> +	(unless (or alist quiet)
>> +	  (message "No attributes configured."))
>> +        (when alist
>> +          ;; Add class and id attributes if a) the element has any
>> +          ;; other attributes configured, and b) they're not already
>> +          ;; present.
>> +          (unless (assoc-string "class" alist)
>> +            (setq alist (cons '("class") alist)))
>> +          (unless (assoc-string "id" alist)
>> +            (setq alist (cons '("id") alist))))
>
> Should <div>s always have class/id attributes?  I guess it's unusual to
> have neither, but I find myself writing <div>s all the time with just
> class.  Or just id...

The patch changes the default value of `html-tag-alist' as well, to add
id and class, so that's already taken care of.

>> +(define-skeleton html-div
>> +  "HTML div tag."
>> +  nil
>> +  "<div>" > \n _ \n "</div>" >)
>> +
>> +(define-skeleton html-span
>> +  "HTML span tag."
>> +  nil
>> +  "<span>" > _ "</span>")
>
> The skeleton commands look uncontroversial, though.

Cool.





  reply	other threads:[~2019-06-23 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 23:38 bug#35517: 27.0.50; Small improvements to HTML mode Eric Abrahamsen
2019-05-05 18:38 ` Eric Abrahamsen
2019-06-23 17:16   ` Lars Ingebrigtsen
2019-06-23 17:33     ` Eric Abrahamsen [this message]
2019-06-23 17:39       ` Lars Ingebrigtsen
2019-06-23 18:35         ` Eric Abrahamsen
2019-06-23 18:37           ` Lars Ingebrigtsen
2019-06-24 17:21             ` Eric Abrahamsen

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

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

  git send-email \
    --in-reply-to=87sgs0tddx.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=35517@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.