天道酬勤,学无止境

emacs

如何在 ESS / Emacs 中后台运行 R 进程?(How can I background the R process in ESS / Emacs?)

问题 当我启动 R 环境时,我经常运行很长的 R 脚本。 我希望能够在 Emacs/ESS 中加载/运行 R 脚本并在另一个缓冲区中继续其他工作。 当我按 Cg 或 Cc Cc 时,进程被中断,我必须重新启动脚本。 在 ESS / Emacs 中后台运行 R 进程的最佳方法是什么? 编辑:感谢您的回答和评论,但它们都没有解决当您加载/运行大型脚本并且无法更改缓冲区时 Emacs 冻结的事实。 我想我的问题更笼统一点 - Emacs 可以后台处理让您继续工作的进程吗? 回答1 ESS 将 R 作为异步进程运行。 你不需要背景任何东西。 您可以运行您的代码数小时,并且仍然可以不间断地在 ESS 中工作。 你的问题似乎是别的。 当你执行你的脚本时,你会“明显地”执行它,即你执行的代码被打印到终端。 这会导致 Emacs 冻结。 将ess-eval-visibly为 nil,大量代码将立即发送到 R: (setq ess-eval-visibly nil) 干杯。 [更新] 在 ESS 的最新版本中, ess-eval-visibply有一个新设置 - 'nowait。 它将您的代码放在一个劣质缓冲区中,然后将其发送到子进程。 通过这种方式,您可以在不等待子流程完成的情况下查看您的代码和所有输出。 [/更新] 回答2 Mx R将启动 R 会话(默认缓冲区名称为*R* )。 如果再次按Mx

2021-06-21 10:04:54    分类:技术分享    r   emacs   ess

如何将目录上的 emacs helm-find-file 默认操作更改为进入目录而不是在 dired 中打开?(How can I change emacs helm-find-file default action on directory to be go inside the directory instead of open in in dired?)

问题 我正在使用 emacs prelude。 我最近决定从 ido 转为掌舵人。 所以我在 emacs prelude 中启用了helm和helm-everywhere , 一切正常,除了helm-find-file的默认行为 在 Ido 中,我可以点击ret进入选定的目录,但我必须在 helm 中点击right或cj 。 此外, helm-find-files将列出. 和..在每个目录的最顶部。 这意味着在 ido 中,如果路径上没有很多目录,我可以点击ret ret ret直到到达最终目的地。 但是在掌舵时,我必须输入一些字符,点击cj输入至少 1 个字符,点击cj等等。 我什至不能连续打cj 。 我不想切换回 ido,因为我真的很喜欢 find-file 中 helm 的 grep 功能。 无论如何我可以更改默认顺序以将其列出. 和..在底部和ret进入目录而不是打开目录? 回答1 您正在寻找的函数是 (helm-execute-persistent-action),它默认绑定到 Cz。 有些人喜欢用 tab 来切换: (define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) (define-key helm-map (kbd "C-z") 'helm-select-action) 如果您愿意

2021-06-21 09:51:06    分类:技术分享    emacs   emacs-prelude   emacs-helm

Color themes are strange/incorrect in terminal emulator

I'm running emacs-nox 23.3 in Konsole (from kde) emulator, the most color themes have strange colors. For example, i like the Solarized Theme. I expect the theme should look like this: (source: ethanschoonover.com) However, this is what I get: Broken Solarized Theme http://img824.imageshack.us/img824/3881/voronoi2.png Most of themes that comes in emacs-color-theme package have similar behavior. I tried to change the Konsole color settings - no result. I also tried to replace my .Xresources with this one, with no success.

2021-06-15 17:08:25    分类:问答    emacs   terminal   konsole

Emacs 24.3.1 CEDET 2.0 (built in) and ECB 20131116.1319: Errors during the layout setup of ECB

Using the CEDET that comes with Emacs 24.3.1 and the ECB that is in Melpa, I get the following trying ecb-activate: All requirements for ECB 2.40 fulfilled - Enjoy it! [2 times] The ECB is now deactivated. ecb-clean-up-after-activation-failure: ECB 2.40: Errors during the layout setup of ECB. (error-type: void-variable, error-data: (ecb-examples-bufferinfo-buffer-name)) Here is the info from the emacs pacakage manager: ecb is an installed package. Status: Installed in `/home/Smith/.emacs.d/elpa/ecb-20131116.1319/'. Version: 20131116.1319 Summary: a code browser for Emacs cedet is a built-in

2021-06-15 16:27:55    分类:问答    emacs   cedet   emacs-ecb

Accented characters on Emacs

When I type an accented character (eg ñ, ç, ã), it doesn't self-insert immediately, but rather displays itself on the minibuffer as if it was a prefix key (eg ç -> ç-). Is there a way to change this behavior? I can't even capture it with <f1>kç to find out what is happening. Thanks!

2021-06-15 14:56:38    分类:问答    emacs

How to run shell commands in emacs on ubuntu while avoiding a bash job control error?

I installed emacs in ubuntu (using sudo apt-get install emacs). I am havine the problem that when I try to run a shell command from within emacs (for example M-! ls) the output is preceded by this: bash: cannot set terminal process group (-1): Invalid argument bash: no job control in this shell In my .emacs I have the option (setq shell-command-switch "-ic") . This is so that I can presumably use my aliases as well as commands. This has not given me issues at work and it lets me use my aliases. How can I use my aliases but avoid this problem?

2021-06-15 13:20:33    分类:问答    bash   shell   ubuntu   emacs

Command-T in emacs

Is there something similar to the CommandT plugin in vim for emacs? I know some plugins that do directory-based completion, but is there one that does matching on the full paths? An example: ├── bar │ └── hello ├── baz │ └── test │ └── hello └── foo ├── hello └── lost baz baz/test baz/test/hello bar bar/hello foo foo/hello foo/lost Now when I type 'h', I'd like the paths baz/test/hello bar/hello foo/hello to match. For 't', there should be baz/test/hello foo/lost

2021-06-15 10:54:14    分类:问答    plugins   emacs

Set Emacs to smart auto-line after a parentheses pair?

I have electric-pair-mode on (which isn't really particularly relevant, as this could apply to any auto-pairing mode or even manual parens), but in a nutshell, I'd like it so that in the case I have: function foo() {|} (where | is the mark) If I press enter, I would like to have it automatically go to function foo() { | } It would also mean that function foo(|) {} would become function foo( | ){} I already have things to take care of the indentation, but I'm not sure how to say "if I'm inside any empty pair of matched parenthesis, when I press return, actually insert two new lines and put me

2021-06-15 10:43:40    分类:问答    emacs   elisp

Make emacs always close html tags

How can I make emacs always close a sgml-tag (C-c-C-t)? For example div, h2 tags work fine but p or li do not. Basically I'm looking for a way of specifing that I'm always using xhtml when I insert a tag.

2021-06-15 10:16:57    分类:问答    emacs   sgml

Installing python server for emacs-jedi

I am trying to install Jedi for emacs using marmalade package manager by following instructions here -- http://tkf.github.io/emacs-jedi/latest/. The package manger installs Jedi along with its dependencies. But I cannot install python server using: M-x jedi:install-server because that command is not available even after restarting emacs after jedi installation. The only available commands are: Possible completions are: jedi:ac-setup jedi:complete jedi:dot-complete jedi:get-in-function-call jedi:goto-definition jedi:goto-definition-next jedi:goto-definition-pop-marker jedi:setup jedi:show-doc

2021-06-15 08:36:07    分类:问答    python   python-2.7   emacs   emacs-jedi