From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WBJvDUz7Z2IlDgAAbAwnHQ (envelope-from ) for ; Tue, 26 Apr 2022 16:01:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KAJ5DEz7Z2L7FAAAG6o9tA (envelope-from ) for ; Tue, 26 Apr 2022 16:01:48 +0200 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 A22C823402 for ; Tue, 26 Apr 2022 16:01:47 +0200 (CEST) Received: from localhost ([::1]:53718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njLlC-0005vk-26 for larch@yhetil.org; Tue, 26 Apr 2022 10:01:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njLjz-0005ty-VY for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 10:00:31 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54897) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njLjx-000347-Cl for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 10:00:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 69C0E24010B for ; Tue, 26 Apr 2022 16:00:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1650981625; bh=uwwN5Nioex7I56tQTF6UHl17IYgneSdYQyE63oSGOhU=; h=From:To:Subject:Date:From; b=j0rP4oyJLMOhAttHWaQZotKjHljWGvczKpljAMuYuMmn+kQP8xlQYJ1VA7fMQCZkG lDjzFqbkEBKhtKosVzvmcGqCupB/awV2JwY0cUDTFW+d5jPDpzOdVcDvrpDuEZMNrB ayg88CtgO+eqh6PDNPSZVQiN6c6gtoBIPyb0f/p6GPys/tUeNpsSEj1Va0SHzHOnzR TThI4huZRLJ8gFJtcP2JHrMdPcZklVAla1SZdhq2u28o3k3ev1T9b0uo9JntNRWlPt ax0YOLmBBQr91VcKdZgwKnrcXUdWlXJkMDbqfplOFMVnQwU6L533ybA4qYuZGjyh6f tnnYmNGF8k9Xw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Knk6c6Dzzz9rxL for ; Tue, 26 Apr 2022 16:00:24 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: orgmode Subject: [tip] Org speed commands improved Date: Tue, 26 Apr 2022 14:00:31 +0000 Message-ID: <87pml4lzb4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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-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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650981707; 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=jlyqezpiGNmpTH0IOo0QrnY7SAVBJAEz4SUaqzGil3w=; b=SiK3mIk+t8fbt1WnTIUNIlPlzNbMciJkMkt8OFn1EpcMvcZpRBsnDr8ineKQ9SfLpEyn7r Ak5o0Hy5HQ7y7F19hn+VcGt36ZbPNaWx8+lkvzPzfcGr7oGL4jqvGi8U0BdM3DNLoQ/rG7 YZb2zpFiACQiPfqfi6SZLNx00EDW8E8+D4T00ZYpWcJ+Mup+fOPGSWbJ6lbLXctXjK41TA 1ONpslmARXvapRO8r5uFPi5e3TU+ekKtUnRZxN845Klcmf9o5aqE3+QfGib3BiHAr0vR/q UOsDQhvv8TAsYmz+QHBbHvQbmRBvMJFf4oSZcg3X8cYE2qpyiVEl12f3GSNVpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650981707; a=rsa-sha256; cv=none; b=nN9AuEGXIfh9CM7anvU2Hly0zmOBTtLipyipshfxkZP9UbAvWyT5PTCOi1reEup0Fjf/he OlZpHho9gmz2z3ou5Z6aoMI7GmOxpOYGaPSZFXoytQEAUjn5WUG1Zux6fBoV6yXBSifk9X MTXgJP+4bEuvuIS0f3bszLNAQKn8goQQ0O/gKLGurUIdwb+WHemZXjI8R0ucw6A/2fmPxF QUjGDEW1Pziv1BJywyoo3RXNpdcJt6QdX6WC81aLxJ+Sood9kzwVGkyBjLoS3RB4wOpAvl dmOYuXDZcnVrLOGlu8UdnZNoA9WbD+65NBiZxIVUVpgMRKyuSoqh/R9oPwSulw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=j0rP4oyJ; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -4.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=j0rP4oyJ; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: A22C823402 X-Spam-Score: -4.21 X-Migadu-Scanner: scn1.migadu.com X-TUID: 30tdhvPxiJM8 Hi all, Org speed commands are a major productivity boost and I love them. Lately it has occurred to me to make some modifications with the following configuration, which I share here in case someone wants to try it. The idea is that Org speed commands are activated anywhere in the header (not just at the beginning of the line) *or* when point is at the very beginning of the buffer. This, in my opinion, improves the navigation speed: #+begin_src emacs-lisp (setq org-use-speed-commands (lambda () (or (eq (point) 1) (org-in-regexp "^\\*+\s+.+")))) #+end_src This also serves as a kind of write protection for the header titles. To be able to edit them, we can use this function: #+begin_src emacs-lisp (defun my-org-toggle-speed-commands () (interactive) (if org-use-speed-commands (progn (setq org-use-speed-commands nil) (message "speed-commands off")) (setq org-use-speed-commands (lambda () (or (eq (point) 1) (org-in-regexp "^\\*+\s+.+")))) (message "speed-commands on"))) (with-eval-after-load 'org (define-key org-mode-map (kbd "M-i") 'my-org-toggle-speed-commands)) #+end_src Best regards, Juan Manuel