From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master d68ecda05c: Improve navigation keybindings in emacs-news-mode Date: Mon, 04 Jul 2022 13:31:45 +0200 Message-ID: <87zghpi066.fsf@gmail.com> References: <165685202989.19667.1306295129215761316@vcs2.savannah.gnu.org> <20220703124030.C769BC00BAF@vcs2.savannah.gnu.org> 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="34915"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 04 13:36:22 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 1o8KNF-0008kA-V6 for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jul 2022 13:36:17 +0200 Original-Received: from localhost ([::1]:54842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8KNE-000278-TA for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Jul 2022 07:36:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KIw-0005jD-GH for emacs-devel@gnu.org; Mon, 04 Jul 2022 07:31:54 -0400 Original-Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:45671) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8KIu-0008Hz-So for emacs-devel@gnu.org; Mon, 04 Jul 2022 07:31:50 -0400 Original-Received: by mail-wm1-x334.google.com with SMTP id o19-20020a05600c4fd300b003a0489f414cso5464161wmq.4 for ; Mon, 04 Jul 2022 04:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:gmane-reply-to-list:date :message-id:mime-version:content-transfer-encoding; bh=60OHi29zGNsxKdqZz8SeCprXEC+Xqf+d5T/P2BZLY4s=; b=Bn6BwgHiffKVaZ5d9QV6mLWuHgS0DmHZ9DGcu2/CyAjjUNy8d3HZjkYKl6p3cb/g+U 3VwaHRNTq9C9nSZAV05mJDvpJmef3kfVRp4eME9SXbcASj5Ka4zy5ls5sp4K7kek/04b IqVYk4bUqm/AP9G9SKfBWbGH/oOUxPwhAMoybnuVpClTGBSEiQzsA/TatYOPjyCHhLZF n4VwQJFTeMtuCsAXk6YoBON/VmAoz0bkQ9V2wO8NhgIQntzeJJLCaS2d6AaW5Q54ImUo 7bcIY9gYZ+xnPunRL57C28VE+zLwn0hmsE2FNmKaxmfE4BJg9xu0b+AhUKBgm1RmHFFh KeyA== 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:in-reply-to:references :gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=60OHi29zGNsxKdqZz8SeCprXEC+Xqf+d5T/P2BZLY4s=; b=ebOrMPxm6XuFmRRcc/9Y5+ko2h2+usDmeXShzLXhLjNZ+VbqF6QeC5MsHxQ0e23F7U NtNVos4H6/vYPx2PfpC9gJer86/ZRFAsu2VeZkeLKW1/2v2Qz0/YGy/ymiPnnQYQ19/A tUBRIr+yfbNNRmZa8wjUg7r9Vg7FbE/QVMVysd6d8Tx6wEwdJAfhRNnLrDgYXN8LgL7H nQjGo7vudKJfskPHjuRktoOxzfbKdCsgRlYNGD9NcR+Vcsjvc2tGzmQFUc5uEWLrZ/W9 1CfclgpmVZi8HQsAXpf+qhTHUSXqdlpcW6TFDPk2kujLsnfuV1xDqW9CnbQx//2POncO VCEg== X-Gm-Message-State: AJIora8qpgehQvlYYbTtEgruSCBpvTqYwdwxEX3XY/tSS/RdJDvLA1uq ME4WC2ENapwNiZV0KESxZVWRPDcVnaw= X-Google-Smtp-Source: AGRyM1tQSUjMf7BHCaYeFmFbhKGjfA+urSnjyq3Ukga36no+gOeFhCl5vQqEw7Avplx+HdPA/OeVmA== X-Received: by 2002:a05:600c:3d18:b0:3a1:8f1e:cc05 with SMTP id bh24-20020a05600c3d1800b003a18f1ecc05mr16888638wmb.78.1656934306756; Mon, 04 Jul 2022 04:31:46 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb50:67b5:5b1e:11ca:d79a]) by smtp.gmail.com with ESMTPSA id g3-20020a05600c140300b0039c96b97359sm19663350wmi.37.2022.07.04.04.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 04:31:46 -0700 (PDT) In-Reply-To: <20220703124030.C769BC00BAF@vcs2.savannah.gnu.org> (Stefan Kangas's message of "Sun, 3 Jul 2022 08:40:30 -0400 (EDT)") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=rpluim@gmail.com; helo=mail-wm1-x334.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:291814 Archived-At: >>>>> On Sun, 3 Jul 2022 08:40:30 -0400 (EDT), Stefan Kangas said: Stefan> branch: master Stefan> commit d68ecda05c4a634a1f0a606c73137d85bf261775 Stefan> Author: Stefan Kangas Stefan> Commit: Stefan Kangas Stefan> Improve navigation keybindings in emacs-news-mode =20=20=20=20 Stefan> * lisp/textmodes/emacs-news-mode.el (emacs-news-common-map)= : New Stefan> defvar-keymap. Bind navigation commands as in 'org-mode' a= nd Stefan> 'outline-minor-mode'. Stefan> (emacs-news-mode-map): Inherit from 'emacs-news-common-map'. Stefan> (emacs-news-view-mode-map): New defvar-keymap; inherit from Stefan> 'emacs-news-common-map'. Those outline-mode bindings are repeatable in outline-mode itself. Wouldn=CA=BCt it be nice if they were in news-mode as well? (the emacs-news-mode-map bindings I think don=CA=BCt need repeatability) So how about: diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-= mode.el index c5d7b6ea50..2a7a5f1ca7 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -48,6 +48,26 @@ emacs-news-common-map "C-c C-p" #'outline-previous-visible-heading "C-c C-u" #'outline-up-heading) =20 +(defvar-keymap emacs-news-common-repeat-map + ;; Navigation like `org-mode'/`outline-minor-mode'. + "C-f" #'outline-forward-same-level + "f" #'outline-forward-same-level + "C-b" #'outline-backward-same-level + "b" #'outline-backward-same-level + "C-n" #'outline-next-visible-heading + "n" #'outline-next-visible-heading + "C-p" #'outline-previous-visible-heading + "p" #'outline-previous-visible-heading + "C-u" #'outline-up-heading + "u" #'outline-up-heading) + +(dolist (command '(outline-forward-same-level + outline-backward-same-level + outline-next-visible-heading + outline-previous-visible-heading + outline-up-heading)) + (put command 'repeat-map 'emacs-news-common-repeat-map)) + (defvar-keymap emacs-news-mode-map :parent emacs-news-common-map "C-c C-s" #'emacs-news-next-untagged-entry Robert --=20