From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Regarding outline headings in emacs-lisp libraries Date: Sat, 18 Jul 2020 16:15:25 +0000 (UTC) Message-ID: <7f679297-5d7c-4550-9ca7-d2718c4a82e8@default> References: <875zalolt7.fsf@bernoul.li> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24793"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier , Jonas Bernoulli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 18 18:18:43 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 1jwpXu-0006LO-Sk for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jul 2020 18:18:42 +0200 Original-Received: from localhost ([::1]:60572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwpXt-0007mp-S9 for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jul 2020 12:18:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwpWq-0007Fc-RH for emacs-devel@gnu.org; Sat, 18 Jul 2020 12:17:41 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:41084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwpWn-0001W5-Tt for emacs-devel@gnu.org; Sat, 18 Jul 2020 12:17:36 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06IGDE74010065; Sat, 18 Jul 2020 16:17:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=yUkc3L8+fRYYJOgA3VMwS7hMk69gLHTzl3ejPLAPTsE=; b=ol4QeBHSX2M5yodLVY1muahhKB+fyHzjm3cd2DJWuEicSA5cToriqWm5C4jYN/TRrTmR +zDDag0T6FyD8XVFF5vjhD4mK+algkTurS6CkLR2YHcA5MXp3aPAvBLTK1WeWlRCvL1F MKv4OlG82gf+WdjFSDDYABT4xNtw2H5rTvvD6jCasIlUqpD7lu7+jhj/lqPBnmt/gwBY W9+jx3e/7bQEzH8eZDgijWJG0u8ArBzxw/xt35qgayrUh7JDaq4A6Nr78j+zyTqUbSoh mMtPNZQx54XAlS70lR5UePKgInmlcPVj/Pe4KOdnORV9vbbEOma7vCdEBhKpc/pyDoJ2 gg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 32bs1m1cqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 18 Jul 2020 16:17:24 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06IGHLsB076912; Sat, 18 Jul 2020 16:17:23 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 32br1nm9jk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 18 Jul 2020 16:17:22 +0000 Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 06IGFP7T010136; Sat, 18 Jul 2020 16:15:26 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9686 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007180123 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9686 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 spamscore=0 mlxscore=0 impostorscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007180123 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/18 12:17:27 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -63 X-Spam_score: -6.4 X-Spam_bar: ------ X-Spam_report: (-6.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-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:253073 Archived-At: > > B) The OVERVIEW shown above isn't just not useful, for more complex > > libraries (which are split into more (sub*)sections) having a > > useful OVERVIEW is quite important. > > > > For such libraries the TOC just isn't a suitable substitute for > > OVERVIEW. It could be deeply nested and if one only wants a list > > of the "major sections of a program", then a deeply nested tree of > > sub*sections just isn't the same. >=20 > ... I haven't found a case of a file where the TOC is so > large that it warrants the OVERVIEW. And I'd even claim > that such a file would be just too large and should > likely benefit from splitting it into a few files. FWIW - In my Elisp libraries I often put an Index in the Commentary, with links to the major sections. For this I use the simple library `linkd.el', which is here: https://www.emacswiki.org/emacs/download/linkd.el When in minor-mode `linkd-mode', the links and their targets are highlighted. The major sections I use differ, depending on the library. Here's an example: ;; (@> "Things Defined Here") ;; (@> "Documentation") ;; (@> "Macros") ;; (@> "Faces (Customizable)") ;; (@> "User Options (Customizable)") ;; (@> "Internal Variables") ;; (@> "New Commands") ;; (@> "Replacements for Existing Functions") ;; (@> "Non-Interactive Functions") Each section begins with corresponding link-target (anchor) text. E.g., the "Macros" section has this: ;;(@* "Macros") (I typically also put a formfeed (^L) char before that line. That lets me use `C-x ]' and `C-x [', and with library `pp-c-l.el' I get clear visual indication of ^L chars, i.e., of the sections.) Org Mode offers similar linking, of course, but Linkd is simple.