(or (next-single-property-change point 'epa-list-keys)
(point-max)))
(goto-char point))
- (epa-insert-keys context name mode)
+ (epa--insert-keys context name mode)
(epa-keys-mode)
(widget-setup)
(set-keymap-parent (current-local-map) widget-keymap))
(goto-char (point-min))
(pop-to-buffer (current-buffer)))
-(defun epa-insert-keys (context name mode)
+(defun epa--insert-keys (context name mode)
(save-excursion
(save-restriction
(narrow-to-region (point) (point))
(insert "\n\n")
(if names
(while names
- (epa-insert-keys context (car names) secret)
+ (epa--insert-keys context (car names) secret)
(if (get-text-property (point) 'epa-list-keys)
(epa-mark))
(goto-char (point-max))
(setq names (cdr names)))
(if secret
(progn
- (epa-insert-keys context nil secret)
+ (epa--insert-keys context nil secret)
(if (get-text-property (point) 'epa-list-keys)
(epa-mark)))
- (epa-insert-keys context nil nil)))
+ (epa--insert-keys context nil nil)))
(epa-keys-mode)
(widget-setup)
(set-keymap-parent (current-local-map) widget-keymap)
(save-excursion
(let ((context (epg-make-context))
signature)
- (epg-context-set-armor context epa-armor)
- (epg-context-set-textmode context epa-textmode)
+ ;;(epg-context-set-armor context epa-armor)
+ (epg-context-set-armor context t)
+ ;;(epg-context-set-textmode context epa-textmode)
+ (epg-context-set-textmode context t)
(epg-context-set-signers context signers)
(epg-context-set-passphrase-callback context
#'epa-passphrase-callback-function)
(save-excursion
(let ((context (epg-make-context))
cipher)
- (epg-context-set-armor context epa-armor)
- (epg-context-set-textmode context epa-textmode)
+ ;;(epg-context-set-armor context epa-armor)
+ (epg-context-set-armor context t)
+ ;;(epg-context-set-textmode context epa-textmode)
+ (epg-context-set-textmode context t)
(epg-context-set-passphrase-callback context
#'epa-passphrase-callback-function)
(epg-context-set-progress-callback context
(message "Exporting to %s...done" (file-name-nondirectory file))))
;;;###autoload
+(defun epa-insert-keys (keys)
+ "Insert selected KEYS after the point.
+
+Don't use this command in Lisp programs!"
+ (interactive
+ (list (epa-select-keys (epg-make-context) "Select keys to export. ")))
+ (let ((context (epg-make-context)))
+ ;;(epg-context-set-armor context epa-armor)
+ (epg-context-set-armor context t)
+ (insert (epg-export-keys-to-string context keys))))
+
+;;;###autoload
(defun epa-sign-keys (keys &optional local)
"Sign selected KEYS.
If a prefix-arg is specified, the signature is marked as non exportable.