From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.devel Subject: Re: Extend Outline mode with default visibility state Date: Mon, 17 Jan 2022 20:34:38 +0100 Message-ID: <87iluiw3zl.fsf@gmail.com> References: <8335lny134.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4537"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 17 20:39:23 2022 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 1n9Xqc-00013r-HX for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 20:39:22 +0100 Original-Received: from localhost ([::1]:33902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9Xqb-0003zO-85 for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 14:39:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9XmA-0008C9-7G for emacs-devel@gnu.org; Mon, 17 Jan 2022 14:34:46 -0500 Original-Received: from [2a00:1450:4864:20::329] (port=52195 helo=mail-wm1-x329.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9Xm7-0004jo-T8; Mon, 17 Jan 2022 14:34:45 -0500 Original-Received: by mail-wm1-x329.google.com with SMTP id c2so17233641wml.1; Mon, 17 Jan 2022 11:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=b1Tuo+kgVmaDpbtWD78G1rG2XR7xjO1Ci+kLRVXTcT0=; b=IOo7PkYTm10v77Fu14uACIG+l2znp4OfNBEWsQZth7RL8H12NrW5rDxmiPicymJBJm hRHYox07rAazdqPvNViwwxhQf6JyrRNIe6/KiLwKMwj2YgnKyJ49/OUerTjRAxnK6SzT xxWtpwnW+1wCXSrIyHwF6ud4W1xq985z5g2OXICAkI5IR5SWuJJoAXxUehCg0Em7Rd2Q kOaM5PvtIc7t7mhdrGZX95snWCNuWl5AqGBqQF6atXdjbVbiQphrbhIdWRs+tmKHwGhk F/gzJZLxYNNhSoqCNJy5xH320VkBCtdL27CYCIUsLKbpYJFe5adUnb5y2o9O4DvmN1If ygBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=b1Tuo+kgVmaDpbtWD78G1rG2XR7xjO1Ci+kLRVXTcT0=; b=5XQaCZ7k950H5KA0ImoHOPB2Siyjx42IcLHqrgS2TUTu2mw3+rL6Jgv7ETqPVrmaQE xGVwzv/ivWzpD7WNrkORr/v/aioi5OnRvzB32E9dLLRoaicdI5qNavBQWoUri8bTV5uw WBe+VY1IZKtrN4gqAUzCCxr8bwMjj43I8ZLdvrzyaRPPjEy5MNuz9CD638w23IfYamDH jhcU+TE5rvAJoPFJINEeZxRlpYJ1FtdbzyFaBZgNFmvykUoEZ/RgaiZd6qRrkk4PRQfM zDhfx4g4homzR3i+ClGFwHqhCtw5a6CySP2nyRvROMPA0ks1elKPaqrpvjugNcRpo6hj omNQ== X-Gm-Message-State: AOAM532A77eb+piP1cTnkf7hTFU2NWaJqGqFq7n3kik30c0VDZqp6WN4 7BlQ/x1poqpjnxTpWCl3NnOlRu2wZhY= X-Google-Smtp-Source: ABdhPJypUj/TwVYhgMAie3Lf4/R2DrPEO7Empc2mBMKDd7YIk5nCFPKtuptSjd64+X64olYr/+IQPg== X-Received: by 2002:adf:ec92:: with SMTP id z18mr15211675wrn.207.1642448081320; Mon, 17 Jan 2022 11:34:41 -0800 (PST) Original-Received: from carbon.localdomain ([2a01:e0a:245:c850:98f5:429a:aa8e:95bb]) by smtp.gmail.com with ESMTPSA id j14sm284260wmq.1.2022.01.17.11.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 11:34:40 -0800 (PST) In-Reply-To: <8335lny134.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 16 Jan 2022 20:42:07 +0200") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::329 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=orontee@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:284898 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: Thanks for your careful reading! > The doc string of outline-default-state "Needs Work": > (...) > The doc string of outline-default-rules also "Needs Work": > (...) > > Can these issues be fixed, please? Here is a patch where I tried to improve the doc strings. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-some-doc-strings-in-outline.el.patch >From 9c5763b490b6cc482ea5467c7432a140750164e6 Mon Sep 17 00:00:00 2001 From: Matthias Meulien Date: Mon, 17 Jan 2022 20:20:28 +0100 Subject: [PATCH] Fix some doc strings in outline.el * lisp/outline.el (outline-default-state): Fix doc string. (outline-default-rules): Fix doc string. --- lisp/outline.el | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/lisp/outline.el b/lisp/outline.el index 8e4af64370..4dbbaa26a0 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1308,23 +1308,25 @@ outline-headers-as-kill (defcustom outline-default-state nil "If non-nil, some headings are initially outlined. -Note that the default state is applied when the major mode is set -or when the command `outline-apply-default-state' is called -interactively. +Note that the default state is applied when Outline major and +minor modes are set or when the command +`outline-apply-default-state' is called interactively. -When nil, headings visibility is left unchanged. +When nil, no default state is defined and +`outline-apply-default-state' is a no-op. If equal to `outline-show-all', all text of buffer is shown. -If equal to `outline-show-only-headings', only headings are shown. +If equal to `outline-show-only-headings', show only headings, +whatever their level is. If equal to a number, show only headings up to and including the corresponding level. See `outline-default-rules' to customize -visibility of the subtree at the choosen level. +visibility of the subtree at that level. If equal to a lambda function or function name, this function is -expected to toggle headings visibility, and will be called after -the mode is enabled." +expected to toggle headings visibility, and will be +called without arguments after the mode is enabled." :version "29.1" :type '(choice (const :tag "Disabled" nil) (const :tag "Show all" outline-show-all) @@ -1335,6 +1337,9 @@ outline-default-state (defcustom outline-default-rules nil "Determines visibility of subtree starting at `outline-default-state' level. +The rules apply if and only if `outline-default-state' is a +number. + When nil, the subtree is hidden unconditionally. When equal to a list, each element should be one of the following: @@ -1350,10 +1355,11 @@ outline-default-rules - `subtree-is-long' to only show the heading branches when its subtree contains more than `outline-default-line-count' lines. -- A lambda function or function name which will be evaluated with - point at the beginning of the heading and the match data set - appropriately, the function being expected to toggle the - heading visibility." +- A cons cell of the form (custom-function . FUNCTION) where + FUNCTION is a lambda function or function name which will be + called without arguments with point at the beginning of the + heading and the match data set appropriately, the function + being expected to toggle the heading visibility." :version "29.1" :type '(choice (const :tag "Hide subtree" nil) (set :tag "Show subtree unless" -- 2.30.2 --=-=-= Content-Type: text/plain Just curious, what is the precise meaning of the quotes and capitalization in your usage of "Needs Work", I am not a native English speaker and I don't know how to interpret them? -- Matthias --=-=-=--