From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Keybinding that loops through Major Modes Date: Tue, 3 Nov 2020 12:27:41 +0100 Message-ID: References: <87eelb1nmc.fsf@zoho.eu> <20201103081105.GA17899@tuxteam.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 03 12:35:06 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 1kZuag-00019n-HB for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Nov 2020 12:35:06 +0100 Original-Received: from localhost ([::1]:60458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZuaf-0000RH-Dk for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Nov 2020 06:35:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZuU4-0003w7-Ly for help-gnu-emacs@gnu.org; Tue, 03 Nov 2020 06:28:16 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:58037) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZuU2-00076H-Eo for help-gnu-emacs@gnu.org; Tue, 03 Nov 2020 06:28:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604402861; bh=p+mXuLDs0H3Mu/wBilgdd7H5njkysWkwlS8nZY67Z/g=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=j1lu49EMXSzZ/DNdEonTWpSzbqdTFO3OF4nH5nGsaJ5vBJyhLferR7jA8/RgqQhWP nCK7iGzw77J/qcReQtR4dF/waAtKvujmmuusGOPN3wuKVUOH2RFNtlYZgmyCiv+Apk BXeXeQC7QodKocWLuvINKefIYZHseFmCpk11WO8M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs09.server.lan [172.19.170.177]) (via HTTP); Tue, 3 Nov 2020 12:27:41 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:XCfveG4D3zPQHQZrB25GVJ0SxT1B/9UNr2Rs80ZzY1cK6l9ywS8uMyTj/J/QOv6Zvdr2J YlUYTuUuNB5tVmyQ0hP/lg1mTp8I3vjz4XNUbRsoGqDm/3w9d10stztgawFh1iUbFrxl3QPy6zo5 VhwaVoVTLUqtTYxNuzA+3/KKTorhholeplNNpjGHFBMcSx+2NPz6yLOjfKcJYQcNJjNi7RKQLQdW h8ygp0WHu8KmPuwwOcZzpz7rTSn+FD+Ktcisu4KXreCmmr6IFW1ncSDinLgh7ExM6Xo4efhzE1o2 uk= X-UI-Out-Filterresults: notjunk:1;V03:K0:4KaEKXG6B1Q=:qDTBLbWJL7+fXIIoLjhVrO ELfUu8OhdLFSVjRLLQtd1gk+7oXKcq7WxFw3AvA0rdPb+d9KsR9lkiqBCk6LCDIZ4igYiWMQa 72achhKBXGK4w5j69MdbZWjVHSeAZCSkfju+Y8n3OSIngikTk30V/rWdAx6SUG7ddAeFyPqhh GFotZKfPtOs0yE/LleZVDOmwn9q3esmGxUIvBHzzqJIUm+uMjhtYiL7q3NRKe1b2u8zXmhZQj lzF2NyMzzEZEJ65ngfnLCnqaMfHaFp9/j28oiKinfOC/vnEqQwjq1qzpgiHUCueRwrAFKqEsk K2z1Og1PXCQ5E1oahrNVM2lw5omfWn2Dbfx1K0quX4PfbDylHTovrjqniG9+emhpfiSCp6PLG ZByC9YL0L9MeIYMHKiSh7Pzdgp/BamggAdD9TvM36poRMZnOf7pjYHHEAmExxRky/KXk/hafd Fv1IGdD8uwQdIElBBH7tjMFqJ7HhLdHvMVshBh+trV70w6ph1EDMOesUQI+m8cS9ndSuq8ent T3T9o8pKhDZveeiRtZs66NgU9Ss+JZc3xtwcmY7xu+oCah0/j93fVsTJxynX+ntsr1bugrtGu LLUm24xw0iZaA= Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/03 06:28:12 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:124972 Archived-At: > Sent: Tuesday, November 03, 2020 at 10:44 AM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu.org > Subject: Re: Keybinding that loops through Major Modes > > * Christopher Dimech [2020-11-03 11:51]: > > > > > > > > > Sent: Tuesday, November 03, 2020 at 9:11 AM > > > From: tomas@tuxteam.de > > > To: help-gnu-emacs@gnu.org > > > Subject: Re: Keybinding that loops through Major Modes > > > > > > On Mon, Nov 02, 2020 at 10:10:02PM +0100, Christopher Dimech wrote: > > > > I shall explain better then. In my .texi files I customarily incl= ude commands > > > > from other modes or want to use some hooks from other modes (e.g. = org-mode). > > > > So even after I load a file with the default mode, I would need to= quickly > > > > shift to another mode temporarily, then switch back to normal-mode= . > > > > > > Perhaps your problem becomes different [0] if you squint at it from > > > another angle (space vs time): do you really want your whole buffer > > > to "switch mode", or are you looking after some regions "having a > > > different mode"? > > > > That's what I had in mind, for the whole buffer > > > > > In the second case, look, e.g. for "multiple major modes" [1]. It's > > > a class of problems for which need exists (e.g. Org source snippets, > > > but also those PHP cum HTML cum Javascript thingies. > > > > Indeed. Customarily I would need to change mode on just a portion of = the > > code I would be working with. > > > I do not know by which settings, but I do see that Org snippets with > programming language inside behave just as the mode: > > If I have this in Org: > > #+begin_src emacs-lisp :results output silent > > Then I can see syntax highlighting and I get indentation as well. But > not all features. The major power would not be the highlighting itself, but the operations associated with the mode. > Maybe soolution could be to narrow-to-region, change the mode, and > then by exiting from narrow to region to change it back to original > mode. It could be one function. > >