From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#47877: [PATCH] Respect sgml-xml-mode Date: Wed, 21 Apr 2021 07:27:16 +0000 Message-ID: <87lf9ccd2j.fsf@posteo.net> References: <87eef7pgkl.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10612"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 47877@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 21 09:28:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZ7HP-0002ZQ-0o for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 09:28:11 +0200 Original-Received: from localhost ([::1]:46350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZ7HN-0008AR-NC for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 03:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZ7HG-0008AI-3A for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 03:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZ7HF-0004g3-Rv for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 03:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZ7HF-0001rL-PH for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 03:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Apr 2021 07:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 47877-submit@debbugs.gnu.org id=B47877.16189900497108 (code B ref 47877); Wed, 21 Apr 2021 07:28:01 +0000 Original-Received: (at 47877) by debbugs.gnu.org; 21 Apr 2021 07:27:29 +0000 Original-Received: from localhost ([127.0.0.1]:56853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ7Gj-0001qZ-Db for submit@debbugs.gnu.org; Wed, 21 Apr 2021 03:27:29 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:41027) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZ7Gg-0001qC-1Q for 47877@debbugs.gnu.org; Wed, 21 Apr 2021 03:27:28 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 9C91D24002A for <47877@debbugs.gnu.org>; Wed, 21 Apr 2021 09:27:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1618990037; bh=wy4jttOtiGGSz8eVQyduiUSc6NKJFy5mrDjQkuxIwGg=; h=From:To:Cc:Subject:Date:From; b=Wmqhwif/sTLXUhvThyU0Dl+ETq/Xp2OZy4MnZpJw102TUqFizu4XlJA+bURbIbXtW SUag2FFVGb7HSarXQRk6pySaQPAwsP54fUpZBTbW21jLeyrTYAI1EXxR/qb2YWEjXK BAcr4bI3w+iPuyHx9Yaf6Qt0rSsXGjDHa3ENrHAKvbV9NesguMpoG85JPVV6mcfmGO k4WT7J9E3nppsI+9mg/Ejvaz8CFnKgiY4VWyzCSrJnlTXQY2F14oGszHL7v1e8qaC/ tEkdnHM9DuBtMDVJK0Nh6V350c56XspnFkDu38STmUVqcNeiYbkM1QqpszbPK+25FC 0t69E05OgYYjg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FQBvm5nTmz6tmK; Wed, 21 Apr 2021 09:27:16 +0200 (CEST) In-Reply-To: (Stefan Kangas's message of "Tue, 20 Apr 2021 18:45:18 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204581 Archived-At: Stefan Kangas writes: > Philip Kaludercic writes: > >> sgml-xml-mode is a user option that is over-riden by smgl-mode. When I >> customize sgml-xml-mode to be enabled for every sgml-mode derived mode >> (specifically html-mode), it is disabled because a HTML file does not >> have to be a valid XML file -- even if I would want it to be. >> >> This patch only sets sgml-xml-mode if we know that the current file is >> an XML file, but leaves the default value if it cannot be said for sure. > > Thanks for the patch. > > Your explanation sounds reasonable, but could you perhaps provide a > recipe for how to reproduce this problem (preferably starting from emacs > -Q)? 1. Customize sgml-xml-mode to t 2. Open a HTML file 3. Insert a tag using C-c C-o, eg.

Compare this to 1. Open a HTML file 2. Manually set sgml-xml-mode to t 3. Insert a tag using C-c C-o, eg.

and in this time you will also have a

tag generated, as intended. -- Philip K.