출력해보기

M-x ielm

(message "하이 %d" (+ 2 3))
#'(1 2 3)
(cons 1 '(2 3 4))
;; (1 2 3 4)
(let ((a 2) (b 3))
  (message "%s" (+ a b))
  )

(let (a b)
  (setq a 2)
  (setq b 3)
  (message "%s" (+ a b))
  )
;; (message a) // let은 local variable
;; (let ((a 2) (b 3) (c (+ a b)))) // error 심볼은 각각 평가 되므로 초기화 단계에서 서로 참조 불가
(let* ((a 2) (b 2) (c (+ a b)))
  (message "%s" (+ a b c))
  )

String 다루는 방법에 대해서 설명하라, 2가지 함수

(split-string "123123 123123 123123" " ")
;; ("123123" "123123" "123123"
(concat "a" "b")

string <-> int

join-string

regex

memq

(memq 1 '(7 1 2 3))

(memq ELT LIST)로 정의 되어 있고, ELT가 LIST의 엘리먼트라면 non-nil을 반환한다. 반환되는 값은 LIST의 tail이고 그것의 car는 ELT이다.

progn

(require 'org)
(org-add-link-type "evernote" nil '(lambda (path desc frmt)
      (format "<a href=\"evernote:%s\">%s</a>" path desc)))

sort-lines

  • sort.el에서 임포트 되는 함수입니다.

Emacs Lisp Functions

buffer

  • winner-mode
  • perspective.el mode
    (current-buffer)
    

display-buffer

  • 어떤 버퍼를 어떤 창에서 실행 시키고 싶을 때 사용할 수 있는 함수이다.
  • display-buffer–maybe-pop-up-frame-or-window
(display-buffer "scratch"
   '(display-buffer--maybe-same-window . ())) ;
  • 만약 현재 buffer에 아래와 같은 이름의 버퍼가 있다면 새롭게 실행된다.
(display-buffer "javascript.org"
      '(display-buffer--maybe-pop-up-frame-or-window . ()))

display-buffer–maybe-pop-up-frame is a compiled Lisp function in ‘window.el’. 이 함수는 window.el에서 컴파일 된 함수이다.

(display-buffer–maybe-pop-up-frame BUFFER ALIST)

Try displaying BUFFER based on ‘pop-up-frames’. If ‘pop-up-frames’ is non-nil (and not ‘graphic-only’ on a text-only terminal), try with ‘display-buffer-pop-up-frame’.

ALIST is an association list of action symbols and values. See Info node ‘(elisp) Buffer Display Action Alists’ for details of such alists.

display-buffer-at-buttom

  • 현재의 버퍼를 그대로 아래에 하나 더 만들어 준다.
(display-buffer (current-buffer) '(display-buffer-at-bottom . () ))

display-buffer-no-window

Overriding the default placement actions

(setq display-buffer-base-action
      '((display-buffer-reuse-window
   display-buffer-reuse-mode-window
   display-buffer-same-window
   display-buffer-in-previous-window)
  ))

display-buffer-alist

현재

emacs-lisp으로 이것저것

; 항상 아래에 *Messages* Buffer를 생성한다.
(display-buffer "*Messages*" '(display-buffer-in-side-window . (
                              (side . bottom)
                              (slot . 1)
                              (window-height . 5)
                              )
                               )
      )
(display-buffer ".scratch.org" '(display-buffer-in-side-window . (
                                (side . bottom)
                                (window-height . 5)
                                (slot . -0)
                                )
                                 )
      )

{{c1::dfasdfasdlfij}}

이건 어때용?