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: outline-minor-mode and org-mode capabilities for programming languages Date: Mon, 10 May 2021 14:32:51 +0200 Message-ID: References: <87zgx3zu6e.fsf@zoho.eu> 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="5501"; 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 Mon May 10 14:44:54 2021 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 1lg5HJ-0001IF-EC for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 14:44:53 +0200 Original-Received: from localhost ([::1]:45060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg5HI-0002cI-Gr for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 08:44:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg56H-0001fN-R4 for help-gnu-emacs@gnu.org; Mon, 10 May 2021 08:33:29 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:41145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg56C-00076g-EC for help-gnu-emacs@gnu.org; Mon, 10 May 2021 08:33:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620649971; bh=j7Su558QC09BKjzMKxLn6wbys4mHoWZ5cJBN0/REPwE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RZN6y5FIhGQ6aUKEsSBwHxL/M+0R2EMpQKeKoBzd7ya76EJ689nLKV7u6ZGNRVWwy ovmh0OOr1KcqjthdjF5FOHZtgha+HIRMooQwvVIy/FM1ObvZaDBOw/IT9ZripDqUSr 9p//EQ8F7HlkI7OqAaj3l+bs3QxliC71gTQBHdsE= 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-bs03.server.lan [172.19.170.169]) (via HTTP); Mon, 10 May 2021 14:32:51 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:Bb5DND321c4S/whcykQJ+guIZqdG+VHNwNuXqtkbnzZVp3PoCRiYB4xwvLOMjy8GZ1edV sj+mxROLnrhqtx3HpGbOGUE8WAyCTeLEfh5am3ZP2z2X6sr0b/avkPTunYy4wpSIwm+sapakSkdB hj3qS/HWrDTwBOSx9BDHu5621x/U0vBndgb1evPZHO/RtdLhfX68uq6cv+w+EojcOpUcyMBkEKI6 nF0wt72/fROwRuYLCtVDYjDKT3lV71GUVYFW+qfZNNundcfVsa1mmVPG1/ciOozubidTm7y5I6gp zE= X-UI-Out-Filterresults: notjunk:1;V03:K0:diledPKMq+w=:n+9Oee/0zOwwrCpJo/h/go e9NlAvLh+Fe7fB+2SY/U4RqqamP9m1ncSzM/u3jc5ppN9S/jRhTfc+DmYBTcyPLxUP1/0OE/u sNZbPyCLTbp5W9l9GEiXFq9rrRnhLNebO/jgqNEBtYJ0k3zXfoNirFBWDxMOaMXLhmHMAsN8G DuyDjTwItlkOWYZEVnrm5kmD/ndm0zK2ZtXHSN9EO7VO5tion1cLM/yk0qL7lCT9cSjqRBd/7 Pw1rwwSUAAMgy04BevHls+hof6WJv6NAGXngmwiRajBRpMMqIRO7syJIOBtr2WqCL5W8I1ChY RU2HXl7V/ADltNOCF4D4znKUHplFmMHDcbXc5+AWOWt158za9NVGb2/VYnk2SUu878e2JyR+K LaDH72HRMVjQbnSVDxt8LOe3lyfjklLNDJNCOY1Gj23lB0sfDtdFILxqGYhgJNL8M581aLHld 9mZT5pSWe6Tl4HXnSpYbGHk4iJsfhuLyB1Ef1wvgNkw8xTe2Tu3tZT+DAxoCbmuxrRHh5AqPt mBbHzrI8m+UJGPI0jQniS3pCuTEWSg2zedcO1uzfh7WqnzdFZgqNV6PsYhHLFEGT1/KTxNyOJ QjslcNZflopiTpRzHh8PiMfIW9Ge4+vU+MVEb1U8UXxKxgrO3W0iOLjxjX3/OUrfZtby29ZtP vZKXacLRPZqAnhHW5ME4N4hsuST9/a9z6I+Xd6UV2FAoYSvxeSBDNQppSqfId+mwq1TT5YY+p m5pwOptK/wRUqPr/fOwrNx5Hs8UCgRKZakHrvjVL0OrU6++efSADHCnGSjWLq7TFyFe7Cj60 Received-SPF: pass client-ip=212.227.17.20; envelope-from=dimech@gmx.com; helo=mout.gmx.net 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:129663 Archived-At: > Sent: Monday, May 10, 2021 at 11:53 PM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu=2Eorg > Subject: Re: outline-minor-mode and org-mode capabilities for programmin= g languages > > * Christopher Dimech [2021-05-10 13:28]: > > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) > > (add-hook 'emacs-lisp-mode-hook > > (lambda () > > (outline-minor-mode 1))) >=20 > I am not sure why you need to call 2 times, isn't once just enough? >=20 > I have tried this: >=20 > > (add-hook 'emacs-lisp-mode-hook #'outline-minor-mode) >=20 > and it works=2E I try that with this function here, could be > interesting=2E It creates new temporary buffers=2E C-u F5 and I choose t= he > favorite mode, and the above hook worked just well=2E >=20 > I think there is no need for second line above=2E You are right, have removed the second and do get outline-minor-mode for e= lisp files=2E =20 > (defvar rcd-temp-buffer-mode-history nil) >=20 > (defun rcd-temp-buffer (&optional name mode) > (interactive "p") > (let* ((format "*RCD TEMPORARY BUFFER%s%s*") > (buffer (if name (format format ": " name) (format format "" "")))) > (switch-to-buffer (generate-new-buffer "*RCD TEMPORARY BUFFER*")) > (if current-prefix-arg > (let* ((modes '("adoc-mode" "emacs-lisp-mode" "lisp-mode" "markdown-mod= e" > "org-mode" "sql-mode" "fundamental-mode" "html-mode")) > (mode (completing-read "Mode: " modes nil t nil 'rcd-temp-buffer= -mode-history))) > (funcall (intern mode))) > (funcall (intern (or mode "fundamental-mode")))))) >=20 > > (highlight-regexp "^;;;;;=2E*$" 'hi-yellow) >=20 > I don't think that is right place to define highlighting=2E Please first > verify options of outline-minor-mode-highlight (I did not yet)=2E >=20 > > (setq outline-heading-alist > > '((";; * " =2E 1) (";; ** " =2E 2) (";; *** " =2E 3)) ) > >=20 > > ((emacs-lisp-mode =2E > > ((outline-heading-alist =2E > > '( (";; * " =2E 1) > > (";; ** " =2E 2) > > (";; *** " =2E 3) ) )))) > >=20 > > Still want to ask example code for hon to change the outline-minor-mod= e=20 > > keybindings to something else=2E >=20 > I have tried that, does it work on your side? Not on mine, I don't > know why=2E Does not work here either, trying to understand why=2E =20 > I have made new prefix: outline-minor-mode-prefix is C-c C-d "=03=04" >=20 > But TAB works automatically when you set headings=2E >=20 > --=20 > Jean >=20 > Take action in Free Software Foundation campaigns: > https://www=2Efsf=2Eorg/campaigns >=20 > Sign an open letter in support of Richard M=2E Stallman > https://stallmansupport=2Eorg/ > https://rms-support-letter=2Egithub=2Eio/ >=20 >=20 >