From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Enabling mode for part of buffer / region Date: Fri, 24 Jan 2020 12:16:07 +0100 Message-ID: <20200124111607.GI10650@tuxteam.de> References: <87tv4mv5rg.fsf@winston.localdomain> <875zh1163u.fsf@winston.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/GPgYEyhnw15BExa" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="130914"; mail-complaints-to="usenet@ciao.gmane.io" 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-mx.org@gnu.org Fri Jan 24 12:16:38 2020 Return-path: Envelope-to: geh-help-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 1iuwx4-000Y1e-DX for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 12:16:38 +0100 Original-Received: from localhost ([::1]:40818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuwx3-00042d-Ie for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jan 2020 06:16:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60076) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuwwj-00042F-CB for help-gnu-emacs@gnu.org; Fri, 24 Jan 2020 06:16:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuwwi-0004u1-2A for help-gnu-emacs@gnu.org; Fri, 24 Jan 2020 06:16:17 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:49046) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuwwh-0004pw-JM for help-gnu-emacs@gnu.org; Fri, 24 Jan 2020 06:16:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=+G5ib0dGsahjj9ck/i6MKUDzBQYG/MRpk+HL5orKm34=; b=m2Oa20cP81ZTDyUiBfZzkOxOsLAZcIcixEIcooQwqp+Jb+WI/e9eNUKFxwVpIE7MfON0JMr+vF8/HX3F0nGh2A5cmVQnRiYbCImHUQGgeLXYCkGWe2YXliFWGsa8Butfs7N52U0nQma7D2p9i0ev1RkWFW2eOGGlxae2c9zsxJRQh1UpqjZsbek/d9opjqyqxOJAljkYwdMHQxS7zOAWmo8QdkNypQDF6Y8FaPL9V3T6NkD91/5nwaAUq7yCcw7Ti8A0pjjHEUcESko3625uKgE4abaWlh8zomh/+cWy3Fs2qhoJCXf0bhWXrb2KGVaqQ1VjWuzS8fcX7V6F7qU2dg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1iuwwa-0004iW-0n for help-gnu-emacs@gnu.org; Fri, 24 Jan 2020 12:16:08 +0100 Content-Disposition: inline In-Reply-To: <875zh1163u.fsf@winston.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122287 Archived-At: --/GPgYEyhnw15BExa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 24, 2020 at 11:49:57AM +0100, Michael Anckaert wrote: > I wanted to document my problem and the solution I reached in case some > else needs it.=20 [...] Since I haven't seen it in the thread (apologies if I have overseen it), I think this is a problem class which arises in other contexts (e.g. Javascript embedded in HTML, SQL embedded in some host language, etc.) There is a whole flurry of solutions which have emerged for that, generally under the title "multiple major modes" Perhaps those are a bit heavyweight wrt what you had in mind (Org doesn't try to have the whole major mode up and running on the snippet, but offers editing in another buffer). Emacs seems to be slowly converging towards something. Here [1] is a good overview of what's available: Cheers https://www.emacswiki.org/emacs/MultipleModes -- tom=C3=A1s --/GPgYEyhnw15BExa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl4q0fcACgkQBcgs9XrR2kbK/wCfSTQrCcfMEBi5iWCnLZBKTfIl CmAAn2RKenkPl2TPOfQpi/RDEm2X7UIT =jqvr -----END PGP SIGNATURE----- --/GPgYEyhnw15BExa--