小编Dre*_*rew的帖子

添加橘子酱作为包源

我正在尝试添加Marmalade作为包源,但是当我这样做时,我得到错误:Symbol's value as variable is void: package-archives.任何人都知道如何解决这个问题?以下是我的.emacs档案.

;;; This was installed by package-install.el.
;;; This provides support for the package system and
;;; interfacing with ELPA, the package archive.
;;; Move this code earlier if you want to reference
;;; packages in your .emacs.
(when
    (load
     (expand-file-name "~/.emacs.d/elpa/package.el"))
  (package-initialize))

(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path  "~/.emacs.d/plugins")
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(add-to-list 'load-path "~/.emacs.d/plugins/groovy")

(require 'package)
(add-to-list 'package-archives
         '("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
Run Code Online (Sandbox Code Playgroud)

安装package.el

我运行了以下代码:

(let ((buffer (url-retrieve-synchronously
           "http://tromey.com/elpa/package-install.el"))) …
Run Code Online (Sandbox Code Playgroud)

emacs emacs23 elpa

21
推荐指数
1
解决办法
1万
查看次数

存储过程的缺点

想获得使用存储过程的优缺点列表.SP的主要优点似乎是预编译并从应用程序中抽象出数据.给我你的想法....

database database-design stored-procedures sql-server-2005

20
推荐指数
6
解决办法
5万
查看次数

什么是我的.emacs中的自定义变量和面孔?

这是我的.emacs我可以搞乱它吗?

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there …
Run Code Online (Sandbox Code Playgroud)

emacs dot-emacs emacs-faces

20
推荐指数
3
解决办法
2万
查看次数

19
推荐指数
2
解决办法
10万
查看次数

在不活动期间隐藏Emacs回显区域

回声区是在模式线以下的Emacs底部的线:

                     ~                       ~
                     |                       |
                     +-----------------------+
                     |-U:--- mode-line       |
                     +-----------------------+
                     | M-x echo-area         |
                     +-----------------------+
Run Code Online (Sandbox Code Playgroud)

现在模式线是高度可定制的,而回声区域更加严格(并且很多时候都没有使用).问题很简单:是否可以在不活动期间隐藏回声区域,并在需要注意时重新显示它:

  ~                       ~             ~                       ~
  |                       |             |                       |
  |                       |             +-----------------------+
  |                       |             |-U:--- mode-line       |
  +-----------------------+             +-----------------------+
  |-U:--- mode-line       |             | M-x echo-area         |
  +-----------------------+             +-----------------------+

          Inactive                                Active
Run Code Online (Sandbox Code Playgroud)

这类似于当您将mose悬停在链接上时Google Chrome显示网址的方式,以及默认情况下隐藏命令行的Firefox插件Pentadactyl.

emacs appearance

19
推荐指数
3
解决办法
3701
查看次数

emacs全局放大/缩小

我知道我可以使用Cx C- +进行放大/缩小,但这仅适用于当前文件.一旦我打开另一个文本,文本就会回到默认值,并且一遍又一遍地执行它真的很烦人.如何为当前的emacs会话保持全局缩放级别?

我知道如果你知道确切的字体大小,我可以在init文件中设置它,我不知道.另外,我不想让它保持永久性 - 我通常需要这个,当我没有外部屏幕几个小时或连接到投影仪同时进行演示时.

emacs font-size zooming

19
推荐指数
4
解决办法
5434
查看次数

如何强制Emacs不在特定窗口中显示缓冲区?

我的Windows配置如下所示:

          +----------+-----------+
      |          |           |
      |          |           |
      |          |           |
      |          |           |
      |          |           |
      |          +-----------+
      |          |           |
      +----------+-----------+
Run Code Online (Sandbox Code Playgroud)

我使用右下方的窗口进行特殊显示(如帮助,完成等),但是当我调用使用的命令(find-file-other-window等等)时,emacs仍坚持使用该窗口display-buffer,并调整该窗口的大小.这很烦人......有没有办法可以强制emacs不要使用那个窗口?我在考虑建议display-buffer,但这是c中的一个功能.有什么想法吗?

编辑:

基于Trey的答案,这对我来说是有用的:

(setq special-display-function 'my-display-buffer)
(setq special-display-regexps '(".*"))

(defun display-special-buffer (buf)
  "put the special buffers in the right spot (bottom rigt)"
    (let ((target-window (window-at (- (frame-width) 4) (- (frame-height) 4)))
          (pop-up-windows t))
      (set-window-buffer target-window buf)
      target-window))

(defun my-display-buffer (buf)
  "put all buffers in a window other than the one in …
Run Code Online (Sandbox Code Playgroud)

lisp emacs elisp advising-functions

18
推荐指数
1
解决办法
3890
查看次数

在Emacs中,如何在具有字体外观属性的迷你缓冲区中显示消息?

我想在迷你缓冲区中显示彩色的文本字符串,但是当我使用'message'函数时,文本属性被剥离.

emacs elisp font-lock minibuffer emacs-faces

18
推荐指数
1
解决办法
2806
查看次数

存储过程和单元测试

是否有人知道使用SQL对存储过程进行单元测试的框架(或方法),并能够生成合理的报告,告知已经过了什么和失败了什么(类似于CPPUnit)?

regex mysql unit-testing stored-procedures database-testing

18
推荐指数
1
解决办法
2956
查看次数

emacs橘子酱:"无法打开加载文件","包"

我正在使用emacs 24并想安装橘子酱.

我已~/.emacs按照http://marmalade-repo.org/上的说明尝试将以下内容添加到我的文件中:

(require 'package)
(add-to-list 'package-archives 
    '("marmalade" .
      "http://marmalade-repo.org/packages/"))
(package-initialize)
Run Code Online (Sandbox Code Playgroud)

当我尝试重新加载电子mac时,我收到错误:

Error in init file: File error: "Cannot open load file", "package".
Run Code Online (Sandbox Code Playgroud)

可能有什么问题?

emacs elisp marmalade

18
推荐指数
2
解决办法
1万
查看次数