From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: outline-heading-alist for elisp using ";; * " Date: Wed, 12 May 2021 21:35:07 +0700 Message-ID: References: <878s4m5mbj.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 12 16:36:50 2021 Return-path: Envelope-to: geh-help-gnu-emacs@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 1lgpyk-000AQ9-D5 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 16:36:50 +0200 Original-Received: from localhost ([::1]:35004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgpyj-0006Yd-FQ for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 10:36:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgpxN-0005RY-Be for help-gnu-emacs@gnu.org; Wed, 12 May 2021 10:35:25 -0400 Original-Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:35363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgpxL-0006v1-Cp for help-gnu-emacs@gnu.org; Wed, 12 May 2021 10:35:25 -0400 Original-Received: by mail-ua1-x92d.google.com with SMTP id n61so7546884uan.2 for ; Wed, 12 May 2021 07:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=q3i+2SzAgRQtbIQm1HGYHsKbj77FBcQx9UUti2+Hzc4=; b=eCKDmrvKMD3zTpubf/ThB1859mCBBiI2boRPqtYj+BFLES4exEYTgRWbj7pfz8peGa I5G45a3HfuOlkXLeZQFa7w4VCdvIThKK77yWiEDmHGxqxgKC0tAUFLFT3t+l5yqQgwIK wfyk6r/ZY0dDClIGAX6lvVN3jM97lo3IEIhGDVsbGA/pjtH+TiEsGl5lltw3lFLpidik AUc2B1p0RzVsXUKnzfX/f7qp8Ti2mJvw1Dvph1GTFJhlkg6Tud+CGKomcsAlGXZJQs9b N1f8z5OJRyFOOvGFYhTys2kwPwvV9I0auWDGQnuSnyCKLSRDpXsJvvNmrN/vWGxx75Jp yKDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=q3i+2SzAgRQtbIQm1HGYHsKbj77FBcQx9UUti2+Hzc4=; b=h+sjUj4ohoKp+oLnO1attodq1x+zurE7A+0ZOHtBS2qpNh5nUweaTmIsIicTfvO5di Bs1vBBFww4kWeEgBVC96dDCe37avkh3PE1Piu9YPZK6QuKPBWQBlqcbWkcuUppk6/3ez V2WBdF0uw0mmS5qB7ic3+XGTvoW0/8/lYOQI4IdbIdMlZCo2Mrvu6tJBvQGiHXZnQG+t UVQNpx2A/oq6RSpf42j9euvMihWOaxK4lk4cmsmHkxEPlxkDV5CCbwEyfhuCcr1l9OjU NDs6WfrQkOt5UqHPaUJbgGOU2ekMldo8X+MZz50Vky0Ag5dkfRTjAh1uCW+r2jc0Fb4o Gjxg== X-Gm-Message-State: AOAM533uXsG+2VMg5YZ/jOnQy9pas4N77IBHapwJ8976KRtVdqJ1bwn5 1AebEN6Os87AObVjdZqvJVFJTRsa799mB6v9D/htrQT1dMxRZw== X-Google-Smtp-Source: ABdhPJxhuRWtcNCfe3pfMEuGfw7BbRwkaWVvIPsxbVylPebcvHPQ8PGsMiaCkcqTwo6eNqqoEPMqce37j9KqOxrVirc= X-Received: by 2002:ab0:2b15:: with SMTP id e21mr20596100uar.102.1620830119536; Wed, 12 May 2021 07:35:19 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92d.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-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129724 Archived-At: On Wed, 12 May 2021 at 19:43, Christopher Dimech wrote: > Some have been trying to set outline-heading-alist fol/lowing the code in= "texinfo.el". > I have also tried to set it up but have not been successful. There is a group of people on this list, including you, michael-franzese, pietru, steve-humphreys, and wael-zwaiter, who seem to be working on a common project, have various difficulties, and post requests for assistance that are hard to follow through. You state an approach (=E2=80=9CI have tried this=E2=80=A6=E2=80=9D), follo= wed by something general like =E2=80=9CI have not been successful=E2=80=9D or =E2=80=9CI enc= ountered difficulties=E2=80=9D or =E2=80=9CI need assistance=E2=80=9D, but it is not= readily clear how to assist you. So you get unhelpful answers or no answers at all. The standard assistance request form includes: * Your software version(s) and operating system (if you feel it might be relevant). This is important because if you are using older software, you won=E2=80=99t be able to use some solutions, or people will s= ay it just works on newer versions. * What high-level problem you are trying to solve. This is important because sometimes people will say your approach is wrong and point you at a better way to solve it. * How you are trying to solve it. * What concrete result you expected. * What concrete result you observe instead. Your above request could look like: =3D=3D=3D I am on GNU/Linux, running Emacs 27.1. I have a variable =E2=80=98texinfo-section-list=E2=80=99 whose value is: ((chapter 2) (section 3) (subsection 4) (subsubsection 5) (unnumbered 2) (unnumberedsec 3) (unnumberedsubsec 4) (unnumberedsubsubsec 5) (mychapter 2) (mysection 3) (mysubsection 4)) (note my custom section macros). I want to set up Emacs so that, when I open a texinfo file, outline-minor-mode is enabled and configured to recognize section macros listed in =E2=80=98texinfo-section-list=E2=80=99 as headings. To that end, I=E2=80=99m trying this: (defun my-texinfo-outline () (setq-local outline-heading-alist (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x))) texinfo-section-list)) (setq-local outline-regexp (concat (regexp-opt (mapcar 'car outline-heading-alist) t) "\\>"))) (add-hook 'texinfo-mode-hook #'my-texinfo-outline) When I open the attached texinfo file, put point on line 42 and press C-c @ C-d (outline-hide-subtree), I expect the whole section up to line 68 to be hidden but not further lines, because line 69 has a custom section header; but Emacs hides everything up to line 86. =3D=3D=3D (and don=E2=80=99t forget to actually attach a sample file, as short as possible to demonstrate the problem).