Ken Manheimer [Thu, 16 Dec 2010 23:30:57 +0000 (18:30 -0500)]
Synopsis: Migrate allout encryption provisions from pgg library, which is
obsolete, to epg library, which replaces pgg.
Due to the underlying GnuPG V2 restrictions on external handling of
passphrases (or epg's restrictions when working with GnuPG v2), we are
dropping allout's symmetric encryption passphrase hinting and verification.
This has the advantage that no emacs code has access to the passphrase,
leaving all passphrase handling in GnuPG, which is much more secure. This,
together with the reduction in allout code complexity and logistical
complications the user would have in arranging to use GnuPG v1, requires
dropping these features.
Keypair encryption gains features, with adoption of respect for epa-file's
'epa-file-encrypt-to'. This means that allout outlines can be associated
with recipients, and encryptions by default will be targeted to those
recipients.
The default encryption mode (whether to epa-file-encrypt-to recipients, if
any, or symmetric mode) is overridden by providing a universal argument
greater than 1 to the outline entry encryption command,
'allout-toggle-current-subtree-encryption'. The user is then prompted to
select keypair identities from their list of known GnuPG keypairs. If they
don't select any, then symmetric encryption is done. Otherwise, the
selected keypair identities are targeted. If the universal argument is
greater than 4 then the selected recipients (or none, if none were
selected) are associated with the outline using a file local variable, as
default recipients for subsequent encryptions.
This is a big merge from a private branch.
Code details:
(allout-toggle-current-subtree-encryption,
allout-toggle-subtree-encryption): Adjust docstrings to reflect defaulting
policy and other changes.
Change fetch-pass to keymode-cue, for simpler universal argument
interpretation.
(allout-toggle-subtree-encryption): Adjust docstring to describe
changed encryption provisions.
Change fetch-pass to keymode-cue, for simpler universal argument
interpretation.
Remove provisions for handling key type and identity - they'll all be
within allout-encrypt-string or epg/epg or even contained all the way in
gpg.
(allout-encrypt-string): Include keymode-cue, for optionally prompting for
keypair recipients (universal argument > 1) and, in addition, associating the
specified recipients with the outline (universal argument > 4) using a file
local variable setting for 'epa-file-encrypt-to'.
Require epa, for recipients handling.
Change how regexp filtering elements are named.
Describe the problem with caching of incorrect symmetric-decryption keys.
Use the epa-passphrase-callback-function, in case the user is using GnuPG
v1.
Support saving of the selected keypair recipients when invoked with a
keymode-cue > 4.
Remove obsolete arguments 'fetch-pass', 'target-cache-id', 'retried'.
Require 'epa.
Establish epg-context with armoring and default epg-protocol.
Remove all passphrase cache, verification, and hinting code.
(allout-passphrase-verifier-handling, allout-passphrase-hint-handling):
No longer used, delete.
(allout-mode): Adjust docstring to describe changed encryption provisions.
Describe the problem with caching of incorrect symmetric-decryption keys.
(allout-obtain-passphrase, allout-epg-passphrase-callback-function,
allout-make-passphrase-state, allout-passphrase-state-passphrase,
allout-encrypted-key-info, allout-update-passphrase-mnemonic-aids,
allout-get-encryption-passphrase-verifier, allout-verify-passphrase):
Obsolete, remove.
Ken Manheimer [Thu, 16 Dec 2010 22:33:13 +0000 (17:33 -0500)]
last pgg adjustment before migrating to epg.
(allout-encrypted-key-info): replace pgg-gpg-symmetric-key-p with explicit
examination of the parsed armoring structure. pgg-gpg-symmetric-key-p
seems to have drifted, not recognizing parsed symmetric keys as being
symmetric.
Gnus developers [Thu, 16 Dec 2010 22:22:28 +0000 (22:22 +0000)]
Merge changes made in Gnus trunk.
nnimap.el (nnimap-wait-for-response): Always look (at least) at the previous line.
nnimap.el (nnimap-quirk): New function.
(nnimap-retrieve-group-data-early): Use it.
(nnimap-quirks): New alist.
gnus.texi (Foreign Groups): Added clarification of foreign groups.
gnus-sum.el (gnus-summary-push-marks-to-backend): Fix the logic for copying read-ness to the backends.
gnus-group.el (gnus-group-kill-group): Notify the backend that the group has been killed.
(gnus-group-yank-group): Ditto.
gnus-start.el (gnus-subscribe-newsgroup): Notify the backend.
nnir.el: Improve customizations.
gnus.texi (Archived Messages): Removed outdated comment and text.
nnfolder.el (nnfolder-save-all-buffers): Refactor out into its own function.
(nnfolder-request-expire-articles): Save all the buffers after doing expiry.
nnmail.el (nnmail-expiry-target-group): Revert the "all articles are the last article", since that led to serious performance regressions when expiring nnml groups.
gnus-html.el (gnus-html-schedule-image-fetching): Make sure the HTML fetching stops when Gnus exits.
gnus-srvr.el: Avoid passing nil regexp argument to delete-matching-lines.
auth-source.el (auth-source-gpg-encrypt-to): New variable to set the list of recipient keys, or use symmetric encryption if not a list.
(auth-source-create): Use it to make `epa-file-encrypt-to' local for an EPA override, replacing the call to `netrc-store-data'.
Ken Manheimer [Thu, 16 Dec 2010 07:39:17 +0000 (02:39 -0500)]
respect epa-file-encrypt-to, defaulting to it when encrypting, if set, and
adjusting the value (as a file local variable and an active buffer setting)
with the result of epa-select-keys.
note the problem with caching of incorrect symmetric decryption keys.
(allout-toggle-current-subtree-encryption),
(allout-toggle-subtree-encryption): Adjust docstrings to reflect defaulting
policy change.
(allout-encrypt-string): keymod-cue rather than keypair-mode, which is
interpreted here. Use the epa-passphrase-callback-function, in case the
user is using GnuPG v1. Support saving of the selected keypair recipients
when invoked with a keymode-cue > 4.
Gnus developers [Wed, 15 Dec 2010 22:24:36 +0000 (22:24 +0000)]
gnus-agent.el: Indent.
gnus.texi: Fix a couple nnir -> @code{nnir} things.
nnimap.el (nnimap-retrieve-group-data-early): Fix the syntax of the QRESYNC command by deleting a superfluous space which broke Cyrus servers. This change will break other servers that are buggy the other way around.
gnus.texi (The hyrex Engine): Say that this engine as obsolete.
Jari Aalto [Wed, 15 Dec 2010 02:56:22 +0000 (10:56 +0800)]
New command rectangle-number-lines (Bug#4382).
* rect.el (rectange--default-line-number-format)
(rectangle-number-line-callback): New functions.
(rectangle-number-lines): New command, bound to C-x r N.
Chong Yidong [Wed, 15 Dec 2010 02:05:38 +0000 (10:05 +0800)]
Delete long unused functions and variables in rect.el.
lisp/rect.el (operate-on-rectangle-lines, string-rectangle-string):
Delete unused variables.
(move-to-column-force): Remove function obsolete since 21.2.
Gnus developers [Mon, 13 Dec 2010 22:29:12 +0000 (22:29 +0000)]
Merge changes made in Gnus trunk.
nnir.el (nnir-run-imap): Return article list in UID order.
gnus-start.el (gnus-auto-subscribed-groups): Add nnimap to the list of automatically subscribed groups.
(gnus-auto-subscribed-categories): New variable.
(gnus-matches-options-n): Use it.
(gnus-default-subscribed-newsgroups): Remove unused variable.
(gnus-start-draft-setup): Message a bit less.
gnus-agent.el (gnus-agentize): Don't create the queue group automatically on startup. It'll be created later, if needed.
gnus-start.el (gnus-1): Clarify comment.
(gnus-matches-options-n): Fix typo in last change.
(gnus-1): Don't create the nndrafts group twice.
(gnus-setup-news): There's no need to read the active file here, since that's done again later on a per-backend basis.
(gnus-start-draft-setup): Make sure that the new group is started out empty.
netrc.el (netrc-point-at-eol): Remove the unused netrc-point-at-old and netrc-bound-and-true-p bindings.
(netrc-parse): Cache the netrc contents.
proto-stream.el (proto-stream-open-network-only): Fix the calling convention of the network-only option.
gnus-sum.el (gnus-summary-enter-digest-group): Mention gnus-auto-select-on-ephemeral-exit.
Karl Fogel [Sun, 12 Dec 2010 16:53:24 +0000 (11:53 -0500)]
* lisp/bookmark.el (bookmark-name-from-full-record): Rename back to
this original name from `bookmark-name-from-record' reverting part of
2010-12-08T08:09:27Z!kfogel@red-bean.com / kfogel@red-bean.com-20101208080927-5j9jqnb2xvcw4ogm.
As Drew Adams pointed out, there was no reason to cause churn for
third-party callers.
Eli Zaretskii [Sat, 11 Dec 2010 18:45:53 +0000 (20:45 +0200)]
Fallout from bug #7563.
processes.texi (Shell Arguments):
strings.texi (Creating Strings): Don't mention "shell commands";
make it explicit that `split-string-and-unquote' and
`combine-and-quote-strings' are mainly for working with arguments
to call-process and start-process.
Eli Zaretskii [Sat, 11 Dec 2010 15:41:04 +0000 (17:41 +0200)]
Fix bug #7398 with truncated glyphs in w32 tooltips.
w32fns.c (Fx_show_tip): Call try_window with last argument
TRY_WINDOW_IGNORE_FONTS_CHANGE. Delete the TODO ifdef: problem
solved. Round up the tip height to an integral multiple of the
frame's line height. Add FRAME_COLUMN_WIDTH to the tip width.
Eli Zaretskii [Sat, 11 Dec 2010 15:20:11 +0000 (17:20 +0200)]
Fix bug #7398 with truncated glyphs in tooltip display on w32.
w32fns.c (Fx_show_tip): Call try_window with last argument
TRY_WINDOW_IGNORE_FONTS_CHANGE. Delete the TODO ifdef: problem
solved. Round up the tip height to an integral multiple of the
frame's line height. Add FRAME_COLUMN_WIDTH to the tip width.
Eli Zaretskii [Sat, 11 Dec 2010 12:27:13 +0000 (14:27 +0200)]
Code cleanup in xdisp.c regarding string_char_and_length.
xdisp.c (string_pos_nchars_ahead, c_string_pos)
(face_before_or_after_it_pos, next_element_from_string)
(next_element_from_c_string, produce_stretch_glyph): Remove unused
calculations of maximum string length before calling
string_char_and_length and STRING_CHAR_AND_LENGTH.
(string_char_and_length): Update commentary: MAXLEN is no longer
needed.
Glenn Morris [Sat, 11 Dec 2010 02:54:07 +0000 (18:54 -0800)]
Misc vc-bzr.el.
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic): Also check that the executable
state of the file matches. (Bug#7544)
(vc-bzr-register, vc-bzr-checkin)
(vc-bzr-annotate-extract-revision-at-line): Doc fixes.
(vc-directory-exclusion-list): Remove unnecessary eval-after-load.
Comment changes:
Remove outdated comments about defunct upstream.
Set maintainer to FSF.
Gnus developers [Sat, 11 Dec 2010 01:27:14 +0000 (01:27 +0000)]
Merge changes made in Gnus trunk.
nnir.el (nnir-request-expire-articles): Only allow article deletion.
message.el (message-bogus-recipient-p): Set address to "" if nil.
gnus-gravatar.el (gnus-gravatar-transform-address): Fix error when email address is nil.
proto-stream.el (proto-stream-open-network-only): New function to have a way to specify non-STARTTLS upgrade connections.
Ken Manheimer [Fri, 10 Dec 2010 22:09:57 +0000 (17:09 -0500)]
- replace pgg with epg/epa - working version, with no calls to pgg.
- remove passphrase verifier and hinting.
(allout-passphrase-verifier-handling), (allout-passphrase-hint-handling):
No longer used, delete.
(allout-epg-protocol): Never used and unnecessary, delete.
(allout-mode): Adjust docstring to describe changed encryption provisions.
(allout-toggle-current-subtree-encryption): Adjust docstring to describe
changed encryption provisions. Change fetch-pass to keymode-cue, for
simpler universal argument interpretation.
(allout-toggle-subtree-encryption): Adjust docstring to describe
changed encryption provisions. Change fetch-pass to keymode-cue, for
simpler universal argument interpretation. Remove provisions for handling
key type and identity - they'll all be within allout-encrypt-string or
epg/epg or even contained all the way in gpg.
(allout-encrypt-string): Include keypair-mode argument, for requesting
keypair encryption. Require epa, for recipients handling. Change how
regexp filtering elements are named.
(allout-obtain-passphrase), (allout-epg-passphrase-callback-function),
(allout-make-passphrase-state), (allout-passphrase-state-passphrase):
Remove, we're not providing passphrase verification and hinting because:
- gpg v1 is required for epg passphrase callback operation, on which
verification and hinting depends
- doing that handling exposes the passphrase to emacs code, which is much
much less secure than leaving all passphrase handling in gpg
- leaving all passphrase handling to gpg removes a lot of complexity from
allout code
- gpg v2 connection to gpg-agent requires no user provisions, so is simpler
and provides some convenience that makes up for the lack of hinting and
verification
Stefan Monnier [Fri, 10 Dec 2010 20:00:25 +0000 (15:00 -0500)]
Derive from prog-mode, use derived-mode-p, and fix up various
minor style issues in lisp/progmodes.
* lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
(vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
make-local-hook.
* lisp/progmodes/sh-script.el (sh-require-final-newline): Remove.
(sh-set-shell): Don't set require-final-newline since it's already done
by prog-mode.
* lisp/progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
since we never set it.
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
Use read-string and standard prompt.
* lisp/progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
* lisp/progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
(meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
(meta-common-mode-map): Rename from meta-mode-map.
Remove C-m binding, which is a user preference, not mode specific.
(meta-common-mode): New major mode; replace meta-common-initialization.
* lisp/progmodes/js.el (js-mode): Call syntax-propertize rather than messing
around with font-lock.
* lisp/progmodes/etags.el (select-tags-table-mode):
Derive from special-mode.
* lisp/progmodes/octave-mod.el (octave-mode):
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
(gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
(gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
Let define-derived-mode do its job.
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
Move initialization into declaration.
(cpp-edit-mode): Use define-derived-mode.
(cpp-edit-load): Use derived-mode-p.
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/f90.el (f90-mode):
* lisp/progmodes/cfengine.el (cfengine-mode): Don't bother setting
require-final-newline since prog-mode does it already.
* lisp/progmodes/cc-cmds.el (c-update-modeline): Use match-string.
* lisp/progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
* lisp/progmodes/antlr-mode.el: Require cc-mode upfront.
(antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
the declaration.
(antlr-directory-dependencies, antlr-show-makefile-rules):
Use derived-mode-p.
(antlr-language-option): Don't assume point-min==1.
(antlr-mode): Use define-derived-mode.
* lisp/progmodes/ada-mode.el: Use derived-mode-p.
(ada-mode): Use define-derived-mode.
Use hack-local-variables-hook.
Jan Djärv [Fri, 10 Dec 2010 18:23:43 +0000 (19:23 +0100)]
Move call to Fkill_emacs from signal handler (session event) (Bug#7552).
* keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT
as (Qsave_session arg).
* xsmfns.c (smc_interact_CB): Set arg to Qnil.
(smc_die_CB): Make an event with arg Qt.
(Fhandle_save_session): If event has Qt as argument,
call Fkill_emacs.
Eli Zaretskii [Thu, 9 Dec 2010 19:07:53 +0000 (21:07 +0200)]
Fix bug #1077 with popping new frames from a minibuffer-only frame.
menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p):
New functions.
(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
them instead of `nil' and `>', respectively.
(menu-bar-showhide-tool-bar-menu): Use menu-bar-frame-for-menubar
instead of `nil'.
(toggle-menu-bar-mode-from-frame): Use menu-bar-frame-for-menubar
and menu-bar-positive-p instead of `nil' and `>', respectively.
Eli Zaretskii [Thu, 9 Dec 2010 18:53:17 +0000 (20:53 +0200)]
Fix bug #1077 with popping new frames from a minibuffer-only frame.
Do NOT merge with trunk!
menu-bar.el (menu-bar-frame-for-menubar, menu-bar-positive-p): New functions.
(menu-bar-showhide-menu) <menu-bar-mode, showhide-tool-bar>: Use
them instead of `nil' and `>', respectively.
Michael Albinus [Wed, 8 Dec 2010 20:07:25 +0000 (21:07 +0100)]
* net/tramp.el (tramp-handle-start-file-process): Protect
buffer-modified value. (Bug#7557)
(tramp-action-password): Delete region, do not narrow.
(tramp-process-actions): Do not widen.
Ken Manheimer [Wed, 8 Dec 2010 19:57:06 +0000 (14:57 -0500)]
partial checking with substantial progress towards epg passphrase
callback arrangements. several reasons to drop the special provisions:
- gpg v1 is required for passphrase callback operation - so allout
passphrase hinting and verification requires that
- exposes passphrase to emacs code, which is much much less secure than
sticking with gpg v2 and leaving all passphrase handling in gpg
- leaving all passphrase handling to gpg removes a lot of complexity from
allout code
- gpg v2 connection to gpg-agent requires no user provisions, so is simpler
and provides some convenience that makes up for the lack of hinting and
verification
this checkin includes a partially developed version of
allout-epg-passphrase-callback-function, with hinting and ready to
implement the passphrase verification. but there's a lot to go there, and
in working through the twisty flow to adjust the verifier and hint string,
etc. not worth it, considering the above trade-offs.
Karl Fogel [Wed, 8 Dec 2010 08:09:27 +0000 (03:09 -0500)]
Adjust parameter names and doc strings to resolve confusion over
whether "bookmark" meant a bookmark name or a bookmark record.
Along the way, shorten one function's name for similar reasons.
(Issue #7548)
* lisp/bookmark.el
(bookmark-name-from-record):
New name for `bookmark-name-from-full-record'. All callers changed.
(bookmark-get-bookmark, bookmark-get-bookmark-record,
bookmark-default-annotation-text, bookmark-prop-get, bookmark-prop-set,
bookmark-get-annotation, bookmark-set-annotation,
bookmark-get-filename, bookmark-set-filename,
bookmark-get-position, bookmark-set-position,
bookmark-get-front-context-string, bookmark-set-front-context-string,
bookmark-get-rear-context-string, bookmark-set-rear-context-string,
bookmark-get-handler, bookmark-edit-annotation, bookmark--jump-via,
bookmark-handle-bookmark, bookmark-location, bookmark-show-annotation):
Rename `bookmark' parameter to `bookmark-name-or-record', to
clearly show its role, and shorten or adjust doc strings accordingly.
(bookmark-set-name):
Same, and pass the parameter directly to `bookmark-get-bookmark'
instead of redundantly doing the callee's work.
(bookmark-default-annotation-text, bookmark-send-edited-annotation,
bookmark-relocate, bookmark-insert-location, bookmark-insert,
bookmark-delete):
Rename `bookmark' parameter to `bookmark-name', and in some cases
shorten doc string accordingly.
(bookmark-rename):
Change `old' and `new' parameters to `old-name'
and `new-name', and adjust an internal variable to avoid confusion.
(bookmark-jump, bookmark-jump-noselect):
Clarify `bookmark' parameter in doc string.
Glenn Morris [Wed, 8 Dec 2010 05:00:12 +0000 (21:00 -0800)]
In gdb, try to init comint history from gdbhist.
* lisp/progmodes/gdb-mi.el (gdb): Try to initialize comint input history
from gdb's history file. (Bug#7575)
Glenn Morris [Wed, 8 Dec 2010 03:45:45 +0000 (19:45 -0800)]
Make verify-visited-file-modtime default to the current buffer.
* src/fileio.c (Fverify_visited_file_modtime): Default to current buffer.
* doc/lispref/buffers.texi (Modification Time):
verify-visited-file-modtime now defaults to the current buffer.