* Default for editing XML files @ 2009-09-12 0:12 Chong Yidong 2009-09-12 1:41 ` bug#4169: " Miles Bader ` (5 more replies) 0 siblings, 6 replies; 26+ messages in thread From: Chong Yidong @ 2009-09-12 0:12 UTC (permalink / raw) To: emacs-devel; +Cc: 4169 In Bug#4169, it's been suggested to default to nXML mode for editing XML files. Does anyone on this list support or object to this? I don't edit XML files, so I can't form an opinion on this. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong @ 2009-09-12 1:41 ` Miles Bader 2009-09-12 1:41 ` Miles Bader ` (4 subsequent siblings) 5 siblings, 0 replies; 26+ messages in thread From: Miles Bader @ 2009-09-12 1:41 UTC (permalink / raw) To: Chong Yidong; +Cc: 4169, emacs-devel Chong Yidong <cyd@stupidchicken.com> writes: > In Bug#4169, it's been suggested to default to nXML mode for editing XML > files. Does anyone on this list support or object to this? I don't > edit XML files, so I can't form an opinion on this. I support it -- nxml is an _excellent_ mode for editing xml files, mostly because it does real-time verification. -Miles -- Patience, n. A minor form of despair, disguised as a virtue. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong 2009-09-12 1:41 ` bug#4169: " Miles Bader @ 2009-09-12 1:41 ` Miles Bader 2009-09-12 6:29 ` bug#4169: " joakim ` (3 subsequent siblings) 5 siblings, 0 replies; 26+ messages in thread From: Miles Bader @ 2009-09-12 1:41 UTC (permalink / raw) To: Chong Yidong; +Cc: 4169, emacs-devel Chong Yidong <cyd@stupidchicken.com> writes: > In Bug#4169, it's been suggested to default to nXML mode for editing XML > files. Does anyone on this list support or object to this? I don't > edit XML files, so I can't form an opinion on this. I support it -- nxml is an _excellent_ mode for editing xml files, mostly because it does real-time verification. -Miles -- Patience, n. A minor form of despair, disguised as a virtue. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong 2009-09-12 1:41 ` bug#4169: " Miles Bader 2009-09-12 1:41 ` Miles Bader @ 2009-09-12 6:29 ` joakim 2009-09-12 6:29 ` joakim ` (2 subsequent siblings) 5 siblings, 0 replies; 26+ messages in thread From: joakim @ 2009-09-12 6:29 UTC (permalink / raw) To: Chong Yidong; +Cc: 4169, emacs-devel Chong Yidong <cyd@stupidchicken.com> writes: > In Bug#4169, it's been suggested to default to nXML mode for editing XML > files. Does anyone on this list support or object to this? I don't > edit XML files, so I can't form an opinion on this. > Nxml has been my default xml editing mode for years, so yes. -- Joakim Verona ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong ` (2 preceding siblings ...) 2009-09-12 6:29 ` bug#4169: " joakim @ 2009-09-12 6:29 ` joakim 2009-09-12 16:02 ` Eric Hanchrow 2009-09-18 18:49 ` Chong Yidong 5 siblings, 0 replies; 26+ messages in thread From: joakim @ 2009-09-12 6:29 UTC (permalink / raw) To: Chong Yidong; +Cc: 4169, emacs-devel Chong Yidong <cyd@stupidchicken.com> writes: > In Bug#4169, it's been suggested to default to nXML mode for editing XML > files. Does anyone on this list support or object to this? I don't > edit XML files, so I can't form an opinion on this. > Nxml has been my default xml editing mode for years, so yes. -- Joakim Verona ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong ` (3 preceding siblings ...) 2009-09-12 6:29 ` joakim @ 2009-09-12 16:02 ` Eric Hanchrow 2009-09-12 22:19 ` Sean Sieger 2009-09-18 18:49 ` Chong Yidong 5 siblings, 1 reply; 26+ messages in thread From: Eric Hanchrow @ 2009-09-12 16:02 UTC (permalink / raw) To: emacs-devel What Miles and Joakim said -- I have this in my .emacs: ;; nxml-mode is superior to the built-in XML mode in every way. (fset 'xml-mode 'nxml-mode) :-) ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 16:02 ` Eric Hanchrow @ 2009-09-12 22:19 ` Sean Sieger 2009-09-13 1:16 ` Stefan Monnier 2009-09-13 1:30 ` Jason Rumney 0 siblings, 2 replies; 26+ messages in thread From: Sean Sieger @ 2009-09-12 22:19 UTC (permalink / raw) To: emacs-devel Eric Hanchrow <eric.hanchrow@gmail.com> writes: What Miles and Joakim said -- I have this in my .emacs: ;; nxml-mode is superior to the built-in XML mode in every way. (fset 'xml-mode 'nxml-mode) :-) Right. But xml-mode supports the super-set, SGML, no? ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 22:19 ` Sean Sieger @ 2009-09-13 1:16 ` Stefan Monnier 2009-09-13 1:30 ` Jason Rumney 1 sibling, 0 replies; 26+ messages in thread From: Stefan Monnier @ 2009-09-13 1:16 UTC (permalink / raw) To: Sean Sieger; +Cc: emacs-devel > What Miles and Joakim said -- I have this in my .emacs: > ;; nxml-mode is superior to the built-in XML mode in every way. > (fset 'xml-mode 'nxml-mode) > Right. But xml-mode supports the super-set, SGML, no? Not really. The superset is handled by ... sgml-mode. Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 22:19 ` Sean Sieger 2009-09-13 1:16 ` Stefan Monnier @ 2009-09-13 1:30 ` Jason Rumney 1 sibling, 0 replies; 26+ messages in thread From: Jason Rumney @ 2009-09-13 1:30 UTC (permalink / raw) To: Sean Sieger; +Cc: emacs-devel Sean Sieger wrote: > Eric Hanchrow <eric.hanchrow@gmail.com> writes: > > What Miles and Joakim said -- I have this in my .emacs: > > ;; nxml-mode is superior to the built-in XML mode in every way. > (fset 'xml-mode 'nxml-mode) > > :-) > > Right. But xml-mode supports the super-set, SGML, no? > We're not talking about removing it, or changing the default for non-XML SGML modes. For XML, that SGML superset is part of the problem - valid SGML is not necessarily valid XML. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-12 0:12 Default for editing XML files Chong Yidong ` (4 preceding siblings ...) 2009-09-12 16:02 ` Eric Hanchrow @ 2009-09-18 18:49 ` Chong Yidong 2009-08-17 2:33 ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee 2009-09-21 21:48 ` Default for editing XML files Juri Linkov 5 siblings, 2 replies; 26+ messages in thread From: Chong Yidong @ 2009-09-18 18:49 UTC (permalink / raw) To: emacs-devel; +Cc: 4169-done I've made nXML mode the default for editing XML files. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: 23.1.50; default mode for xml files not correct @ 2009-08-17 2:33 ` Xah Lee 2009-08-17 14:35 ` Lennart Borgman 2009-09-18 18:55 ` bug#4169: marked as done (23.1.50; default mode for xml files not correct) Emacs bug Tracking System 0 siblings, 2 replies; 26+ messages in thread From: Xah Lee @ 2009-08-17 2:33 UTC (permalink / raw) To: emacs-pretest-bug On my Windows emacs, when i open a xml file, the default mode loaded is sgml-mode, not nxml. This is reproducible with Emacs -Q with FSF's binary for Windows. Since nxml is better, it seems the default should be nxml-mode. PS here's some tidbits from Lennart. On Aug 16, 5:49 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote: > On Sat, Aug 15, 2009 at 5:08 PM, Xah Lee<xah...@gmail.com> wrote: > > > is this a bug or intentional? > > It is one of those unintentional problems that has not got the > official bug status ;-) > > I wrote majmodpri.el (part of nXhtml) to take care of this kind of > problem and suggested that something like it should be included in > Emacs. There has not been any positive response to it yet. > > The reason I wrote it was that this problem is much more prominent > when there are multi major modes as an alternative too. (For an xhtml > file for example you could use html-mode, nxml-mode, html-mumamo-mode, > nxhtml-mumamo-mode etc.) I'm not sure how emacs choose modes, or the policies, mechanisms, file locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought this warrant a bug report for the record. Thanks. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: 23.1.50; default mode for xml files not correct 2009-08-17 2:33 ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee @ 2009-08-17 14:35 ` Lennart Borgman 2009-08-18 2:18 ` Stefan Monnier 2009-09-18 18:55 ` bug#4169: marked as done (23.1.50; default mode for xml files not correct) Emacs bug Tracking System 1 sibling, 1 reply; 26+ messages in thread From: Lennart Borgman @ 2009-08-17 14:35 UTC (permalink / raw) To: Xah Lee, 4169 On Mon, Aug 17, 2009 at 4:33 AM, Xah Lee<xah@xahlee.org> wrote: >> I wrote majmodpri.el (part of nXhtml) to take care of this kind of >> problem and suggested that something like it should be included in >> Emacs. There has not been any positive response to it yet. >> >> The reason I wrote it was that this problem is much more prominent >> when there are multi major modes as an alternative too. (For an xhtml >> file for example you could use html-mode, nxml-mode, html-mumamo-mode, >> nxhtml-mumamo-mode etc.) > > I'm not sure how emacs choose modes, or the policies, mechanisms, file > locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought > this warrant a bug report for the record. Thanks. Major modes are choosen by searching auto-mode-alist etc. The first hit is choosen. (Sometimes the lists are searched several times though.) majmodpri.el sorts the list so that the major modes (or multi major modes) that the user prefers comes first. ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: 23.1.50; default mode for xml files not correct 2009-08-17 14:35 ` Lennart Borgman @ 2009-08-18 2:18 ` Stefan Monnier 2009-08-18 2:25 ` Lennart Borgman 0 siblings, 1 reply; 26+ messages in thread From: Stefan Monnier @ 2009-08-18 2:18 UTC (permalink / raw) To: Lennart Borgman; +Cc: Xah Lee, 4169 >>> I wrote majmodpri.el (part of nXhtml) to take care of this kind of >>> problem and suggested that something like it should be included in >>> Emacs. There has not been any positive response to it yet. >>> >>> The reason I wrote it was that this problem is much more prominent >>> when there are multi major modes as an alternative too. (For an xhtml >>> file for example you could use html-mode, nxml-mode, html-mumamo-mode, >>> nxhtml-mumamo-mode etc.) >> >> I'm not sure how emacs choose modes, or the policies, mechanisms, file >> locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought >> this warrant a bug report for the record. Thanks. > Major modes are choosen by searching auto-mode-alist etc. The first > hit is choosen. (Sometimes the lists are searched several times > though.) > majmodpri.el sorts the list so that the major modes (or multi major > modes) that the user prefers comes first. When we offer several different modes for the same language (e.g. perl-mode vs cperl-mode), we should try to make auto-mode-alist (and other such facilities) point to a function alias (e.g. html-mode) which can then point to whichever major mode the user favors. E.g. we should probably rename sgml-mode.el's html-mode to sgml-html-mode, and then make (defalias 'html-mode 'sgml-html-mode) so that the user can easily (fset 'html-mode 'my-html-mode). Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: 23.1.50; default mode for xml files not correct 2009-08-18 2:18 ` Stefan Monnier @ 2009-08-18 2:25 ` Lennart Borgman 0 siblings, 0 replies; 26+ messages in thread From: Lennart Borgman @ 2009-08-18 2:25 UTC (permalink / raw) To: Stefan Monnier; +Cc: Xah Lee, 4169 On Tue, Aug 18, 2009 at 4:18 AM, Stefan Monnier<monnier@iro.umontreal.ca> wrote: >>>> I wrote majmodpri.el (part of nXhtml) to take care of this kind of >>>> problem and suggested that something like it should be included in >>>> Emacs. There has not been any positive response to it yet. >>>> >>>> The reason I wrote it was that this problem is much more prominent >>>> when there are multi major modes as an alternative too. (For an xhtml >>>> file for example you could use html-mode, nxml-mode, html-mumamo-mode, >>>> nxhtml-mumamo-mode etc.) >>> >>> I'm not sure how emacs choose modes, or the policies, mechanisms, file >>> locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought >>> this warrant a bug report for the record. Thanks. > > >> Major modes are choosen by searching auto-mode-alist etc. The first >> hit is choosen. (Sometimes the lists are searched several times >> though.) > >> majmodpri.el sorts the list so that the major modes (or multi major >> modes) that the user prefers comes first. > > When we offer several different modes for the same language > (e.g. perl-mode vs cperl-mode), we should try to make auto-mode-alist > (and other such facilities) point to a function alias (e.g. html-mode) > which can then point to whichever major mode the user favors. > > E.g. we should probably rename sgml-mode.el's html-mode to > sgml-html-mode, and then make (defalias 'html-mode 'sgml-html-mode) so > that the user can easily (fset 'html-mode 'my-html-mode). That is a good idea, but I would suggest using a table in between instead of fset. And a simple way to manipulate that table. (Maybe putting a property like 'this-is-a-major-mode on major mode functions?) ^ permalink raw reply [flat|nested] 26+ messages in thread
* bug#4169: marked as done (23.1.50; default mode for xml files not correct) 2009-08-17 2:33 ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee 2009-08-17 14:35 ` Lennart Borgman @ 2009-09-18 18:55 ` Emacs bug Tracking System 1 sibling, 0 replies; 26+ messages in thread From: Emacs bug Tracking System @ 2009-09-18 18:55 UTC (permalink / raw) To: Chong Yidong [-- Attachment #1: Type: text/plain, Size: 866 bytes --] Your message dated Fri, 18 Sep 2009 14:49:02 -0400 with message-id <87eiq4jdgh.fsf@stupidchicken.com> and subject line Re: Default for editing XML files has caused the Emacs bug report #4169, regarding 23.1.50; default mode for xml files not correct to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) -- 4169: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4169 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 3593 bytes --] From: "Xah Lee" <xah@xahlee.org> To: <emacs-pretest-bug@gnu.org> Subject: 23.1.50; default mode for xml files not correct Date: Sun, 16 Aug 2009 19:33:27 -0700 Message-ID: <48317C0E1A69429482B1548C992F0FFC@xahPC> On my Windows emacs, when i open a xml file, the default mode loaded is sgml-mode, not nxml. This is reproducible with Emacs -Q with FSF's binary for Windows. Since nxml is better, it seems the default should be nxml-mode. PS here's some tidbits from Lennart. On Aug 16, 5:49 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote: > On Sat, Aug 15, 2009 at 5:08 PM, Xah Lee<xah...@gmail.com> wrote: > > > is this a bug or intentional? > > It is one of those unintentional problems that has not got the > official bug status ;-) > > I wrote majmodpri.el (part of nXhtml) to take care of this kind of > problem and suggested that something like it should be included in > Emacs. There has not been any positive response to it yet. > > The reason I wrote it was that this problem is much more prominent > when there are multi major modes as an alternative too. (For an xhtml > file for example you could use html-mode, nxml-mode, html-mumamo-mode, > nxhtml-mumamo-mode etc.) I'm not sure how emacs choose modes, or the policies, mechanisms, file locations...etc, or what majmodpri.el is supposed to do. Anyway, i thought this warrant a bug report for the record. Thanks. Xah ∑ http://xahlee.org/ ☄ [-- Attachment #3: Type: message/rfc822, Size: 1674 bytes --] From: Chong Yidong <cyd@stupidchicken.com> To: emacs-devel@gnu.org Cc: 4169-done@emacsbugs.donarmstrong.com Subject: Re: Default for editing XML files Date: Fri, 18 Sep 2009 14:49:02 -0400 Message-ID: <87eiq4jdgh.fsf@stupidchicken.com> I've made nXML mode the default for editing XML files. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-18 18:49 ` Chong Yidong 2009-08-17 2:33 ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee @ 2009-09-21 21:48 ` Juri Linkov 2009-09-21 22:12 ` Chong Yidong 1 sibling, 1 reply; 26+ messages in thread From: Juri Linkov @ 2009-09-21 21:48 UTC (permalink / raw) To: Chong Yidong; +Cc: emacs-devel > I've made nXML mode the default for editing XML files. Shouldn't `xml-mode' be replaced with `nxml-mode' in `magic-fallback-mode-alist' and `conf-mode-maybe' as well? -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-21 21:48 ` Default for editing XML files Juri Linkov @ 2009-09-21 22:12 ` Chong Yidong 2009-09-22 14:27 ` Stefan Monnier 0 siblings, 1 reply; 26+ messages in thread From: Chong Yidong @ 2009-09-21 22:12 UTC (permalink / raw) To: Juri Linkov; +Cc: emacs-devel Juri Linkov <juri@jurta.org> writes: >> I've made nXML mode the default for editing XML files. > > Shouldn't `xml-mode' be replaced with `nxml-mode' in > `magic-fallback-mode-alist' and `conf-mode-maybe' as well? Yes, I missed that. Thanks. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-21 22:12 ` Chong Yidong @ 2009-09-22 14:27 ` Stefan Monnier 2009-09-23 9:06 ` Juri Linkov 0 siblings, 1 reply; 26+ messages in thread From: Stefan Monnier @ 2009-09-22 14:27 UTC (permalink / raw) To: Chong Yidong; +Cc: Juri Linkov, emacs-devel >>> I've made nXML mode the default for editing XML files. >> Shouldn't `xml-mode' be replaced with `nxml-mode' in >> `magic-fallback-mode-alist' and `conf-mode-maybe' as well? > Yes, I missed that. Thanks. I think this is wrong. I think all those variable should point to xml-mode, and then xml-mode should be an alias for nxml-mode (which the user can re-alias back to sgml-mode if she so prefers). Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-22 14:27 ` Stefan Monnier @ 2009-09-23 9:06 ` Juri Linkov 2009-09-23 15:57 ` Chong Yidong 2009-09-23 20:43 ` Stefan Monnier 0 siblings, 2 replies; 26+ messages in thread From: Juri Linkov @ 2009-09-23 9:06 UTC (permalink / raw) To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel >>>> I've made nXML mode the default for editing XML files. >>> Shouldn't `xml-mode' be replaced with `nxml-mode' in >>> `magic-fallback-mode-alist' and `conf-mode-maybe' as well? > >> Yes, I missed that. Thanks. > > I think this is wrong. I think all those variable should point to > xml-mode, and then xml-mode should be an alias for nxml-mode (which the > user can re-alias back to sgml-mode if she so prefers). I agree, it would be better to configure sgml-mode/nxml-mode for all calls of xml-mode in one place. Maybe with the help of a new defcustom like: (defcustom xml-mode 'nxml-mode "Define xml-mode." :type '(choice (const nxml-mode) (const sgml-mode))) (defun xml-mode () (interactive) (funcall xml-mode)) -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-23 9:06 ` Juri Linkov @ 2009-09-23 15:57 ` Chong Yidong 2009-09-23 20:43 ` Stefan Monnier 1 sibling, 0 replies; 26+ messages in thread From: Chong Yidong @ 2009-09-23 15:57 UTC (permalink / raw) To: Juri Linkov; +Cc: Stefan Monnier, emacs-devel Juri Linkov <juri@jurta.org> writes: > I agree, it would be better to configure sgml-mode/nxml-mode > for all calls of xml-mode in one place. Maybe with the help > of a new defcustom like: > > (defcustom xml-mode 'nxml-mode > "Define xml-mode." > :type '(choice (const nxml-mode) > (const sgml-mode))) > > (defun xml-mode () > (interactive) > (funcall xml-mode)) Sounds fine to me. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-23 9:06 ` Juri Linkov 2009-09-23 15:57 ` Chong Yidong @ 2009-09-23 20:43 ` Stefan Monnier 2009-09-24 20:57 ` Juri Linkov 1 sibling, 1 reply; 26+ messages in thread From: Stefan Monnier @ 2009-09-23 20:43 UTC (permalink / raw) To: Juri Linkov; +Cc: Chong Yidong, emacs-devel > I agree, it would be better to configure sgml-mode/nxml-mode > for all calls of xml-mode in one place. Maybe with the help > of a new defcustom like: > (defcustom xml-mode 'nxml-mode > "Define xml-mode." > :type '(choice (const nxml-mode) > (const sgml-mode))) > (defun xml-mode () > (interactive) > (funcall xml-mode)) We already had xml-mode as an alias for sgml-mode, AFAICT. I see no need to introduce such additional customization: we should just change the alias to point to nxml-mode. Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-23 20:43 ` Stefan Monnier @ 2009-09-24 20:57 ` Juri Linkov 2009-09-24 21:14 ` Lennart Borgman 2009-09-25 2:03 ` Chong Yidong 0 siblings, 2 replies; 26+ messages in thread From: Juri Linkov @ 2009-09-24 20:57 UTC (permalink / raw) To: Stefan Monnier; +Cc: Chong Yidong, emacs-devel >> I agree, it would be better to configure sgml-mode/nxml-mode >> for all calls of xml-mode in one place. Maybe with the help >> of a new defcustom like: > >> (defcustom xml-mode 'nxml-mode >> "Define xml-mode." >> :type '(choice (const nxml-mode) >> (const sgml-mode))) > >> (defun xml-mode () >> (interactive) >> (funcall xml-mode)) > > We already had xml-mode as an alias for sgml-mode, AFAICT. > I see no need to introduce such additional customization: we should just > change the alias to point to nxml-mode. The question is how often users might want to switch xml-mode back to sgml-mode and how easy this should be. Putting a line (defalias 'xml-mode 'sgml-mode) to .emacs is easy but only if this line is easy to find in documentation. One easy way is the Customization UI, another is adding menu entries to the mode menu. Designing a general mechanism to select a mode amongst multiple implementations would be even better e.g. to switch `perl-mode' between `perl-mode' and `cperl-mode', `js-mode' between `js2-mode' and `espresso-mode', etc. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-24 20:57 ` Juri Linkov @ 2009-09-24 21:14 ` Lennart Borgman 2009-09-25 2:03 ` Chong Yidong 1 sibling, 0 replies; 26+ messages in thread From: Lennart Borgman @ 2009-09-24 21:14 UTC (permalink / raw) To: Juri Linkov; +Cc: Chong Yidong, Stefan Monnier, emacs-devel On Thu, Sep 24, 2009 at 10:57 PM, Juri Linkov <juri@jurta.org> wrote: > One easy way is the Customization UI, another is adding menu entries to > the mode menu. Designing a general mechanism to select a mode amongst > multiple implementations would be even better e.g. to switch `perl-mode' > between `perl-mode' and `cperl-mode', `js-mode' between `js2-mode' and > `espresso-mode', etc. As I have mentioned before I have a library majmodpri.el in nXhtml that sorts major modes according to user given priorities to them. This is just distributed with nXhtml because I need a mechanism for this there. If you want to edit a html file you may have a long list of major and multi major modes to choose from. Also please consider that if multi major modes are used then it is perhaps not possible to use the same major modes in chunks as you normally do for a whole buffer. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-24 20:57 ` Juri Linkov 2009-09-24 21:14 ` Lennart Borgman @ 2009-09-25 2:03 ` Chong Yidong 2009-09-25 9:01 ` Juri Linkov 1 sibling, 1 reply; 26+ messages in thread From: Chong Yidong @ 2009-09-25 2:03 UTC (permalink / raw) To: Juri Linkov; +Cc: Stefan Monnier, emacs-devel Juri Linkov <juri@jurta.org> writes: > The question is how often users might want to switch xml-mode back to > sgml-mode and how easy this should be. My impression, from those few who chimed in on the earlier thread about the switch, is that there's basically no reason to switch back to sgml-mode. Or is there? If hardly anyone will want to switch back, I don't think it's worth adding an extra knob for customizing this; we can just mention this in the nxml-mode docstring. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-25 2:03 ` Chong Yidong @ 2009-09-25 9:01 ` Juri Linkov 2009-09-25 14:18 ` Stefan Monnier 0 siblings, 1 reply; 26+ messages in thread From: Juri Linkov @ 2009-09-25 9:01 UTC (permalink / raw) To: Chong Yidong; +Cc: Stefan Monnier, emacs-devel >> The question is how often users might want to switch xml-mode back to >> sgml-mode and how easy this should be. > > My impression, from those few who chimed in on the earlier thread about > the switch, is that there's basically no reason to switch back to > sgml-mode. Or is there? I know no reason to switch back to sgml-mode. But what I worry about is that someone who has a reason to use sgml-mode should be able to find an instruction how to do this. > If hardly anyone will want to switch back, I don't think it's worth > adding an extra knob for customizing this; we can just mention this in > the nxml-mode docstring. I don't think the nxml-mode docstring is an appropriate place to mention sgml-mode. I remember that at the early days of Wikipedia an initial version of the article about Leo Tolstoy started with the sentence "Along with Dostoevsky, Tolstoy is one of the most famous novelists" that looked very silly. Starting the nxml-mode docstring with something like "Along with sgml-mode, nxml-mode is a major mode for editing XML" is no better ;-) I think a good place to mention both nxml-mode and sgml-mode is the docstring of the xml-mode alias since the optional third argument of `defalias' specifies the docstring: (defalias 'xml-mode 'nxml-mode "Docstring.") In this docstring we could write that there are two XML editing modes, whereas nxml-mode is the default mode, add links to docstrings of both and provide instructions how to switch xml-mode to sgml-mode. -- Juri Linkov http://www.jurta.org/emacs/ ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: Default for editing XML files 2009-09-25 9:01 ` Juri Linkov @ 2009-09-25 14:18 ` Stefan Monnier 0 siblings, 0 replies; 26+ messages in thread From: Stefan Monnier @ 2009-09-25 14:18 UTC (permalink / raw) To: Juri Linkov; +Cc: Chong Yidong, emacs-devel > I know no reason to switch back to sgml-mode. But what I worry about > is that someone who has a reason to use sgml-mode should be able to find > an instruction how to do this. cperl-mode managed quite well by putting such instructions in the major mode's documentation. We could even put it directly in sgml-mode's docstring so C-h m shows it. Stefan ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2009-09-25 14:18 UTC | newest] Thread overview: 26+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-09-12 0:12 Default for editing XML files Chong Yidong 2009-09-12 1:41 ` bug#4169: " Miles Bader 2009-09-12 1:41 ` Miles Bader 2009-09-12 6:29 ` bug#4169: " joakim 2009-09-12 6:29 ` joakim 2009-09-12 16:02 ` Eric Hanchrow 2009-09-12 22:19 ` Sean Sieger 2009-09-13 1:16 ` Stefan Monnier 2009-09-13 1:30 ` Jason Rumney 2009-09-18 18:49 ` Chong Yidong 2009-08-17 2:33 ` bug#4169: 23.1.50; default mode for xml files not correct Xah Lee 2009-08-17 14:35 ` Lennart Borgman 2009-08-18 2:18 ` Stefan Monnier 2009-08-18 2:25 ` Lennart Borgman 2009-09-18 18:55 ` bug#4169: marked as done (23.1.50; default mode for xml files not correct) Emacs bug Tracking System 2009-09-21 21:48 ` Default for editing XML files Juri Linkov 2009-09-21 22:12 ` Chong Yidong 2009-09-22 14:27 ` Stefan Monnier 2009-09-23 9:06 ` Juri Linkov 2009-09-23 15:57 ` Chong Yidong 2009-09-23 20:43 ` Stefan Monnier 2009-09-24 20:57 ` Juri Linkov 2009-09-24 21:14 ` Lennart Borgman 2009-09-25 2:03 ` Chong Yidong 2009-09-25 9:01 ` Juri Linkov 2009-09-25 14:18 ` Stefan Monnier
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.