From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Augusto Stoffel Newsgroups: gmane.emacs.bugs Subject: bug#50679: 28.0.50; outline-minor-mode-cycle should be able to only cycle at the begining of a line Date: Tue, 21 Sep 2021 20:50:40 +0200 Message-ID: <87lf3p3gqn.fsf@gmail.com> References: <87r1dkv8i2.fsf@posteo.net> <87mto8h5hk.fsf@mail.linkov.net> <87mto8uwnu.fsf@posteo.net> <87fstzn2zw.fsf@mail.linkov.net> <87y27rpi4q.fsf@mail.linkov.net> <87bl4nuuon.fsf@posteo.net> <87mto73xh5.fsf@gmail.com> <87tuidkdo2.fsf@mail.linkov.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="29872"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Philip Kaludercic , 50679@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 21 20:51:21 2021 Return-path: Envelope-to: geb-bug-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 1mSkrQ-0007UF-Mm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Sep 2021 20:51:20 +0200 Original-Received: from localhost ([::1]:35170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSkrP-0006iO-9J for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Sep 2021 14:51:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSkr8-0006dC-FF for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 14:51:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSkr8-0002oU-6N for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 14:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mSkr7-0001NH-V1 for bug-gnu-emacs@gnu.org; Tue, 21 Sep 2021 14:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Augusto Stoffel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Sep 2021 18:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50679 X-GNU-PR-Package: emacs Original-Received: via spool by 50679-submit@debbugs.gnu.org id=B50679.16322502525262 (code B ref 50679); Tue, 21 Sep 2021 18:51:01 +0000 Original-Received: (at 50679) by debbugs.gnu.org; 21 Sep 2021 18:50:52 +0000 Original-Received: from localhost ([127.0.0.1]:47993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSkqy-0001Mo-8X for submit@debbugs.gnu.org; Tue, 21 Sep 2021 14:50:52 -0400 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:39514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mSkqw-0001MW-LY for 50679@debbugs.gnu.org; Tue, 21 Sep 2021 14:50:51 -0400 Original-Received: by mail-wr1-f46.google.com with SMTP id u15so42127026wru.6 for <50679@debbugs.gnu.org>; Tue, 21 Sep 2021 11:50:50 -0700 (PDT) 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:content-transfer-encoding; bh=RgwUyvEOSgWuY6DifVGjaitn0g5kwPLjczHaS/zRjxc=; b=pfzfisz1f/BCe7+81Y0Sb3b6l5lNAWGNchfnvdxVqhxTxXUjAwzu7ByYelDhJMHWmw 3uRwx1d0SpzvSlUjwOXU2MlSR61xrwwgoLcmfbj5LLPs0mg+PpepjPhhK7GVxWdu9eEo kkv56JSgUnF1Zb+wyi730eb6zO65puN+hZ2RrsXH8KbCiis1PVd6xUwebTmgeCkO2dxM 4dcNXz7KQ7BQM5cEdd0RKo72VrWrn+he85FzX4Pb8e4ic3kCJunQYs1fJtU0gL6i15W3 w9V5SRlAonosyXLqeB/y3NH7p9fPgSq8XMMI+rEbqzgbwtnJRxiwVQ1FpTLVF8vJsE0u RkwQ== 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:content-transfer-encoding; bh=RgwUyvEOSgWuY6DifVGjaitn0g5kwPLjczHaS/zRjxc=; b=72e6A2cxg/yE6+XstduE7V5blzwBwAafmi7LFugsfRaFe7h8kGT8QuL7vQwwQovSQ6 mtTx78ZMP3Zi2oq4cHqZxIjpUu3KVeaoDUuNRadBhqu2cWw7gTgSv9liweNL/f2Tnasr TQJ+IuaSsT3fBymzgjVRhowQRV8uWoBdT5Seak+ypB0gmjV3l89fBW3U8MEIcWZ7CXKy SePkA/D6hOG87RUuw9H0kPG33E66h1OGLX0zE4yt/GMPuKCKeVYUknEJm6mgCdAUQPaf 7WiTYr5GUyu4LMWx4aMS4iNUEO4quH9WuJHxcCdQsf0nJpNHZ4FOm8JaWcCeuQ3XE6+I QWTg== X-Gm-Message-State: AOAM531doOJbibrrRVYLrFjQKc6fAqeXdkRKl5lBKkxuXvQkozqdD455 C5T3484QFvqVa5BDLaouUzWbbsj48Eo= X-Google-Smtp-Source: ABdhPJykP9T5TVwlfKFjmVsfKRGToPOAvN2lTIWLMHNf2ZLCqacqzoOlLoEW6j8yO6aUpFj+8HwlnA== X-Received: by 2002:adf:f1c4:: with SMTP id z4mr37076256wro.418.1632250243447; Tue, 21 Sep 2021 11:50:43 -0700 (PDT) Original-Received: from ars3 ([2a02:8109:8ac0:56d0::2f72]) by smtp.gmail.com with ESMTPSA id 23sm3883729wme.27.2021.09.21.11.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 11:50:42 -0700 (PDT) In-Reply-To: <87tuidkdo2.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 21 Sep 2021 20:58:01 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215027 Archived-At: On Tue, 21 Sep 2021 at 20:58, Juri Linkov wrote: >> FWIW, I think it would be nice to provide a simple way to define other >> =E2=80=9Cspeed keys=E2=80=9D in `outline-minor-mode [1], or even provide= some >> pre-configured ones [2]. >> >> [2]: I personally use these speed keys in outline-minor-mode, which are >> probably very similar to those from Org mode: >> >> "" 'outline-cycle >> "" 'outline-cycle-buffer >> "f" 'outline-forward-same-level >> "b" 'outline-backward-same-level >> "n" 'outline-next-visible-heading >> "p" 'outline-previous-visible-heading >> "u" 'outline-up-heading >> "F" 'outline-move-subtree-down >> "B" 'outline-move-subtree-up >> "@" 'outline-mark-subtree > > But this means you can't type all these keys on heading lines? > This is why I confugured it not to use self-inserting keys: > In my setup those keys only apply at BOL in a heading line. I never type anything there. TAB for reindenting might be a bit trickier. Apparently I never try to reindent a heading line when point is at BOL, because I never thought about a possible conflict, but I guess I would type SPC TAB in that case. > (let ((map outline-mode-cycle-map) > (cmds '(("M-" outline-next-visible-heading) > ("M-" outline-previous-visible-heading) > ("M-" outline-hide-subtree) > ("M-" outline-show-subtree)))) > (dolist (command cmds) > (define-key map (kbd (nth 0 command)) > `(menu-item > "" ,(nth 1 command) > :filter ,(lambda (cmd) > (when (outline-on-heading-p)) > cmd)))))) > > I can't find this block in outline.el, is this a suggestion for a possible default? >> Looking at the code, it seems that adding bindings to >> `outline-mode-cycle-map` would achieve precisely that, but the name >> of the keymap doesn't reflect that. > > Do you suggest different keymaps? And indeed, these two are > quite different beasts each with own problems. So we need both > outline-mode-cycle-map and outline-minor-mode-cycle-map. Okay, those keymaps are active in the entire heading line, right? I would prefer to only have a special behavior at the first character of a heading line, in exchange of allowing _any_ shortcut key with minimal interference. Org mode already does that with a simple customization, (setq org-use-speed-commands t), so I don't think it would be too surprising for most users.