0

I am trying out org-mode in emacs. Strangely, after hooking org-mode to text-mode, whenever I press <RET> key on headlines, the mini-buffer shows

Wrong type argument: stringp, nil

And nothing happens. Similar things happen to normal text region after I use <alt>-q for column filling.

This issue do no present if I don't hook it to text-mode and only manually invoke it after opening a file.

What could be causing the issue? Is there any way to debug it?

  • 2
    text-mode and org-mode are two distinct major-mode that are designed to work independently. You should choose one or the other. If you want org-mode, type M-x org-mode. If you want text-mode, type M-x text-mode. Do not attempt to hook the two major-mode together. If you want to achieve certain behavior in a particular major-mode, then those behavioral modifications may be added to a major-mode hook. – lawlist Feb 13 '16 at 17:21
  • @lawlist Thanks, I partially solved the problem by linking some of the suffix to org-mode. But is there a way to set the default text mode to org-mode? Because frankly, text-mode's functionality is just like a subset of org-mode, isn't it? – Chong Feb 13 '16 at 17:41
  • When you get more advanced, you can create your own major-mode. In the meantime, I suggest you pick a particular feature that is lacking/annoying in org-mode and figure out how to add/disable that feature. For example, maybe you don't like how shift-left works when your cursor is at a particular location -- you may decide to disable that behavior in org-mode. You need to handle each issue one at a time. Be prepared to invest a substantial amount of time customizing Emacs to your precise needs. – lawlist Feb 13 '16 at 17:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.