unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daiki Ueno <ueno@unixuser.org>
To: "Dan Nicolaescu" <dann@ics.uci.edu>
Cc: Michael Olson <mwolson@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: patch to include EasyPG to Emacs
Date: Mon, 11 Feb 2008 15:30:54 +0900	[thread overview]
Message-ID: <87odaongwx.fsf@broken.deisui.org> (raw)
In-Reply-To: <54a15d860802101534h37b953b7i7061123ae83e4dec@mail.gmail.com> (Daiki Ueno's message of "Mon, 11 Feb 2008 08:34:09 +0900")

Here is up-to-date patch.  It does:

- remove the installation instruction from epa.texi at all,
- rename the menu label "EasyPG Assistant" to "Encryption/Decryption",
- merge epa-menu-mode into epa-mode, and
- define a minor mode for dired instead of directly modifying the keymap.

Thanks Dan for the suggestions.

Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.12763
diff -c -r1.12763 ChangeLog
*** lisp/ChangeLog	11 Feb 2008 04:11:00 -0000	1.12763
--- lisp/ChangeLog	11 Feb 2008 06:21:19 -0000
***************
*** 1,3 ****
--- 1,13 ----
+ 2008-02-11  Daiki Ueno  <ueno@unixuser.org>
+ 
+ 	* epa.el (epa-menu-mode): Merge into epa-mode.
+ 	(epa-menu-items): Rename the label "EasyPG Assistant" to
+ 	"Encryption/Decryption".
+ 
+ 	* epa-dired.el: Define a new minor-mode epa-dired-mode for dired.
+ 	(epa-dired-mode-map): Renamed from epa-dired-map.
+ 	(epa-global-dired-mode): Renamed the global minor mode.
+ 
  2008-02-11  Glenn Morris  <rgm@gnu.org>
  
  	* progmodes/compile.el (compilation-error-regexp-alist-alist):
Index: lisp/epa-dired.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa-dired.el,v
retrieving revision 1.4
diff -c -r1.4 epa-dired.el
*** lisp/epa-dired.el	10 Feb 2008 20:57:46 -0000	1.4
--- lisp/epa-dired.el	11 Feb 2008 06:21:19 -0000
***************
*** 26,43 ****
  (require 'epa)
  (require 'dired)
  
! (defvar epa-dired-map
    (let ((keymap (make-sparse-keymap)))
!     (define-key keymap "d" 'epa-dired-do-decrypt)
!     (define-key keymap "v" 'epa-dired-do-verify)
!     (define-key keymap "s" 'epa-dired-do-sign)
!     (define-key keymap "e" 'epa-dired-do-encrypt)
      keymap))
  
! (fset 'epa-dired-prefix epa-dired-map)
  
! (defun epa-dired-mode-hook ()
!   (define-key dired-mode-map ":" 'epa-dired-prefix))
  
  (defun epa-dired-do-decrypt ()
    "Decrypt marked files."
--- 26,47 ----
  (require 'epa)
  (require 'dired)
  
! (defvar epa-dired-mode-map
    (let ((keymap (make-sparse-keymap)))
!     (define-key keymap ":d" 'epa-dired-do-decrypt)
!     (define-key keymap ":v" 'epa-dired-do-verify)
!     (define-key keymap ":s" 'epa-dired-do-sign)
!     (define-key keymap ":e" 'epa-dired-do-encrypt)
      keymap))
  
! (defvar epa-dired-mode-hook nil)
! (defvar epa-dired-mode-on-hook nil)
! (defvar epa-dired-mode-off-hook nil)
  
! ;;;###autoload
! (define-minor-mode epa-dired-mode
!   "A minor-mode for encrypt/decrypt files with Dired."
!   nil " epa-dired" epa-dired-mode-map)
  
  (defun epa-dired-do-decrypt ()
    "Decrypt marked files."
***************
*** 83,94 ****
      (revert-buffer)))
  
  ;;;###autoload
! (define-minor-mode epa-dired-mode
    "Minor mode to hook EasyPG into Dired."
    :global t :init-value nil :group 'epa-dired :version "23.1"
!   (remove-hook 'dired-mode-hook 'epa-dired-mode-hook)
!   (if epa-dired-mode
!       (add-hook 'dired-mode-hook 'epa-dired-mode-hook)))
  
  (provide 'epa-dired)
  
--- 87,98 ----
      (revert-buffer)))
  
  ;;;###autoload
! (define-minor-mode epa-global-dired-mode
    "Minor mode to hook EasyPG into Dired."
    :global t :init-value nil :group 'epa-dired :version "23.1"
!   (remove-hook 'dired-mode-hook 'epa-dired-mode)
!   (if epa-global-dired-mode
!       (add-hook 'dired-mode-hook 'epa-dired-mode)))
  
  (provide 'epa-dired)
  
Index: lisp/epa.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/epa.el,v
retrieving revision 1.5
diff -c -r1.5 epa.el
*** lisp/epa.el	10 Feb 2008 21:59:27 -0000	1.5
--- lisp/epa.el	11 Feb 2008 06:21:19 -0000
***************
*** 45,54 ****
    :type 'integer
    :group 'epa)
  
! (defcustom epa-global-minor-modes '(epa-dired-mode
! 				    epa-file-mode
  				    epa-global-mail-mode
! 				    epa-menu-mode)
    "Globally defined minor modes to hook into other modes."
    :type '(repeat symbol)
    :group 'epa)
--- 45,53 ----
    :type 'integer
    :group 'epa)
  
! (defcustom epa-global-minor-modes '(epa-global-dired-mode
  				    epa-global-mail-mode
! 				    epa-file-mode)
    "Globally defined minor modes to hook into other modes."
    :type '(repeat symbol)
    :group 'epa)
***************
*** 240,246 ****
  (defvar epa-menu nil)
  
  (defconst epa-menu-items
!   '("EasyPG Assistant"
      ("Decrypt"
       ["File" epa-decrypt-file
        :help "Decrypt a file"]
--- 239,245 ----
  (defvar epa-menu nil)
  
  (defconst epa-menu-items
!   '("Encryption/Decryption"
      ("Decrypt"
       ["File" epa-decrypt-file
        :help "Decrypt a file"]
***************
*** 1220,1247 ****
  ;; (make-obsolete 'epa-sign-keys "Do not use.")
  
  ;;;###autoload
- (define-minor-mode epa-menu-mode
-   "Minor mode to hook EasyPG into the menu-bar."
-   :global t :init-value nil :group 'epa :version "23.1"
-   (unless epa-menu
-     (easy-menu-define epa-menu nil "EasyPG Assistant global menu"
-       epa-menu-items))
-   (easy-menu-remove-item nil '("Tools") "EasyPG Assistant")
-   (if epa-menu-mode
-       (easy-menu-add-item nil '("Tools") epa-menu)))
- 
- ;;;###autoload
  (define-minor-mode epa-mode
    "Minor mode to hook EasyPG into various modes.
  See `epa-global-minor-modes'."
    :global t :init-value nil :group 'epa :version "23.1"
    (let ((modes epa-global-minor-modes)
  	symbol)
      (while modes
        (setq symbol (car modes))
        (if (and symbol
  	       (fboundp symbol))
! 	  (funcall symbol (if epa-mode 1 0))
  	(message "`%S' not found" (car modes)))
        (setq modes (cdr modes)))))
  
--- 1219,1241 ----
  ;; (make-obsolete 'epa-sign-keys "Do not use.")
  
  ;;;###autoload
  (define-minor-mode epa-mode
    "Minor mode to hook EasyPG into various modes.
  See `epa-global-minor-modes'."
    :global t :init-value nil :group 'epa :version "23.1"
+   (unless epa-menu
+     (easy-menu-define epa-menu nil "EasyPG Assistant global menu"
+       epa-menu-items))
+   (easy-menu-remove-item nil '("Tools") "Encryption/Decryption")
+   (if epa-mode
+       (easy-menu-add-item nil '("Tools") epa-menu))
    (let ((modes epa-global-minor-modes)
  	symbol)
      (while modes
        (setq symbol (car modes))
        (if (and symbol
  	       (fboundp symbol))
! 	  (funcall symbol epa-mode)
  	(message "`%S' not found" (car modes)))
        (setq modes (cdr modes)))))
  
Index: doc/misc/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/ChangeLog,v
retrieving revision 1.91
diff -c -r1.91 ChangeLog
*** doc/misc/ChangeLog	10 Feb 2008 20:57:44 -0000	1.91
--- doc/misc/ChangeLog	11 Feb 2008 06:21:19 -0000
***************
*** 1,3 ****
--- 1,7 ----
+ 2008-02-11  Daiki Ueno  <ueno@unixuser.org>
+ 
+ 	* epa.texi (Quick start): Remove the .emacs setting.
+ 
  2008-02-10  Daiki Ueno  <ueno@unixuser.org>
  
  	* epa.texi (Quick start): Use the command `epa-enable' instead of
Index: doc/misc/epa.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/epa.texi,v
retrieving revision 1.3
diff -c -r1.3 epa.texi
*** doc/misc/epa.texi	10 Feb 2008 20:57:44 -0000	1.3
--- doc/misc/epa.texi	11 Feb 2008 06:21:19 -0000
***************
*** 77,112 ****
  @node  Quick start
  @chapter Quick start
  
! @c To install, just follow the standard CMMI installation instructions.
! 
! @c @cartouche
! @c @example
! @c $ ./configure
! @c $ sudo make install
! @c @end example
! @c @end cartouche
! 
! @c @noindent
! @c Then, add the following line to your @file{~/.emacs}
! 
! Add the following line to your @file{~/.emacs}.
! 
! @cartouche
! @lisp
! (epa-mode 1)
! @end lisp
! @end cartouche
! 
! @noindent
! Restart emacs and type @kbd{M-x epa- @key{TAB}}, and you will see a
! lot of commands available.  For example,
  
  @itemize @bullet
  @item To browse your keyring, type @kbd{M-x epa-list-keys}
  
  @item To create a cleartext signature of the region, type @kbd{M-x epa-sign-region}
  @end itemize
  
  @node Commands
  @chapter Commands
  
--- 77,99 ----
  @node  Quick start
  @chapter Quick start
  
! EasyPG Assistant commands are prefixed by @samp{epa-}.  For example,
  
  @itemize @bullet
  @item To browse your keyring, type @kbd{M-x epa-list-keys}
  
  @item To create a cleartext signature of the region, type @kbd{M-x epa-sign-region}
+ 
+ @item To encrypt a file, type @kbd{M-x epa-encrypt-file}
  @end itemize
  
+ EasyPG Assistant provides several cryptographic features which can be
+ integrated into other Emacs functionalities.  For example, automatic
+ encryption/decryption of @samp{*.gpg} files.
+ 
+ To install these features, do @kbd{C-u 1 M-x epa-mode}.  It can also
+ be turned on by customize.  Try @kbd{M-x customize-variable epa-mode}.
+ 
  @node Commands
  @chapter Commands
  
Regards,
-- 
Daiki Ueno




  reply	other threads:[~2008-02-11  6:30 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-07  4:58 patch to include EasyPG to Emacs Daiki Ueno
2008-02-07  5:13 ` Dan Nicolaescu
2008-02-07  9:28   ` Daiki Ueno
2008-02-07 16:24     ` Leo
2008-02-08  4:42       ` Daiki Ueno
2008-02-08  7:15     ` Dan Nicolaescu
2008-02-08  4:14 ` Richard Stallman
2008-02-08  7:03 ` Michael Olson
2008-02-10  7:04   ` Daiki Ueno
2008-02-10 15:44     ` Stefan Monnier
2008-02-10 19:15       ` Daiki Ueno
2008-02-10 19:30         ` Daiki Ueno
2008-02-10 20:58           ` Michael Olson
2008-02-10 21:29             ` Daiki Ueno
2008-02-11  0:03               ` Michael Olson
2008-02-10 19:46         ` Stefan Monnier
2008-02-10 22:36         ` Dan Nicolaescu
2008-02-10 23:34           ` Daiki Ueno
2008-02-11  6:30             ` Daiki Ueno [this message]
2008-02-12  1:24               ` Michael Olson
2008-02-12  3:48               ` Dan Nicolaescu
2008-02-12  6:04                 ` Daiki Ueno
2008-02-12 17:45                 ` Richard Stallman
2008-02-13 17:28                   ` Dan Nicolaescu
2008-02-14  4:43                     ` Richard Stallman
2008-02-14 11:26                       ` Daiki Ueno
2008-02-14 15:37                         ` Sascha Wilde
2008-02-14 18:43                           ` Daiki Ueno
2008-02-15 10:07                             ` Sascha Wilde
2008-02-15 17:05                               ` Daiki Ueno
2008-02-15 18:34                                 ` Sascha Wilde
2008-02-16  5:53                               ` Richard Stallman
2008-02-16 10:25                                 ` Jan Djärv
2008-02-16 11:16                                   ` Andreas Schwab
2008-02-16 23:00                                     ` Jeremy Maitin-Shepard
2008-02-17 20:29                                       ` Richard Stallman
2008-02-17 13:23                                   ` Richard Stallman
2008-02-18  6:58                                     ` Jan Djärv
2008-02-18  7:11                                       ` Miles Bader
2008-02-15  0:02                         ` Richard Stallman
2008-02-15  2:20                           ` Daiki Ueno
2008-02-18  8:55                         ` auto-encryption-mode, etc. (Re: " Daiki Ueno
2008-02-18 17:30                           ` Richard Stallman
2008-02-18 19:51                           ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87odaongwx.fsf@broken.deisui.org \
    --to=ueno@unixuser.org \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=mwolson@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).