2018년 11월 24일 토요일

Backup 기능

Backup 파일


참고: https://www.gnu.org/software/emacs/manual/html_node/emacs/Backup.html

원래 파일명 뒤에 ~ 를 붙임

예)
README 는 README~ 파일이 자동 생성

make-backup-files 변수를 t 또는 nil 로 설정하여 emacs 동작 설정


예) $HOME/.emacs 파일에 추가


(setq make-backup-files nil) ; backup 기능 중지




2018년 11월 23일 금요일

Emacs 설치

최신 버전의 emacs 설치를 위해 소스를 받아 빌드

소스 다운로드

https://www.gnu.org/software/emacs/


Ubuntu


GUI toolkit 없이 사용


$ sudo apt install libxpm-dev libjpeg-dev libpng-dev libgif-dev libtiff-dev libgnutls-dev libncurses-dev
$ curl -OL http://ftp.jaist.ac.jp/pub/GNU/emacs/emacs-26.1.tar.gz
$ tar xvf emacs-26.1.tar.gz
$ cd emacs-26.1
$ ./configure --with-x-toolkit=no
$ make
$ sudo make install

Note)
  • Ubuntu 18.04 에서 libgnutls-dev 는 libgnutls28-dev 설치


GUI toolkit 사용시 gtk 패키지 설치 필요


$ sudo apt install libgtk2.0-dev

./configure 시 --with-x-toolkit=no 제거



바이너리 다운로드


바이너리 버전을 받으면 바로 실행 가능


Docker container 에서 빌드시 에러


참고: https://stackoverflow.com/a/37561793

**************************************************
Warning: Your system has a gap between BSS and the
heap (23758296 bytes).  This usually means that exec-shield
or something similar is in effect.  The dump may
fail because of this.  See the section about
exec-shield in etc/PROBLEMS for more information.
**************************************************

docker run 할 때 --security-opt seccomp=unconfined 옵션을 추가

예)
$ docker run --rm -it --security-opt seccomp=unconfined emacs-builder-image


Windows


빌드된 바이너리 emacs 를 받아 바로 사용 가능
emacs 다운로드 웹 페이지에서 다운로드



macosx


다운로드: https://emacsformacosx.com/

실행 바이너리 형태


2014년 2월 19일 수요일

Emacs 24.3.1 + win7 + plink : Couldn't find a proper `ls' command

증상: plink 를 사용해서 ssh 접속을 하였는데 Couldn't find a proper `ls' command 라는 에러가 발생함

해결: http://stackoverflow.com/a/18764972
  • 해당 스레드에 채택된 답보다 다른 답이 더 나은거 같음

1. .emacs 파일에 아래 내용 추가 (자신의 emacs 설치 경로로 변경할 것)
(byte-compile-file "C:/Program Files/emacs/lisp/net/tramp-sh.el")
2. emacs 종료
3. $HOME/.emacs.d/tramp 파일을 삭제
4. emacs 시작

성공하면 .emacs 파일에 추가한 부분 제거해도 되는 것으로 보임