Usually, TAB after <s expand to #+BEGIN_SRC in org-mode, but today I updated my org to version 9.1.13, and TAB not work this way any more.

I don't know where to start to figure this out, but I C-h k TAB after <s and the help message is like this:

runs the command org-cycle, which is an interactive autoloaded compiled Lisp function in `org.el'.

It is bound to tab, TAB, menu-bar Tbl Next Field, menu-bar Org Show/Hide Cycle Visibility.

(org-cycle &optional ARG)

For more information check the manuals.

TAB-action and visibility cycling for Org mode.

This is the command invoked in Org mode by the ‘TAB’ key. Its main purpose is outline visibility cycling, but it also invokes other actions in special contexts.

When this function is called with a ‘C-u’ prefix, rotate the entire buffer through 3 states (global cycling) 1. OVERVIEW: Show only top-level headlines. 2. CONTENTS: Show all headlines of all levels, but no body text. 3. SHOW ALL: Show everything.

With a ‘C-u C-u’ prefix argument, switch to the startup visibility, determined by the variable ‘org-startup-folded’, and by any VISIBILITY properties in the buffer.

With a ‘C-u C-u C-u’ prefix argument, show the entire buffer, including any drawers.

When inside a table, re-align the table and move to the next field.

When point is at the beginning of a headline, rotate the subtree started by this line through 3 different states (local cycling) 1. FOLDED: Only the main headline is shown. 2. CHILDREN: The main headline and the direct children are shown. From this state, you can move to one of the children and zoom in further. 3. SUBTREE: Show the entire subtree, including body text. If there is no subtree, switch directly from CHILDREN to FOLDED.

When point is at the beginning of an empty headline and the variable ‘org-cycle-level-after-item/entry-creation’ is set, cycle the level of the headline by demoting and promoting it to likely levels. This speeds up creation document structure by pressing ‘TAB’ once or several times right after creating a new headline.

When there is a numeric prefix, go up to a heading with level ARG, do a ‘show-subtree’ and return to the previous cursor position. If ARG is negative, go up that many levels.

When point is not at the beginning of a headline, execute the global binding for ‘TAB’, which is re-indenting the line. See the option ‘org-cycle-emulate-tab’ for details.

As a special case, if point is at the beginning of the buffer and there is no headline in line 1, this function will act as if called with prefix arg (‘C-u TAB’, same as ‘S-TAB’) also when called without prefix arg, but only if the variable ‘org-cycle-global-at-bob’ is t.


Can you help me with where should I start to figure the problem out?

  • 1
    Try starting emacs with no init file emacs -q, load (with M-x load-file or anything like that) just the new version of org-mode and check if the problem persists. If that isn't the case, the problem is related to your config. – user12563 Jun 30 '18 at 16:26
  • 2
    It's worth running org-version to check that you are actually using v9.1.3. If you are, then <s Tab should work. If you're running a more recent, developmental version of Org, expansion won't work because easy templates were removed in c04e357f3 (Replace easy templates with org-insert-structure-template, 2017-11-05). – Kyle Meyer Jun 30 '18 at 20:38
  • Thank you very much, @KyleMeyer . I've made a mistake but I am running v9.1.13, that is exactly because of what you said. – cmal Jul 1 '18 at 8:35
  • 1
    Link to commit. Note that the old functionality is/will be mostly re-implemented with org-tempo. (See also this message on the mailing list very briefly describing org-tempo and the start of the long thread spanning several months where the changes were discussed.) – aplaice Jul 1 '18 at 9:29

I would like to add to the answer of m43cap:

<s TAB

works in Orgmode 9.2 and later if you activate the checkbox for org-tempo of the customization option org-modules.

You get to that customization option through the menu item Options -> Customize Emacs -> Specific Option ..., input of the option name org-modules, and RET. Tab-completion is possible during the input of the option name.

Alternatively you can input M-x customize-option RET org-modules RET. Tab-completion is possible.

| improve this answer | |
<s TAB

still works at least since org-mode version 9.1.0. In org-mode version 9.2.4 (and maybe earlier) it might be better to use

M-x org-insert-structure-template

which should be bound to C-c C-,

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.