From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Duplicated outline-cycle binding, and problems with the new one Date: Fri, 31 Dec 2021 15:32:25 -0800 Message-ID: <9DFDAD07-DBC0-4FAE-A565-D1EE6045E7D8@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) 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="6174"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 01 00:33:17 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 1n3ROf-0001Sy-Kc for ged-emacs-devel@m.gmane-mx.org; Sat, 01 Jan 2022 00:33:17 +0100 Original-Received: from localhost ([::1]:56200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3ROd-0007WL-Cc for ged-emacs-devel@m.gmane-mx.org; Fri, 31 Dec 2021 18:33:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3RNu-0006rZ-0a for emacs-devel@gnu.org; Fri, 31 Dec 2021 18:32:30 -0500 Original-Received: from [2607:f8b0:4864:20::635] (port=33781 helo=mail-pl1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3RNs-00022H-FH for emacs-devel@gnu.org; Fri, 31 Dec 2021 18:32:29 -0500 Original-Received: by mail-pl1-x635.google.com with SMTP id i6so15005912pla.0 for ; Fri, 31 Dec 2021 15:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=hrqwXvz8fKXgXMBb/FK6dxOdnkqV9YE3mls6zPDQOLA=; b=azMMw04nI6qSBiAWi/sKLExFtD03WOKdy2ml73p27HoacAXEIZilHc6KlPlVWxv6tc 4ZNUtz4aMS/xwZaRuYdhBVw4U6sHYvRXcY8rOhfxjlqkcohaIoiJbzNpEZ9P96OmCaht n6TcWIF64Usf9yqYfuO0M9ATcmSR57/35ConZs6QE9ZEFDwSlvc/XkwT/AO9utBNChzp eWJ1NA/SPD9Ol3cehzpFUBvjYI2UfpPjw9DOQZF/w0I2pQEiVL5VKbGcmVnBi1469K5K vM/8sROIgG+HKEAlsrSq1bxStyTLUmecHkUnXXrfXln8NwfixZ56irgx7Ywov6P9kDLg N1aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=hrqwXvz8fKXgXMBb/FK6dxOdnkqV9YE3mls6zPDQOLA=; b=dWsUsh7I6EMyyKIXf4oAq/IfTG1iUgqozqU97IB7HMR2DLgTTCPRMc6jfEfQy/6Ndo zKUSHHoECcFBj7GLRcv+QzpNmLUhvid4hThHxoP7ufJSvenr9xnKa5a42A77iGJFEXcj pgjbn2FsuL31Yw/17+Dw76Vxs7gbe98Q8r/oODHfFbSyYU7IY1iunkOvcmrrYTsaStPJ 3PB8MhJKrJ7gJXp79dYp7I9Ls9uKfbri1SysyMIOwGnwP+ERQ2dIFxviSlsX7qdtMfMd Zx6E8nzQekUPn7j8s12hgjH/LyxbQqEaUjJH1+vEQCR8/+TtTlzK2N9Y5USsddr3w+s6 g9/g== X-Gm-Message-State: AOAM533rXui3QbUmzky79zceDaB/g/kNbF66higR60y+GtkJ8ttwiP6R NBdjvfS7fmBru3n+hK2FFih1rbFfMMo= X-Google-Smtp-Source: ABdhPJxaEZ8b+cqJYeXRzaS9JrcqlxP9klMvrNVURnYZrdktNoXnYNYpFPzceweBprAurRfZeo2aBg== X-Received: by 2002:a17:903:22c3:b0:149:b557:1990 with SMTP id y3-20020a17090322c300b00149b5571990mr1285679plg.54.1640993546703; Fri, 31 Dec 2021 15:32:26 -0800 (PST) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:d85e:8f59:4e9a:7cc9]) by smtp.gmail.com with ESMTPSA id l145sm30861661pfd.117.2021.12.31.15.32.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Dec 2021 15:32:26 -0800 (PST) X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::635 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=casouri@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) 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, 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:283773 Archived-At: When outline-cycle was originally added, I think we only added this (defvar outline-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-c" outline-mode-prefix-map) (define-key map [menu-bar] outline-mode-menu-bar-map) ;; Only takes effect if point is on a heading. (define-key map (kbd "TAB") `(menu-item "" outline-cycle :filter ,(lambda (cmd) (when (outline-on-heading-p) cmd)))) (define-key map (kbd "") #'outline-cycle-buffer) map)) So =E2=80=98outline-cycle=E2=80=99 takes effect when point is on a = heading. Now in addition to this, I also see (defvar outline-minor-mode-cycle-map (let ((map (make-sparse-keymap))) (outline-minor-mode-cycle--bind map (kbd "TAB") #'outline-cycle) (outline-minor-mode-cycle--bind map (kbd "") = #'outline-cycle-buffer) map) "Keymap used by `outline-minor-mode-cycle'.=E2=80=9D) Which presumably are applied as keymap text properties to headings in a = buffer. I=E2=80=99m having problems with this: some text that are not = headings in my buffer are incorrectly propertied with this keymap, and = when I try to indent with TAB, outline-cycle is invoked. Overall, from my limited knowledge, I think the old approach is more = reliable: I wouldn=E2=80=99t have this problem with the old approach. = And the new functionality added by the new approach and = outline-minor-mode-cycle-filter can be easily implemented in the old = approach. We don=E2=80=99t need to fiddle with font-lock-keywords with = the old approach, either. How about we go back to the old approach? = Juri, WDYT? Yuan