From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Regarding outline headings in emacs-lisp libraries Date: Fri, 17 Jul 2020 18:27:13 -0400 Message-ID: References: <875zalolt7.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16046"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Jonas Bernoulli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 18 00:27:51 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 1jwYpb-00043H-6k for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jul 2020 00:27:51 +0200 Original-Received: from localhost ([::1]:40772 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwYpa-0001mB-2F for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jul 2020 18:27:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwYp5-0001LB-E9 for emacs-devel@gnu.org; Fri, 17 Jul 2020 18:27:19 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwYp3-0004DI-CN for emacs-devel@gnu.org; Fri, 17 Jul 2020 18:27:18 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E276081377; Fri, 17 Jul 2020 18:27:15 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0184780B63; Fri, 17 Jul 2020 18:27:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1595024834; bh=okfb1jvulGgJ3NURv1AZllhicYdWKpSIMmv9Q7CK3Oc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jGKESok4vvwUVH6k8OLkKR1JN44Yi1FWxp8NMNmQpniDzUAv4gs1Sz8TSjBH/opHp ucwIOFF+FykjyoS099TShF1et4CbMQvFvemEUuGd13lMi1NmkV8LrSzWCK2SuGZ8M9 x2hbYoeFz/8cd4pfo5DSccv28s6e52K6iSSR1HSWsk9XiwTLKRA1UUjhT893ZZeRfL r2wIqVqgSEZ2nCCu5d9GEQctB+CoNxI7SZoSmuoa9bg4EQTIOi5eft0w6OM0jOOyVP EVz3nJqS3G3cb7SwWb5Te57seIzA9BIx5JgVftFjGixJA0LmWZmguLjzvlTv5keVih fzQ8fj7YFgbRw== Original-Received: from milanesa (76-10-180-175.dsl.teksavvy.com [76.10.180.175]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BF3541203E4; Fri, 17 Jul 2020 18:27:13 -0400 (EDT) In-Reply-To: <875zalolt7.fsf@bernoul.li> (Jonas Bernoulli's message of "Fri, 17 Jul 2020 23:48:04 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/17 18:08:42 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:253050 Archived-At: Hi Jonas, > Now, I agree that it makes sense to do it that way but the problem is > that it only does so in theory, in practice this approach comes with > several annoyances. [ Note: I use `outline-minor-mode` systematically in all my Elisp files. ] I don't have a strong opinion on this, but FWIW, I have a slight preference for the ";;;;" version over the ";;;" version (but it's very slight; I'm really OK either way. In most cases I don't even notice the difference). The annoyance you mention doesn't affect me, because I use (hide-sublevels (if (eq outline-level 'lisp-outline-level) 1000 1)) to fold most of the actual code when opening the file but none of the headings. More specifically, I get something that might look like: ;;; foo.el --- Blabla ;;; Commentary: ;;; Code: (require 'cl-lib) ;;;; Custom vars: (defcustom foo-var nil... ;;;; Aux functions (defun foo-fun1 (arg)... (defun foo-fun2 (arg)... ;;; foo.el ends here [ And I (almost) never toggle the folding or fiddle with it by hand, I only use `reveal-mode` to auto-unfold/refold as I move about the buffer. ] Stefan