From unknown Fri Jun 20 07:12:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46878 <46878@debbugs.gnu.org> To: bug#46878 <46878@debbugs.gnu.org> Subject: Status: 27.1; lisp-outline-level returns imprecise level number Reply-To: bug#46878 <46878@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:12:08 +0000 retitle 46878 27.1; lisp-outline-level returns imprecise level number reassign 46878 emacs submitter 46878 Howard Melman severity 46878 normal tag 46878 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 11:35:20 2021 Received: (at submit) by debbugs.gnu.org; 2 Mar 2021 16:35:20 +0000 Received: from localhost ([127.0.0.1]:54078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7zO-0005DV-Ks for submit@debbugs.gnu.org; Tue, 02 Mar 2021 11:35:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:55258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH7zN-0005DO-LO for submit@debbugs.gnu.org; Tue, 02 Mar 2021 11:35:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH7zK-0000c5-No for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:35:12 -0500 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:34946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lH7zG-0002OI-OW for bug-gnu-emacs@gnu.org; Tue, 02 Mar 2021 11:35:10 -0500 Received: by mail-qv1-xf2d.google.com with SMTP id h7so3232925qvm.2 for ; Tue, 02 Mar 2021 08:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=yxlza6AW3viSYNOK25vVDO84H/7Nfz+ynGk2zWpx2po=; b=rH+rudW3J6c9I4db5doM61SOdgk3Z9x2REmXqrD3ftK9/tq1xw3gwtJ7fk8KSk6Z6/ ljKNAB2CTehRHrRh0fclCk3qkAYtofE9OS+Yws0VMyQhtFUAuyRmHPBvgtL0KJncfrNS /xNDe5pZPZdVwJC2ZC/K6/0K2cG7Rbaz1GTW0p9uLbq9vP9utMbNI7xeTd/oK5J8yjP4 N3pnvA6GEilEXdgkr2mi8evzYcdRpHbIITOtHSFNLu8pK7r5LdPoLJtbVAsFvOJGe68S teOx5U20WQKHNd2ZXH/9S6F24v6TIOh9OUZho6P8R4lBMQjhXRJeivAVgFlvVwjOb4bE ueBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=yxlza6AW3viSYNOK25vVDO84H/7Nfz+ynGk2zWpx2po=; b=YYxE5xWQd67DvClN4aMtUPsauFNPNrC1DxRGkf1jdtlC8ZvSuZWjqLmYc2CKdm+p6Q JZklXSDIvqmM1igOwY7EVn/arEpcWU4474FopBjPNz/+PmsPNMP4S6POuN957MmY4YFo yi12Au95MAWEJqY92ERkF/ug4Ly2rEpw3UPYb+6LXkQAy/ST5YjkOrpDfPoxHqbZmihe bxXgQlbXThHh8jGUMQA2G/lwzP/BkpA0VqhjdW7+nIVkBrTVZ37Rwv3MmYKQL3Nyp6OQ TWueixaGRqz7mkpzhGE9CYShJrqFYBkoFfJ4NJL4nzshDI+r5HfIl5YWOQd9sCjez+cz JKSg== X-Gm-Message-State: AOAM530so3vAeCHFh8idX/WwwHPnh9pOJPpnYuGe52ZFP6ohMZJRkGoo euBIKntGCPHzn7dL5ZMQhDoTIOBaQiU4aw== X-Google-Smtp-Source: ABdhPJx5Sy33tk3biAQt3xXnLy/CGPbadVSAB/Y/rjFnI5r0ChTRazXoXJQPRjDpaytySNLpHuO0rg== X-Received: by 2002:a0c:b59f:: with SMTP id g31mr20390203qve.28.1614702903548; Tue, 02 Mar 2021 08:35:03 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id l3sm9120315qtd.38.2021.03.02.08.35.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Mar 2021 08:35:03 -0800 (PST) From: Howard Melman Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: 27.1; lisp-outline-level returns imprecise level number Message-Id: Date: Tue, 2 Mar 2021 11:35:01 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=hmelman@gmail.com; helo=mail-qv1-xf2d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) lisp-outline-level returns a functional but incorrect level number. Comments beginning with ";;; " should be at level 1 but it returns 5 because they match ";;; [^ \t\n]" and the current code just returns that length. The following version returns the right level following the convention that ;;; are top level comments and each lower level adds a ;. As in the existing code, lines that match an autoload tag or begin with ( return level 1000. This fix would be helpful for code that wants to deal with headings by level number generically (e.g., display the top 3 heading levels). Other modes like outline, org, texinfo, and html-mode return a level rooted at 1. Programming modes are more mixed, but this seems like an easy improvement for lisp modes. (defun lisp-outline-level () "Lisp mode `outline-level' function." ;; expects outline-regexp is ";;;\\(;* [^ = \t\n]\\|###autoload\\)\\|(" ;; and point is at the beginning of a matching line (let ((len (- (match-end 0) (match-beginning 0)))) (cond ((looking-at "(\\|;;;###autoload") 1000) ((looking-at ";;\\(;+\\) ") (- (match-end 1) (match-beginning 1))) ;; above should match everything but just in case (t len)))) In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 = Version 10.14.6 (Build 18G95)) of 2020-08-12 built on builder10-14.porkrind.org Windowing system distributor 'Apple', version 10.3.1894 System Description: Mac OS X 10.15.7 Configured using: 'configure --with-ns '--enable-locallisppath=3D/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' --=20 Howard From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 12:05:25 2021 Received: (at 46878) by debbugs.gnu.org; 2 Mar 2021 17:05:25 +0000 Received: from localhost ([127.0.0.1]:54100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH8Sb-0005ul-Hr for submit@debbugs.gnu.org; Tue, 02 Mar 2021 12:05:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH8Sa-0005ua-7n for 46878@debbugs.gnu.org; Tue, 02 Mar 2021 12:05:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43757) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH8SU-0006zw-E4; Tue, 02 Mar 2021 12:05:19 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3405 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lH8SQ-00030N-QA; Tue, 02 Mar 2021 12:05:17 -0500 Date: Tue, 02 Mar 2021 19:05:14 +0200 Message-Id: <83sg5d5vw5.fsf@gnu.org> From: Eli Zaretskii To: Howard Melman In-Reply-To: (message from Howard Melman on Tue, 2 Mar 2021 11:35:01 -0500) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number References: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Howard Melman > Date: Tue, 2 Mar 2021 11:35:01 -0500 > > lisp-outline-level returns a functional but incorrect level > number. Comments beginning with ";;; " should be at level 1 > but it returns 5 because they match ";;; [^ \t\n]" and the > current code just returns that length. I believe these problems are fixed on the master branch (or at least the behavior is very different), please try that. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 12:48:49 2021 Received: (at 46878) by debbugs.gnu.org; 2 Mar 2021 17:48:49 +0000 Received: from localhost ([127.0.0.1]:54116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH98b-0006u1-FW for submit@debbugs.gnu.org; Tue, 02 Mar 2021 12:48:49 -0500 Received: from mail-qt1-f181.google.com ([209.85.160.181]:46841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lH98W-0006tk-Ta for 46878@debbugs.gnu.org; Tue, 02 Mar 2021 12:48:48 -0500 Received: by mail-qt1-f181.google.com with SMTP id o1so10970523qta.13 for <46878@debbugs.gnu.org>; Tue, 02 Mar 2021 09:48:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7G7hjItVtRorIxTd61zgcZFaxEAUsIAmTTm4dW9nj6I=; b=kvawsG+jFw7DxXHFo91MCCevIh2xhHI3aW3S7szFteE+rW7vj3B0Xm+O3kmOytnfG8 UdZrmo1wGKEi5XwQX38EXYKJEEmJhPYoyZgxzMyKdMI5sHBBLwPmZKlSuJMLVT57NIZw W5Sf+VTXDknTDIXArZyjYSLrDlbpo4HmZN49JppaB0bjn4FUiqFLsxJKgKxEgNEMVK+A QsVbc8ZAmMG0/STSzzWNjhQjguGeY3OEdnblD40fv6UNKzvyl4dxiIe/Lu21MBdllcTG LaUbYisEdBhiFKgzVcdoYCbwcNbNF7+U3czSkgkPlExjv0Q5YSUpUM4pO8Jy+dFBpQ4v V2SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7G7hjItVtRorIxTd61zgcZFaxEAUsIAmTTm4dW9nj6I=; b=BKw5TujZz9AM98PhG+9BYK31xhZgfXBF2AraxCWQ3d720ap6V7WqJn+Esnnd9gcB7L qpQiir54wb4k74JE0UrAh61EY1gmzPhhR6HDHblPNQEkKkywrlTqFizykx+B7ARsYRYL SrJp3ZlkRSaYc5UYFRuUUF0XeQQI4eoNjF7HuWYmvjDZZTJ3L/8bM8mDZEia1AhQ3kea OEZvJXXnjXDlUVLK1nLCW6yQIY/G4yDjA6w361d+MAMfnWYpcNYabKrfk7PovIW6s12U zsHSQKa16Y99iiiEgIJs9o6yYvRvcgjpJRcE1j6YNJBfiB9dhOE8Wl8qTI9h1vR24TZx 8AJA== X-Gm-Message-State: AOAM530fePjiacTLFEkwvJ4t7vO4Cj0DsYK6Lx24grzFgsH/lNqUSnOe 8kbRgSRxL3JNZzyzQNOzruM= X-Google-Smtp-Source: ABdhPJxy3935AkMEKeRUFNPrgBgRqIEMUCJU+7ad85b/t3ROzlLIC4XPo0x0kkJd3KtOIqXdUT1Lxg== X-Received: by 2002:ac8:382e:: with SMTP id q43mr18958725qtb.119.1614707318875; Tue, 02 Mar 2021 09:48:38 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id z188sm14502006qkb.40.2021.03.02.09.48.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Mar 2021 09:48:38 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number From: Howard Melman In-Reply-To: <83sg5d5vw5.fsf@gnu.org> Date: Tue, 2 Mar 2021 12:48:37 -0500 Content-Transfer-Encoding: 7bit Message-Id: <36425FB3-9EAE-4050-A6B0-AA4AAE57C10A@gmail.com> References: <83sg5d5vw5.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mar 2, 2021, at 12:05 PM, Eli Zaretskii wrote: > >> From: Howard Melman >> Date: Tue, 2 Mar 2021 11:35:01 -0500 >> >> lisp-outline-level returns a functional but incorrect level >> number. Comments beginning with ";;; " should be at level 1 >> but it returns 5 because they match ";;; [^ \t\n]" and the >> current code just returns that length. > > I believe these problems are fixed on the master branch (or at least > the behavior is very different), please try that. I don't build my own emacs and can't easily test on master. I had previously confirmed that lisp-outline-level in 27.1 is the same as in master as shown here: http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/lisp-mode.el You can quickly test the behavior by putting point at the beginning of a "heading" line in an emacs-lisp-mode file and running: (progn (looking-at outline-regexp) (funcall outline-level)) Howard From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 14:43:13 2021 Received: (at 46878) by debbugs.gnu.org; 2 Mar 2021 19:43:13 +0000 Received: from localhost ([127.0.0.1]:54263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAvJ-0003Gi-Hq for submit@debbugs.gnu.org; Tue, 02 Mar 2021 14:43:13 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:52607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHAvI-0003G7-Nj for 46878@debbugs.gnu.org; Tue, 02 Mar 2021 14:43:13 -0500 Received: from mail.gandi.net (m91-129-96-116.cust.tele2.ee [91.129.96.116]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 558A3200005; Tue, 2 Mar 2021 19:43:06 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: Date: Tue, 02 Mar 2021 21:36:14 +0200 In-Reply-To: (Howard Melman's message of "Tue, 2 Mar 2021 11:35:01 -0500") Message-ID: <871rcxuz4h.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > The following version returns the right level following the > convention that ;;; are top level comments and each lower > level adds a ;. I use outline-minor-mode extensively in lisp-mode, so after trying your version I'd say that while the change of the level definition can be surprising to someone, but to me your version makes more sense than the current level definition. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 02 19:26:07 2021 Received: (at 46878) by debbugs.gnu.org; 3 Mar 2021 00:26:07 +0000 Received: from localhost ([127.0.0.1]:54506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHFL4-0003ki-UF for submit@debbugs.gnu.org; Tue, 02 Mar 2021 19:26:07 -0500 Received: from mail-qk1-f173.google.com ([209.85.222.173]:35558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHFL1-0003kC-0M for 46878@debbugs.gnu.org; Tue, 02 Mar 2021 19:26:05 -0500 Received: by mail-qk1-f173.google.com with SMTP id d20so21380265qkc.2 for <46878@debbugs.gnu.org>; Tue, 02 Mar 2021 16:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JRdRgz+hzpiZueAW58NQtX5MbwaxeNS7xQOQZs66pOc=; b=lLZTlaayFzCUlLm1O1tSD6a3ojZbGYblOA7DYx6osXxw+bvSkNVn6mBzvFGuSvxewO SDc+BsEQRcRKjiUL8DGJEGEz9oE3vbvgE2efAkkDcE5YBJv+5S8iLD5k4v3LI1VW9MZn uK71IV/J1z6iQFaxgoDIogjDc04K6LtFZpA7ejtKaj3lN0cZavWu+GybEfERazCERnV6 kTDba6ZHsqVmXNUjheITPC916WTDT9U/AB1vXwvLPNb8+VAnzB1VYfVFYE/VrpwZ2/HJ XB9mY2nQ/dUoNUALebl/+RV4xAafK2DhkKbEkgX3ahPBIIDnaogm4y0zGELe06IpMgtV HLiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=JRdRgz+hzpiZueAW58NQtX5MbwaxeNS7xQOQZs66pOc=; b=oFykfN4L+bUcgs+NLayT0GKM6+G4tVAC0cCMTNgt4tuqqj4RlIMKmAsmCJala5jNK4 PSu44LqwLFljKIcRQTLCqWq3GWuKOJilRPAyFeZVX9aVIzZMVymm+J+ZolTL3WLR/5Mn t66cM7tCg4DKy16w6GuNBWlJnRLhNKJUotpxPqQwpLMChfULY33lPlkmIIIrJ/te732q ryfezHLtxHYJg0LzQxvgJrN1TCcpStLHZGc74yp8WjpZDvbQQVhTYGv3Yw0nTIX1jPH5 eELIFMMEiycZIMELebjRkyFiQ+Tj3Pp2e7slW4CdhEzCoQ50SZmyxEMUcmhsHlCHYdJy GjGA== X-Gm-Message-State: AOAM532c91H7G6JUF3PmAEnegq/bTgr/z2u+nk+ZafvcjaIr7gKNJekW EH3lDtXtd28os22QMn4ckdI= X-Google-Smtp-Source: ABdhPJz2mfcp26KgOkkzlfWsH3aQmlXQ55bYPlce5HUQjhzNA/TXAMBjG3judHdsh6Zt7TPOY2FGWA== X-Received: by 2002:a37:68c1:: with SMTP id d184mr21629751qkc.395.1614731157420; Tue, 02 Mar 2021 16:25:57 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id k21sm7037177qkg.78.2021.03.02.16.25.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Mar 2021 16:25:56 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number From: Howard Melman In-Reply-To: <871rcxuz4h.fsf@mail.linkov.net> Date: Tue, 2 Mar 2021 19:25:56 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> References: <871rcxuz4h.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 2, 2021, at 2:36 PM, Juri Linkov wrote: >=20 > I use outline-minor-mode extensively in lisp-mode, > so after trying your version I'd say that while > the change of the level definition can be surprising > to someone, but to me your version makes more sense than > the current level definition. Thanks. I use outline-minor-mode a bit, mostly via outline-cycle. When = you say the change can be surprising, what do you mean? Does something = show the level number? AFAIK levels are just treated in relation to each = other and the number isn't shown to the user. My change I think just = means levels 1-4 were previously unused and are now used. Howard= From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 03 14:14:53 2021 Received: (at 46878) by debbugs.gnu.org; 3 Mar 2021 19:14:53 +0000 Received: from localhost ([127.0.0.1]:57004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHWxR-0000YF-4y for submit@debbugs.gnu.org; Wed, 03 Mar 2021 14:14:53 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:44721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHWxO-0000Xx-HG for 46878@debbugs.gnu.org; Wed, 03 Mar 2021 14:14:51 -0500 X-Originating-IP: 91.129.96.116 Received: from mail.gandi.net (m91-129-96-116.cust.tele2.ee [91.129.96.116]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5492260009; Wed, 3 Mar 2021 19:14:42 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> Date: Wed, 03 Mar 2021 21:04:18 +0200 In-Reply-To: <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> (Howard Melman's message of "Tue, 2 Mar 2021 19:25:56 -0500") Message-ID: <87mtvkcfr1.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I use outline-minor-mode extensively in lisp-mode, >> so after trying your version I'd say that while >> the change of the level definition can be surprising >> to someone, but to me your version makes more sense than >> the current level definition. > > Thanks. I use outline-minor-mode a bit, mostly via outline-cycle. bug#45147 implemented new modes for Org-like TAB cycling in outline-minor-mode. > When you say the change can be surprising, what do you mean? Does something > show the level number? AFAIK levels are just treated in relation to each > other and the number isn't shown to the user. My change I think just means > levels 1-4 were previously unused and are now used. Some packages like https://jurta.org/en/emacs/ee/outline showed all 4 useless additional levels. Now thanks to your new definition, all such visual noise is removed: - (no-heading) - (no-heading) - (no-heading) - (no-heading) and only one top heading is displayed: - (no-heading) ;;; ee-outline.el --- manipulate outlines collected from outline-mode ;;; Commentary: - ;;; Code: From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 03 15:04:34 2021 Received: (at 46878) by debbugs.gnu.org; 3 Mar 2021 20:04:34 +0000 Received: from localhost ([127.0.0.1]:57080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHXjV-0003ud-Qb for submit@debbugs.gnu.org; Wed, 03 Mar 2021 15:04:34 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:41422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lHXjU-0003uQ-53 for 46878@debbugs.gnu.org; Wed, 03 Mar 2021 15:04:32 -0500 Received: by mail-qv1-f49.google.com with SMTP id t1so11344185qvj.8 for <46878@debbugs.gnu.org>; Wed, 03 Mar 2021 12:04:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wSnGO4GwmJtmchSDpSrdguCY76d4L7nPIR76Pwo1Q4M=; b=koloJedThJrJWWHv3QPnFsCAeSnj8vCzJImlqRM8AXILxDuzfC40VurxpnGktHMmUl qzR+xlLAiDxZslFyR3wjqLG00Su9i6ut8HNlG6evHl5Crv27DW+NC9CyuDgg6v/CnP7L oGYBl8pIG/4EHuJl3nlK4xRJ5F3ldD401AFxpR+Ijb0M0JC6IG1xr/S5Mm6k2UkrU520 tdbUV2rG6o8w/s7GhBUw2P/oW0F5hVOGtNdY+bjASZaBQEpjZ5DpCN6Jry7iS2bVUFZJ wlQF+gHwWLA6L3CUyGq1SwOAPwn3+XP3PmviMhoBjBvSeHPUKlE5JZ0iFDfhjMragM+8 uvUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=wSnGO4GwmJtmchSDpSrdguCY76d4L7nPIR76Pwo1Q4M=; b=uj3izlYHxlvIY6NJ8y+OJH+3peJlS/bPY9xLgkdhT4bZD0KglNiM/wWJh0cV0OCmwi WPtfdqKp9vffFHLqPQI9Eb0ffk41ZSDHTBWH84o9Ufn2TIaukYWBQMa+kyttHeoxNOwQ f52GGne6AnMkkHeMRvHfgJntiZdl5WkDJ23TxjlKYyZC5mpSixhq7+leJkn9akfBTHha SihDQZRoWh6VqnTo6uXiIHyJvREOYe3k51793+addQ0h/+wtT7pdzIZAd40OOXTqW4yp N5yq4ztXrxGyoR66G/TlQD6R18G0jZayFfxdRr3/ZPyxZNiFSIPo/SusJ7Ail6rgGk2+ 3DNg== X-Gm-Message-State: AOAM5318O6y2fpencARhHHigqq4anE3pXt8EOGBgTnADk2YLNkVqIrwy lO0fyZzshs5maXEZXwpkPnsySZP9VjTxaQ== X-Google-Smtp-Source: ABdhPJyHgEIM5CxbcKtRbqTYpqAauc5dj5CqsJxco2gs2UCI19fDAUoIko4SxxQ038s4p2bu6JxUyA== X-Received: by 2002:a05:6214:1085:: with SMTP id o5mr670812qvr.5.1614801866643; Wed, 03 Mar 2021 12:04:26 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id n23sm18085060qkg.25.2021.03.03.12.04.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 12:04:26 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number From: Howard Melman In-Reply-To: <87mtvkcfr1.fsf@mail.linkov.net> Date: Wed, 3 Mar 2021 15:04:25 -0500 Content-Transfer-Encoding: 7bit Message-Id: <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Mar 3, 2021, at 2:04 PM, Juri Linkov wrote: > > Some packages like https://jurta.org/en/emacs/ee/outline > showed all 4 useless additional levels. > > Now thanks to your new definition, all such visual noise is removed: > > - (no-heading) > - (no-heading) > - (no-heading) > - (no-heading) > > and only one top heading is displayed: > > - (no-heading) > ;;; ee-outline.el --- manipulate outlines collected from outline-mode > ;;; Commentary: > - ;;; Code: Great. I came about it because I hope consult-outline adds an argument to let the user choose headings from the top N levels, so that's why the numbering became important for me. Hopefully no reports a downside which is why I asked about any visible changes in what is shipped with emacs. Howard From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 07 13:51:22 2021 Received: (at 46878) by debbugs.gnu.org; 7 Mar 2021 18:51:22 +0000 Received: from localhost ([127.0.0.1]:41493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIyUs-0005b0-3f for submit@debbugs.gnu.org; Sun, 07 Mar 2021 13:51:22 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:44005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIyUo-0005aZ-Vk for 46878@debbugs.gnu.org; Sun, 07 Mar 2021 13:51:20 -0500 X-Originating-IP: 91.129.108.46 Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 25304E000A; Sun, 7 Mar 2021 18:51:10 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> Date: Sun, 07 Mar 2021 20:45:30 +0200 In-Reply-To: <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> (Howard Melman's message of "Wed, 3 Mar 2021 15:04:25 -0500") Message-ID: <874khmkgcl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Hopefully no reports a downside which is why I asked about any visible > changes in what is shipped with emacs. I tried to use your new definition, but noticed that it adds a new cycling state: while using outline-cycle-buffer previously it used to cycle between only two states (thus it was convenient to collapse/expand all headings with only one keypress S-TAB). But with your change, it requires typing S-TAB twice to get the state where all headings are shown and their bodies are collapsed, because it cycles between three states. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 07 13:57:41 2021 Received: (at 46878) by debbugs.gnu.org; 7 Mar 2021 18:57:41 +0000 Received: from localhost ([127.0.0.1]:41511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIyaz-0005kq-Jt for submit@debbugs.gnu.org; Sun, 07 Mar 2021 13:57:41 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:45538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lIyax-0005ke-Ki for 46878@debbugs.gnu.org; Sun, 07 Mar 2021 13:57:40 -0500 Received: by mail-qk1-f182.google.com with SMTP id z128so7255459qkc.12 for <46878@debbugs.gnu.org>; Sun, 07 Mar 2021 10:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b2yM8Bcx4fASdrS42Bu6nYQ0mXp22iUYFaIW87Iusu0=; b=e5BdjwsROLjXB3zIsPfKecA35LSUaYuhJYzWGgA0BXVwXFBpRkGRQpZcju6RfPyZb/ 2A4PKWlUy02xo6DeClbWttTZjEgaR9A1cFwICumPDHwg6F0ILYYkrnJv8SH0zCf6rEs5 a1clSJEnuKdCSpdwSGh3Ya2ORtmF896Pf/ycEvAqaEvCIcarImslh9KaStgk/fW5n2cX d52R7fAUkGREu6tag5AV69V89jfGkuJYPS1H7KHE9O0/BXTlWp0xBYUui/NjwnoKSP1U E00PaOYowzTEhZoYbdLXwMR5EwJuXEGEYrWee4RSRFR2vbh3u9ViP07Mbb6RjEeAml12 fywQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b2yM8Bcx4fASdrS42Bu6nYQ0mXp22iUYFaIW87Iusu0=; b=tXKPB37fOpbgwTT2fcz3MNW2j90UzaGIPxCvZajQZMs9m0CBVeQZaZXIfRsveWPeO1 DwEgepxFlnAhx2ElKobCxHr+l+yvQCXqegM2gJT3a8VLqPjKOmlvVj/eD5VuflwCwURI qveUaZ94tmt62C8gEPMO9Ejao1GsglfjaXweaB2W5GpUzdl40yCuO8mMOmQYo0b5bizt OT3wEVaW0jWbZZiDeXBqsW1PyXvmd5zBo30vqM1dX//ElmMsqAMPXhYaBS3v7n3XAgw6 cXdlSjvG++bDuoqFN2suh4k0ko23oEVm+9bsKt0THxOv6kevY/JiL1hABPnlNrhV1dMe rP+w== X-Gm-Message-State: AOAM533mRBdjR3NZ6H1PPXZQ9Tmc/bXuIN2f2gG/zLBYDmENg9ldj6DD Kxm92z4t10GaCiQtmRZh3Lc= X-Google-Smtp-Source: ABdhPJyVwK/4lPb8o3qPSn7uJ8xCLT4sUdLzlOZhuebNXFlVPalZCwrsbPB530wBfpLFFCEKXNipTw== X-Received: by 2002:a05:620a:1467:: with SMTP id j7mr17481498qkl.136.1615143453866; Sun, 07 Mar 2021 10:57:33 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id l129sm6185178qkd.76.2021.03.07.10.57.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Mar 2021 10:57:33 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number From: Howard Melman In-Reply-To: <874khmkgcl.fsf@mail.linkov.net> Date: Sun, 7 Mar 2021 13:57:32 -0500 Content-Transfer-Encoding: 7bit Message-Id: <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mar 7, 2021, at 1:45 PM, Juri Linkov wrote: > I tried to use your new definition, but noticed that > it adds a new cycling state: while using outline-cycle-buffer > previously it used to cycle between only two states > (thus it was convenient to collapse/expand all headings > with only one keypress S-TAB). > > But with your change, it requires typing S-TAB twice > to get the state where all headings are shown and > their bodies are collapsed, because it cycles > between three states. Hmmm. Yes I have that, but I always had that in emacs-lisp-mode even before this change. The cycle commands cycle between three states (top level, all headings and everything) and as I understand it, it's just a function of how many levels are defined, not what numbers they are called. Howard From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 12:36:05 2021 Received: (at 46878) by debbugs.gnu.org; 8 Mar 2021 17:36:05 +0000 Received: from localhost ([127.0.0.1]:44690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJJnY-00024O-W7 for submit@debbugs.gnu.org; Mon, 08 Mar 2021 12:36:05 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:35529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJJnX-00023h-Dm for 46878@debbugs.gnu.org; Mon, 08 Mar 2021 12:36:03 -0500 X-Originating-IP: 91.129.108.46 Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 1D36A1BF212; Mon, 8 Mar 2021 17:35:55 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> Date: Mon, 08 Mar 2021 19:23:58 +0200 In-Reply-To: <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> (Howard Melman's message of "Sun, 7 Mar 2021 13:57:32 -0500") Message-ID: <87zgzdd7td.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I tried to use your new definition, but noticed that >> it adds a new cycling state: while using outline-cycle-buffer >> previously it used to cycle between only two states >> (thus it was convenient to collapse/expand all headings >> with only one keypress S-TAB). >> >> But with your change, it requires typing S-TAB twice >> to get the state where all headings are shown and >> their bodies are collapsed, because it cycles >> between three states. > > Hmmm. Yes I have that, but I always had that in emacs-lisp-mode > even before this change. The cycle commands cycle between > three states (top level, all headings and everything) and as I > understand it, it's just a function of how many levels are defined, > not what numbers they are called. This is strange. When trying this in emacs -Q and visiting a Emacs-Lisp file from the emacs repository and typing: M-x outline-minor-mode RET Then using repeatedly: M-x outline-cycle-buffer RET It consistently alternates between only two states: Show all All headings But after evaluating your version of lisp-outline-level, it alternates between three states: Show all Top level headings All headings From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 12:38:16 2021 Received: (at 46878) by debbugs.gnu.org; 8 Mar 2021 17:38:16 +0000 Received: from localhost ([127.0.0.1]:44699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJJpg-00027y-KY for submit@debbugs.gnu.org; Mon, 08 Mar 2021 12:38:16 -0500 Received: from mail-qv1-f54.google.com ([209.85.219.54]:45701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJJpf-00027m-Hn for 46878@debbugs.gnu.org; Mon, 08 Mar 2021 12:38:16 -0500 Received: by mail-qv1-f54.google.com with SMTP id s17so4962235qvr.12 for <46878@debbugs.gnu.org>; Mon, 08 Mar 2021 09:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jJEJ2yx/AKHIJZrHdE489W7P68aujOp0HCLAUlSrbMw=; b=vWqfRnL5FYgjx+0ooJGII/bseLzxFJ2mq4039shpTK71ueCFyCeWNz3VXj79w9I3ys LjivOaGL11PU3wW+3nHhLRutaNVP7PcJ6KDg07s94eyj9aqj9aXTYMPk88c3jgYxxldu tgoVQVAhKDf9ABJhVe1TLW17HC6DXsPBlMbWePthgrR1OKswlVXfS6WthXQQqZOPSUwD TCTQ2Fdz47kvBWVfoum3b1+PhhrKKETZWDpNrtctp3C2U8Mv0JLtAQT37ExihaXh1glD Yd6qeAq12vf2lNzXQMcaBu0+vE/6NKIGYtMg8mOpSifV9R9L58ZUvxMLZuf9tGz7SAjq Xjjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jJEJ2yx/AKHIJZrHdE489W7P68aujOp0HCLAUlSrbMw=; b=ZAjNjfZrtsTNFPClaKxrNECUfvtQrBGyKTFLAWlhy7+PeRZQe+lF+jXtpHG3Dw76t5 R14b3erieAbMB9tTf+Wh6ACNpIdFmMYPO3y8RnzkbVh9xdzzmfhZWWR9qsMg+mUrhWlD Db9jxZGNH8JklwUa0yjYpmshM24Lu2yLtxyebEyRnuvOCOPFAXmY17n+DYInPe9I7JMr IhVu9z9rh7PYgFJDwGk6AYJHxKoRojMJ5WTA0kzQ+S8raxtof/q8zwt8cGY4yUHo3jid DnHIH5TKLGse1YJqCuqEGvR1Q1LnhN9YigfRBhZgMas0GeupaecdA+fbkkNg800VBclm YjAw== X-Gm-Message-State: AOAM531e9i79xMBR99y0asYFAcuw9wTEgK+rViUXRBX0O9lpgLfwsYI3 oOOkc4JrVttL9g8W/wsM7LM= X-Google-Smtp-Source: ABdhPJz+3TGYVlLPG9zWdivBRo6urtCB7u1bW95FDex4hM8+yevTibSSS4urqXrPvIQdccWnfdD7uA== X-Received: by 2002:a0c:a282:: with SMTP id g2mr21584677qva.14.1615225089879; Mon, 08 Mar 2021 09:38:09 -0800 (PST) Received: from lumet2.home (pool-108-26-232-211.bstnma.fios.verizon.net. [108.26.232.211]) by smtp.gmail.com with ESMTPSA id h6sm8053981qtj.75.2021.03.08.09.38.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Mar 2021 09:38:09 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number From: Howard Melman In-Reply-To: <87zgzdd7td.fsf@mail.linkov.net> Date: Mon, 8 Mar 2021 12:38:08 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> To: Juri Linkov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Mar 8, 2021, at 12:23 PM, Juri Linkov wrote: > This is strange. When trying this in emacs -Q and visiting > a Emacs-Lisp file from the emacs repository and typing: >=20 > M-x outline-minor-mode RET >=20 > Then using repeatedly: >=20 > M-x outline-cycle-buffer RET >=20 > It consistently alternates between only two states: >=20 > Show all > All headings >=20 > But after evaluating your version of lisp-outline-level, > it alternates between three states: >=20 > Show all > Top level headings > All headings That is strange. Is outline-regexp changing? (I'm not on Emacs 28 so I = can't check.) Howard From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 08 12:56:07 2021 Received: (at 46878) by debbugs.gnu.org; 8 Mar 2021 17:56:07 +0000 Received: from localhost ([127.0.0.1]:44737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJK6x-0002a3-Ja for submit@debbugs.gnu.org; Mon, 08 Mar 2021 12:56:07 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:38655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lJK6w-0002ZX-8K for 46878@debbugs.gnu.org; Mon, 08 Mar 2021 12:56:06 -0500 X-Originating-IP: 91.129.108.46 Received: from mail.gandi.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id EBA0DE0002; Mon, 8 Mar 2021 17:55:58 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> Date: Mon, 08 Mar 2021 19:52:13 +0200 In-Reply-To: (Howard Melman's message of "Mon, 8 Mar 2021 12:38:08 -0500") Message-ID: <87tuplv8he.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> M-x outline-cycle-buffer RET >> >> It consistently alternates between only two states: >> >> Show all >> All headings >> >> But after evaluating your version of lisp-outline-level, >> it alternates between three states: >> >> Show all >> Top level headings >> All headings > > That is strange. Is outline-regexp changing? (I'm not on Emacs 28 so I can't check.) I don't think that outline-regexp is changing. But I can't check in Emacs 27 because outline-cycle-buffer is only in Emacs 28. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 20 22:38:39 2021 Received: (at submit) by debbugs.gnu.org; 21 Mar 2021 02:38:39 +0000 Received: from localhost ([127.0.0.1]:53393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNnzC-0005xU-So for submit@debbugs.gnu.org; Sat, 20 Mar 2021 22:38:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:40922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNnzA-0005xL-33 for submit@debbugs.gnu.org; Sat, 20 Mar 2021 22:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNnz9-0005ao-FO for bug-gnu-emacs@gnu.org; Sat, 20 Mar 2021 22:38:35 -0400 Received: from mail-mw2nam10olkn2012.outbound.protection.outlook.com ([40.92.42.12]:18784 helo=NAM10-MW2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNnz7-0006Tw-FY for bug-gnu-emacs@gnu.org; Sat, 20 Mar 2021 22:38:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D39KgGR0PlFqXzobrDID+O9lj0GiDsymqhvyOBaIB7VGYHucnK2AsI14nlFsQTtF2U53l88tpwZJyt2F8sVMRw0wndqiCWXYOhTRDw8Y96x0laPHTps33ERQkFmOdl2h15hPaBbTjv5M3LA0oGw2eCMv5sSPXKGrtvnZ402JjFsmMF+aH/0EafgyzShB1lDeWZXNyRGccHCBHci4aLVG/w9r+LVtXBlvib9U86Mw23Gss3TNKqrV8EG4wgEWqk3G5mbog5uLSJMTw5rpn3CgP9Yh972/v89DN6/GARv5TteiVZv6MnbpW0aQRnoupVK+eb034gw9p+RRhNM+kwenKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bw69iUoBmyGZL8afqMwxJj6gicfwNr6tyUg3b5T2jcY=; b=CmJmaKMz8zamLPwwTrR6JRSCFWUR1VX193zJMRlOmuE6hbsaFamM8Gqq5dtHYKMlWwoxW0cTot6TknWMp/dlshLC8XmeUO5lAUcps9sAaG5AgJFVXJlgkAaKn0ORODzVV5+A8iIxvoUXPLz5qIoDTitcCN7l0eGVVsVdWrqbtAwcUdhNv2Jvo9/a2YoJMjcXwszYelxCfO390Xcy8kGHCIifHlG/3STZsT+UwvHwmTEBu79GUSdSXHnj3ieaJ88aHtZakOijXyG2kwSnfcU082n+XkLvEYoa00vnf3kI0WyZzwgBivIZTtDh9BX7d0X/2MXL58GFAHygxuqtcSot1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bw69iUoBmyGZL8afqMwxJj6gicfwNr6tyUg3b5T2jcY=; b=grxy48BebztLZgfEVx7wtCFVGGX+tVukuDMWZo0kqFsKfMDYmjYnoBYQT9f2sHiqqhwz3XgWkh5QjoJSVpB8Mjs5BlpwYJuBPwBuisyiw134fFizysGsm/Z3ZNt+55r9Yi/PXuKHOp+H1zxTB0hqm4nHkGrWDqUJki7yq+CAZi4CPeycq6jB83KxkCo+fVKzKFHkaE7mzAADpLiTmp7ThoKXb8gHilEg44mMb1DEtX6Bno7ldRlCk30e+JoIshqbV8XURQnWWn0FA0gb2U/ankk5VEs35GAPwe9lBMBt8M83osc5OnJ8Q51Cmiku+gW3VqbYjKeo4+63Zl9qFg66jw== Received: from BN7NAM10FT009.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::46) by BN7NAM10HT028.eop-nam10.prod.protection.outlook.com (2a01:111:e400:7e8f::346) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Sun, 21 Mar 2021 02:23:29 +0000 Received: from CH2PR01MB5879.prod.exchangelabs.com (2a01:111:e400:7e8f::45) by BN7NAM10FT009.mail.protection.outlook.com (2a01:111:e400:7e8f::248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sun, 21 Mar 2021 02:23:29 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F04FF0CE5B7A5BC60A7FD3EF59D0A152524DEA2FC80A59FEBB5891291405909C; UpperCasedChecksum:42D7C0A9CF7B80DA52A4F92D71EF9B8E16168BFF528200DF0FFA83C68E3A0ADB; SizeAsReceived:7812; Count:45 Received: from CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9]) by CH2PR01MB5879.prod.exchangelabs.com ([fe80::592f:9a58:d8cd:d9c9%7]) with mapi id 15.20.3955.025; Sun, 21 Mar 2021 02:23:29 +0000 From: Gabriel To: bug-gnu-emacs@gnu.org Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> Date: Sat, 20 Mar 2021 23:23:21 -0300 In-Reply-To: <87tuplv8he.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 08 Mar 2021 19:52:13 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-TMN: [lf1N9z5PaubPEQEGMKNK0UEeZryiiwPT3WxJ/dTeWaq7RU5UO//+HwVaYgumRdn5] X-ClientProxiedBy: CP2PR80CA0032.lamprd80.prod.outlook.com (2603:10d6:102::18) To CH2PR01MB5879.prod.exchangelabs.com (2603:10b6:610:3c::12) X-Microsoft-Original-Message-ID: <87pmzt4546.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from precision5540 (2804:431:c7f3:ee67:f1fd:1434:d853:5bc8) by CP2PR80CA0032.lamprd80.prod.outlook.com (2603:10d6:102::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Sun, 21 Mar 2021 02:23:26 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 4757d326-3bb9-4d0a-57e4-08d8ec104fc2 X-MS-TrafficTypeDiagnostic: BN7NAM10HT028: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CSyCULzF7fSCJoCIKN46hhjBgpVwB8SZ6AuGH+MTVmh6k/qGIIkv9Oel4HbDj+SHE1cq+MIA6CYi9yJLiQnDZqDiu4kVyePJ22haehss6jUNpVBueXeGQGnDip+kJiVG9Ua4hcCq5IJqyuRpdl2jZ80HjJqRig9SCnbafvEOo+VAQu5TL++R9E8uEEm8MqEzKgF5kCz5XjO416oVkpipJVVku58+MGOfgrGn+8tAPPfDO9aziQpSJhVrK7SUppUwYoJyUcjrE1SaxWPoc4C/Mps8G5PuOW3hIBK9DnjUxwfXuM2WqZ2i+7cAqcCgiRH1hgV8kyHBHdVOTSwkG8+zsPgSWtTCIVnrgyuT9HZocMbiI78g9a/vyIA6Q0s1vBK7NO/P+j9EKv0vNYaMHE6JGA== X-MS-Exchange-AntiSpam-MessageData: Fyiz1Lv+YmQ5ZwjAq3NWAu/KrzsGGqRJT+sYdoWfv8UJyHgYHFybuaNY8rGD/6508Xd5ehBBWUyMHaN4HDQpfM5X4l0bWQmzjIq1qFkqMFp2YpMPL66RKrcFJZhf5VnKTj284jCE0Hr+1bgyge4Bm71Q9/Lroush9QcwiN8hchH1XT2qgSoXTqxgEjvE4GD18/FcLcvZY7z0mpekKmA8Qg== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4757d326-3bb9-4d0a-57e4-08d8ec104fc2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2021 02:23:29.2633 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BN7NAM10FT009.eop-nam10.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7NAM10HT028 Received-SPF: pass client-ip=40.92.42.12; envelope-from=gabriel376@hotmail.com; helo=NAM10-MW2-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Juri Linkov writes: >>> M-x outline-cycle-buffer RET >>> >>> It consistently alternates between only two states: >>> >>> Show all >>> All headings >>> >>> But after evaluating your version of lisp-outline-level, >>> it alternates between three states: >>> >>> Show all >>> Top level headings >>> All headings >> >> That is strange. Is outline-regexp changing? (I'm not on Emacs 28 so I can't check.) > > I don't think that outline-regexp is changing. But I can't check > in Emacs 27 because outline-cycle-buffer is only in Emacs 28. So I checked this "apparent strange behavior" on master branch and it seems to be working as expected. The commit 5a823a2a0c3eca60dd3939fba67df1bbe5a1b715 (Lars on 24 Nov 2020) added a new condition ('has-top-level') to 'outline-cycle-buffer' to check, well, if there is a top level heading, which is used to decide to hide or not sublevels, in case they exist. For emacs-lisp-mode, it fails to identify a top-level because 'outline-level' for a line starting with ";;; " returns a number greater than 1, which the code thinks its a child level: (when (= (funcall outline-level) 1) (setq has-top-level t)) Even though the outline level is used to compare relatively the headings to decide which ones are parents and which ones are children (level 5 is parent of level 6 and subsequent levels), there are cases (like the one above) where it's expected to have an ordered levelling starting from 1. It's more intuitive, and otherwise it's impossible to know what is a top-level or to set faces according to is level (level 1 with face outline-1 and so on). A simpler approach to avoid rewriting the existing functions and regexps would be to create a new variable called 'outline-level-offset', which could be used inside 'outline-level' to subtract from the original value. For example, if today the outline level for ";;; " in emacs-lisp returns 3, the elisp-mode.el (or lisp.mode.el) could set 'outline-level-offset' to 2, so 3 - 2 = 1, the expected value. Regards, Gabriel From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 21 16:44:02 2021 Received: (at 46878) by debbugs.gnu.org; 21 Mar 2021 20:44:02 +0000 Received: from localhost ([127.0.0.1]:55539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO4vZ-00016Q-TY for submit@debbugs.gnu.org; Sun, 21 Mar 2021 16:44:02 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:45691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lO4vX-00015y-Fv for 46878@debbugs.gnu.org; Sun, 21 Mar 2021 16:44:01 -0400 X-Originating-IP: 91.129.107.223 Received: from mail.gandi.net (m91-129-107-223.cust.tele2.ee [91.129.107.223]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id CDA07E0003; Sun, 21 Mar 2021 20:43:51 +0000 (UTC) From: Juri Linkov To: Gabriel Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> Date: Sun, 21 Mar 2021 22:17:39 +0200 In-Reply-To: (Gabriel's message of "Sat, 20 Mar 2021 23:23:21 -0300") Message-ID: <87wnu05k1w.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So I checked this "apparent strange behavior" on master branch and it > seems to be working as expected. The commit > 5a823a2a0c3eca60dd3939fba67df1bbe5a1b715 (Lars on 24 Nov 2020) added a > new condition ('has-top-level') to 'outline-cycle-buffer' to check, > well, if there is a top level heading, which is used to decide to hide > or not sublevels, in case they exist. For emacs-lisp-mode, it fails to > identify a top-level because 'outline-level' for a line starting with > ";;; " returns a number greater than 1, which the code thinks its a > child level: > > (when (= (funcall outline-level) 1) > (setq has-top-level t)) > > Even though the outline level is used to compare relatively the headings > to decide which ones are parents and which ones are children (level 5 is > parent of level 6 and subsequent levels), there are cases (like the one > above) where it's expected to have an ordered levelling starting from > 1. It's more intuitive, and otherwise it's impossible to know what is a > top-level or to set faces according to is level (level 1 with face > outline-1 and so on). Thanks for the analysis. After replacing the hard-coded 1 with 5 it works as expected in emacs-lisp-mode. > A simpler approach to avoid rewriting the existing functions and regexps > would be to create a new variable called 'outline-level-offset', which > could be used inside 'outline-level' to subtract from the original > value. For example, if today the outline level for ";;; " in emacs-lisp > returns 3, the elisp-mode.el (or lisp.mode.el) could set > 'outline-level-offset' to 2, so 3 - 2 = 1, the expected value. Maybe a better name for a new buffer-local variable would be 'outline-top-level', to make it similar to the internal variable 'has-top-level'. Or maybe better just to apply the patch that Howard sent in the top message of this bug report to change 'outline-level' in emacs-lisp-mode to count from 1. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 23 21:34:59 2021 Received: (at submit) by debbugs.gnu.org; 24 Mar 2021 01:34:59 +0000 Received: from localhost ([127.0.0.1]:33483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOsQF-0006Dy-CT for submit@debbugs.gnu.org; Tue, 23 Mar 2021 21:34:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:55918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOsQA-0006Do-Pe for submit@debbugs.gnu.org; Tue, 23 Mar 2021 21:34:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOsQ4-0004bd-A6 for bug-gnu-emacs@gnu.org; Tue, 23 Mar 2021 21:34:52 -0400 Received: from ciao.gmane.io ([116.202.254.214]:60024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOsQ3-0001q7-4K for bug-gnu-emacs@gnu.org; Tue, 23 Mar 2021 21:34:48 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lOsPz-0008w3-Qu for bug-gnu-emacs@gnu.org; Wed, 24 Mar 2021 02:34:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Date: Tue, 23 Mar 2021 21:34:39 -0400 Message-ID: References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> <87wnu05k1w.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) Cancel-Lock: sha1:Zhtj+9HwWPcYv5EUfqc+PEJALWo= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Juri Linkov writes: > Or maybe better just to apply the patch that Howard sent in the top message > of this bug report to change 'outline-level' in emacs-lisp-mode to count > from 1. FWIW, this seems cleaner to me :) -- Howard From debbugs-submit-bounces@debbugs.gnu.org Mon May 17 21:13:07 2021 Received: (at submit) by debbugs.gnu.org; 18 May 2021 01:13:07 +0000 Received: from localhost ([127.0.0.1]:54094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lioIF-0001HE-9i for submit@debbugs.gnu.org; Mon, 17 May 2021 21:13:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:43356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lioID-0001H5-0m for submit@debbugs.gnu.org; Mon, 17 May 2021 21:13:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lioIC-0000Up-SK for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:13:04 -0400 Received: from ciao.gmane.io ([116.202.254.214]:55304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lioIB-0001Z1-Kz for bug-gnu-emacs@gnu.org; Mon, 17 May 2021 21:13:04 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lioI8-00052p-6F for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 03:13:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Date: Mon, 17 May 2021 21:12:51 -0400 Message-ID: References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> <87wnu05k1w.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cancel-Lock: sha1:3dCU0LDch2qX4QG/Yt8UGnRsMMQ= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Howard Melman writes: > Juri Linkov writes: > >> Or maybe better just to apply the patch that Howard sent in the top message >> of this bug report to change 'outline-level' in emacs-lisp-mode to count >> from 1. > > FWIW, this seems cleaner to me :) So two months later, will this fix get applied? -- Howard From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 16:38:26 2021 Received: (at 46878) by debbugs.gnu.org; 18 May 2021 20:38:26 +0000 Received: from localhost ([127.0.0.1]:57429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj6Ty-0000dx-KR for submit@debbugs.gnu.org; Tue, 18 May 2021 16:38:26 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj6Tw-0000dh-PL; Tue, 18 May 2021 16:38:25 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 30C1B1C0003; Tue, 18 May 2021 20:38:16 +0000 (UTC) From: Juri Linkov To: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Organization: LINKOV.NET References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> <87wnu05k1w.fsf@mail.linkov.net> Date: Tue, 18 May 2021 23:36:42 +0300 In-Reply-To: (Howard Melman's message of "Mon, 17 May 2021 21:12:51 -0400") Message-ID: <87mtsrye1x.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46878 Cc: 46878@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) tags 46878 fixed close 46878 28.0.50 thanks >>> Or maybe better just to apply the patch that Howard sent in the top message >>> of this bug report to change 'outline-level' in emacs-lisp-mode to count >>> from 1. >> >> FWIW, this seems cleaner to me :) > > So two months later, will this fix get applied? Sorry for the delay, I waited for more possible objections. Now pushed to master in the commit 502e3ce614. From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 19:38:38 2021 Received: (at submit) by debbugs.gnu.org; 18 May 2021 23:38:38 +0000 Received: from localhost ([127.0.0.1]:57579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj9IM-0000l6-3F for submit@debbugs.gnu.org; Tue, 18 May 2021 19:38:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:37444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj9IJ-0000kv-9f for submit@debbugs.gnu.org; Tue, 18 May 2021 19:38:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj9IJ-00063e-1u for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 19:38:35 -0400 Received: from ciao.gmane.io ([116.202.254.214]:51808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lj9IH-0001VR-SM for bug-gnu-emacs@gnu.org; Tue, 18 May 2021 19:38:34 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lj9IF-00093E-AB for bug-gnu-emacs@gnu.org; Wed, 19 May 2021 01:38:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Howard Melman Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number Date: Tue, 18 May 2021 19:38:22 -0400 Message-ID: References: <871rcxuz4h.fsf@mail.linkov.net> <54FD8677-43E1-4806-9F8D-86850CBC3B29@gmail.com> <87mtvkcfr1.fsf@mail.linkov.net> <44DA0D54-D744-41A3-A7A1-D6A45B9536A4@gmail.com> <874khmkgcl.fsf@mail.linkov.net> <6A310565-0A96-416B-B476-EE5D26D72615@gmail.com> <87zgzdd7td.fsf@mail.linkov.net> <87tuplv8he.fsf@mail.linkov.net> <87wnu05k1w.fsf@mail.linkov.net> <87mtsrye1x.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cancel-Lock: sha1:43gmYaY8u7o7A62ZJH3M59KjUiY= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Juri Linkov writes: >> So two months later, will this fix get applied? > > Sorry for the delay, I waited for more possible objections. > Now pushed to master in the commit 502e3ce614. Thanks very much. -- Howard From unknown Fri Jun 20 07:12:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Jun 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator