Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t doesn't mark TODO in org-mode #8640

Open
JuanCaicedo opened this issue Apr 5, 2017 · 56 comments
Open

t doesn't mark TODO in org-mode #8640

JuanCaicedo opened this issue Apr 5, 2017 · 56 comments
Labels
- Bug tracker - Fixed in develop Key Bindings Org stale marked as a stale issue/pr (usually by a bot)

Comments

@JuanCaicedo
Copy link

JuanCaicedo commented Apr 5, 2017

Description :octocat:

t in org-mode (or evil-org-mode) no longer marks header as TODO. Not sure if
this is an upstream problem, feel free to close if so.

Reproduction guide 🪲

  • Start Emacs
  • Open org-mode
  • Make header like
* test
  • Press t

Observed behaviour: 👀 💔

  • in messages buffer

    user-error: Can’t find t

Expected behaviour: ❤️ 😄

  • Line should be marked as TODO

System Info 💻

  • OS: darwin
  • Emacs: 25.1.1
  • Spacemacs: 0.200.8
  • Spacemacs branch: develop (rev. f79a169)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(nginx csv helm auto-completion command-log emacs-lisp elm extra-langs git github html javascript ibuffer markdown
       (org :variables org-enable-github-support t)
       osx php python ruby yaml shell-scripts themes-megapack better-defaults spell-checking
       (syntax-checking :variables syntax-checking-enable-by-default nil)
       version-control)
  • System configuration features: JPEG RSVG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>
@Biotechjones
Copy link

Biotechjones commented Apr 5, 2017

I get similar issues. Its as if the org keymap doesn't get loaded when you load an org-file

@tshu-w
Copy link
Contributor

tshu-w commented Jun 10, 2017

I get similar issues. And I wander if there is any way to fix this issue temporarily.

@tshu-w
Copy link
Contributor

tshu-w commented Jun 10, 2017

It seems that this line should be
(setq evil-org-key-theme '(textobjects navigation additional insert todo))
now t mark TODO in org-mode.

@TheBB
Copy link
Collaborator

TheBB commented Jun 10, 2017

Thanks for bringing this to my attention. In develop, t no longer marks todo by default. As you say, you can configure that variable or use SPC m TT instead. Since this is a non-issue I'll put this as fixed in develop.

@caikechao
Copy link
Contributor

I think this is a bug since t is documented as org-todo in the latest org layer readme.org.

https://github.com/syl20bnr/spacemacs/blob/develop/layers/%2Bemacs/org/README.org

@TheBB
Copy link
Collaborator

TheBB commented Jun 10, 2017

Thanks, somehow I didn't expect to find todo bindings under “tree”. So many bindings there that don't belong. Removed it.

@tshu-w
Copy link
Contributor

tshu-w commented Jun 11, 2017

@TheBB as for me, org-todo is nearly the function I call most. So keep this kind of shortcut as default will be nice.

@TheBB
Copy link
Collaborator

TheBB commented Jun 11, 2017

As you said it's easy to customize though. I find it difficult to believe that so many people need to do this so often that we have to have a one key shortcut for it, but I'm open to listening.

@JuanCaicedo
Copy link
Author

JuanCaicedo commented Jun 21, 2017

I agree that I use it hundreds of times daily a lot. I probably do that just since it was included in spacemacs when I started using it, but I find it incredibly useful.

I find it to be one of those things that I didn't know I was missing until I had it. A user new to emacs might not know how to use org-todo as a function, much less how to map it to their own keybinding (I definitely wouldn't have).

What's the value in removing this keybinding? Can we trace back to who added it originally and figure out what value they saw in adding it?

I don't want to bike shed this if you feel it's not important. It's just that to me it's a really useful feature and I think others might like it and not know it's going away 😃

@TheBB
Copy link
Collaborator

TheBB commented Jun 21, 2017

100 times daily corresponds to once every six minutes, assuming you're at the computer for 10 hours. If that is true you are probably far north of the average user, let alone hundreds of times daily.

I can add a layer variable though if you feel so strongly about it.

@TheBB
Copy link
Collaborator

TheBB commented Jun 21, 2017

010164c

@Somelauw
Copy link

Would it be a good idea to bind C-t to org-todo in Spacemacs?

By the way, each of the following key combinations can also be used to change the TODO status:

  • SPC m L
  • C-c C-t
  • S-right

@kepi
Copy link
Contributor

kepi commented Jul 29, 2017

First of all, I'm trying to be constructive. If anything in this post seams offensive, it wasn't intended (blame my english).

Thanks for layer variable. It solves problem for me because I spent hour and half finding where the problem is and then going through commits and issues, solving it myself, reporting and then finding there is the solution. Unfortunately I think there are many ppl for which this will remain problem because they are not able to find the solution.

I suppose this is not right place to discuss this but main problem is that bindings shouldn't be changed at all if possible. And definitely not as often as in org layer in last months.

It is extremely inconvenient for users. I think I can understand most reasons to change something, but this is ... saying politely... "not smart". I can accept that something breaks - it comes with using develop. But then I realize that somebody break smart shortcut intentionally and that is something I don't think we should accept.

Please suggest where it is best place to discuss/solve this (again, probably not in this issue) but at least think about:

  • shortcuts are often in one's muscle memory. Someone's hurried decision shouldn't complicate life of dozen's or hundreds ppl
  • shortcuts should be decided at start of project. So it is ok to choose whatever shortcuts you want when you are starting new layer
  • shortcuts shouldn't be changed if not absolutely needed. Definitely not because somebody wasn't thinking them enough at start
  • changing shortcuts that people use a lot from one letter to 3 letters is not smart
  • adding new shortcut so people can discover it is smart - but leave original at place if possible

And most importantly please if there is a change:

  1. discuss those changes in advance - but it wouldn't help a lot as most people will not know about discussion (maybe if combined with 4.)
  2. make commits with clear subjects from which we can learn that something changed
  3. describe in commits how we can revert that change
  4. we should have some changes alerts on home spacemacs buffer. It would be much better if we see "Hey, there is shortcut change" after spacemacs update. Even in develop.

It is really totally insane to introduce such change in commit with subject "Use evil-org from MELPA".

btw. C-t doesn't seam good idea to me as I'm evil user. S-right is for cycling through states, it doesn't offer popup with available states.

@jb55
Copy link
Contributor

jb55 commented Aug 1, 2017

Marking todo DONE with 3-4 keystrokes is insane. This was clearly done by someone who doesn't use org-mode a lot???

turns on option

good day.

@Tiberriver256
Copy link

Definitely makes it a bit more difficult to use. I just started using emacs just for org-mode and I think there are a lot of others out there like myself, org-mode seems to be the gateway drug.

@prestancedesign
Copy link

@Tiberriver256 There is the option org-want-todo-bindings to retrieve simplicity ;)
010164c

@adamczykm
Copy link

Bumping this topic. I'm just another 'used-to-be-happy-with-former-t-in-org-mode' guy. If you truly use this mode for organising your agendas you will need marking subtrees with TODO statuses to be as efficient as possible.

@nixmaniack
Copy link
Contributor

@adamczykm Could you tell more about the issue you're facing? This has been fixed in develop and you can enable the old functionality of marking todo states with t with org-want-todo-bindings as mentioned in the comments above.

@pangwa
Copy link

pangwa commented Mar 24, 2018

It's not a good user experience since the default behavior was changed! It doesn't make any sense for the user to adjust the config to bring back the old (and useful) behavior.

I spent ~15 minutes to fix my config(set org-want-todo-bindings t) and I think many org users may waste their time doing the same fix...

@Miciah
Copy link
Contributor

Miciah commented Sep 18, 2018

The following will remove the old binding:

