Merge from origin/emacs-29
7ac947f34c
; * src/lisp.h (struct Lisp_Overlay): Update commentary (...9bc93c7996
Replace duplicate text from epa.texi by a reference74cc1d27f1
Add basic usage information and fix referencesf24bdbfaf5
Add concept index, title-case structure titles0165b50b0f
; * lisp/emacs-lisp/lisp.el (raise-sexp): Fix typo in doc...4cf33b6bd0
; * doc/misc/modus-themes.org: Fix whitespace (bug#64548).4821da1ad7
Fix show-paren-mode when the parentheses is partially vis...419b4d4491
; Improve documentation of with-restrictionbe34e8294a
; * admin/git-bisect-start: Update failing commits8e06809fcc
Merge branch 'scratch/bug64391' into emacs-29dbac807605
* lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.01fb898420
Simplify after adding internal function to enter a labele...b741dc7fcd
Add internal function to enter a labeled restriction # Conflicts: # doc/misc/modus-themes.org
This commit is contained in:
commit
748d2ed515
10 changed files with 322 additions and 137 deletions
|
@ -82,7 +82,7 @@ done
|
|||
# SKIP-BRANCH 58cc931e92ece70c3e64131ee12a799d65409100
|
||||
|
||||
## The list below is the exhaustive list of all commits between Dec 1
|
||||
## 2016 and Jun 8 2023 on which building Emacs with the default
|
||||
## 2016 and Jul 8 2023 on which building Emacs with the default
|
||||
## options, on a GNU/Linux computer and with GCC, fails. It is
|
||||
## possible (though unlikely) that building Emacs with non-default
|
||||
## options, with other compilers, or on other platforms, would succeed
|
||||
|
@ -1735,3 +1735,25 @@ $REAL_GIT bisect skip $(cat $0 | grep '^# SKIP-SINGLE ' | sed 's/^# SKIP-SINGLE
|
|||
# SKIP-SINGLE 348e4504c6d5588443809ec28da3c3c693368e16
|
||||
# SKIP-SINGLE 970f94a2dd8bc4be4d71f1075421093ca6f87d28
|
||||
# SKIP-SINGLE 6b2c8dc9050c5c0514fa404733ce1d4a37d00e39
|
||||
# SKIP-SINGLE 6c3e65a75f582ca007a7fbcc4b866680e3b0e626
|
||||
# SKIP-SINGLE 8e8667246a4c06c8362515cbd6bead889babb748
|
||||
# SKIP-SINGLE bb4b511c4c63762bfd3b96623323a882cc57ecb6
|
||||
# SKIP-SINGLE 567258ab4309a7406cd4087d28cd0e820b17e157
|
||||
# SKIP-SINGLE 5fa9458511a17ff79a822e5cf8cc00f7bfb89364
|
||||
# SKIP-SINGLE 6d55d93379fa531f81327be6e506610474846758
|
||||
# SKIP-SINGLE eedb7111185569e426726fe15242f8ba08f89b31
|
||||
# SKIP-SINGLE 4c2cc21354a500b0fc48994b7b60648ef5f00a2d
|
||||
# SKIP-SINGLE d7168e8575794b7af4e7e2bde51ca0663bbc2eac
|
||||
# SKIP-SINGLE aad13e61dbf949ca6dea1ff492baca82f40a5738
|
||||
# SKIP-SINGLE 184106be2678f18ae90ccd35d69c2ccd61198b0a
|
||||
# SKIP-SINGLE dfba4347c71d70b8357979ff0fb4bb070b0ed60c
|
||||
# SKIP-SINGLE a19beb4ad43fe8225d384fc64e2406b7d24621a5
|
||||
# SKIP-SINGLE 77c2f05d773271cb59ebfd994b06a4075cacbfa8
|
||||
# SKIP-SINGLE ff5caf68c936ec90825efc4fd878d13703fb0400
|
||||
# SKIP-SINGLE 1c499c18afd6a709272fe60a540a27093e589fff
|
||||
# SKIP-SINGLE 5b7e999e24f6cd446961ac441f69af021528623b
|
||||
# SKIP-SINGLE 9c2cbfa49db96eae95bb40c5fc3ce7f09781a97d
|
||||
# SKIP-SINGLE 375dac936fcca902874ecfd1c57b713581641725
|
||||
# SKIP-SINGLE 0a35c991c19a6dd0a707f2baa868f8989242c3ab
|
||||
# SKIP-SINGLE e2ee646b162b87e832c8032b9d90577bd21f21f8
|
||||
# SKIP-SINGLE 35d2fe176cb438d55552cacbdf25c3692c054d51
|
||||
|
|
|
@ -1203,7 +1203,8 @@ saved bounds. In that case it is equivalent to
|
|||
|
||||
@cindex labeled narrowing
|
||||
@cindex labeled restriction
|
||||
When the optional argument @var{label}, a symbol, is present, the
|
||||
When the optional argument @var{label}, which is evaluated to get the
|
||||
label to use and must yield a non-@code{nil} value, is present, the
|
||||
narrowing is @dfn{labeled}. A labeled narrowing differs from a
|
||||
non-labeled one in several ways:
|
||||
|
||||
|
|
|
@ -675,43 +675,12 @@ before @file{~/.authinfo}, the auth-source library will try to
|
|||
read the GnuPG encrypted @file{.gpg} file first, before
|
||||
the unencrypted file.
|
||||
|
||||
There is an option @code{auto-encryption-mode} to automatically
|
||||
decrypt @file{*.gpg} files. It is enabled by default.
|
||||
|
||||
If you want your GnuPG passwords to be cached, set up @code{gpg-agent}
|
||||
or EasyPG Assistant
|
||||
(@pxref{Caching Passphrases, , Caching Passphrases, epa}).
|
||||
|
||||
To quick start, here are some questions:
|
||||
|
||||
@itemize
|
||||
@item
|
||||
Do you use GnuPG version 2 instead of GnuPG version 1?
|
||||
@item
|
||||
Do you use symmetric encryption rather than public key encryption?
|
||||
@item
|
||||
Do you want to use gpg-agent?
|
||||
@end itemize
|
||||
|
||||
Here are configurations depending on your answers:
|
||||
|
||||
@multitable {111} {222} {333} {configuration configuration configuration}
|
||||
@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
|
||||
@item Yes @tab Yes @tab Yes @tab Set up gpg-agent.
|
||||
@item Yes @tab Yes @tab No @tab You can't, without gpg-agent.
|
||||
@item Yes @tab No @tab Yes @tab Set up gpg-agent.
|
||||
@item Yes @tab No @tab No @tab You can't, without gpg-agent.
|
||||
@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
|
||||
@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
|
||||
@item No @tab No @tab Yes @tab Set up gpg-agent.
|
||||
@item No @tab No @tab No @tab You can't, without gpg-agent.
|
||||
@end multitable
|
||||
|
||||
To set up gpg-agent, follow the instruction in GnuPG manual
|
||||
(@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}).
|
||||
|
||||
To set up elisp passphrase cache, set
|
||||
@code{epa-file-cache-passphrase-for-symmetric-encryption}.
|
||||
The EasyPG Assistant, which comes bundled with Emacs, handles
|
||||
decryption of encrypted files automatically, see @ref{Top, , Top, epa,
|
||||
EasyPG Assistant User's Manual}. It is an Emacs user interface to
|
||||
@acronym{GnuPG, GNU Privacy Guard}, see @ref{Top, , Top, gnupg, Using
|
||||
the GNU Privacy Guard}. To get started with these quickly, see
|
||||
@ref{Quick start, , Quick Start, epa, EasyPG Assistant User's Manual}.
|
||||
|
||||
@node GNU Free Documentation License
|
||||
@appendix GNU Free Documentation License
|
||||
|
|
|
@ -43,7 +43,10 @@ modify this GNU manual.''
|
|||
@contents
|
||||
|
||||
@node Top
|
||||
@top EasyPG Assistant user's manual
|
||||
@top EasyPG Assistant User's Manual
|
||||
@cindex easypg assistant
|
||||
@cindex gnu privacy guard
|
||||
@cindex gnupg
|
||||
|
||||
EasyPG Assistant is an Emacs user interface to GNU Privacy Guard
|
||||
(GnuPG, @pxref{Top, , Top, gnupg, Using the GNU Privacy Guard}).
|
||||
|
@ -56,14 +59,22 @@ called EasyPG Library.
|
|||
@insertcopying
|
||||
@end ifnottex
|
||||
|
||||
@c Unfortunately the node names of this manual are not very consistent
|
||||
@c w.r.t. their case. However, case is significant in node names, so
|
||||
@c we probably better should not change these to not break any
|
||||
@c external references. Things are more relaxed for structure titles,
|
||||
@c so we consistently updated them to title-case.
|
||||
|
||||
@menu
|
||||
* Overview::
|
||||
* Quick start::
|
||||
* Commands::
|
||||
* GnuPG version compatibility::
|
||||
* GnuPG Pinentry::
|
||||
* Caching Passphrases::
|
||||
* Bug Reports::
|
||||
* GNU Free Documentation License:: The license for this documentation.
|
||||
* Concept Index::
|
||||
* Key Index::
|
||||
* Function Index::
|
||||
* Variable Index::
|
||||
|
@ -71,8 +82,10 @@ called EasyPG Library.
|
|||
|
||||
@node Overview
|
||||
@chapter Overview
|
||||
@cindex features of easypg assistant
|
||||
|
||||
EasyPG Assistant provides the following features.
|
||||
EasyPG Assistant is an Emacs frontend application to @acronym{GnuPG,
|
||||
GNU Privacy Guard} that provides the following features:
|
||||
|
||||
@itemize @bullet
|
||||
@item Key management.
|
||||
|
@ -84,7 +97,24 @@ EasyPG Assistant provides the following features.
|
|||
@end itemize
|
||||
|
||||
@node Quick start
|
||||
@chapter Quick start
|
||||
@chapter Quick Start
|
||||
@cindex introduction to easypg assistant
|
||||
@cindex gnupg documentation
|
||||
@cindex documentation on gnupg
|
||||
@cindex configuration of gnupg
|
||||
@cindex introduction to gnupg
|
||||
|
||||
You can use EasyPG Assistant without any Emacs or GnuPG configuration
|
||||
whatsoever, for example to encrypt and decrypt files automatically
|
||||
with symmetric encryption, see @ref{Encrypting/decrypting gpg files}.
|
||||
However, to use the full set of EasyPG Assistant's functions you
|
||||
should have at least some minimum GnuPG configuration in place.
|
||||
|
||||
John Michael Ashley's GNU Privacy Handbook, available online as part
|
||||
of @uref{https://gnupg.org/documentation/guides.html, the GnuPG user
|
||||
guides}, provides an introduction to GnuPG use and configuration. In
|
||||
contrast to that, the GnuPG manual (@pxref{Top, , Top, gnupg, Using
|
||||
the GNU Privacy Guard}) is more of a reference manual.
|
||||
|
||||
EasyPG Assistant commands are prefixed by @samp{epa-}. For example,
|
||||
|
||||
|
@ -118,7 +148,11 @@ This chapter introduces various commands for typical use cases.
|
|||
@end menu
|
||||
|
||||
@node Key management
|
||||
@section Key management
|
||||
@section Key Management
|
||||
@cindex key management
|
||||
|
||||
@cindex key ring, browsing
|
||||
@cindex browse key ring
|
||||
Probably the first step of using EasyPG Assistant is to browse your
|
||||
keyring. @kbd{M-x epa-list-keys} is corresponding to @samp{gpg
|
||||
--list-keys} from the command line.
|
||||
|
@ -157,6 +191,7 @@ about the key you selected.
|
|||
Fingerprint: 9003 D76B 73B7 4A8A E588 10AF 4447 461B 2A9B EA2D
|
||||
@end example
|
||||
|
||||
@cindex private key ring, browsing
|
||||
@noindent
|
||||
To browse your private keyring, use @kbd{M-x epa-list-secret-keys}.
|
||||
|
||||
|
@ -172,12 +207,14 @@ to select keys, type @kbd{o}, and then supply the filename.
|
|||
Below are other commands related to key management. Some of them take
|
||||
a file as input/output, and others take the current region.
|
||||
|
||||
@cindex insert keys
|
||||
@deffn Command epa-insert-keys keys
|
||||
Insert selected @var{keys} after the point. It will let you select
|
||||
keys before insertion. By default, it will encode keys in the OpenPGP
|
||||
armor format.
|
||||
@end deffn
|
||||
|
||||
@cindex import keys
|
||||
@deffn Command epa-import-keys file
|
||||
Import keys from @var{file} to your keyring.
|
||||
@end deffn
|
||||
|
@ -195,14 +232,18 @@ Import keys in the OpenPGP armor format in the current region between
|
|||
applies @code{epa-import-keys-region} to each of them.
|
||||
@end deffn
|
||||
|
||||
@cindex delete keys
|
||||
@deffn Command epa-delete-keys allow-secret
|
||||
Delete selected keys. If @var{allow-secret} is non-@code{nil}, it
|
||||
also delete the secret keys.
|
||||
@end deffn
|
||||
|
||||
@node Cryptographic operations on regions
|
||||
@section Cryptographic operations on regions
|
||||
@section Cryptographic Operations on Regions
|
||||
@cindex cryptographic operations on regions
|
||||
@cindex region operations, cryptographic
|
||||
|
||||
@cindex decrypt region
|
||||
@deffn Command epa-decrypt-region start end
|
||||
Decrypt the current region between @var{start} and @var{end}. It
|
||||
replaces the region with the decrypted text.
|
||||
|
@ -216,6 +257,7 @@ and applies @code{epa-decrypt-region} to each of them. That is, this
|
|||
command does not alter the original text around armors.
|
||||
@end deffn
|
||||
|
||||
@cindex verify region
|
||||
@deffn Command epa-verify-region start end
|
||||
Verify the current region between @var{start} and @var{end}. It sends
|
||||
the verification result to the minibuffer or a popup window. It
|
||||
|
@ -231,6 +273,7 @@ searches OpenPGP cleartext blocks in the region and applies
|
|||
not alter the original text around OpenPGP cleartext blocks.
|
||||
@end deffn
|
||||
|
||||
@cindex sign region
|
||||
@deffn Command epa-sign-region start end signers type
|
||||
Sign the current region between @var{start} and @var{end}. By
|
||||
default, 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
|
|||
type.
|
||||
@end deffn
|
||||
|
||||
@cindex encrypt region
|
||||
@deffn Command epa-encrypt-region start end recipients sign signers
|
||||
Encrypt the current region between @var{start} and @var{end}. It will
|
||||
let 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.
|
|||
@end deffn
|
||||
|
||||
@node Cryptographic operations on files
|
||||
@section Cryptographic operations on files
|
||||
@section Cryptographic Operations on Files
|
||||
@cindex cryptographic operations on files
|
||||
@cindex file operations, cryptographic
|
||||
|
||||
@cindex decrypt file
|
||||
@deffn Command epa-decrypt-file file &optional output
|
||||
Decrypt @var{file}. If you do not specify the name @var{output} to
|
||||
use for the decrypted file, this function prompts for the value to use.
|
||||
@end deffn
|
||||
|
||||
@cindex verify file
|
||||
@deffn Command epa-verify-file file
|
||||
Verify @var{file}.
|
||||
@end deffn
|
||||
|
||||
@cindex sign file
|
||||
@deffn Command epa-sign-file file signers type
|
||||
Sign @var{file}. If a prefix argument is given, it will let you
|
||||
select signing keys, and then a signature type.
|
||||
@end deffn
|
||||
|
||||
@cindex encrypt file
|
||||
@deffn Command epa-encrypt-file file recipients
|
||||
Encrypt @var{file}. It will let you select recipients.
|
||||
@end deffn
|
||||
|
||||
@node Dired integration
|
||||
@section Dired integration
|
||||
@section Dired Integration
|
||||
@cindex dired integration
|
||||
@cindex directory operations
|
||||
@cindex multiple file operations
|
||||
|
||||
EasyPG Assistant extends Dired Mode for GNU Emacs to allow users to
|
||||
easily do cryptographic operations on files. For example,
|
||||
|
@ -306,7 +359,9 @@ Encrypt marked files.
|
|||
@end table
|
||||
|
||||
@node Mail-mode integration
|
||||
@section Mail-mode integration
|
||||
@section Mail-Mode Integration
|
||||
@cindex mail-mode integration
|
||||
@cindex sending signed/encrypted mails
|
||||
|
||||
EasyPG Assistant provides a minor mode @code{epa-mail-mode} to help
|
||||
user compose inline OpenPGP messages. Inline OpenPGP is a traditional
|
||||
|
@ -361,13 +416,56 @@ whether to sign, and which key(s) to sign with.
|
|||
@end table
|
||||
|
||||
@node Encrypting/decrypting gpg files
|
||||
@section Encrypting/decrypting gpg files
|
||||
@section Encrypting and Decrypting gpg Files
|
||||
@cindex encrypting gpg files
|
||||
@cindex decrypting gpg files
|
||||
@cindex gpg files, encrypting and decrypting
|
||||
@cindex automatic file encryption and decryption
|
||||
|
||||
By default, every file whose name ends with @file{.gpg} will be
|
||||
treated as encrypted. That is, when you open such a file, the
|
||||
decrypted text is inserted in the buffer rather than encrypted one.
|
||||
Similarly, when you save the buffer to a @file{foo.gpg} file,
|
||||
encrypted data is written.
|
||||
|
||||
When you save a buffer to an encrypted file for the first time, EasyPG
|
||||
Assistant presents you a list of keys in a buffer @file{*Keys*} where
|
||||
you can select recipients for encryption. @xref{Key management}, for
|
||||
a description of the format of that buffer. You can streamline this
|
||||
recipient selection step by customizing variables
|
||||
@code{epa-file-encrypt-to} and @code{epa-file-select-keys} described
|
||||
further below in this section.
|
||||
|
||||
@cindex symmetric encryption, passphrase entry for
|
||||
If you do not select any recipient during this step, EasyPG Assistant
|
||||
uses symmetric encryption. As a consequence, you have to enter the
|
||||
passphrase twice for every buffer save and every so often for file
|
||||
reads, since the GnuPG Agent caches your passphrase for file reads at
|
||||
least for some time, but not for buffer saves. @xref{Caching
|
||||
Passphrases}, for more information.
|
||||
|
||||
@cindex public key encryption, passphrase entry for
|
||||
If you have created your own keypair@footnote{For encryption and
|
||||
decryption of files you do not intend to share, you do not have to use
|
||||
an email address as recipient during creation of the keypair. You can
|
||||
also use some free-form string that gives information on the use of
|
||||
the keypair, like @code{backup} or @code{account database}.}, you can
|
||||
select that as recipient, and EasyPG Assistant will use public key
|
||||
encryption for that file. Since GnuPG performs encryption with your
|
||||
public key, it does not prompt for a passphrase for the buffer save,
|
||||
but it will prompt for your passphrase for file reads every now and
|
||||
then, depending on the GnuPG Agent cache configuration.
|
||||
|
||||
@cindex tempory files created by easypg assistant
|
||||
To encrypt and decrypt files as described above EasyPG Assistant under
|
||||
certain circumstances uses intermediate tempory files that contain the
|
||||
plain-text contents of the files it processes. EasyPG Assistant
|
||||
creates them below the directory returned by function
|
||||
@code{temporary-file-directory} (@pxref{Unique File Names, ,
|
||||
Generating Unique File Names, elisp, GNU Emacs Lisp Reference
|
||||
Manual}). If you want to be sure not to leave any plain-text traces,
|
||||
use an encrypted file systems at least for that directory.
|
||||
|
||||
The file name pattern for encrypted files can be controlled by
|
||||
@code{epa-file-name-regexp}.
|
||||
|
||||
|
@ -404,11 +502,11 @@ You can also change the default behavior with the variable
|
|||
Control whether or not to pop up the key selection dialog.
|
||||
@end defvar
|
||||
|
||||
For frequently visited files, it might be a good idea to tell Emacs
|
||||
which encryption method should be used through @xref{File Variables, ,
|
||||
, emacs, the Emacs Manual}. Use the @code{epa-file-encrypt-to} local
|
||||
variable for this.
|
||||
@vindex epa-file-encrypt-to
|
||||
For frequently visited files, it might be a good idea to tell Emacs
|
||||
which encryption method should be used through file variables
|
||||
(@pxref{File Variables, , Local Variables in Files, emacs, The Emacs
|
||||
Editor}). Use the @code{epa-file-encrypt-to} local variable for this.
|
||||
|
||||
For example, if you want an Elisp file to be encrypted with a
|
||||
public key associated with an email address @samp{ueno@@unixuser.org},
|
||||
|
@ -436,6 +534,11 @@ behavior are below.
|
|||
@defvar epa-file-cache-passphrase-for-symmetric-encryption
|
||||
If non-@code{nil}, cache passphrase for symmetric encryption. The
|
||||
default value is @code{nil}.
|
||||
|
||||
For security reasons, this option is turned off by default and not
|
||||
recommended to be used. Instead, consider using the GnuPG Agent, which
|
||||
in many cases can do the same job, and does it in a safer way.
|
||||
@xref{Caching Passphrases}, for more information.
|
||||
@end defvar
|
||||
|
||||
@defvar epa-file-inhibit-auto-save
|
||||
|
@ -444,7 +547,9 @@ The default value is @code{t}.
|
|||
@end defvar
|
||||
|
||||
@node Querying a key server
|
||||
@section Querying a key server
|
||||
@section Querying a Key Server
|
||||
@cindex query key server
|
||||
@cindex key server, querying
|
||||
|
||||
The @code{epa-search-keys} command can be used to query a
|
||||
@acronym{GPG} key server. Emacs will then pop up a buffer that lists
|
||||
|
@ -457,14 +562,23 @@ into your key ring).
|
|||
|
||||
The @code{epa-keyserver} variable says which server to query.
|
||||
|
||||
|
||||
@node GnuPG version compatibility
|
||||
@chapter GnuPG version compatibility
|
||||
@chapter GnuPG Version Compatibility
|
||||
@cindex gnupg version compatibility
|
||||
@cindex version compatibility with gnupg
|
||||
@cindex compatibility with gnupg
|
||||
|
||||
As of February 2016, there are three active branches of GnuPG: 2.1,
|
||||
2.0, and 1.4. All those branches should work flawlessly with Emacs
|
||||
with basic use-cases. They have, however, some incompatible
|
||||
characteristics, which might be visible when used from Emacs.
|
||||
As of June 2023, there are three active branches of GnuPG: 2.4, 2.2,
|
||||
and 1.4. GnuPG versions 2.4.1 and later suffer from
|
||||
@uref{https://dev.gnupg.org/T6481, GnuPG bug T6481} and are hardly
|
||||
usable with Emacs. There is a patch for that bug available at least
|
||||
for GnuPG version 2.4.1, which your operating system or distribution
|
||||
might provide already. GnuPG 1.4 is considered a legacy version.
|
||||
|
||||
Besides that, all of those branches mentioned above should work
|
||||
flawlessly with Emacs with basic use-cases. They have, however, some
|
||||
incompatible characteristics, which might be visible when used from
|
||||
Emacs.
|
||||
|
||||
@itemize
|
||||
@item
|
||||
|
@ -473,58 +587,127 @@ means, a key created with GnuPG 2.1 is not visible with 1.4.
|
|||
|
||||
@item
|
||||
GnuPG 2.1 uses a fixed address for the Unix domain socket used to
|
||||
communicate with gpg-agent. The @code{GPG_AGENT_INFO} environment
|
||||
variable, which is used by GnuPG 2.0 and 1.4, is ignored. That means,
|
||||
if your system has both GnuPG 2.1 and 1.4, the gpg command from GnuPG
|
||||
1.4 is not able to use gpg-agent provided by 2.1 (at least out of box).
|
||||
communicate with @command{gpg-agent}. The @code{GPG_AGENT_INFO}
|
||||
environment variable, which is used by GnuPG 2.0 and 1.4, is ignored.
|
||||
That means, if your system has both GnuPG 2.1 and 1.4, the gpg command
|
||||
from GnuPG 1.4 is not able to use @command{gpg-agent} provided by 2.1
|
||||
(at least out of box).
|
||||
|
||||
@item
|
||||
GnuPG 2.1 (2.1.5 or later) has a mechanism to direct the Pinentry
|
||||
password prompt to the Emacs minibuffer@footnote{To enable this
|
||||
feature, add @samp{allow-emacs-pinentry} to
|
||||
@file{~/.gnupg/gpg-agent.conf} and let gpg-agent reload the
|
||||
configuration, with: @samp{gpgconf --reload gpg-agent}}, which would
|
||||
be useful when you use Emacs remotely or from a text-only terminal.
|
||||
That feature is not available in other versions, and more
|
||||
specifically, with 2.0 (as of 2.0.29), there is no way to avoid the
|
||||
graphical prompt.
|
||||
password prompt to the Emacs minibuffer. @xref{GnuPG Pinentry}.
|
||||
@end itemize
|
||||
|
||||
@node GnuPG Pinentry
|
||||
@chapter GnuPG Pinentry
|
||||
@cindex gnupg pinentry
|
||||
@cindex pinentry provided by gnupg
|
||||
|
||||
An important component of the GnuPG suite is the Pinentry, which
|
||||
allows for secure entry of passphrases requested by GnuPG. GnuPG
|
||||
delivers various different programs as Pinentry, ranging from bland
|
||||
TTY-only @command{pinentry-tty} to fancy graphical dialogs for various
|
||||
desktop environments, like @command{pinentry-gnome3}. Your operating
|
||||
system usually determines which of these is used by default.
|
||||
|
||||
Note that the selection of a concrete Pinentry program determines only
|
||||
@emph{how} GnuPG queries for passphrases and not @emph{how often}.
|
||||
For the latter question see @ref{Caching Passphrases}.
|
||||
|
||||
@cindex pinentry, emacs as
|
||||
With some configuration Emacs can also play the role of a Pinentry.
|
||||
The most natural choice, available with GnuPG 2.1.5 and later, is to
|
||||
use Emacs itself as Pinentry for requests that are triggered by Emacs.
|
||||
For example, if you open a file whose name ends with @file{.gpg} using
|
||||
automatic decryption, you most likely also want to enter the
|
||||
passphrase for that request in Emacs.
|
||||
|
||||
@cindex loopback pinentry
|
||||
This so called @dfn{loopback Pinentry} has the added benefit that it
|
||||
works also when you use Emacs remotely or from a text-only terminal.
|
||||
To enable it:
|
||||
|
||||
@enumerate
|
||||
@item
|
||||
@vindex allow-loopback-pinentry
|
||||
Ensure that option @code{allow-loopback-pinentry} is configured for
|
||||
@command{gpg-agent}, which should be the default. @xref{Agent
|
||||
Options, , Option Summary, gnupg, Using the GNU Privacy Guard}.
|
||||
|
||||
@item
|
||||
@vindex epg-pinentry-mode
|
||||
Customize variable @code{epg-pinentry-mode} to @code{loopback} in
|
||||
Emacs.
|
||||
@end enumerate
|
||||
|
||||
There are other options available to use Emacs as Pinentry, you might
|
||||
come across a Pinentry called @command{pinentry-emacs} or
|
||||
@command{gpg-agent} option @code{allow-emacs-pinentry}. However,
|
||||
these are considered insecure or semi-obsolete and might not be
|
||||
supported by your operating system or distribution. For example,
|
||||
Debian GNU/Linux supports only the loopback Pinentry described above.
|
||||
|
||||
@ignore
|
||||
In case somebody requests these:
|
||||
|
||||
Use Emacs for all GnuPG requests:
|
||||
|
||||
Make @command{pinentry-emacs} the default Pinentry by means of your
|
||||
operating system. Install package @file{pinentry.el} from GNU ELPA
|
||||
and execute @kbd{M-x pinentry-start} to start the Emacs Pinentry
|
||||
service. @emph{All} GnuPG passphrase requests should then result in a
|
||||
minibuffer prompt in the running Emacs. If Emacs or the Emacs
|
||||
Pinentry service are not running, passphrase requests fail.
|
||||
|
||||
Use Emacs for all GnuPG requests with other Pinentry as fallback:
|
||||
|
||||
Ensure the other Pinentry supports Emacs; @command{pinentry-curses}
|
||||
does, for example. Configure @command{gpg-agent} option
|
||||
@code{allow-emacs-pinentry}. Set environment variable
|
||||
@code{INSIDE_EMACS} for the calling process. Install package
|
||||
@file{pinentry.el}. Now if Emacs is running and @kbd{M-x
|
||||
pinentry-start} has been executed, all GnuPG passphrase requests
|
||||
should result in a minibuffer prompt in the running Emacs. If Emacs
|
||||
or the Emacs Pinentry service are not running, GnuPG uses the other
|
||||
Pinentry instead.
|
||||
@end ignore
|
||||
|
||||
@node Caching Passphrases
|
||||
@chapter Caching Passphrases
|
||||
@cindex caching passphrases
|
||||
@cindex entering passphrases
|
||||
@cindex passphrases, entering and caching
|
||||
|
||||
Typing passphrases is a troublesome task if you frequently open and
|
||||
close the same file. GnuPG and EasyPG Assistant provide mechanisms to
|
||||
remember your passphrases for a limited time. Using these, you only
|
||||
need to re-enter the passphrase occasionally.
|
||||
However, the configuration is a bit
|
||||
confusing since it depends on your GnuPG installation@xref{GnuPG
|
||||
version compatibility}, encryption method (symmetric or public key),
|
||||
and whether or not you want to use gpg-agent. Here are some
|
||||
questions:
|
||||
need to re-enter the passphrase occasionally. However, the
|
||||
configuration is a bit confusing since it depends on your GnuPG
|
||||
installation (@pxref{GnuPG version compatibility}), encryption method
|
||||
(symmetric or public key), and whether or not you want to use
|
||||
GnuPG Agent. As an additional constraint, use of the GnuPG Agent is
|
||||
mandatory for GnuPG 2.0 and later. Here are some questions:
|
||||
|
||||
@enumerate
|
||||
@item Do you use GnuPG version 2.1 or 2.0 instead of GnuPG version 1.4?
|
||||
@item Do you use GnuPG version 2.0 or later instead of GnuPG version 1.4?
|
||||
@item Do you use symmetric encryption rather than public key encryption?
|
||||
@item Do you want to use gpg-agent?
|
||||
@item Do you want to use GnuPG Agent?
|
||||
@end enumerate
|
||||
|
||||
Here are configurations depending on your answers:
|
||||
|
||||
@multitable {111} {222} {333} {configuration configuration configuration}
|
||||
@item @b{1} @tab @b{2} @tab @b{3} @tab Configuration
|
||||
@item Yes @tab Yes @tab Yes @tab Set up gpg-agent.
|
||||
@item Yes @tab Yes @tab No @tab You can't, without gpg-agent.
|
||||
@item Yes @tab No @tab Yes @tab Set up gpg-agent.
|
||||
@item Yes @tab No @tab No @tab You can't, without gpg-agent.
|
||||
@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
|
||||
@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
|
||||
@item No @tab No @tab Yes @tab Set up gpg-agent.
|
||||
@item No @tab No @tab No @tab You can't, without gpg-agent.
|
||||
@item Yes @tab Yes @tab Must @tab Set up GnuPG Agent.
|
||||
@item Yes @tab No @tab Must @tab Set up GnuPG Agent.
|
||||
@item No @tab Yes @tab Yes @tab Set up elisp passphrase cache.
|
||||
@item No @tab Yes @tab No @tab Set up elisp passphrase cache.
|
||||
@item No @tab No @tab Yes @tab Set up GnuPG Agent.
|
||||
@item No @tab No @tab No @tab You can't, without GnuPG Agent.
|
||||
@end multitable
|
||||
|
||||
To set up gpg-agent, follow the instruction in GnuPG manual.
|
||||
@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}.
|
||||
To set up GnuPG Agent, follow the instruction in @ref{Invoking
|
||||
GPG-AGENT, , , gnupg, Using the GNU Privacy Guard}.
|
||||
|
||||
To set up elisp passphrase cache, set
|
||||
@code{epa-file-cache-passphrase-for-symmetric-encryption}.
|
||||
|
@ -532,11 +715,13 @@ To set up elisp passphrase cache, set
|
|||
|
||||
@node Bug Reports
|
||||
@chapter Bug Reports
|
||||
@cindex bug reports
|
||||
@cindex reporting bugs
|
||||
|
||||
Bugs and problems with EasyPG Assistant are actively worked on by the
|
||||
Emacs development team. Feature requests and suggestions are also
|
||||
more than welcome. Use @kbd{M-x report-emacs-bug}, @pxref{Bugs, ,
|
||||
Bugs, emacs, Reporting Bugs}.
|
||||
more than welcome. Use @kbd{M-x report-emacs-bug}, see @ref{Bugs, ,
|
||||
Reporting Bugs, emacs, The Emacs Editor}.
|
||||
|
||||
When submitting a bug report, please try to describe in excruciating
|
||||
detail the steps required to reproduce the problem. Also try to
|
||||
|
@ -556,6 +741,10 @@ buffer name is a whitespace.
|
|||
@appendix GNU Free Documentation License
|
||||
@include doclicense.texi
|
||||
|
||||
@node Concept Index
|
||||
@unnumbered Concept Index
|
||||
@printindex cp
|
||||
|
||||
@node Key Index
|
||||
@unnumbered Key Index
|
||||
@printindex ky
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
#+title: Modus themes for GNU Emacs
|
||||
#+author: Protesilaos Stavrou
|
||||
#+email: info@protesilaos.com
|
||||
#+language: en
|
||||
#+options: ':t toc:nil author:t email:t num:t
|
||||
#+startup: content
|
||||
#+macro: stable-version 4.2.0
|
||||
#+macro: release-date 2023-05-30
|
||||
#+macro: development-version 4.3.0-dev
|
||||
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
|
||||
#+macro: space @@texinfo:@: @@
|
||||
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
|
||||
#+texinfo_filename: modus-themes.info
|
||||
#+texinfo_dir_category: Emacs misc features
|
||||
#+texinfo_dir_title: Modus Themes: (modus-themes)
|
||||
#+texinfo_dir_desc: Elegant, highly legible and customizable themes
|
||||
#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage}
|
||||
#+texinfo_header: @set MAINTAINER Protesilaos Stavrou
|
||||
#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com}
|
||||
#+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:info@protesilaos.com,contact the maintainer}
|
||||
#+title: Modus themes for GNU Emacs
|
||||
#+author: Protesilaos Stavrou
|
||||
#+email: info@protesilaos.com
|
||||
#+language: en
|
||||
#+options: ':t toc:nil author:t email:t num:t
|
||||
#+startup: content
|
||||
#+macro: stable-version 4.2.0
|
||||
#+macro: release-date 2023-05-30
|
||||
#+macro: development-version 4.3.0-dev
|
||||
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
|
||||
#+macro: space @@texinfo:@: @@
|
||||
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
|
||||
#+texinfo_filename: modus-themes.info
|
||||
#+texinfo_dir_category: Emacs misc features
|
||||
#+texinfo_dir_title: Modus Themes: (modus-themes)
|
||||
#+texinfo_dir_desc: Elegant, highly legible and customizable themes
|
||||
#+texinfo_header: @set MAINTAINERSITE @uref{https://protesilaos.com,maintainer webpage}
|
||||
#+texinfo_header: @set MAINTAINER Protesilaos Stavrou
|
||||
#+texinfo_header: @set MAINTAINEREMAIL @email{info@protesilaos.com}
|
||||
#+texinfo_header: @set MAINTAINERCONTACT @uref{mailto:info@protesilaos.com,contact the maintainer}
|
||||
|
||||
#+texinfo: @insertcopying
|
||||
|
||||
|
|
|
@ -888,7 +888,7 @@ The option `delete-pair-blink-delay' can disable blinking."
|
|||
"Raise N sexps one level higher up the tree.
|
||||
|
||||
This function removes the sexp enclosing the form which follows
|
||||
point, and then re-inserts N sexps that originally followe point,
|
||||
point, and then re-inserts N sexps that originally followed point,
|
||||
thus raising those N sexps one level up.
|
||||
|
||||
Interactively, N is the numeric prefix argument, and defaults to 1.
|
||||
|
|
|
@ -1950,11 +1950,10 @@ version, the function does nothing."
|
|||
"Return contents of BUFFER.
|
||||
If BUFFER is not a buffer or a buffer name, return the contents
|
||||
of `current-buffer'."
|
||||
(or (let ((buf (or buffer (current-buffer))))
|
||||
(when (bufferp buf)
|
||||
(with-current-buffer (or buffer (current-buffer))
|
||||
(substring-no-properties (buffer-string)))))
|
||||
""))
|
||||
(with-current-buffer
|
||||
(if (or (bufferp buffer) (and (stringp buffer) (get-buffer buffer)))
|
||||
buffer (current-buffer))
|
||||
(substring-no-properties (buffer-string))))
|
||||
|
||||
(defun tramp-debug-buffer-name (vec)
|
||||
"A name for the debug buffer for VEC."
|
||||
|
|
|
@ -506,7 +506,19 @@ It is the default value of `show-paren-data-function'."
|
|||
(when (and show-paren-context-when-offscreen
|
||||
(not (eql show-paren--last-pos (point)))
|
||||
(< there-beg here-beg)
|
||||
(not (pos-visible-in-window-p openparen)))
|
||||
;; Either OPENPAREN position is fully visible...
|
||||
(not (or (pos-visible-in-window-p openparen)
|
||||
(let ((dfh4 (* 0.25 (default-font-height)))
|
||||
(part
|
||||
(pos-visible-in-window-p openparen
|
||||
nil t)))
|
||||
;; ...or partially visible, and the
|
||||
;; invisible part is less than 1/4th
|
||||
;; of the default font height
|
||||
(or (< (length part) 4)
|
||||
(and
|
||||
(< (nth 2 part) dfh4)
|
||||
(< (nth 3 part) dfh4)))))))
|
||||
(let ((context (blink-paren-open-paren-line-string
|
||||
openparen))
|
||||
(message-log-max nil))
|
||||
|
|
15
lisp/subr.el
15
lisp/subr.el
|
@ -4061,11 +4061,11 @@ See also `locate-user-emacs-file'.")
|
|||
|
||||
The current restrictions, if any, are restored upon return.
|
||||
|
||||
When the optional :label LABEL argument is present, in which
|
||||
LABEL is a symbol, inside BODY, `narrow-to-region' and `widen'
|
||||
can be used only within the START and END limits. To gain access
|
||||
to other portions of the buffer, use `without-restriction' with the
|
||||
same LABEL argument.
|
||||
When the optional LABEL argument, which is evaluated to get the
|
||||
label to use and must yield a non-nil value, is present, inside
|
||||
BODY, `narrow-to-region' and `widen' can be used only within the
|
||||
START and END limits. To gain access to other portions of the
|
||||
buffer, use `without-restriction' with the same LABEL argument.
|
||||
|
||||
\(fn START END [:label LABEL] BODY)"
|
||||
(declare (indent 2) (debug t))
|
||||
|
@ -4087,9 +4087,8 @@ same LABEL argument.
|
|||
|
||||
The current restrictions, if any, are restored upon return.
|
||||
|
||||
When the optional :label LABEL argument is present, the
|
||||
restrictions set by `with-restriction' with the same LABEL argument
|
||||
are lifted.
|
||||
When the optional LABEL argument is present, the restrictions set
|
||||
by `with-restriction' with the same LABEL argument are lifted.
|
||||
|
||||
\(fn [:label LABEL] BODY)"
|
||||
(declare (indent 0) (debug t))
|
||||
|
|
16
src/lisp.h
16
src/lisp.h
|
@ -2585,20 +2585,14 @@ struct Lisp_Marker
|
|||
ptrdiff_t bytepos;
|
||||
} GCALIGNED_STRUCT;
|
||||
|
||||
/* START and END are markers in the overlay's buffer, and
|
||||
PLIST is the overlay's property list. */
|
||||
struct Lisp_Overlay
|
||||
/* An overlay's real data content is:
|
||||
- plist
|
||||
- buffer (really there are two buffer pointers, one per marker,
|
||||
and both points to the same buffer)
|
||||
- insertion type of both ends (per-marker fields)
|
||||
- start & start byte (of start marker)
|
||||
- end & end byte (of end marker)
|
||||
- next (singly linked list of overlays)
|
||||
- next fields of start and end markers (singly linked list of markers).
|
||||
I.e. 9words plus 2 bits, 3words of which are for external linked lists.
|
||||
*/
|
||||
- buffer
|
||||
- itree node
|
||||
- start buffer position (field of the itree node)
|
||||
- end buffer position (field of the itree node)
|
||||
- insertion types of both ends (fields of the itree node). */
|
||||
{
|
||||
union vectorlike_header header;
|
||||
Lisp_Object plist;
|
||||
|
|
Loading…
Add table
Reference in a new issue