问题标签 [dot-emacs]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
670 浏览

emacs - gdb 未在 Windows 上的 emacs 中显示代码

我昨天刚问了一个问题,导致了这个新问题。 Windows 上 emacs 中的 gdb

基本上我正在安装一个 QT sdk,它要求我卸载我所做的 MSYS 并且我冲洗了我的 emacs/gdb 交互。

这是我正在使用的 gdb_init 文件。在卸载 MSYS 之前,这工作正常。现在在它之后,断点正在工作,但我没有在另一个窗口中获取我的代码,左边距有一个小红点作为断点。

我在 emacs 中运行的步骤

任何想法我做错了什么?

0 投票
3 回答
37158 浏览

emacs - 当磁盘上的文件发生更改时,如何让 Emacs 自动刷新所有缓冲区?

我有一个非 emacs 全局搜索和替换功能,它使我的磁盘文件变得比我的 emacs 缓冲区(整体)更新。有没有办法告诉emacs一举刷新磁盘中的所有缓冲区,而不必通过重新加载文件来单独执行每个缓冲区?

谢谢!D

0 投票
2 回答
1509 浏览

emacs - 与 tty 兼容的自定义主题集面

我使用custom-create-theme 创建了一个emacs-23 自定义主题。它在 X(Linux gnome 桌面)下运行良好。但是,在 tty(在 gnome-terminal 中)下运行时,某些颜色是错误的。

问题不是颜色的准确性(尽管在这两种情况下匹配它们会很好),而是有些颜色太差以至于无法使用。例如,在 X 下显示为绿色的函数名称在 tty 下是不可见的,尽管在 X 下显示为金色的关键字在 tty 下也显示为金色(或至少某种黄色)。

也许在 tty 下的颜色不能完全匹配,所以类似的东西被替换了?如果是这样,这似乎并不总是有效。

我怎样才能解决这个问题?是否可以在“自定义”GUI 或 ~/.emacs.d/my-theme.el 文件中指定某些面孔仅适用于 X 上显示的帧,而其他面孔仅适用于 tty 或其他相似的?

(我有兴趣得到这个,内置的 emacs 主题系统工作而不是使用一些外部颜色主题系统。)

0 投票
3 回答
2065 浏览

emacs - Emacs 设置哪个功能模式

我希望在打开 Emacs 时默认启用 which-function-mode。我已将以下几行添加到我的 .emacs 文件中。

当我打开一个 .cpp 文件并导航到一个函数的主体时,我没有在底部的状态栏中看到我应该看到的函数名称。如果我然后运行 ​​Mx which-function-mode,则消息是“禁用了哪个功能模式”,所以看起来我的 .emacs 文件中的行占用了但不太工作。

我是在我的 .emacs 文件中设置了错误的东西还是有其他问题?

0 投票
4 回答
3313 浏览

emacs - Don't show uninteresting files in Emacs completion window

How do I prevent Emacs from showing me all the files I'm not interested in (such as ~ backup files, .pyc files, or .orig files) when I: C-x C-f TAB ?

It is working in one respect: if I know the file I want to open begins with foo and I type foo TAB then the mini-buffer correctly autocompletes all the way to foo.py. It correctly ignored foo~ and foo.pyc, because both ~ and .pyc are in completion-ignored-extensions. It also correctly lets me open either ignored file if I really want to by typing in all the letters my self.

However, if I just hit TAB to to bring up the completion list buffer then that list includes files with extensions in completion-ignored-extensions, which makes it very difficult to find what I'm looking for.

Clearly the code to ignore uninteresting files is there and working. How do I get the completion list buffer to respect completion-ignored-extensions?

(by-the-by, can I make dired behave similarly?)

0 投票
3 回答
869 浏览

emacs - 我应该将什么传递给 .emacs 文件中的 switch-to-buffer 参数?

我的 .emacs 文件在以下行出现错误:

