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: Mon, 2 Nov 2020 23:11:57 +0100 Message-ID: References: <87eelb1nmc.fsf@zoho.eu> <877dr3h2e6.fsf@uninett.no> 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="14532"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org, moasenwood@zoho.eu To: Vegard Vesterheim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 02 23:16:11 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 1kZi7W-0003ci-Ls for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 23:16:10 +0100 Original-Received: from localhost ([::1]:55876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZi7V-0007BS-Hd for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 17:16:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZi3h-0007BJ-LY for help-gnu-emacs@gnu.org; Mon, 02 Nov 2020 17:12:13 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:48835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZi3d-0001Ns-0C for help-gnu-emacs@gnu.org; Mon, 02 Nov 2020 17:12:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604355118; bh=klhNGFC0xu1eR+vBqUafmGR2uoQCNut1T0Jgo+Y3u/s=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=DHBuUviYplLBEW0rzhJnWRywV5473chbJutVyJ3JLSqXWSsVfWEV9NCsFZ6C+wAVB 8ztaOzOSZSzRYr/gjMUM9m/gb4qpRH0i9X4DvGo/7ZDxwE/ZGW5Yh4GAwLkdDcFxIt sFIwmATMwP5SQCDCOWH3m3sjVDXWEtaPUNMT3Gbk= 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); Mon, 2 Nov 2020 23:11:57 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <877dr3h2e6.fsf@uninett.no> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:QK7oYlMClptBihObVdpW/6Lh96bihGXuDe7Yvi6R13y2g9ZoKBPTfe/UD96g2nAS8U3yo Y5mCuFgJQilE+2YpkF1my7Y4zrPpPrh9nfvQQrcyXEoZ8FamSCjE2ZszLAFOPgl31qnQBfKFNvTU QShR8uh0g0+wMoF+70cVZEbyoeuHtmBZc5BMo/PyHGfBmB89ja/+5eqrGuQMOSFnsak+MknPZH4B J8jEPRaDF/eEClWBq6n8GW994DnYSN4i9vQm7CEz3T41VmIwQOpGuiTlqk3n8DZKvtbmCHtNcGxO 04= X-UI-Out-Filterresults: notjunk:1;V03:K0:goVZLXdDqXw=:D0BEXs9ArNlAhCzdGW+Hv/ yKgEkMyYfKjv+Z12HNny9leaAOjgJWC0eWWbSjuMmTlljP2yWVLFXUc5L2EppOiOuIuTzoN0+ sMpS9gZBDTHArdhVNKJONNQPanowF/LlXeaNiliubiubtUwTbsHliIOIIMkz7araUTT0Rq1MZ efDFdjVw5mX2Xka1w0l7PcBkMyjn1bxkO08yq+MGzlOoGPmfrbhgx6UI6COsuKZgVKHoi/DNu SwNtF/ToNhFhxhMU6XHZKQJfj9Gl2QZ83yjoojypNn/a/sYhsz2BKgj+kG4N75XzrIn4fzutk GkEFhyFOrI4vPADnt5Kprv21hdp8CsgWFZ+2Ftv+x0ncUPND57a9vHWCgJi9MgdKCeE/5ElEb MY9C6FVODHBnf0VtQRHJ8B+xB2jgqvdwnWPyjCDesY6UBoCyWhtF6MYjXy6FQgB+FfkAEkkBH Dn6iT9wq4ZU2K1Yd+v6gvGjTTLEpHwNcKJud7OcFFAk38dLsyUFNC3oTh1BYLjvSHHW03R4Kr zxDt0iHS4TwEzjcd5UtOV2FkJkrXv5Egp0PvZkXpblXk1eCnP8/OHaM+7uNxA4koaxJ80Ghff 4R4++IcjXeB7Y= Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/02 17:12:05 X-ACL-Warn: Detected OS = Linux 3.11 and newer [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:124961 Archived-At: Have used Org Babel before. My situation is more complicated because I use Org Commands in Source Files as well. To add further complication, I also add rec commands that can be parsed by Gnu Recutils, which is useful to we because I can compute some metrics for my code, such as the Cyclomatic Complexity of each function. > Sent: Monday, November 02, 2020 at 10:31 PM > From: "Vegard Vesterheim" > To: "Christopher Dimech" > Cc: moasenwood@zoho.eu, help-gnu-emacs@gnu.org > Subject: Re: Keybinding that loops through Major Modes > > On Mon, 2 Nov 2020 22:10:02 +0100 Christopher Dimech wr= ote: > > > I shall explain better then. In my .texi files I customarily include = 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 qui= ckly > > shift to another mode temporarily, then switch back to normal-mode. > > I realize this is not an answer to your original question. But have you > considered writing your file in org-mode? Org-mode can export to > several formats, also texi. > > Org-mode has this thing called babel > (https://orgmode.org/worg/org-contrib/babel/) which allows you to embed > (and even execute) blocks of code in your document. > > From the manual > (https://orgmode.org/manual/Editing-Source-Code.html#Editing-Source-Code= ): > > Use C-c ' to edit the current code block. It opens a new major mode edit > buffer containing the body of the source code block, ready for any edits= . > > -- > Vennlig hilsen/Best regards > Vegard Vesterheim > Senior Software engineer > +47 48 11 98 98 > vegard.vesterheim@uninett.no >