From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Major and minor modes Date: Wed, 14 Jun 2017 10:51:33 +0200 Message-ID: <20170614085133.GA9145@tuxteam.de> References: <86k24f5o5u.fsf@zoho.com> <20170614074003.GA2968@workstation> <874lvj56dm.fsf@debian.uxu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed X-Trace: blaine.gmane.org 1497430457 13831 195.159.176.226 (14 Jun 2017 08:54:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Jun 2017 08:54:17 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 14 10:54:13 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dL444-0003M9-Eu for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jun 2017 10:54:12 +0200 Original-Received: from localhost ([::1]:47278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL449-0008Uv-DH for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jun 2017 04:54:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL42n-00083R-2Q for help-gnu-emacs@gnu.org; Wed, 14 Jun 2017 04:52:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL42j-0002hp-Uq for help-gnu-emacs@gnu.org; Wed, 14 Jun 2017 04:52:53 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:38658 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dL42j-0002fo-Op for help-gnu-emacs@gnu.org; Wed, 14 Jun 2017 04:52:49 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1dL41V-0002T5-Px for help-gnu-emacs@gnu.org; Wed, 14 Jun 2017 10:51:33 +0200 In-Reply-To: <874lvj56dm.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113448 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jun 14, 2017 at 10:19:01AM +0200, Emanuel Berg wrote: [...] > > Then I have this question. One major mode is > > suitable for a type of data. Everything is text but > > it is formatted differently. Usually in the same > > buffer you have several sections with different > > types [...] > There are solutions to deal with that but those are > exceptions [...] This is a well-known problem for those poor souls dealing with "things Web", where you have nested languages (CSS and Javascript in HTML, HTML in PHP and things). Thus, several approaches to the problem of "multiple major modes" have developed. But yes, that's a point where we might need a more "fundamental" solution. See https://www.emacswiki.org/emacs/MultipleModes For another, somewhat refreshing, but different approach (embedding snippets of code in many languages in some text, and getting the results of executing those snippets back into the text, the whole literate programming kaboodle), start, e.g. here: http://orgmode.org/worg/org-contrib/babel/ Careful! this one has rabbit-hole quality ;-) Cheers - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAllA+RUACgkQBcgs9XrR2kZ4dACcCNbQMKUzRgcmjoqZSdiQcdOE LpwAn35uKBxojdDn4WkwQ25/1Bb5GpNt =ijLS -----END PGP SIGNATURE-----