错误:作为变量的符号值是无效的

我做了一个describe-functiononswitch-to-buffer并发现我可以传递一个 BUFFER (以及另一个我目前不需要的可选参数)。我究竟做错了什么?

只是一些注意事项
:我还需要两条相似的线(switch-to-buffer *grep*)(switch-to-buffer *compilation*)所以简单的使用解决方案(switch-to-completions)并不能解决我所有的问题。
湾。我需要的所有缓冲区都已经打开,所以我认为这不是问题。

0 投票
4 回答
1160 浏览

macos - 如何让 Mac OS X 上的可可 emacs 加载新窗口的 .emacs 可视化自定义(第一个之后打开的任何文档)?

所以我刚刚从http://emacsformacosx.com/为我的新雪豹 macbook pro 下载了 emacs 23.1 ,它就像一个魅力,除了......

我的 .emacs 中有可视化自定义,这里提取了几行:

(set-background-color "black")
(set-cursor-color "green") (set-default-font "- -Lucida Console-normal-r-normal-normal-18- -96-96-c-* -iso10646-1")

我还设置了一些键绑定,这里有几行

(global-set-key "\Cl" `goto-line)

(global-set-key [(control ?%)] `query-replace-regexp)

我第一次启动 emacs 或使用 emacs 打开文档时,一切都完美加载。当我发出命令-N 或通过 finder 打开另一个文件时,会打开一个新窗口,其中加载了键绑定自定义,但没有视觉自定义(包括窗口大小等)

我认为这与 emacsclient 的调用方式和 emacs 服务器有关,但是尽管我热衷于使用 emacs 进行开发,但在 .emacs 级别自定义之外设置编辑器本身时,我却一无所知

以下是我希望在打开新窗口时实现的潜在行为(通过 command-n 或在 finder 中打开文档),按优先顺序排列:

  1. 让新窗口创建一个新的 emacs 进程(不仅仅是一个新的缓冲区),这样我就可以像 textmate 一样管理和导航多个项目,为每个项目使用一个 emacs 进程。

  2. 让这些视觉自定义保持不变,以便每个新窗口加载正确的大小、字体和颜色。

  3. 让每个新文档在当前活动的 emacs 窗口中作为缓冲区打开。

各位大侠能不能帮忙告诉我一下,谢谢!

0 投票
6 回答
9444 浏览

emacs - 如何在 Emacs 启动时显示 Org 模式议程?

我希望 Org 模式议程能够在我打开 Emacs 时自动显示我今天必须做的事情。org-agenda 命令是交互式的,因此它似乎不能很好地用于此目的。

有没有办法在 Emacs 启动时显示 Org-mode 议程?

谢谢,

康纳

0 投票
1 回答
288 浏览

emacs - 无法在 Emacs 的第二个实例中打开文件 cua?

尝试打开 emacs 的第二个实例时出现以下错误:

文件错误:“无法打开加载文件”、“cua”

我想我不必打开另一个 emacs 实例(毕竟那是美丽的),我只是想把一些东西分开(特别是工作 - 比如代码和调试 - 和播放 - 就像新闻一样)。

如果我使用 cua.el,我是否有任何理由无法打开两个 emacs 实例?

0 投票
3 回答
6029 浏览

ruby-on-rails - 将 emacs ruby​​-mode 缩进更改为 4 个空格

从上一篇文章中,我得到了在 emacs 中工作的 Ruby 模式。这很好用。

为 mac ruby​​ 开发设置 .emacs 文件

我们公司使用 4 个空格代替默认的 2 个缩进。我很难让它工作。

这是我的 .emacs 文件

(添加到列表'加载路径“〜/ rdoc-mode.el”)

(需要'红宝石模式)

(setq indent-tabs-mode nil) ; 总是用空格替换制表符

(setq-default tab-width 4) ; 将所有缓冲区的制表符宽度设置为 4

有谁看到我做错了什么?

谢谢!