emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [tip] Org speed commands improved
@ 2022-04-26 14:00 Juan Manuel Macías
  2022-04-27  4:20 ` Ihor Radchenko
  2022-04-27 16:30 ` Daniel Fleischer
  0 siblings, 2 replies; 6+ messages in thread
From: Juan Manuel Macías @ 2022-04-26 14:00 UTC (permalink / raw)
  To: orgmode

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip] Org speed commands improved
  2022-04-26 14:00 [tip] Org speed commands improved Juan Manuel Macías
@ 2022-04-27  4:20 ` Ihor Radchenko
  2022-04-27  5:37   ` Tim Cross
  2022-04-27  7:08   ` Juan Manuel Macías
  2022-04-27 16:30 ` Daniel Fleischer
  1 sibling, 2 replies; 6+ messages in thread
From: Ihor Radchenko @ 2022-04-27  4:20 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> 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:
> ...
> This also serves as a kind of write protection for the header titles. To
> be able to edit them, we can use this function:

If you are going this far with speed commands, you might as well switch
to modal editing. What you are describing is basically a modal command
map with ability to switch to insert map.

Best,
Ihor


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip] Org speed commands improved
  2022-04-27  4:20 ` Ihor Radchenko
@ 2022-04-27  5:37   ` Tim Cross
  2022-04-27  7:08   ` Juan Manuel Macías
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Cross @ 2022-04-27  5:37 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, orgmode


Ihor Radchenko <yantar92@gmail.com> writes:

> Juan Manuel Macías <maciaschain@posteo.net> writes:
>
>> 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:
>> ...
>> This also serves as a kind of write protection for the header titles. To
>> be able to edit them, we can use this function:
>
> If you are going this far with speed commands, you might as well switch
> to modal editing. What you are describing is basically a modal command
> map with ability to switch to insert map.
>

Funny - as I read Juan's post, as an evil user, that was exactly my
thought. I've never looked at the org speed commands, but as I read the
post, I thought "that looks like what I have with evil mode"



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip] Org speed commands improved
  2022-04-27  4:20 ` Ihor Radchenko
  2022-04-27  5:37   ` Tim Cross
@ 2022-04-27  7:08   ` Juan Manuel Macías
  2022-05-04 22:12     ` TRS-80
  1 sibling, 1 reply; 6+ messages in thread
From: Juan Manuel Macías @ 2022-04-27  7:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: orgmode

Hi Ihor,

Ihor Radchenko writes:

> If you are going this far with speed commands, you might as well switch
> to modal editing. What you are describing is basically a modal command
> map with ability to switch to insert map.

I'm not a fan of modal editing, rather the opposite. But in this
particular case I have found that I spend very little time editing the
raw content of the headers, once I set it. I spend more time editing the
'meta-content': TODO states, properties, tags, refile, attached folders,
etc. And that with the speed commands can be achieved in a very agile
way, so that a small dose of controlled modal editing and reduced only
to the header, maybe it's worth it :-) If the speed commands were also
activated in the content of the sections, here we would have a real
modal editing, and that (in my case) would not be comfortable.

Best regards,

Juan Manuel 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip] Org speed commands improved
  2022-04-26 14:00 [tip] Org speed commands improved Juan Manuel Macías
  2022-04-27  4:20 ` Ihor Radchenko
@ 2022-04-27 16:30 ` Daniel Fleischer
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Fleischer @ 2022-04-27 16:30 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

Juan Manuel Macías [2022-04-26 Tue 14:00] wrote:

> 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:

Very nice idea; I'll give it a try, thanks!

-- 

Daniel Fleischer


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [tip] Org speed commands improved
  2022-04-27  7:08   ` Juan Manuel Macías
@ 2022-05-04 22:12     ` TRS-80
  0 siblings, 0 replies; 6+ messages in thread
From: TRS-80 @ 2022-05-04 22:12 UTC (permalink / raw)
  To: emacs-orgmode

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Hi Ihor,
>
> Ihor Radchenko writes:
>
>> If you are going this far with speed commands, you might as well switch
>> to modal editing. What you are describing is basically a modal command
>> map with ability to switch to insert map.
>
> I'm not a fan of modal editing, rather the opposite. But in this
> particular case I have found that I spend very little time editing the
> raw content of the headers, once I set it. I spend more time editing the
> 'meta-content': TODO states, properties, tags, refile, attached folders,
> etc. And that with the speed commands can be achieved in a very agile
> way, so that a small dose of controlled modal editing and reduced only
> to the header, maybe it's worth it :-) If the speed commands were also
> activated in the content of the sections, here we would have a real
> modal editing, and that (in my case) would not be comfortable.

I agree with your assessment!  In fact, I think I will give your
functions a try.  Thanks for sharing them!

Cheers,
TRS-80



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-04 22:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-26 14:00 [tip] Org speed commands improved Juan Manuel Macías
2022-04-27  4:20 ` Ihor Radchenko
2022-04-27  5:37   ` Tim Cross
2022-04-27  7:08   ` Juan Manuel Macías
2022-05-04 22:12     ` TRS-80
2022-04-27 16:30 ` Daniel Fleischer

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).