From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 6DSsHakE32baSQEA62LTzQ:P1 (envelope-from ) for ; Mon, 09 Sep 2024 14:22:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6DSsHakE32baSQEA62LTzQ (envelope-from ) for ; Mon, 09 Sep 2024 16:22:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=U9GYEFX7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725891753; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=JmDE+s32AWAmz7NGkQWjP7rNgMImYxy3vF8/1PXkQ6U=; b=qJAHff+CDHbDiidDP43/qvVmvCklcvLdcTtLQ0Rug4quiHIF6orCyMRY4vLd7dZd1+sg/z 8QgV79jsUGvHhFT9+PAlMX7aW/q46psBUQDmCp15YwOzmsAWOJpS/Herr0066NhfhJvDwk zuXflvN4Jf6dmN2W6+l+mF4nwwGgMKJf8+Bg1JnnWNv3X8TEmssZWW+W9KGk4WgYkUYFxd Mcsk7gKQusMdzF0RrntuUbd/Dizi9iiTNIkW1nkRVCI+K0MJZkoXs+IAF76CqYnGoVeYuE ctJo4rfR5IPpvSxWsgbndrjeRUe7A8DyRZ0mDPjnb7bhPc7jwPPoHJnNIP6BYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725891753; a=rsa-sha256; cv=none; b=PrqIWfpGJ4AQ92hFICbknEtO2CjNvYXsbfvQ/ZYGnY1WtEydKlsNimDbyKD/9ym8933n7v hXFnosW/IK/IEv48m39Mb9cEbuodUqWIR35O2pPnwCWANoDZzLbrY1DF94dyHVAEBNajXT XUGWGLUHQrq9Z/9mPqp3TQTF9thz7kH5DNMjCtbieZnQXZsLPLRsDcym5MNlxIEkE8uGVB Yu+V0m91rKlvUCumz+x8V9UGPm/yEqBmMyMPcNER9/M5Fpk+vWhQqdu28Bx3zc/mv2rBsw XbJBhlS0uoUFcBJyU01OLoRa6WWuIYsth9qkPBoOApvjctgrg3Bw7lRsubSTNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=U9GYEFX7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 086947163E for ; Mon, 09 Sep 2024 16:22:33 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1snfH4-0008Rk-Uy; Mon, 09 Sep 2024 10:21:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1snfH3-0008MC-Fp for emacs-orgmode@gnu.org; Mon, 09 Sep 2024 10:21:49 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1snfH0-00043X-T9 for emacs-orgmode@gnu.org; Mon, 09 Sep 2024 10:21:49 -0400 Received: by mail-pl1-x644.google.com with SMTP id d9443c01a7336-20570b42f24so51871275ad.1 for ; Mon, 09 Sep 2024 07:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725891703; x=1726496503; darn=gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=JmDE+s32AWAmz7NGkQWjP7rNgMImYxy3vF8/1PXkQ6U=; b=U9GYEFX7u7YMel3j5V23YXVm/kJUL0iUBFJGJm8igYaz4F3ReTTJueORP7gzbyBx+M De7d45TkqnyR6jp6VXj/W9qHyRS1le2VAyprYPRkkB1wBdZ7p4vYACruN+spd+LyG3IH pa4XkwF8hrZA5YcPu6YzGt4+F85TDU8lKDVmE5GxsSpWMRnTP9x+EFubTL5B3I0RODuS 1V52oj3BuHSmIFqQHp7vLp3Cz0cYbcMutx8kN7hV/KgzOy8P9BmKYdptwyUjnyGfeaNX czb0Z31/TU4DGWrOkpr1OD1u3RxtGiHOgFdQAjpgtJLoL3obX8u7uQFgrF+3tpH3TUp4 /1BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725891703; x=1726496503; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=JmDE+s32AWAmz7NGkQWjP7rNgMImYxy3vF8/1PXkQ6U=; b=CaBZjLL9RLuEVcxI9jL3pq+7f7q6FfEIisJpCI5UrymZj8NpO7cwKElEi2a8E2F7oC PYTlmhdGgYPtpimXxfRAFcN41JVXLEVac86CD8kmIpHNcw2qdLE7c3y/tkZRnYHR2kS5 81SAS8OFWQNsvzDbegQkY+WQ0VOZoh2AlHGzKSX54Yj5uLfu30taLYIukcc3eU5je5OW vPeOxL2Q8Ub9iYMSwifFY/VadG9eUjmwu3rcEhrO+k8sSJqacDs/jyj8rmUvg2bwaBiC Op7ZIFSs4uz5pawrbi2TzKxD0ie/yr4L8fFBXVdHnIrwftiyruKSPhE33A76w8HWlBqG viIA== X-Gm-Message-State: AOJu0Yxh1pgz+r1rexcE/KpeunDBHN1jgE9eVrqmsAtBnStrTguCDpiI W8d2od2djTDR6Gz7wr1jqrfsd3I1PbLY5FbwjEWHMumH1AMam3smwLLnXkik X-Google-Smtp-Source: AGHT+IH9Oz8W6EJjNGIRnCiWXxpF6PGp4lR4+7XdykZCuUCS7wwqGP72lgYxM4xMr4ahzRmqHw4MdQ== X-Received: by 2002:a17:90a:a110:b0:2d8:8818:4d53 with SMTP id 98e67ed59e1d1-2dad513f015mr9248780a91.41.1725891702583; Mon, 09 Sep 2024 07:21:42 -0700 (PDT) Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2db049662dfsm4553009a91.46.2024.09.09.07.21.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 07:21:41 -0700 (PDT) From: Visuwesh To: emacs-orgmode@gnu.org Subject: [PATCH] Add repeat-map for navigation commands Date: Mon, 09 Sep 2024 19:51:38 +0530 Message-ID: <877cbkoqkt.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::644; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x644.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.81 X-Spam-Score: -6.81 X-Migadu-Queue-Id: 086947163E X-Migadu-Scanner: mx11.migadu.com X-TUID: 4H0zgCI+uCWw --=-=-= Content-Type: text/plain Ihor says: > - visuwesh asked whether Org mode could have repeat maps for outline > navigation in Org mode (C-c C-n n n p n p ..., C-c C-f b f...) > - Such functionality has been added to outline-mode upstream > - Patches for Org mode equivalent are indeed welcome > - They do not even have to be the past weekend after the meetup > Any time will do ;) > - For now, we at least have speed keys as an alternative > https://orgmode.org/manual/Speed-Keys.html Sorry for the month long delay. I was busy with uni stuff so could not find the time to invest into this properly. I've attached a patch which adds a repeat-map to org-keys.el but this pointed out that org-mode lacks a org-up-heading command so I've resorted to using outline-up-heading. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-repeat-mode-keymap-for-navigation-commands.patch >From 8b980efcd9497e395f4d82a1304267ae4426b00d Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Mon, 9 Sep 2024 19:46:47 +0530 Subject: [PATCH] Add repeat-mode keymap for navigation commands * org-keys.el (org-navigation-repeat-map): Add repeat-map to make navigation easier when repeat-mode is turned on. --- lisp/org-keys.el | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lisp/org-keys.el b/lisp/org-keys.el index 1daedaae8..ec32d212d 100644 --- a/lisp/org-keys.el +++ b/lisp/org-keys.el @@ -462,6 +462,25 @@ (org-defkey org-mode-map (kbd "C-S-") #'org-shiftcontrolleft) (org-defkey org-mode-map (kbd "C-S-") #'org-shiftcontrolup) (org-defkey org-mode-map (kbd "C-S-") #'org-shiftcontroldown) +;;; Repeat-mode map. +(defvar org-navigation-repeat-map (make-sparse-keymap) + "Repeat keymap for navigation commands.") +(org-defkey org-navigation-repeat-map (kbd "b") #'org-backward-heading-same-level) +(org-defkey org-navigation-repeat-map (kbd "C-b") #'org-backward-heading-same-level) +(org-defkey org-navigation-repeat-map (kbd "f") #'org-forward-heading-same-level) +(org-defkey org-navigation-repeat-map (kbd "C-f") #'org-forward-heading-same-level) +(org-defkey org-navigation-repeat-map (kbd "n") #'org-next-visible-heading) +(org-defkey org-navigation-repeat-map (kbd "C-n") #'org-next-visible-heading) +(org-defkey org-navigation-repeat-map (kbd "p") #'org-previous-visible-heading) +(org-defkey org-navigation-repeat-map (kbd "C-p") #'org-previous-visible-heading) +(declare-function outline-up-heading "outline" (arg &optional invisible-ok)) +(org-defkey org-navigation-repeat-map (kbd "u") #'outline-up-heading) +(org-defkey org-navigation-repeat-map (kbd "C-u") #'outline-up-heading) +(map-keymap + (lambda (_key cmd) + (put cmd 'repeat-map 'org-navigation-repeat-map)) + org-navigation-repeat-map) + ;;;; Extra keys for TTY access. ;; We only set them when really needed because otherwise the -- 2.45.2 --=-=-= Content-Type: text/plain Emacs : GNU Emacs 31.0.50 (build 5, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw scroll bars) of 2024-08-15 Package: Org mode version 9.8-pre (release_9.7.8-713-g62cbac @ /home/viz/lib/emacs/straight/build/org/) --=-=-=--