From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iMBDMlHV32bhkAAA62LTzQ:P1 (envelope-from ) for ; Tue, 10 Sep 2024 05:12:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iMBDMlHV32bhkAAA62LTzQ (envelope-from ) for ; Tue, 10 Sep 2024 07:12:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ElcTq1ic; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725945169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=oh+83I+OgLNp/4TxRG27GdPJ5vNayWMWDFftkXmsVio=; b=VxPTB5nh47nPJeHWhJqSOYRnYPm59TKVf7JyODOXsTxBMrGm8EktK+2UeZVtSIoFQ+l6cU lB1Q3BnB/4eQ52SJaceEMPY12tskOaipncinFswA7H1sZK5BUiMjMjEc3KxkYNoqEj0zcu AuOxTuASEEQjV4yBmq6AwB9Ph+HNcjEOBwuLzPNwr4fceBVBSRkAW3rJkWpxZAMbQ2umXX mzZlJv1lvecmMHFpyekb3SElhf0cVHLpxowuH7zkI9DwVQW893qOKwqWclGXNfgmFsPQHL RodnRxSmXbLt2OuTPlE3d8PyS+w6e3Kql4Xtw4sxuc1OTcOC7gw3TRbuJCSd7g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ElcTq1ic; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725945169; a=rsa-sha256; cv=none; b=D8WGRlP/VGAKMHCBtM4icNcOoboowTr2v+QQLZatfwUAwkeEOPHeyyNd7zfUIap9UEDi2V 5RypSOavAG21BAhX2c+Vcs55fGBjxL1wlfp/aqlGG7txc/vY5GEAuvLAL+TlsPXhNLvKAC YritjuUNdg777dgcEtsOaBjDUZdcaTz1FRQYYcDk5iz2Nix9DOPbeYcqfR7GpG3S+3cka+ xDrCZ3dcOTYjq0zfhpu0ACIvTjZncq2ByAZV+BxoIkL1/YoPd7dfC4bAtbNAjX9RH1byD5 cgumVp0u8QjTNpTkTCXo6QcueLJwK9XMLENreDLDAcup46EZ06gnEUfmAKgLkQ== 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 9F33C73688 for ; Tue, 10 Sep 2024 07:12:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sntAJ-0004NQ-3C; Tue, 10 Sep 2024 01:11:47 -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 1sntAG-0004N4-7B for emacs-orgmode@gnu.org; Tue, 10 Sep 2024 01:11:44 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sntAD-0004o8-8L for emacs-orgmode@gnu.org; Tue, 10 Sep 2024 01:11:43 -0400 Received: by mail-pg1-x541.google.com with SMTP id 41be03b00d2f7-7d4fa972cbeso4142309a12.2 for ; Mon, 09 Sep 2024 22:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725945099; x=1726549899; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oh+83I+OgLNp/4TxRG27GdPJ5vNayWMWDFftkXmsVio=; b=ElcTq1icI0yNF7kMiNkPlHChQV+VZNherYZQJBxvK5PQ3xmokGbtwrvfqKtev9o9DE aFNar7mukJrxBivX1By/rxqJ/HEFHXdyn7F1wT3Bjpo2zPpU1wwUWJfILMyxHhk32vks mxCWrbY921J49/qn/pt+gZZeQiPaiflN8WGtXG80HPwPd8nOAwx1bplnL0Jk1gCASYZK sXowRoh6jRmRnQcH0YtZRJHX9n1n21omrXJEzrMMTW2MPhOyj0JAqB0n8f4H9HVQwNZx nbpywCgLz5sKKacfUh6+GVlds0PMHv5kHLy5HpO4Ek6IdA2Xh+rZRHjSXeXm0hfqJ3Db q1rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725945099; x=1726549899; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oh+83I+OgLNp/4TxRG27GdPJ5vNayWMWDFftkXmsVio=; b=fx6DDf2y4kHB0nFwzmBhF+ljijFAfWF/lO0sWPnoek7bdv8toh73+QfSpv7Tpp6PVO uPCncC866kalQYZ3fy3a1OgDtiyyWA4EJxRbpHVkSkgThd3NpI41g73Yvderw55PNxxK rIVZxp54VsZqgHeDxOUpOf8XTPt3RfUQ9uLT+s6L6xEueGm8Ttm+PPtJyAXTP0A44P+f sSwoWwIYF4Jzs0nUIYUI6hrbcQcIetFOD/DRv4/rWcbNuOJxEZs0w36NfHJPjh/NVJ0l AHSvjXqP843SppH3u9c7jZgjFqSuuNSpBGjZ/22McjHoNvstnnH0srThpKj2wgGvaW8R 27Dg== X-Gm-Message-State: AOJu0Yxy+E7TNbmYlxX1A+2I+4jpYOQZk/HOIz3hh1Ttcd/F6827+n+7 TyQG9Vl1K7vqq1WileFl5yOBkpna+5Dag5eMcjQsziToV9Y5BOvO X-Google-Smtp-Source: AGHT+IHWunWcqCOxEvoYn5mjKpTpUYoFMdBII0MqeQokjIEg1zYE3OZh/y1DZEyB37wSolGllExwuw== X-Received: by 2002:a05:6a21:3a4b:b0:1cf:4175:d545 with SMTP id adf61e73a8af0-1cf4175d598mr8396749637.19.1725945098682; Mon, 09 Sep 2024 22:11:38 -0700 (PDT) Received: from localhost ([1.7.159.70]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7d8256da131sm4894048a12.70.2024.09.09.22.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 22:11:38 -0700 (PDT) From: Visuwesh To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Add repeat-map for navigation commands In-Reply-To: <8734m8rcoh.fsf@localhost> (Ihor Radchenko's message of "Mon, 09 Sep 2024 16:53:34 +0000") References: <877cbkoqkt.fsf@gmail.com> <8734m8rcoh.fsf@localhost> Date: Tue, 10 Sep 2024 10:41:35 +0530 Message-ID: <87wmjk6qk8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=visuweshm@gmail.com; helo=mail-pg1-x541.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.81 X-Migadu-Queue-Id: 9F33C73688 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.81 X-TUID: 4MTVsqDRc9Ee [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 09, 2024] Ihor Radchenko wrote: >> ... 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. > > It is not the only one. But outline version should also work. I just realised that we would need a few defalias-es if we are going to have outline commands in the repeat-map to avoid overriding outline-navigation-repeat-map when one uses outline-up-heading in outline-minor-mode or outline-mode. [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE=9A= =E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0= =AF=8D 09, 2024] Karthik Chikmagalur wrote: >>> 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. >> >> May you also add a news entry? >> Ideally, we should also document this in the manual. I will add this along with the above in the next patch. > Do you think it makes sense to add repeat-maps for other next/previous > commands in Org, such as org-next-link and org-previous-link? I've been > using this for a while (they don't use defvar-keymap as I wrote them a > while ago): > > (defvar org-link-navigation-repeat-map > (let ((map (make-sparse-keymap))) > (define-key map (kbd "n") #'org-next-link) > (define-key map (kbd "p") #'org-previous-link) > (define-key map (kbd "v") #'org-link-preview) ;toggle preview for lin= k at point > map)) > > (map-keymap > (lambda (_ cmd) > (put cmd 'repeat-map 'org-link-navigation-repeat-map)) > org-link-navigation-repeat-map) > > (defvar org-block-navigation-repeat-map > (let ((map (make-sparse-keymap))) > (define-key map (kbd "f") #'org-next-block) > (define-key map (kbd "b") #'org-previous-block) > map)) > > (put 'org-next-block 'repeat-map 'org-block-navigation-repeat-map) > (put 'org-previous-block 'repeat-map 'org-block-navigation-repeat-map) I also have a repeat-map for org-todo since I have org-support-shift-select to t which makes changing the TODO when in the body text quite inconvenient. BTW, should we add C-n and friends to org-navigation-repeat-map or just have n, p, etc.? I personally find C-n in the repeat-map disruptive since I usually want to move the cursor after jumping to a specific heading, in which case C-n not being next-line is annoying.