(spacemacs/set-leader-keys-for-major-mode 'org-mode "Cp" nil)

@gnohz
Copy link

gnohz commented Sep 18, 2018

@Miciah unfortunately, these don't work...

Update: it works after several times of restarts. Thanks.

2nd Update: it only works in org mode, but I woud like it to work in agenda as well.

@ret2libc
Copy link

I agree this change was a bit of a surprise. I had to spend time just to enable an option to bring things back to what they were. In org mode I often move items between different states, so using t d or t g, etc. was really great.

@IngvarListard
Copy link

IngvarListard commented May 11, 2019

Since I upgrade spacemacs to developer version 't' key doesn't work at all even with variable set.
UPD

Spent more than hour to find what's the problem.

@windedge
Copy link

In my case, it was caused by ipython-notebook layer, I commented out ipython-notebook layer, and there was no problem anymore.

@Asalle
Copy link

Asalle commented May 22, 2019

Please don't change the default keybindings. I understand you're the maintainer and it's up to you, but as a user I'm telling you: it's killing the magic of spacemacs for me.

@pbolger
Copy link

pbolger commented Aug 11, 2019

As you said it's easy to customize though. I find it difficult to believe that so many people need to do this so often that we have to have a one key shortcut for it, but I'm open to listening.

Excuse me for sounding a bit peeved, but I've just spent a couple of weeks wondering why Org mode in Spacemacs doesn't work properly.

Cycle TODO is listed in Org Mode Basics as the first keyboard shortcut.

The most important commands to work with TODO entries are:

C-c C-t (org-todo)
Rotate the TODO state of the current item

It also is one of only 15 one key shortcuts in the Spacemacs manual.

You'll also find that it's referred to in countless third party "Getting started with Org Mode in Spacemacs" videos.

So why would you remove a key feature, and seemingly on a whim?

This looks like a mistake, particularly when it seems that the "T" (org-insert-todo-heading nil) to make a new heading shortcut seems to have disappeared as well.

@duianto
Copy link
Collaborator

duianto commented Aug 11, 2019

This seems to have been why it was changed:

My reasoning is

  • single-shortcut keys are few in number and valuable
  • the vim/evil defaults for those keys are designed for editable modes, and org is an editable mode
  • practically nowhere else in Spacemacs are such keys overridden
  • the benefit of making an exception in this case is dubious
  • it's not too difficult to configure on a user level

For sure, many people will be toggling todo state more often than using the t jump operator while in org-mode, but I'm not convinced that this is worth violating POLA in org-mode. But of course if there is consensus that I'm wrong then I'm happy to be convinced otherwise.

source: Use evil-org from MELPA #9041 (comment)

@pbolger
Copy link

pbolger commented Aug 11, 2019

  • the vim/evil defaults for those keys are designed for editable modes, and org is an editable mode

I can see the merit in this argument, but surely demoting it to three levels deep - and without changing the docs to alert develop branch users - is pretty unhelpful. Particularly when there are so many resources out there that refer to the original behaviour.

Going back to the Org Mode documentation the developers there obviously regard 'Make heading', 'Cycle TODO status' , 'promote/demote' and 'move' as core Org Mode functions. IMO Spacemacs should treat them as such.

As 't' and 'T' both have underlying Vim editing functions they are probably not a good choice but "SPC m TT" is agonisingly slow for something which should be as easy as switching between 'normal' and 'insert'.

The alternatives all have their problems too:
SPC m L -- Still too many keypresses for what should be a toggle.
C-c C-t -- If I'm going to have to use Holy mode key combinations, what am I doing in Evil Mode*?
S-right -- Forces you to leave the keyboard, unless you are using some odd keyboard with the arrow keys on a separate layer.

  • Went through the stock Emacs tutorial yesterday, and it wasn't that bad!

@Asalle
Copy link

Asalle commented Sep 15, 2019

I don't know if it's how it's usually done, but:
it's a UX question, so let's have a poll or interview some users and see what they have to say about the change?

@Apromixately
Copy link
Contributor

Apromixately commented Nov 4, 2019

Would it be a good idea to bind C-t to org-todo in Spacemacs?

By the way, each of the following key combinations can also be used to change the TODO status:

* SPC m L

* C-c C-t

* S-right

I think there is an important issue buried here.
Checking h d f org-todo:

org-todo is an interactive compiled Lisp function in ‘org.el’.

It is bound to M-RET T T, M-m m T T, C-c C-t, and many ordinary text characters.

and with f1 w org-todo the list becomes much longer but both S-right and , L are NOT on that list. These are both bound to org-shiftright which apparently also toggles todo states.
I don't want to say that this a is spacemacs problem, necessarily. It might be considered an org-mode problem but I think it's quite unfortunate when such shortcuts are not discoverable.

@guysbryant
Copy link

I was watching a tutorial this morning in which the author demonstrated that t would cycle the todo statuses of a tree element. Thankfully he also showed that S-arrow keys would cycle them as well because the documentation only says t for this. After reading through this thread I learned that SPC m T T would do it as well as SPC m L.

Keeping in mind that , is the same thing as SPC m, and that most of us are using evil mode and have the power of the dot at our disposal, this doesn't really seem too bad. My workflow is to use , L to do the first toggle of a todo status, then to use the dot . to do any further cycling. I think this is a fine method for handling this toggle and we get to keep t for jumping which is a small, but nice bonus.

tl;dr
, L to toggle once then use . for further toggling and you get to keep the vim t jump command.

@blackdev1l
Copy link

This issue is first link when you google "org mode can't find t todo" so i'm going to write here:
Is there an easy way to get the shortcut back? it's probably the most used one in org-mode and it's not going to change.

@tshu-w
Copy link
Contributor

tshu-w commented May 5, 2020

@blackdev1l (setq org-want-todo-bindings t)

@micahbf
Copy link

micahbf commented May 14, 2020

Chalk me up as another person who spent an hour figuring out why this binding went away.

@bderrly
Copy link

bderrly commented May 21, 2020

@blackdev1l (setq org-want-todo-bindings t)

I discovered that I need to add this under dotspacemacs/user-init() rather than dotspacemacs/user-config()

@kepi
Copy link
Contributor

kepi commented May 21, 2020

@blackdev1l (setq org-want-todo-bindings t)

I discovered that I need to add this under dotspacemacs/user-init() rather than dotspacemacs/user-config()

You can set it directly when setting layer. Instead of adding only

org

to dotspacemacs-configuration-layers add it as:

     (org :variables
          org-want-todo-bindings t)

@blackdev1l
Copy link

@blackdev1l (setq org-want-todo-bindings t)

I discovered that I need to add this under dotspacemacs/user-init() rather than dotspacemacs/user-config()

Thanks for the clarification, i'm going to look into it as soon as possible!

@camio
Copy link

camio commented Mar 6, 2021

Hi, new user here. I'm learning both spacemacs and org mode and figured there's got to be a better way than ', T T'. I appreciate that 'org-want-todo-bindings' provides me a way to get the one-key behavior, but I am certain that the current default (org-want-todo-bindings f) is wrong.

To see why, we need to look at the principals of spacemacs (mnemonic based editing) and org mode (where TODOs are a primary purpose for its existence). I appreciate that binding 't' can seem like a binding land grab, but in this case it is justified. Org mode is going to be something that spacemacs users will want to try very quickly and if it doesn't have a short binding for such a common operation, then I think it'll hurt adoption.

Here's another way of looking at it, if (org-want-todo-bindings t) is the default, how many will switch it to (org-want-todo-bindings f)? I would venture to guess many fewer people care about having the vim 't' binding in org mode than those who care about having a fast TODO marker in org mode. Lets not let ideology get in the way of pragmatism here.

@GaneshParkopedia
Copy link

GaneshParkopedia commented Mar 11, 2021

As a new user (long time emacs user), I followed the installation instructions for the plain spacemacs installation. I read the org mode readme page, and found out that my keyboard shortcuts don't work. This has lead me to a 4 year old post that says that the documentation is out of date. Is spacemacs a dead project?

Whether or not the (not very) new key binding is a good idea, I think docs should be updated when changing them, otherwise it is very confusing for new users. Considering the amount of backlash about this particular change, mentioning the flag in the readme to be able to use those shortcuts would be pretty helpful

@Miciah
Copy link
Contributor

Miciah commented Mar 11, 2021

Is spacemacs a dead project?

There hasn't been a release in quite some time, but the develop branch is fairly lively. See https://develop.spacemacs.org/ the develop branch's documentation; https://develop.spacemacs.org/layers/+emacs/org/README.html#org-with-evil-org-mode documents the org-want-todo-bindings option.

@GaneshParkopedia
Copy link

GaneshParkopedia commented Mar 12, 2021

@Miciah ah I understand now, I didn't realise I should be using the develop documentation page. Thanks very much!

@shiki
Copy link

shiki commented Oct 13, 2021

The org-want-todo-bindings does not seem to work anymore in the recent develop (63056ec).

I ended up remapping the t key by adding this in dotspacemacs/user-config:

(define-key evil-normal-state-map (kbd "t") 'org-todo)

I'm a newbie. I think this only works if you're using Evil mode. There are probably other commands if you don't use Evil.

@lebensterben
Copy link
Collaborator

@shiki
cannot reproduce.
When you move the cursor onto a heading in org-mode, and evaluate (describe-key "t"), do you see org-todo?

@shiki
Copy link

shiki commented Oct 15, 2021

Hi @lebensterben! Without the mapping that I shared above (#8640 (comment)), this is the result of describe-key "t":

But if I apply the mapping, this is the result:

Here is my current .spacemacs config for reference: .spacemacs

@lebensterben
Copy link
Collaborator

This doesn't make any sense.

In your config you've set org-want-todo-bindings to t. https://github.com/shiki/dotfiles/blob/ae4235e4fe6449f27fec4bdc71640bbf586f94de/spacemacs/.spacemacs#L58

So this evaluates to (setq evil-org-key-theme '(textobjects navigation additional todo)). (You can verify it by (describe-variable 'evil-org-key-theme)).

When evil-org is loaded, ]this line](https://github.com/Somelauw/evil-org-mode/blob/80ef38fb378541937f6ddfe836809e76eda1e355/evil-org.el#L816) is always evaluated. It finds todo in evil-org-key-theme and therefore setup todo bindings. https://github.com/Somelauw/evil-org-mode/blob/80ef38fb378541937f6ddfe836809e76eda1e355/evil-org.el#L794

Specifically, https://github.com/Somelauw/evil-org-mode/blob/80ef38fb378541937f6ddfe836809e76eda1e355/evil-org.el#L731-L732 is equivalent to (define-key evil-normal-state-map (kbd "t") 'org-todo)

@xabbu42

This comment has been minimized.

Copy link

github-actions bot commented May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Bug tracker - Fixed in develop Key Bindings Org stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests