aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorEli Zaretskii2023-07-15 05:30:14 -0400
committerEli Zaretskii2023-07-15 05:30:14 -0400
commit748d2ed5158ebde03094aaf6956b39e5b96b70c7 (patch)
tree29a8490db3410396ceb4047352e67ed6ee230b13 /doc/misc
parentd49669e5d3ddb80c6c722af1097a485ccc867bbe (diff)
parent7ac947f34c745c61f8acc1fe2452a2c720d57a0d (diff)
downloademacs-748d2ed5158ebde03094aaf6956b39e5b96b70c7.tar.gz
emacs-748d2ed5158ebde03094aaf6956b39e5b96b70c7.zip
Merge from origin/emacs-29
7ac947f34c7 ; * src/lisp.h (struct Lisp_Overlay): Update commentary (... 9bc93c7996c Replace duplicate text from epa.texi by a reference 74cc1d27f1f Add basic usage information and fix references f24bdbfaf57 Add concept index, title-case structure titles 0165b50b0ff ; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc... 4cf33b6bd02 ; * doc/misc/modus-themes.org: Fix whitespace (bug#64548). 4821da1ad7f Fix show-paren-mode when the parentheses is partially vis... 419b4d44914 ; Improve documentation of with-restriction be34e8294af ; * admin/git-bisect-start: Update failing commits 8e06809fccd Merge branch 'scratch/bug64391' into emacs-29 dbac8076057 * lisp/net/tramp.el (tramp-get-buffer-string): Stabilize. 01fb898420f Simplify after adding internal function to enter a labele... b741dc7fcde Add internal function to enter a labeled restriction # Conflicts: # doc/misc/modus-themes.org
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/auth.texi43
-rw-r--r--doc/misc/epa.texi295
-rw-r--r--doc/misc/modus-themes.org40
3 files changed, 268 insertions, 110 deletions
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 03484950e01..7b4e8fcfb39 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -675,43 +675,12 @@ before @file{~/.authinfo}, the auth-source library will try to
675read the GnuPG encrypted @file{.gpg} file first, before 675read the GnuPG encrypted @file{.gpg} file first, before
676the unencrypted file. 676the unencrypted file.
677 677
678There is an option @code{auto-encryption-mode} to automatically 678The EasyPG Assistant, which comes bundled with Emacs, handles
679decrypt @file{*.gpg} files. It is enabled by default. 679decryption of encrypted files automatically, see @ref{Top, , Top, epa,
680 680EasyPG Assistant User's Manual}. It is an Emacs user interface to
681If you want your GnuPG passwords to be cached, set up @code{gpg-agent} 681@acronym{GnuPG, GNU Privacy Guard}, see @ref{Top, , Top, gnupg, Using
682or EasyPG Assistant 682the GNU Privacy Guard}. To get started with these quickly, see
683(@pxref{Caching Passphrases, , Caching Passphrases, epa}). 683@ref{Quick start, , Quick Start, epa, EasyPG Assistant User's Manual}.
684
685To quick start, here are some questions:
686
687@itemize
688@item
689Do you use GnuPG version 2 instead of GnuPG version 1?
690@item
691Do you use symmetric encryption rather than public key encryption?
692@item
693Do you want to use gpg-agent?
694@end itemize
695
696Here are configurations depending on your answers:
697
698@multitable {111} {222} {333} {configuration configuration configuration}
699@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
700@item Yes @tab Yes @tab Yes @tab Set up gpg-agent.
701@item Yes @tab Yes @tab No @tab You can't, without gpg-agent.
702@item Yes @tab No @tab Yes @tab Set up gpg-agent.
703@item Yes @tab No @tab No @tab You can't, without gpg-agent.
704@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
705@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
706@item No @tab No @tab Yes @tab Set up gpg-agent.
707@item No @tab No @tab No @tab You can't, without gpg-agent.
708@end multitable
709
710To set up gpg-agent, follow the instruction in GnuPG manual
711(@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}).
712
713To set up elisp passphrase cache, set
714@code{epa-file-cache-passphrase-for-symmetric-encryption}.
715 684
716@node GNU Free Documentation License 685@node GNU Free Documentation License
717@appendix GNU Free Documentation License 686@appendix GNU Free Documentation License
diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi
index 6f63a3d7ba0..917fd588593 100644
--- a/doc/misc/epa.texi
+++ b/doc/misc/epa.texi
@@ -43,7 +43,10 @@ modify this GNU manual.''
43@contents 43@contents
44 44
45@node Top 45@node Top
46@top EasyPG Assistant user's manual 46@top EasyPG Assistant User's Manual
47@cindex easypg assistant
48@cindex gnu privacy guard
49@cindex gnupg
47 50
48EasyPG Assistant is an Emacs user interface to GNU Privacy Guard 51EasyPG Assistant is an Emacs user interface to GNU Privacy Guard
49(GnuPG, @pxref{Top, , Top, gnupg, Using the GNU Privacy Guard}). 52(GnuPG, @pxref{Top, , Top, gnupg, Using the GNU Privacy Guard}).
@@ -56,14 +59,22 @@ called EasyPG Library.
56@insertcopying 59@insertcopying
57@end ifnottex 60@end ifnottex
58 61
62@c Unfortunately the node names of this manual are not very consistent
63@c w.r.t. their case. However, case is significant in node names, so
64@c we probably better should not change these to not break any
65@c external references. Things are more relaxed for structure titles,
66@c so we consistently updated them to title-case.
67
59@menu 68@menu
60* Overview:: 69* Overview::
61* Quick start:: 70* Quick start::
62* Commands:: 71* Commands::
63* GnuPG version compatibility:: 72* GnuPG version compatibility::
73* GnuPG Pinentry::
64* Caching Passphrases:: 74* Caching Passphrases::
65* Bug Reports:: 75* Bug Reports::
66* GNU Free Documentation License:: The license for this documentation. 76* GNU Free Documentation License:: The license for this documentation.
77* Concept Index::
67* Key Index:: 78* Key Index::
68* Function Index:: 79* Function Index::
69* Variable Index:: 80* Variable Index::
@@ -71,8 +82,10 @@ called EasyPG Library.
71 82
72@node Overview 83@node Overview
73@chapter Overview 84@chapter Overview
85@cindex features of easypg assistant
74 86
75EasyPG Assistant provides the following features. 87EasyPG Assistant is an Emacs frontend application to @acronym{GnuPG,
88GNU Privacy Guard} that provides the following features:
76 89
77@itemize @bullet 90@itemize @bullet
78@item Key management. 91@item Key management.
@@ -84,7 +97,24 @@ EasyPG Assistant provides the following features.
84@end itemize 97@end itemize
85 98
86@node Quick start 99@node Quick start
87@chapter Quick start 100@chapter Quick Start
101@cindex introduction to easypg assistant
102@cindex gnupg documentation
103@cindex documentation on gnupg
104@cindex configuration of gnupg
105@cindex introduction to gnupg
106
107You can use EasyPG Assistant without any Emacs or GnuPG configuration
108whatsoever, for example to encrypt and decrypt files automatically
109with symmetric encryption, see @ref{Encrypting/decrypting gpg files}.
110However, to use the full set of EasyPG Assistant's functions you
111should have at least some minimum GnuPG configuration in place.
112
113John Michael Ashley's GNU Privacy Handbook, available online as part
114of @uref{https://gnupg.org/documentation/guides.html, the GnuPG user
115guides}, provides an introduction to GnuPG use and configuration. In
116contrast to that, the GnuPG manual (@pxref{Top, , Top, gnupg, Using
117the GNU Privacy Guard}) is more of a reference manual.
88 118
89EasyPG Assistant commands are prefixed by @samp{epa-}. For example, 119EasyPG Assistant commands are prefixed by @samp{epa-}. For example,
90 120
@@ -118,7 +148,11 @@ This chapter introduces various commands for typical use cases.
118@end menu 148@end menu
119 149
120@node Key management 150@node Key management
121@section Key management 151@section Key Management
152@cindex key management
153
154@cindex key ring, browsing
155@cindex browse key ring
122Probably the first step of using EasyPG Assistant is to browse your 156Probably the first step of using EasyPG Assistant is to browse your
123keyring. @kbd{M-x epa-list-keys} is corresponding to @samp{gpg 157keyring. @kbd{M-x epa-list-keys} is corresponding to @samp{gpg
124--list-keys} from the command line. 158--list-keys} from the command line.
@@ -157,6 +191,7 @@ about the key you selected.
157 Fingerprint: 9003 D76B 73B7 4A8A E588 10AF 4447 461B 2A9B EA2D 191 Fingerprint: 9003 D76B 73B7 4A8A E588 10AF 4447 461B 2A9B EA2D
158@end example 192@end example
159 193
194@cindex private key ring, browsing
160@noindent 195@noindent
161To browse your private keyring, use @kbd{M-x epa-list-secret-keys}. 196To browse your private keyring, use @kbd{M-x epa-list-secret-keys}.
162 197
@@ -172,12 +207,14 @@ to select keys, type @kbd{o}, and then supply the filename.
172Below are other commands related to key management. Some of them take 207Below are other commands related to key management. Some of them take
173a file as input/output, and others take the current region. 208a file as input/output, and others take the current region.
174 209
210@cindex insert keys
175@deffn Command epa-insert-keys keys 211@deffn Command epa-insert-keys keys
176Insert selected @var{keys} after the point. It will let you select 212Insert selected @var{keys} after the point. It will let you select
177keys before insertion. By default, it will encode keys in the OpenPGP 213keys before insertion. By default, it will encode keys in the OpenPGP
178armor format. 214armor format.
179@end deffn 215@end deffn
180 216
217@cindex import keys
181@deffn Command epa-import-keys file 218@deffn Command epa-import-keys file
182Import keys from @var{file} to your keyring. 219Import keys from @var{file} to your keyring.
183@end deffn 220@end deffn
@@ -195,14 +232,18 @@ Import keys in the OpenPGP armor format in the current region between
195applies @code{epa-import-keys-region} to each of them. 232applies @code{epa-import-keys-region} to each of them.
196@end deffn 233@end deffn
197 234
235@cindex delete keys
198@deffn Command epa-delete-keys allow-secret 236@deffn Command epa-delete-keys allow-secret
199Delete selected keys. If @var{allow-secret} is non-@code{nil}, it 237Delete selected keys. If @var{allow-secret} is non-@code{nil}, it
200also delete the secret keys. 238also delete the secret keys.
201@end deffn 239@end deffn
202 240
203@node Cryptographic operations on regions 241@node Cryptographic operations on regions
204@section Cryptographic operations on regions 242@section Cryptographic Operations on Regions
243@cindex cryptographic operations on regions
244@cindex region operations, cryptographic
205 245
246@cindex decrypt region
206@deffn Command epa-decrypt-region start end 247@deffn Command epa-decrypt-region start end
207Decrypt the current region between @var{start} and @var{end}. It 248Decrypt the current region between @var{start} and @var{end}. It
208replaces the region with the decrypted text. 249replaces the region with the decrypted text.
@@ -216,6 +257,7 @@ and applies @code{epa-decrypt-region} to each of them. That is, this
216command does not alter the original text around armors. 257command does not alter the original text around armors.
217@end deffn 258@end deffn
218 259
260@cindex verify region
219@deffn Command epa-verify-region start end 261@deffn Command epa-verify-region start end
220Verify the current region between @var{start} and @var{end}. It sends 262Verify the current region between @var{start} and @var{end}. It sends
221the verification result to the minibuffer or a popup window. It 263the verification result to the minibuffer or a popup window. It
@@ -231,6 +273,7 @@ searches OpenPGP cleartext blocks in the region and applies
231not alter the original text around OpenPGP cleartext blocks. 273not alter the original text around OpenPGP cleartext blocks.
232@end deffn 274@end deffn
233 275
276@cindex sign region
234@deffn Command epa-sign-region start end signers type 277@deffn Command epa-sign-region start end signers type
235Sign the current region between @var{start} and @var{end}. By 278Sign the current region between @var{start} and @var{end}. By
236default, it creates a cleartext signature. If a prefix argument is 279default, it creates a cleartext signature. If a prefix argument is
@@ -238,6 +281,7 @@ given, it will let you select signing keys, and then a signature
238type. 281type.
239@end deffn 282@end deffn
240 283
284@cindex encrypt region
241@deffn Command epa-encrypt-region start end recipients sign signers 285@deffn Command epa-encrypt-region start end recipients sign signers
242Encrypt the current region between @var{start} and @var{end}. It will 286Encrypt the current region between @var{start} and @var{end}. It will
243let you select recipients. If a prefix argument is given, it will 287let you select recipients. If a prefix argument is given, it will
@@ -246,28 +290,37 @@ you answered yes, it will let you select the signing keys.
246@end deffn 290@end deffn
247 291
248@node Cryptographic operations on files 292@node Cryptographic operations on files
249@section Cryptographic operations on files 293@section Cryptographic Operations on Files
294@cindex cryptographic operations on files
295@cindex file operations, cryptographic
250 296
297@cindex decrypt file
251@deffn Command epa-decrypt-file file &optional output 298@deffn Command epa-decrypt-file file &optional output
252Decrypt @var{file}. If you do not specify the name @var{output} to 299Decrypt @var{file}. If you do not specify the name @var{output} to
253use for the decrypted file, this function prompts for the value to use. 300use for the decrypted file, this function prompts for the value to use.
254@end deffn 301@end deffn
255 302
303@cindex verify file
256@deffn Command epa-verify-file file 304@deffn Command epa-verify-file file
257Verify @var{file}. 305Verify @var{file}.
258@end deffn 306@end deffn
259 307
308@cindex sign file
260@deffn Command epa-sign-file file signers type 309@deffn Command epa-sign-file file signers type
261Sign @var{file}. If a prefix argument is given, it will let you 310Sign @var{file}. If a prefix argument is given, it will let you
262select signing keys, and then a signature type. 311select signing keys, and then a signature type.
263@end deffn 312@end deffn
264 313
314@cindex encrypt file
265@deffn Command epa-encrypt-file file recipients 315@deffn Command epa-encrypt-file file recipients
266Encrypt @var{file}. It will let you select recipients. 316Encrypt @var{file}. It will let you select recipients.
267@end deffn 317@end deffn
268 318
269@node Dired integration 319@node Dired integration
270@section Dired integration 320@section Dired Integration
321@cindex dired integration
322@cindex directory operations
323@cindex multiple file operations
271 324
272EasyPG Assistant extends Dired Mode for GNU Emacs to allow users to 325EasyPG Assistant extends Dired Mode for GNU Emacs to allow users to
273easily do cryptographic operations on files. For example, 326easily do cryptographic operations on files. For example,
@@ -306,7 +359,9 @@ Encrypt marked files.
306@end table 359@end table
307 360
308@node Mail-mode integration 361@node Mail-mode integration
309@section Mail-mode integration 362@section Mail-Mode Integration
363@cindex mail-mode integration
364@cindex sending signed/encrypted mails
310 365
311EasyPG Assistant provides a minor mode @code{epa-mail-mode} to help 366EasyPG Assistant provides a minor mode @code{epa-mail-mode} to help
312user compose inline OpenPGP messages. Inline OpenPGP is a traditional 367user compose inline OpenPGP messages. Inline OpenPGP is a traditional
@@ -361,13 +416,56 @@ whether to sign, and which key(s) to sign with.
361@end table 416@end table
362 417
363@node Encrypting/decrypting gpg files 418@node Encrypting/decrypting gpg files
364@section Encrypting/decrypting gpg files 419@section Encrypting and Decrypting gpg Files
420@cindex encrypting gpg files
421@cindex decrypting gpg files
422@cindex gpg files, encrypting and decrypting
423@cindex automatic file encryption and decryption
424
365By default, every file whose name ends with @file{.gpg} will be 425By default, every file whose name ends with @file{.gpg} will be
366treated as encrypted. That is, when you open such a file, the 426treated as encrypted. That is, when you open such a file, the
367decrypted text is inserted in the buffer rather than encrypted one. 427decrypted text is inserted in the buffer rather than encrypted one.
368Similarly, when you save the buffer to a @file{foo.gpg} file, 428Similarly, when you save the buffer to a @file{foo.gpg} file,
369encrypted data is written. 429encrypted data is written.
370 430
431When you save a buffer to an encrypted file for the first time, EasyPG
432Assistant presents you a list of keys in a buffer @file{*Keys*} where
433you can select recipients for encryption. @xref{Key management}, for
434a description of the format of that buffer. You can streamline this
435recipient selection step by customizing variables
436@code{epa-file-encrypt-to} and @code{epa-file-select-keys} described
437further below in this section.
438
439@cindex symmetric encryption, passphrase entry for
440If you do not select any recipient during this step, EasyPG Assistant
441uses symmetric encryption. As a consequence, you have to enter the
442passphrase twice for every buffer save and every so often for file
443reads, since the GnuPG Agent caches your passphrase for file reads at
444least for some time, but not for buffer saves. @xref{Caching
445Passphrases}, for more information.
446
447@cindex public key encryption, passphrase entry for
448If you have created your own keypair@footnote{For encryption and
449decryption of files you do not intend to share, you do not have to use
450an email address as recipient during creation of the keypair. You can
451also use some free-form string that gives information on the use of
452the keypair, like @code{backup} or @code{account database}.}, you can
453select that as recipient, and EasyPG Assistant will use public key
454encryption for that file. Since GnuPG performs encryption with your
455public key, it does not prompt for a passphrase for the buffer save,
456but it will prompt for your passphrase for file reads every now and
457then, depending on the GnuPG Agent cache configuration.
458
459@cindex tempory files created by easypg assistant
460To encrypt and decrypt files as described above EasyPG Assistant under
461certain circumstances uses intermediate tempory files that contain the
462plain-text contents of the files it processes. EasyPG Assistant
463creates them below the directory returned by function
464@code{temporary-file-directory} (@pxref{Unique File Names, ,
465Generating Unique File Names, elisp, GNU Emacs Lisp Reference
466Manual}). If you want to be sure not to leave any plain-text traces,
467use an encrypted file systems at least for that directory.
468
371The file name pattern for encrypted files can be controlled by 469The file name pattern for encrypted files can be controlled by
372@code{epa-file-name-regexp}. 470@code{epa-file-name-regexp}.
373 471
@@ -404,11 +502,11 @@ You can also change the default behavior with the variable
404Control whether or not to pop up the key selection dialog. 502Control whether or not to pop up the key selection dialog.
405@end defvar 503@end defvar
406 504
407For frequently visited files, it might be a good idea to tell Emacs
408which encryption method should be used through @xref{File Variables, ,
409, emacs, the Emacs Manual}. Use the @code{epa-file-encrypt-to} local
410variable for this.
411@vindex epa-file-encrypt-to 505@vindex epa-file-encrypt-to
506For frequently visited files, it might be a good idea to tell Emacs
507which encryption method should be used through file variables
508(@pxref{File Variables, , Local Variables in Files, emacs, The Emacs
509Editor}). Use the @code{epa-file-encrypt-to} local variable for this.
412 510
413For example, if you want an Elisp file to be encrypted with a 511For example, if you want an Elisp file to be encrypted with a
414public key associated with an email address @samp{ueno@@unixuser.org}, 512public key associated with an email address @samp{ueno@@unixuser.org},
@@ -436,6 +534,11 @@ behavior are below.
436@defvar epa-file-cache-passphrase-for-symmetric-encryption 534@defvar epa-file-cache-passphrase-for-symmetric-encryption
437If non-@code{nil}, cache passphrase for symmetric encryption. The 535If non-@code{nil}, cache passphrase for symmetric encryption. The
438default value is @code{nil}. 536default value is @code{nil}.
537
538For security reasons, this option is turned off by default and not
539recommended to be used. Instead, consider using the GnuPG Agent, which
540in many cases can do the same job, and does it in a safer way.
541@xref{Caching Passphrases}, for more information.
439@end defvar 542@end defvar
440 543
441@defvar epa-file-inhibit-auto-save 544@defvar epa-file-inhibit-auto-save
@@ -444,7 +547,9 @@ The default value is @code{t}.
444@end defvar 547@end defvar
445 548
446@node Querying a key server 549@node Querying a key server
447@section Querying a key server 550@section Querying a Key Server
551@cindex query key server
552@cindex key server, querying
448 553
449The @code{epa-search-keys} command can be used to query a 554The @code{epa-search-keys} command can be used to query a
450@acronym{GPG} key server. Emacs will then pop up a buffer that lists 555@acronym{GPG} key server. Emacs will then pop up a buffer that lists
@@ -457,14 +562,23 @@ into your key ring).
457 562
458The @code{epa-keyserver} variable says which server to query. 563The @code{epa-keyserver} variable says which server to query.
459 564
460
461@node GnuPG version compatibility 565@node GnuPG version compatibility
462@chapter GnuPG version compatibility 566@chapter GnuPG Version Compatibility
463 567@cindex gnupg version compatibility
464As of February 2016, there are three active branches of GnuPG: 2.1, 568@cindex version compatibility with gnupg
4652.0, and 1.4. All those branches should work flawlessly with Emacs 569@cindex compatibility with gnupg
466with basic use-cases. They have, however, some incompatible 570
467characteristics, which might be visible when used from Emacs. 571As of June 2023, there are three active branches of GnuPG: 2.4, 2.2,
572and 1.4. GnuPG versions 2.4.1 and later suffer from
573@uref{https://dev.gnupg.org/T6481, GnuPG bug T6481} and are hardly
574usable with Emacs. There is a patch for that bug available at least
575for GnuPG version 2.4.1, which your operating system or distribution
576might provide already. GnuPG 1.4 is considered a legacy version.
577
578Besides that, all of those branches mentioned above should work
579flawlessly with Emacs with basic use-cases. They have, however, some
580incompatible characteristics, which might be visible when used from
581Emacs.
468 582
469@itemize 583@itemize
470@item 584@item
@@ -473,58 +587,127 @@ means, a key created with GnuPG 2.1 is not visible with 1.4.
473 587
474@item 588@item
475GnuPG 2.1 uses a fixed address for the Unix domain socket used to 589GnuPG 2.1 uses a fixed address for the Unix domain socket used to
476communicate with gpg-agent. The @code{GPG_AGENT_INFO} environment 590communicate with @command{gpg-agent}. The @code{GPG_AGENT_INFO}
477variable, which is used by GnuPG 2.0 and 1.4, is ignored. That means, 591environment variable, which is used by GnuPG 2.0 and 1.4, is ignored.
478if your system has both GnuPG 2.1 and 1.4, the gpg command from GnuPG 592That means, if your system has both GnuPG 2.1 and 1.4, the gpg command
4791.4 is not able to use gpg-agent provided by 2.1 (at least out of box). 593from GnuPG 1.4 is not able to use @command{gpg-agent} provided by 2.1
594(at least out of box).
480 595
481@item 596@item
482GnuPG 2.1 (2.1.5 or later) has a mechanism to direct the Pinentry 597GnuPG 2.1 (2.1.5 or later) has a mechanism to direct the Pinentry
483password prompt to the Emacs minibuffer@footnote{To enable this 598password prompt to the Emacs minibuffer. @xref{GnuPG Pinentry}.
484feature, add @samp{allow-emacs-pinentry} to
485@file{~/.gnupg/gpg-agent.conf} and let gpg-agent reload the
486configuration, with: @samp{gpgconf --reload gpg-agent}}, which would
487be useful when you use Emacs remotely or from a text-only terminal.
488That feature is not available in other versions, and more
489specifically, with 2.0 (as of 2.0.29), there is no way to avoid the
490graphical prompt.
491@end itemize 599@end itemize
492 600
601@node GnuPG Pinentry
602@chapter GnuPG Pinentry
603@cindex gnupg pinentry
604@cindex pinentry provided by gnupg
605
606An important component of the GnuPG suite is the Pinentry, which
607allows for secure entry of passphrases requested by GnuPG. GnuPG
608delivers various different programs as Pinentry, ranging from bland
609TTY-only @command{pinentry-tty} to fancy graphical dialogs for various
610desktop environments, like @command{pinentry-gnome3}. Your operating
611system usually determines which of these is used by default.
612
613Note that the selection of a concrete Pinentry program determines only
614@emph{how} GnuPG queries for passphrases and not @emph{how often}.
615For the latter question see @ref{Caching Passphrases}.
616
617@cindex pinentry, emacs as
618With some configuration Emacs can also play the role of a Pinentry.
619The most natural choice, available with GnuPG 2.1.5 and later, is to
620use Emacs itself as Pinentry for requests that are triggered by Emacs.
621For example, if you open a file whose name ends with @file{.gpg} using
622automatic decryption, you most likely also want to enter the
623passphrase for that request in Emacs.
624
625@cindex loopback pinentry
626This so called @dfn{loopback Pinentry} has the added benefit that it
627works also when you use Emacs remotely or from a text-only terminal.
628To enable it:
629
630@enumerate
631@item
632@vindex allow-loopback-pinentry
633Ensure that option @code{allow-loopback-pinentry} is configured for
634@command{gpg-agent}, which should be the default. @xref{Agent
635Options, , Option Summary, gnupg, Using the GNU Privacy Guard}.
636
637@item
638@vindex epg-pinentry-mode
639Customize variable @code{epg-pinentry-mode} to @code{loopback} in
640Emacs.
641@end enumerate
642
643There are other options available to use Emacs as Pinentry, you might
644come across a Pinentry called @command{pinentry-emacs} or
645@command{gpg-agent} option @code{allow-emacs-pinentry}. However,
646these are considered insecure or semi-obsolete and might not be
647supported by your operating system or distribution. For example,
648Debian GNU/Linux supports only the loopback Pinentry described above.
649
650@ignore
651In case somebody requests these:
652
653Use Emacs for all GnuPG requests:
654
655Make @command{pinentry-emacs} the default Pinentry by means of your
656operating system. Install package @file{pinentry.el} from GNU ELPA
657and execute @kbd{M-x pinentry-start} to start the Emacs Pinentry
658service. @emph{All} GnuPG passphrase requests should then result in a
659minibuffer prompt in the running Emacs. If Emacs or the Emacs
660Pinentry service are not running, passphrase requests fail.
661
662Use Emacs for all GnuPG requests with other Pinentry as fallback:
663
664Ensure the other Pinentry supports Emacs; @command{pinentry-curses}
665does, for example. Configure @command{gpg-agent} option
666@code{allow-emacs-pinentry}. Set environment variable
667@code{INSIDE_EMACS} for the calling process. Install package
668@file{pinentry.el}. Now if Emacs is running and @kbd{M-x
669pinentry-start} has been executed, all GnuPG passphrase requests
670should result in a minibuffer prompt in the running Emacs. If Emacs
671or the Emacs Pinentry service are not running, GnuPG uses the other
672Pinentry instead.
673@end ignore
674
493@node Caching Passphrases 675@node Caching Passphrases
494@chapter Caching Passphrases 676@chapter Caching Passphrases
677@cindex caching passphrases
678@cindex entering passphrases
679@cindex passphrases, entering and caching
495 680
496Typing passphrases is a troublesome task if you frequently open and 681Typing passphrases is a troublesome task if you frequently open and
497close the same file. GnuPG and EasyPG Assistant provide mechanisms to 682close the same file. GnuPG and EasyPG Assistant provide mechanisms to
498remember your passphrases for a limited time. Using these, you only 683remember your passphrases for a limited time. Using these, you only
499need to re-enter the passphrase occasionally. 684need to re-enter the passphrase occasionally. However, the
500However, the configuration is a bit 685configuration is a bit confusing since it depends on your GnuPG
501confusing since it depends on your GnuPG installation@xref{GnuPG 686installation (@pxref{GnuPG version compatibility}), encryption method
502version compatibility}, encryption method (symmetric or public key), 687(symmetric or public key), and whether or not you want to use
503and whether or not you want to use gpg-agent. Here are some 688GnuPG Agent. As an additional constraint, use of the GnuPG Agent is
504questions: 689mandatory for GnuPG 2.0 and later. Here are some questions:
505 690
506@enumerate 691@enumerate
507@item Do you use GnuPG version 2.1 or 2.0 instead of GnuPG version 1.4? 692@item Do you use GnuPG version 2.0 or later instead of GnuPG version 1.4?
508@item Do you use symmetric encryption rather than public key encryption? 693@item Do you use symmetric encryption rather than public key encryption?
509@item Do you want to use gpg-agent? 694@item Do you want to use GnuPG Agent?
510@end enumerate 695@end enumerate
511 696
512Here are configurations depending on your answers: 697Here are configurations depending on your answers:
513 698
514@multitable {111} {222} {333} {configuration configuration configuration} 699@multitable {111} {222} {333} {configuration configuration configuration}
515@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration 700@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
516@item Yes @tab Yes @tab Yes @tab Set up gpg-agent. 701@item Yes @tab Yes @tab Must @tab Set up GnuPG Agent.
517@item Yes @tab Yes @tab No @tab You can't, without gpg-agent. 702@item Yes @tab No @tab Must @tab Set up GnuPG Agent.
518@item Yes @tab No @tab Yes @tab Set up gpg-agent. 703@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
519@item Yes @tab No @tab No @tab You can't, without gpg-agent. 704@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
520@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache. 705@item No @tab No @tab Yes @tab Set up GnuPG Agent.
521@item No @tab Yes @tab No @tab Set up elisp passphrase cache. 706@item No @tab No @tab No @tab You can't, without GnuPG Agent.
522@item No @tab No @tab Yes @tab Set up gpg-agent.
523@item No @tab No @tab No @tab You can't, without gpg-agent.
524@end multitable 707@end multitable
525 708
526To set up gpg-agent, follow the instruction in GnuPG manual. 709To set up GnuPG Agent, follow the instruction in @ref{Invoking
527@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}. 710GPG-AGENT, , , gnupg, Using the GNU Privacy Guard}.
528 711
529To set up elisp passphrase cache, set 712To set up elisp passphrase cache, set
530@code{epa-file-cache-passphrase-for-symmetric-encryption}. 713@code{epa-file-cache-passphrase-for-symmetric-encryption}.
@@ -532,11 +715,13 @@ To set up elisp passphrase cache, set
532 715
533@node Bug Reports 716@node Bug Reports
534@chapter Bug Reports 717@chapter Bug Reports
718@cindex bug reports
719@cindex reporting bugs
535 720
536Bugs and problems with EasyPG Assistant are actively worked on by the 721Bugs and problems with EasyPG Assistant are actively worked on by the
537Emacs development team. Feature requests and suggestions are also 722Emacs development team. Feature requests and suggestions are also
538more than welcome. Use @kbd{M-x report-emacs-bug}, @pxref{Bugs, , 723more than welcome. Use @kbd{M-x report-emacs-bug}, see @ref{Bugs, ,
539Bugs, emacs, Reporting Bugs}. 724Reporting Bugs, emacs, The Emacs Editor}.
540 725
541When submitting a bug report, please try to describe in excruciating 726When submitting a bug report, please try to describe in excruciating
542detail the steps required to reproduce the problem. Also try to 727detail the steps required to reproduce the problem. Also try to
@@ -556,6 +741,10 @@ buffer name is a whitespace.
556@appendix GNU Free Documentation License 741@appendix GNU Free Documentation License
557@include doclicense.texi 742@include doclicense.texi
558 743
744@node Concept Index
745@unnumbered Concept Index
746@printindex cp
747
559@node Key Index 748@node Key Index
560@unnumbered Key Index 749@unnumbered Key Index
561@printindex ky 750@printindex ky
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index 7809bd03918..ae760624b6f 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -1,23 +1,23 @@
1#+title: Modus themes for GNU Emacs 1#+title: Modus themes for GNU Emacs
2#+author: Protesilaos Stavrou 2#+author: Protesilaos Stavrou
3#+email: info@protesilaos.com 3#+email: info@protesilaos.com
4#+language: en 4#+language: en
5#+options: ':t toc:nil author:t email:t num:t 5#+options: ':t toc:nil author:t email:t num:t
6#+startup: content 6#+startup: content
7#+macro: stable-version 4.2.0 7#+macro: stable-version 4.2.0
8#+macro: release-date 2023-05-30 8#+macro: release-date 2023-05-30
9#+macro: development-version 4.3.0-dev 9#+macro: development-version 4.3.0-dev
10#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ 10#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
11#+macro: space @@texinfo:@: @@ 11#+macro: space @@texinfo:@: @@
12#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ 12#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
13#+texinfo_filename: modus-themes.info 13#+texinfo_filename: modus-themes.info
14#+texinfo_dir_category: Emacs misc features 14#+texinfo_dir_category: Emacs misc features
15#+texinfo_dir_title: Modus Themes: (modus-themes) 15#+texinfo_dir_title: Modus Themes: (modus-themes)
16#+texinfo_dir_desc: Elegant, highly legible and customizable themes 16#+texinfo_dir_desc: Elegant, highly legible and customizable themes
17#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage} 17#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage}
18#+texinfo_header: @set MAINTAINER Protesilaos Stavrou 18#+texinfo_header: @set MAINTAINER Protesilaos Stavrou
19#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com} 19#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com}
20#+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:info@protesilaos.com,contact the maintainer} 20#+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:info@protesilaos.com,contact the maintainer}
21 21
22#+texinfo: @insertcopying 22#+texinfo: @insertcopying
23 23