Subject: bug#79401: sgml-tag jumbles attribute and value into the same history list

From: Eli Zaretskii <[email-masked]>
Date: Sat, 13 Sep 2025 12:02:39 +0300

severity 79401 wishlist
thanks

> From: Dan Jacobson <[email-masked]>
> Date: Sun, 07 Sep 2025 21:31:03 +0800
> 
>  C-c C-o     ;; sgml-tag
>  b           ;; self-insert-command
>  l           ;; self-insert-command
>  o           ;; self-insert-command
>  TAB         ;; minibuffer-complete #blockquote
>  RET         ;; exit-minibuffer
>  c           ;; self-insert-command
>  l           ;; self-insert-command
>  a           ;; self-insert-command
>  s           ;; self-insert-command
>  s           ;; self-insert-command
>  RET         ;; exit-minibuffer
>  m           ;; self-insert-command
>  m           ;; self-insert-command
>  m           ;; self-insert-command
>  RET         ;; exit-minibuffer
>  ESC p       ;; previous-history-element
> (Or say we started over with C-c C-o... same thing.)
> 
> At this point we should see "class".
> But instead we see mmm.
> 
> In other words,
> we have just made a
> <blockquote class="mmm">
> so the attribute is "class"
> and the value is "mmm".
> Each needs to be remembered separately,
> not jumbled together.
> 
> The next time we make a blockquote, we then can directly go to the
> "<blockquote class=" stage. As we certainly do not intend to create
> "<blockquote mmm=" !
> 
> emacs-version "30.1"

Patches to implement this enhancement request will be welcome.

I'm not a frequent user of SGML modes, but IMO whether there are
separate histories should be a user option, not an unconditional
behavior.