2

I still can find some minor details to optimize my workflow,

Given TODO list with elements like:

- [ ] task1
- [ ] task2

and I want to introduce a new "- [ ]" line, but "M - Enter" does not produce it (just a "-").

Another thing is how to generate a series of whatever. Think about the command line expansion: {a..z} or {1..10}. How do I generate all elements:

 "a b c d ..." 

or

 "1 2 3 4 ..."?
4

3 に答える 3

2

前のレベルと同じ状態の新しい見出しを作成org-insert-todo-headingするOrg-mode バインド。<M-S-return>

-[ ] foo <cursor>そのコマンドで展開します

- [ ] foo
- [ ] <cursor>

他の見出しタイプでも自然に機能します。

** TODO heading1<cursor>そのコマンドで展開します

** TODO heading1
** TODO <cursor>
于 2013-07-25T07:55:28.917 に答える
0

これはあなたの2番目の質問(シリーズについて)に関するものです:

(defun series (from to &optional delimit step formatter)
  (interactive "nSeries left bound: \nnSeries right bound: ")
  (let (delimiter step)
    (if (null current-prefix-arg)
        (setf delimiter " " step (if (< from to) 1 -1)
              formatter #'number-to-string)
      (setf delimiter (read-string "Delimit with: " ", ")
            step (read-number "Increment by: " 1)
            formatter
            (let ((minibuffer-completing-symbol t))
              (eval (read-from-minibuffer
                     "Number to string function: "
                      "#'char-to-string" read-expression-map t
                     'read-expression-history)))))
    (insert
     (mapconcat formatter
                (loop for i = from then (+ i step)
                      with tester = (if (< step 0) #'>= #'<=)
                      while (funcall tester i to)
                      collect i)
                delimiter))))

ああ、アボアボが投稿したものを見たことがありません。とにかく、代替手段としてここに残します。

于 2013-07-25T06:52:20.913 に答える