Emacs: Stop popup window for gpg passphrase [closed]

情到浓时终转凉″ 提交于 2019-12-06 03:33:07

问题


emacs is annoyingly popping up window and asking for pass phrase whenever I open a encrypted file (somefile.gpg, .authinfo.gpg). I would like it instead ask me for password in minibuffer.

is there any configuration option for that.?

Edit: Important to note, if I press escape on popup window, emacs will ask for password in minibuffer. So there is fallback exist in emacs, I like to make that fallback method as first choice.

UPDATE: Emacs version: GNU Emacs 24.3.50.12 (x86_64-unknown-linux-gnu, GTK+ Version 3.4.2) of 2013-05-28 on sealion


回答1:


Now I placed the following in .emacs which is finally disabling the gui prompt.

;; Do not use gpg agent when runing in terminal
(defadvice epg--start (around advice-epg-disable-agent activate)
  (let ((agent (getenv "GPG_AGENT_INFO")))
    (setenv "GPG_AGENT_INFO" nil)
    ad-do-it
    (setenv "GPG_AGENT_INFO" agent)))



回答2:


The comments on gpg-agent in C-h f epg-context-set-passphrase-callback RET look relevant, and I can see there is plenty of related discussion and apparent workarounds for this on the Emacs Wiki, under the heading "How to use a non-graphical password prompt for gpg":

http://emacswiki.org/emacs/EasyPG#toc4



来源:https://stackoverflow.com/questions/16826849/emacs-stop-popup-window-for-gpg-passphrase

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!