emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] About indentation when the src block is under a list


From: zwz
Subject: [O] About indentation when the src block is under a list
Date: Sun, 28 Apr 2013 18:59:19 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

--text follows this line--

Here is an example:

* array
** search
   - example
  #+BEGIN_SRC c
  /* find score in scores
   ,* return the index if found or -1 */
  int search(int scores[], int n, int score){
    int i = 0;
    for(; i<n; ++i) if(scores[i]==score) return i;
    return -1;
  }
  #+END_SRC

  <point>
   - test

The indentation of the src block is OK, but it is relative to the
second-level headline ("**search"), rather than the list "- example".

In this way, I can not create another list item ("- test") at the point
(illustrated by <point>) by Alt+Enter.

I tried the variable org-indent-indentation-per-level,
org-adapt-indentation and so on, but failed to indent the src block
relative to the list item. So anyone please give me some hint.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]