From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Nicolas Goaziou Newsgroups: gmane.emacs.devel Subject: Re: Convert some files from outline-mode to org-mode Date: Wed, 29 Apr 2020 16:17:42 +0200 Message-ID: <875zdifkah.fsf@nicolasgoaziou.fr> References: <87zhaxi70f.fsf@yahoo.com> <4D145B75-0C23-4371-A388-747BB9E42327@traduction-libre.org> <78A6DFC3-234D-415A-8A71-DD38810B9B17@traduction-libre.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="93449"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: emacs-devel@gnu.org To: Howard Melman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 29 16:22:28 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jTnbW-000OAd-UQ for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 16:22:26 +0200 Original-Received: from localhost ([::1]:49176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTnbV-0003uU-WD for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 10:22:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46184) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTnXA-0006bQ-JX for emacs-devel@gnu.org; Wed, 29 Apr 2020 10:18:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTnX1-0001LN-U0 for emacs-devel@gnu.org; Wed, 29 Apr 2020 10:17:56 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTnX1-0001Bd-4x for emacs-devel@gnu.org; Wed, 29 Apr 2020 10:17:47 -0400 X-Originating-IP: 185.131.40.67 Original-Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 9660220009; Wed, 29 Apr 2020 14:17:43 +0000 (UTC) In-Reply-To: (Howard Melman's message of "Wed, 29 Apr 2020 09:54:56 -0400") Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 10:17:44 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 217.70.183.200 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:248144 Archived-At: Hello, Howard Melman writes: > To be clear, it's better than just that. As I said I use it > for code folding. As long as a programming mode sets > outline-regexp then outline-minor-mode works with it and > org-cycle and org-global-cycle work in those modes. I use > S-TAB and C-TAB in emacs-lisp-mode, python-mode and othes > all the time. > > In emacs-lisp-mode: > > (setq-local outline-regexp ";;;;? \\|(....") > > In python-mode: > > (setq-local outline-regexp (python-rx (* space) (or defun decorator))) > > In html-mode: > > (setq-local outline-regexp "<[hH]\\([1-6]\\)\\>") I wouldn't expect `org-cycle' and `org-global-cycle' to work for any `outline-regexp' value. If it works, good for you, but Org really expects "\\*+ " here. Implementing `outline-cycle' and `outline-global-cycle' may be more future-proof. Regards, -- Nicolas Goaziou