emacs

Emacs: default-frame-alist setting is ignored

萝らか妹 提交于 2020-01-31 18:22:20
问题 I would like all frames to overlap at (1,1) . Yet with a .emacs containing (setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55))) (setq default-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55))) calling C-x 5 2 results in frames in a cascade, as you see in the figure. How can I force all frames to be anchored at the same place? I am running Emacs 23.3.1 on OS X (Mountain Lion). 回答1: The settings are not being ignored. The reason you see the above behaviour

Emacs: default-frame-alist setting is ignored

心已入冬 提交于 2020-01-31 18:20:44
问题 I would like all frames to overlap at (1,1) . Yet with a .emacs containing (setq initial-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55))) (setq default-frame-alist '((top . 1) (left . 1) (width . 80) (height . 55))) calling C-x 5 2 results in frames in a cascade, as you see in the figure. How can I force all frames to be anchored at the same place? I am running Emacs 23.3.1 on OS X (Mountain Lion). 回答1: The settings are not being ignored. The reason you see the above behaviour

Emacs Clojure mode without paredit

此生再无相见时 提交于 2020-01-30 23:24:59
问题 I'm using the Clojure mode package from ELPA. Otherwise everything is fine, but I just can't stand paredit mode. I can't seem to turn it off easily, now I just disable it for every buffer I open. I tried setting this variable to nil: (setq clojure-enable-paredit nil) But paredit still appears. Any ideas? 回答1: Not an answer to your actual question, but give paredit mode a chance. I, too, was really annoyed with it automatically closing my parens, and refusing to delete just a single paren for

Emacs Clojure mode without paredit

人盡茶涼 提交于 2020-01-30 23:24:05
问题 I'm using the Clojure mode package from ELPA. Otherwise everything is fine, but I just can't stand paredit mode. I can't seem to turn it off easily, now I just disable it for every buffer I open. I tried setting this variable to nil: (setq clojure-enable-paredit nil) But paredit still appears. Any ideas? 回答1: Not an answer to your actual question, but give paredit mode a chance. I, too, was really annoyed with it automatically closing my parens, and refusing to delete just a single paren for

【环境安装】ubuntu18.04利用opam安装指定版本的coq工作环境

╄→гoц情女王★ 提交于 2020-01-30 03:46:06
整理了一下从无环境的ubuntu18.04虚拟机到可以证代码的工作环境需要经历的安装流程和命令作为笔记和分享。 第一步:安装opam add-apt-repository ppa:avsm/ppa apt update apt install opam 安装如果出现错误则根据报错安装指定依赖等,(缺少cc是需要安装gcc) 然后初始化和更新opam,(opam没有进度条,需要耐心等候。。。) opam init eval `opam config env` opam update 第二步:安装指定版本的coq 以8.9.1为例 opam install coq.8.9.1 第三步:安装IDE(介绍两种,coqide和emacs) coqide opam install coqide.8.9.1 注意要跟上对应的版本,不然会自动帮你下载coq的最新版 全部安装完后,命令行载入环境变量 eval $(opam env) 之后可以通过命令行输入coqide打开IDE 要注意每个新的命令行都需要载入环境变量一次。 Emacs 安装完coq后,需要按顺序安装emacs和proof general两个东西 sudo apt-get install emacs sudo apt-get install proofgeneral 由于coqtop是使用opam安装的

Emacs custom background color by mode

≯℡__Kan透↙ 提交于 2020-01-29 13:11:11
问题 I use emacs to edit a number of file types, and would like an easy visual queue to tell .c files from .vhd or .py files, for instance. How can I add a custom background color to the major mode for that language? 回答1: You can do this via hooks. Among other things you can hook is when a new major mode starts. Put something like this into your .emacs file, and emacs will set your background color to purple every time you go into Python mode. (add-hook 'python-mode-hook (lambda () (set-background

C++ debugging with gdb & bazel (& emacs)

拥有回忆 提交于 2020-01-29 10:53:36
问题 I want to debug an executable generated with Bazel. The gdb debugger is lost with the links generated by Bazel and is not able to show me the C++ source code. How to fix that? The project root directory is /home/.../Cpp/ ./Cpp/ ├── bazel-bin -> /home/picaud/.cache/bazel/_bazel_picaud... ├── bazel-Cpp -> /home/picaud/.cache/bazel/_bazel_picaud... ├── bazel-genfiles -> /home/picaud/.cache/bazel/_bazel_picaud... ├── bazel-out -> /home/picaud/.cache/bazel/_bazel_picaud... ├── bin │ ├── BUILD │ └─

OS X Terminal: Meta key + alt functionality at the same time

ぐ巨炮叔叔 提交于 2020-01-28 13:17:28
问题 Is there a way to use an alt / option key as a meta key but still be able to use it to make some characters which need it? For example, in my local keyboard layout: @ is alt + 2 \ is alt + shift + 7 | is alt + 7 etc. So, if I set alt as a meta key, I can't make those characters anymore. On the other hand, using "press esc, release esc, press a key" to make meta key sequences makes my hands hurt. Any Emacs users with international keyboards who have solved this, please give any tips you might

OS X Terminal: Meta key + alt functionality at the same time

有些话、适合烂在心里 提交于 2020-01-28 13:17:09
问题 Is there a way to use an alt / option key as a meta key but still be able to use it to make some characters which need it? For example, in my local keyboard layout: @ is alt + 2 \ is alt + shift + 7 | is alt + 7 etc. So, if I set alt as a meta key, I can't make those characters anymore. On the other hand, using "press esc, release esc, press a key" to make meta key sequences makes my hands hurt. Any Emacs users with international keyboards who have solved this, please give any tips you might

Unset key binding in emacs

纵饮孤独 提交于 2020-01-27 23:04:09
问题 For example, in the codes of zen-coding, the "C-j" shadows the normal behavior of "C-j" ( newline-and-indent ) (define-key zencoding-mode-keymap (kbd "C-j") 'zencoding-expand-line) Then how can I unset this keybinding and use C-j for newline-and-indent again? I tried this, but it doesn't work: (add-hook 'html-mode-hook (lambda () (progn (zencoding-mode) (local-set-key (kbd "C-j") 'newline-and-indent)))) Does anyone have ideas about this? 回答1: The general way to unbind a key (for any keymap)