From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id fBRWNAQqmmBaVwEAgWs5BA (envelope-from ) for ; Tue, 11 May 2021 08:53:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YA1tLwQqmmDSZgAA1q6Kng (envelope-from ) for ; Tue, 11 May 2021 06:53:56 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21A6021445 for ; Tue, 11 May 2021 08:53:56 +0200 (CEST) Received: from localhost ([::1]:38016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgMHC-0006vD-R9 for larch@yhetil.org; Tue, 11 May 2021 02:53:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgM3f-0005zY-Va for emacs-orgmode@gnu.org; Tue, 11 May 2021 02:39:55 -0400 Received: from mout.gmx.net ([212.227.15.15]:47267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgM3d-0002Mp-LB for emacs-orgmode@gnu.org; Tue, 11 May 2021 02:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620715188; bh=n+8IezEMrldVILA5Nzi+cSYx2G53aQkBXCXYJ9wxpjA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dD7cPtXQewZRuw+XeU4U7/h2P8FCOb/ZoVYJShPCGBAoebgMKS/Bq8cxlq3GnLhuG YpmhGJrQTYISgEnHxlYbIn5Qe+ceMIHqtcT7TADaUv5nhPc09J0YajDYlfQ9EwsgpU ihSc4bM2ehRODFPyQAUADA2ZZaZBHpn+0cFvn/OI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs03.server.lan [172.19.170.169]) (via HTTP); Tue, 11 May 2021 08:39:48 +0200 MIME-Version: 1.0 Message-ID: From: Christopher Dimech To: Tim Cross , bzg@bzg.fr Subject: Re: Highlighting and Background Colour for Source Code Content-Type: text/plain; charset=UTF-8 Date: Tue, 11 May 2021 08:39:48 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87wns5byeu.fsf@gmail.com> References: <87zgx1c1a4.fsf@gmail.com> <87wns5byeu.fsf@gmail.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ndXVzjKFzBXzLk9QuHRkf/ciOgrpQWp52Gf4EAIkoQMQHw32UFpfD/77N4YjPL0I+jlF+ VehaeQF9AOLBndZjBdTi3RsmZhD6oFa9Se0jo30thir7Gd4nam7fkc0VyPrV46SK9kc//5JlNF8f 86qGAswAM5u0ZQxGAXni4vkcuEcPy9SqPImXALDrCXdAw7dwfkN+YIxKg/Z0qk4zoEBP3SD1O4NU OwQblGaJxD137HNeLyaIOulBc8LANj76f11h9cNrzsUMc0zm0rRsWVHYY52KPgE78fb24+LDsEoN Zk= X-UI-Out-Filterresults: notjunk:1;V03:K0:aRweqQkX3+I=:ZVKrZVBiy64NhngAvRZ8wy 9TcCbOfEifeSAzC1hgSm5pevANfnOoY6/kqyxjgcNEnbBD4R4+D9hRVShGpkZhxldJIYFlY+I BKV0m5WMfZIlRE2fHtfg8oVLF1SNif/9jJdANelINfd+SAP7Bf7ez6pHhNm1TimtKHoJdmMbZ H2r1hdz4K2MlpHrLQSK11FzLrpAE+qLpC3fA1Xo8cSoPvzO1YLo9oO3FuV6I1RCB1ZhXQQTPd PVLX1aB50uJUrooKySA/q/qahANWVbMAjrVSnMLECxPTzOFiSLR9m0C6FxbBhjh5f8I8dl1us Wet320qkrs009RPJhC3EjmRRYBWfme3rrdQw9HZCStQz25iOzWh4QofH7refe74sfxE1nPA39 0nT2ZnxmVuCm0lHa+EPxxCKZ2oGbdHbMZhTMwZJMc+tvCQuzR/5+qQTddN43S2HiG2jgMX3dg ZBozE/G7YGdUEyToMjvzYY4nrI40X02quRrXFv7KD9mjLJm3wNdWAk/BtJV3N99yF6j6q1MVf m2zFYLjcIymo85ov/y6C2CgYqW/x7ePxvoj6ObeOXbAR/ACFaFfUNJvWuwgWuSyrzR+br2RnK km5gvHOBDpc4dE86PJCDSbGhrBOID3cUmMt1tJswRZpbkj9eLFLrmD60nb66BupagKxI5+y1C aYsuxAkOiDoKgWu0IKTJnUnldQwkS+GL7aWNdEbxuAX3Pmq0FMxuPJ5gksPtKtNEHsD8j1BIA xSId8netSpx6d8rWfLhBu/bKXtw9CPXZBg8p22xwO8rNLQLEL1FH9fFokS/3jQ+uMPNef6Lu2 etSFoSFOI9hh++jOmqesKxIXK44Ir5DlVhcEKv3NXNTdOhvpgwiTqPM4SfxaWXDACe1O+U/fb tINAOvO6V2K1+Jp2Z3O+iWWFDioZgIhnx6AOVAJj3+7HslBC9SuRZguf3hWjED Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620716036; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=d6rFD/aE8hp8P0RanSr1+SUGCYV5pGrf580ZYdhoSgk=; b=j7SC62CnmQA3cLqJtxdoDD+1RyvL4eAQIKd4WR9lS5Q0xDCK5Z7lxujB1up89FGHqQtEnj gvCxDmZd87vx7ixyu4h1pabogm246I7JY83tnXYoe0TRH18f+aGagXIZ64EpZ2owHPMra4 +WfXmo9S2SReHPxap6/Otjmmi6iebVowEV98dAlYJM6YRYyW84PqQ+XQjy5b/L7hK++kkI N5DE3ZMzjB6feMTc94TQYHXCGe6f5tLG6BNOx0fzt1s/LdD46sEnjvokcHxGRWAbYH4dej pdekjLX/2ltAeoyg8ZvJ9VphL8/wm1URAhUfwX5hNkAwNSo/kyPHSdPY3fOpjw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620716036; a=rsa-sha256; cv=none; b=LUWyPS38B0lgWxAeVqh/URMkc+eOeG9et3wZFBUM2vp/GIs/j73gSh8JUWflybMBtyzpX1 p33L4F2AEapOORcEUxsuKe5XGIsh35tFvA4dfqjkMvkDheyq0UD1aAuo33gnaFSqtV6tca D75AUkcpaQBzQDoO35mqx5/Cf5BHSSK3i9DAZVaGnFmdUyKiEIrxDVqTpfhgZiFbBb7tFO shGM5Z6tyf93h0I7AOYXCP23H9NAhEIVS3iYforCEhEY7KiSV4MdU7hvvBDI6Fty2jXuTx U4cv7/kPEnGRBjtedHEYCKJGs3FBSoixhK6lpDotDcpSlYG5l4FnyDI0fj8new== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=dD7cPtXQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=dD7cPtXQ; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 21A6021445 X-Spam-Score: -2.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: SwZGtxqH0njh > Sent: Tuesday, May 11, 2021 at 5:50 PM > From: "Tim Cross" > To: "Christopher Dimech" > Cc: emacs-orgmode@gnu.org > Subject: Re: Highlighting and Background Colour for Source Code > > > Christopher Dimech writes: > > >> Sent: Tuesday, May 11, 2021 at 4:50 PM > >> From: "Tim Cross" > >> To: emacs-orgmode@gnu.org > >> Subject: Re: Highlighting and Background Colour for Source Code > >> > >> > >> Christopher Dimech writes: > >> > >> > Currently currently handles the highlighting of programming languag= es through > >> > "Code Blocks". Could org-mode have the capability of highlighting = a whole buffer > >> > with a particular language highlight typeface. > >> > > >> > >> Sorry, I don't quite understand what exactly your asking for? > > > > Suppose I have an elisp file and I change to org-mode by hitting "M-x = org-mode". > > The code does not get highlighted because it is not embedded within or= g-babel > > construct. > > > > If I have a programming language file with some org-mode heading comma= nds in it, > > and change to org-mode, it would be neat to have language highlighting= available. > > > > OK, now I think I understand. > > Basically, with full org-mode, this is not possible and I don't think it > is actually want you want. Once you switch modes, say from elisp mode to > org mode, a lot more changes than just the font locking. Keybindings, > various support minor modes and lots more. > > The 'normal' Emacs way to handle what you are looking for is to add a > minor mode. A minor mode is used to add some level of functionality to a > buffer without losing the major mode settings. Normally, you only have > one major mode associated with a buffer and often that mode is augmented > with a bunch of minor modes. For example, outshine mode is a minor mode > which adds some org-like functionality to non org-mode buffers. > > Have a look at > > https://orgmode.org/worg/org-tutorials/org-outside-org.html > > I think that might give you some ideas to get you started. You may need > a few different minor modes to get the full setup you want and you will > likely need to do some customisation of key bindings etc to get things > how you like it. I agree that some features of org-mode (e.ge heading folding, code folding= ) would be good to have available in emacs-lisp-mode, texinfo-mode, ... The use of general minor-mode such as outline-minor-mode would be a good p= lace to handle the various programming languages. Currently, there in outline-minor-mode and various others (outline-magic, = outshine). Things are all over the place. I know that Carsten was keen to persuade f= or ideas in org-mode to be included in outline-minor-mode. This has not happened. I = am convinced that the developers of org-mode could make valuable contributions to outli= ne-minor-mode, because currently the ideas there are extremely convoluted and writing an = outline setup is difficult. There will be a number of capabilities to consider 1. Heading Levels using comment lines (e.g. ";;; * Heahding", ";;; ** Subh= eading", ...) 2. Folding of headings and subheadings only (cycling using single key) 3. Folding of code structures only (cycling using single key) That would be valuable for starters. Then we can look at more beef later on. What do you think? Would the org-team be willing and able to assist a re-= development of outline-minor-mode? > -- > Tim Cross >