#orgmode 9.2.1 업그레이드

2 minute read

org mode를 9.1.9 버전에서 9.2.1 버전으로 업그레이드했다. <#orgmode 최신 버전 사용하기> 글을 참고해 최신 버전으로 설치했다. emacs 26.1 버전에는 org mode 9.1.9 버전이 설치되어 있다.

changelog를 간단히 살펴봤다.

Incompatible changes

Change in the structure template expansion

Org 9.2 comes with a new template expansion mechanism, combining org-insert-structure-template bound to C-c C-,.

이건 아프다. 많이 바뀌었네.

;; <h가 #+BEGIN_HTML #+END_HTML에서 #+BEGIN_EXPORT html #+END_EXPORT로 변경됨
;; jekyll-org가 지원 안해서 예전으로 되돌림
(add-to-list 'org-structure-template-alist
             '("h" "#+BEGIN_HTML\n?\n#+END_HTML"))

(add-to-list 'org-structure-template-alist
             '("u" "#+BEGIN_SRC plantuml :file ?.png\nskinparam monochrome true\n#+END_SRC")))

이런 설정을 쓰고 있다. 버전을 올린 후 C-c C-, 키를 입력하니

Warning (org):
Please update the entries of `org-structure-template-alist'.

In Org 9.2 the format was changed from something like

    ("s" "#+BEGIN_SRC ?\n#+END_SRC")

to something like

    ("s" . "src")

Please refer to the documentation of `org-structure-template-alist'.

The following entries must be updated:

(("u" "#+BEGIN_SRC plantuml :file ?.png\nskinparam monochrome true\n#+END_SRC")
 ("h" "#+BEGIN_HTML\n?\n#+END_HTML"))

에러가 뜬다.

;; <h가 #+BEGIN_HTML #+END_HTML에서 #+BEGIN_EXPORT html #+END_EXPORT로 변경됨
;; jekyll-org가 지원 안해서 예전으로 되돌림
(setq org-structure-template-alist
      (delete '("h" . "export html") org-structure-template-alist))
(add-to-list 'org-structure-template-alist '("h" . "html"))

html은 이렇게 변경했다.

(add-to-list 'org-structure-template-alist
             '("u" . "src plantuml :file ?.png\nskinparam monochrome true"))

;; org-mode 9.2에서 삭제된 < 키로 시작하는 template 삽입 기능을 되살리고자.
;; 예) <h TAB 입력시 #+BEGIN_HTML ... #+END_HTML 입력
(require 'org-tempo)
;; <h TAB 눌렀을 때, org-tempo-keywords-alist가 우선권을 가져서 제거한다

;; 원했던 #+begin_html 대신 #+html: 가 나오는 문제 해결하려고
(setq org-tempo-keywords-alist (delete '("H" . "html") org-tempo-keywords-alist))

탭키로 이동하는 앵커 역할을 한 ? 기능은 못 살렸다. tempo에서 뭔가 복잡하게 만지면 가능할 것 같은데, 나중에 괴로워지면 개선하도록 한다. 9.2 버전 적응은 여기까지 하는 거로 마무리한다.

Change the signature of the org-set-effort function

(setq org-global-properties
      '(("Effort_ALL" .
         "1:00 2:00 3:00 4:00 8:00 16:00 24:00 32:00 40:00 0:30")))
;; hotkey 1    2    3    4    5    6     7     8     9     0

9.1.x 버전까진 이렇게 effort를 설정하면 단축키가 하나씩 바인딩 됐다. 이제 단축키가 없어지고 직접 입력하는 방식으로 바뀌었다. helm 같은 패키지를 쓰면 자동 완성이 되기 때문에 직접 입력한다고 귀찮아지는 건 없다. 난 반가운 변경 사항이다. 아직도 HHKB 숫자 위치가 헷갈린다.

New features

Dynamically narrow table columns

| N | N^2 | N^3 | N^4 | sqrt(n) | sqrt[4](N) |
|---+-----+-----+-----+---------+------------|
| 1 |   1 |   1 |   1 |       1 |          1 |
| 2 |   4 |   8 |  16 |  1.4142 |     1.1892 |
| 3 |   9 |  27 |  81 |  1.7321 |     1.3161 |

sqrt[4](N) 컬럼에서 C-c TAB 키를 누르면

| N | N^2 | N^3 | N^4 | sqrt(n) |…|
|---+-----+-----+-----+---------+-|
| 1 |   1 |   1 |   1 |       1 |…|
| 2 |   4 |   8 |  16 |  1.4142 |…|
| 3 |   9 |  27 |  81 |  1.7321 |…|

이렇게 접힌다.

org-columns-summary-types entries can take an optional COLLECT function

#+columns: %ITEM %CONFIRMED %Bananas{+} %Bananas(Confirmed Bananas){X+}

{X+} custom summary type을 정의하고 columns 프로퍼티에 사용할 수 있다.

(setq org-columns-summary-types
      '(("X+" org-columns--summary-sum
         custom/org-collect-confirmed)))

summary type은 원래 있었고 custom/org-collect-confirmed 같은 함수를 입력할 수 있게 바뀐 모양이다. 별것이 다 되네 column view. 난 column view를 이슈마다 입력한 예상 시간을 전체적으로 볼 때, 사용하곤 했다. summary type이 신박해서 활용할 곳이 없나 살펴볼 생각이다.

소감

그래도 좀 썼다고 아는 게 보인다. 뭐 사라지고 나서야 저런 기능이 있었다고 알게 된 기능도 있지만.

C-x C-s C-x C-c