From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vegard Vesterheim Newsgroups: gmane.emacs.help Subject: Re: Keybinding that loops through Major Modes Date: Mon, 02 Nov 2020 22:31:13 +0100 Organization: UNINETT AS Message-ID: <877dr3h2e6.fsf@uninett.no> References: <87eelb1nmc.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9017"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: moasenwood@zoho.eu, help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 02 22:47:12 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 1kZhfT-0002Dp-1I for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 22:47:11 +0100 Original-Received: from localhost ([::1]:48426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZhfS-0002Wi-3V for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 02 Nov 2020 16:47:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZhek-0002WU-5O for help-gnu-emacs@gnu.org; Mon, 02 Nov 2020 16:46:26 -0500 Original-Received: from mail-db8eur05on2117.outbound.protection.outlook.com ([40.107.20.117]:33409 helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZheg-0006u1-PK for help-gnu-emacs@gnu.org; Mon, 02 Nov 2020 16:46:25 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Au0h+rVDV03lAYWzLTFhqE/syURnthGYBK0YerSBSVoM/3kNfrCamgCaP1TQ0ZX0+PUI7AkfI5baGqBVh09KDrMYS70qLd5SPc0iKYjoQT5I+januonjG1QW3+PlN8/p3cezP0ygX74n/pH3Bu3dgYtaVw1PFqNjIYuqG8boijO/znSEILEnyGuCl6FTp/Z0YCY4yn94PKCaRVqIXwZHxj2gGVQMUpoS47g0Z6y5wW+CY9wvRniHp6X88jSdSppZksf/p+3FO/XSxmNljj9Ip0IsDNZW8G3Xhf5G3PkAowUzvfLGDmPp4e61Z6WBBWfdcOOKKxRvfmwwa+fw6tKctg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x///JUsWlyyqgds5zWcfkvws451XcUs6G9/65AOXHYs=; b=AmroxehhPBRTQj9pXEHb+8G07u2d3Z9DQ8Av5Penpt2nTB01k6JPjeMjfkhPUVn9TFyITQE/PUe9kPKW9t0PJ+nHWRPGoh6txstrvuvnAhi9nOhZ16aZ59Wlg5cGBPZH+4/3h0Ag8zUFUKANMSiHqjv80zWcX5JD1wyNw4zOVBgK50V/2/dBHUBvNAbNVPOBeQ/yPDQOlDrPR1AdjzLWCkq/85wd6xMmPLqZ4hRJTXL/ScNWC5oA6DDcK1GjGxT3znrJqZjtNn9UW7FtMc+XPRT/wZtRqdP1yWRb7MEhINYbiB4/jSlfe7MZLtF1EsBY28uzNQ+DspQeJV278hSj2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uninett.no; dmarc=pass action=none header.from=uninett.no; dkim=pass header.d=uninett.no; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uninett.no; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x///JUsWlyyqgds5zWcfkvws451XcUs6G9/65AOXHYs=; b=DpPG1QPdGQs6R1ONVkIcpMnTNvko01FV1B84MCvXUGGmOjPXM/o8ELELUCC6wAPbbz9qEYgTFyV0hJOBQryVGk2L9ctO+bzCcu6wT02nN5GolJnuftOd4EBvRZ2QyaHmEm6wZWyW6v9eAczAwsDbyMVn81qkV0DK1C8rkwr15uE= Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=uninett.no; Original-Received: from AM6PR08MB3813.eurprd08.prod.outlook.com (2603:10a6:20b:85::26) by AM5PR0801MB1809.eurprd08.prod.outlook.com (2603:10a6:203:3a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.29; Mon, 2 Nov 2020 21:31:15 +0000 Original-Received: from AM6PR08MB3813.eurprd08.prod.outlook.com ([fe80::d0b9:3737:685f:e64d]) by AM6PR08MB3813.eurprd08.prod.outlook.com ([fe80::d0b9:3737:685f:e64d%4]) with mapi id 15.20.3499.030; Mon, 2 Nov 2020 21:31:15 +0000 In-Reply-To: (Christopher Dimech's message of "Mon, 2 Nov 2020 22:10:02 +0100") X-Originating-IP: [2001:700:1:4561::100e] X-ClientProxiedBy: OL1P279CA0062.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:15::13) To AM6PR08MB3813.eurprd08.prod.outlook.com (2603:10a6:20b:85::26) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from llveve-15 (2001:700:1:4561::100e) by OL1P279CA0062.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Mon, 2 Nov 2020 21:31:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30b6df53-64ed-4f0b-2d87-08d87f76a0e6 X-MS-TrafficTypeDiagnostic: AM5PR0801MB1809: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3dv+iXxdE/Ze7awUvRvZ/nFIcHixauXOae9kAQ5K1+bSMPVyAjBC731yOukTWs4NbR7cPg9qLYJiAwefgvOh5HbxWZzxsqqe2AQHWW++OiGkxbQxlhsa99ORHsdGjoMnGUWSaoGLAQjT4AiznuMo/Q/mNZjDuwncuCrJSxzB1B6JYkAgy79OVdPyYsho8R4USqMN/rVgC1JMAZNuRrbHqkg3A6KgOJ7qlJlFphbJASToJrfchW6hgAUNvZXeCZD7oqZBMjXeFVUs2Peg+mqbBNW3uL1EC8i/SOhc1hlho1yzJkAypyYHQnYRfKcGgwu8HIBi99E+Gk0zfsJjykdIdC9uzzy2lCAmBGguQnoIXyryruAlcDbYfvs9MOaSTjnoxXRiAbUfg/7tFVj8n2nVn8L09ETze3qu5uLOD96YcB4N8P+ntEq2fhNmEgCFmx+bq5it1w8anBjcs2i5hz/5PA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3813.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39830400003)(366004)(376002)(346002)(136003)(396003)(6496006)(52116002)(86362001)(4326008)(36916002)(36756003)(6486002)(2616005)(478600001)(6916009)(316002)(786003)(66476007)(66556008)(66946007)(2906002)(5660300002)(44832011)(8676002)(8936002)(186003)(16526019)(83380400001)(518174003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: ildkFd1RgYZE+HJAeyJK0veho+lv4L/69uqvOeXHOrsKG97bu72Mgun/ZW1l5wSQ/HlAHjmOKP3MEhAROxWG8OdoC9NKQbhTyZcmapdoex/pkKnlQNCW4ZridjAQKmjgjV4WyPNgfWdyxv75nabwKHzriA2vNsL7c8v9weTB9x/DRcMR17B0IVt4vG1I5quBuBVecaDgTk1B+MPyuDz8Bn37HBB76xhkY31gIJPo5ST3Zd968vqqAa6G9lQavq1+hJhgv6494lIxZQOvLLTrfu9pqMNpnNcrDUFsV5HVmHKghOwhICUR3z9Nn5DnJpcxJHRtB01ber7q3H2zyPlh4qhSqpsuv9IyQPiBH/k1r6tPGYwwabtRX+WNbkQsz0k3bp96I7bzPicQWIyA/VvjICHvC62y9cfcA9d3/fgkKkxaZrbCb+x0J4iKBHzwa5GHD84KP1dkBseaxZH/uB/HNE2GcRVlFMQk9ju/VJRHG1PzNuZpr+6GOjTegT6AsFZRaaXM9XB3iO7k1VTasW2u5SPhyqp6xZ1612UY7sTyWc8UVzDlzzPVqsOQdmG5Xs8l1GXuOyS5Y2Zbcp0kiD1HcKRYJxxhdTpxFXy+6mqH+sEO0bnYc4EMvCVfJxRAdlURJhso9fmAozELfjW9JrQLlXl60VYGHdwdNAESJgkcLxk= X-OriginatorOrg: uninett.no X-MS-Exchange-CrossTenant-Network-Message-Id: 30b6df53-64ed-4f0b-2d87-08d87f76a0e6 X-MS-Exchange-CrossTenant-AuthSource: AM6PR08MB3813.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2020 21:31:15.8311 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 68763e3d-4615-4222-988f-90ba13e351e9 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c1gjrXJO+NKLGAg82u5yXAxiLF2jixM9aL21LuCsSf+CpqIAVikWWvu2YWFdE7+/aat/jgiTJzpub2USJkQ5zQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1809 Received-SPF: pass client-ip=40.107.20.117; envelope-from=vegard.vesterheim@uninett.no; helo=EUR05-DB8-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/02 16:46:18 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:124960 Archived-At: On Mon, 2 Nov 2020 22:10:02 +0100 Christopher Dimech wrote: > 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 quickly > 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