Now on revision 111432. ------------------------------------------------------------ revno: 111432 committer: Daiki Ueno branch nick: trunk timestamp: Mon 2013-01-07 12:59:02 +0900 message: lisp/gnus/mml-smime.el: Support signing by sender. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-01-02 16:13:04 +0000 +++ lisp/gnus/ChangeLog 2013-01-07 03:59:02 +0000 @@ -1,3 +1,13 @@ +2013-01-07 Daiki Ueno + + * mml-smime.el: Support signing by sender. + Requested by Uwe Brauer. + (mml-smime-sign-with-sender): New user option analogous + to mml2015-sign-with-sender. + (mml-smime-epg-sign): Respect mml-smime-sign-with-sender. + (mml-smime-epg-find-usable-secret-key): New helper function copied from + mml2015.el. + 2012-12-31 Lars Magne Ingebrigtsen * gnus-msg.el (gnus-inews-insert-gcc): Don't insert Gcc headers if Gnus === modified file 'lisp/gnus/mml-smime.el' --- lisp/gnus/mml-smime.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/mml-smime.el 2013-01-07 03:59:02 +0000 @@ -74,6 +74,11 @@ :group 'mime-security :type '(repeat (string :tag "Key ID"))) +(defcustom mml-smime-sign-with-sender nil + "If t, use message sender so find a key to sign with." + :group 'mime-security + :type 'boolean) + (defun mml-smime-sign (cont) (let ((func (nth 1 (assq mml-smime-use mml-smime-function-alist)))) (if func @@ -366,6 +371,24 @@ (setq pointer (cdr pointer)))) (setq keys (cdr keys))))) +;; XXX: since gpg --list-secret-keys does not return validity of each +;; key, `mml-smime-epg-find-usable-key' defined above is not enough for +;; secret keys. The function `mml-smime-epg-find-usable-secret-key' +;; below looks at appropriate public keys to check usability. +(defun mml-smime-epg-find-usable-secret-key (context name usage) + (let ((secret-keys (epg-list-keys context name t)) + secret-key) + (while (and (not secret-key) secret-keys) + (if (mml-smime-epg-find-usable-key + (epg-list-keys context (epg-sub-key-fingerprint + (car (epg-key-sub-key-list + (car secret-keys))))) + usage) + (setq secret-key (car secret-keys) + secret-keys nil) + (setq secret-keys (cdr secret-keys)))) + secret-key)) + (autoload 'mml-compute-boundary "mml") ;; We require mm-decode, which requires mm-bodies, which autoloads @@ -376,29 +399,36 @@ (let* ((inhibit-redisplay t) (context (epg-make-context 'CMS)) (boundary (mml-compute-boundary cont)) + (sender (message-options-get 'message-sender)) + (signer-names (or mml-smime-signers + (if (and mml-smime-sign-with-sender sender) + (list (concat "<" sender ">"))))) signer-key (signers (or (message-options-get 'mml-smime-epg-signers) (message-options-set - 'mml-smime-epg-signers - (if (eq mm-sign-option 'guided) - (epa-select-keys context "\ + 'mml-smime-epg-signers + (if (eq mm-sign-option 'guided) + (epa-select-keys context "\ Select keys for signing. If no one is selected, default secret key is used. " - mml-smime-signers t) - (if mml-smime-signers - (mapcar - (lambda (signer) - (setq signer-key (mml-smime-epg-find-usable-key - (epg-list-keys context signer t) - 'sign)) - (unless (or signer-key - (y-or-n-p - (format "No secret key for %s; skip it? " + signer-names + t) + (if (or sender mml-smime-signers) + (delq nil + (mapcar + (lambda (signer) + (setq signer-key + (mml-smime-epg-find-usable-secret-key + context signer 'sign)) + (unless (or signer-key + (y-or-n-p + (format + "No secret key for %s; skip it? " signer))) - (error "No secret key for %s" signer)) - signer-key) - mml-smime-signers)))))) + (error "No secret key for %s" signer)) + signer-key) + signer-names))))))) signature micalg) (epg-context-set-signers context signers) (if mml-smime-cache-passphrase ------------------------------------------------------------ revno: 111431 author: Jürgen Hötzel committer: Michael Albinus branch nick: trunk timestamp: Sun 2013-01-06 22:25:27 +0100 message: * net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-06 15:44:18 +0000 +++ lisp/ChangeLog 2013-01-06 21:25:27 +0000 @@ -1,3 +1,7 @@ +2013-01-06 Jürgen Hötzel + + * net/tramp-adb.el (tramp-methods): Add `tramp-tmpdir' entry. + 2013-01-06 Michael Albinus * net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-06 15:44:18 +0000 +++ lisp/net/tramp-adb.el 2013-01-06 21:25:27 +0000 @@ -66,7 +66,8 @@ "[[:space:]]+\\(.*\\)$")) ; \6 filename ;;;###tramp-autoload -(add-to-list 'tramp-methods `(,tramp-adb-method)) +(add-to-list 'tramp-methods `(,tramp-adb-method + (tramp-tmpdir "/data/local/tmp"))) ;;;###tramp-autoload (eval-after-load 'tramp ------------------------------------------------------------ revno: 111430 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sun 2013-01-06 12:34:54 -0800 message: Merge from emacs-24; up to r111146 diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-01-05 21:18:01 +0000 +++ doc/lispref/ChangeLog 2013-01-06 20:34:54 +0000 @@ -1,3 +1,7 @@ +2013-01-06 Chong Yidong + + * windows.texi (Vertical Scrolling): Fix typos (Bug#13267). + 2013-01-05 Glenn Morris * display.texi (Overlay Properties): Mention field. (Bug#13364) === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2013-01-02 16:13:04 +0000 +++ doc/lispref/windows.texi 2013-01-06 20:34:54 +0000 @@ -3054,10 +3054,11 @@ @end defun @defvar auto-window-vscroll -If this variable is non-@code{nil}, the line-move, scroll-up, and -scroll-down functions will automatically modify the vertical scroll -position to scroll through display rows that are taller than the height -of the window, for example in the presence of large images. +If this variable is non-@code{nil}, the @code{line-move}, +@code{scroll-up}, and @code{scroll-down} functions will automatically +modify the vertical scroll position to scroll through display rows +that are taller than the height of the window, for example in the +presence of large images. @end defvar @node Horizontal Scrolling === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-01-05 21:18:01 +0000 +++ doc/misc/ChangeLog 2013-01-06 20:34:54 +0000 @@ -1,3 +1,13 @@ +2013-01-06 Andreas Schwab + + * autotype.texi: Remove undefined command @subtitlefont. + * cc-mode.texi: Likewise. + + * org.texi (Advanced features): Use `@w{ }' instead of `@ ' in + @item argument. + (Property searches): Use \\ instead of @backslashchar{}. + * pgg.texi (VERSION): Move @set below @setfilename. + 2013-01-05 Andreas Schwab * ada-mode.texi: Remove braces from @title argument. === modified file 'doc/misc/autotype.texi' --- doc/misc/autotype.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/autotype.texi 2013-01-06 14:29:40 +0000 @@ -37,8 +37,7 @@ @center @titlefont{Autotyping} @sp 2 -@center @subtitlefont{Convenient features for text that you enter -frequently in Emacs} +@center Convenient features for text that you enter frequently in Emacs @sp 2 @center Daniel Pfeiffer @center additions by Dave Love === modified file 'doc/misc/cc-mode.texi' --- doc/misc/cc-mode.texi 2013-01-01 09:11:05 +0000 +++ doc/misc/cc-mode.texi 2013-01-06 14:29:40 +0000 @@ -188,7 +188,7 @@ @center @titlefont{CC Mode 5.32} @sp 2 -@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} +@center A GNU Emacs mode for editing C and C-like languages @sp 2 @center Barry A. Warsaw, Martin Stjernholm, Alan Mackenzie === modified file 'doc/misc/org.texi' --- doc/misc/org.texi 2013-01-05 21:18:01 +0000 +++ doc/misc/org.texi 2013-01-06 20:34:54 +0000 @@ -3027,7 +3027,7 @@ Selects this line for global recalculation with @kbd{C-u C-c *}, but not for automatic recalculation. Use this when automatic recalculation slows down editing too much. -@item @ +@item @w{ } Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}. All lines that should be recalculated should be marked with @samp{#} or @samp{*}. @@ -5050,7 +5050,7 @@ To create sparse trees and special lists with selection based on properties, the same commands are used as for tag searches (@pxref{Tag searches}). @table @kbd -@orgcmdkkc{C-c / m,C-c @backslashchar{},org-match-sparse-tree} +@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree} Create a sparse tree with all matching entries. With a @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. @orgcmd{C-c a m,org-tags-view} === modified file 'doc/misc/pgg.texi' --- doc/misc/pgg.texi 2013-01-05 16:19:53 +0000 +++ doc/misc/pgg.texi 2013-01-06 10:34:26 +0000 @@ -2,9 +2,9 @@ @include gnus-overrides.texi +@setfilename ../../info/pgg + @set VERSION 0.1 - -@setfilename ../../info/pgg @settitle PGG @value{VERSION} @copying ------------------------------------------------------------ revno: 111429 committer: Michael Albinus branch nick: trunk timestamp: Sun 2013-01-06 16:44:18 +0100 message: * net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can consist of mor than one digit. (tramp-adb-file-name-handler-alist): Use `tramp-handle-file-exists-p' consistently. (tramp-adb-file-name-handler): Don't tweak `tramp-default-host'. (tramp-adb-handle-file-exists-p): Remove function. (tramp-adb-file-name-host): New defun. (tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection): Use it. (tramp-adb-maybe-open-connection): Set "remote-path" property. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-06 02:58:57 +0000 +++ lisp/ChangeLog 2013-01-06 15:44:18 +0000 @@ -1,3 +1,16 @@ +2013-01-06 Michael Albinus + + * net/tramp-adb.el (tramp-adb-ls-toolbox-regexp): The file size can + consist of mor than one digit. + (tramp-adb-file-name-handler-alist): Use + `tramp-handle-file-exists-p' consistently. + (tramp-adb-file-name-handler): Don't tweak `tramp-default-host'. + (tramp-adb-handle-file-exists-p): Remove function. + (tramp-adb-file-name-host): New defun. + (tramp-adb-execute-adb-command, tramp-adb-maybe-open-connection): + Use it. + (tramp-adb-maybe-open-connection): Set "remote-path" property. + 2013-01-06 Chong Yidong * vc/vc.el (vc-next-action): Detect buffer modifications === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2013-01-05 13:48:16 +0000 +++ lisp/net/tramp-adb.el 2013-01-06 15:44:18 +0000 @@ -61,7 +61,7 @@ "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group - "[[:space:]]+\\([[:digit:]]\\)" ; \4 size + "[[:space:]]+\\([[:digit:]]+\\)" ; \4 size "[[:space:]]+\\([-[:digit:]]+[[:space:]][:[:digit:]]+\\)" ; \5 date "[[:space:]]+\\(.*\\)$")) ; \6 filename @@ -95,8 +95,8 @@ (file-directory-p . tramp-adb-handle-file-directory-p) (file-symlink-p . tramp-handle-file-symlink-p) ;; FIXME: This is too sloppy. - (file-executable-p . file-exists-p) - (file-exists-p . tramp-adb-handle-file-exists-p) + (file-executable-p . tramp-handle-file-exists-p) + (file-exists-p . tramp-handle-file-exists-p) (file-readable-p . tramp-handle-file-exists-p) (file-writable-p . tramp-adb-handle-file-writable-p) (file-local-copy . tramp-adb-handle-file-local-copy) @@ -139,13 +139,7 @@ "Invoke the ADB handler for OPERATION. First arg specifies the OPERATION, second arg is a list of arguments to pass to the OPERATION." - (let ((fn (assoc operation tramp-adb-file-name-handler-alist)) - ;; `tramp-default-host's default value is (system-name). Not - ;; useful for us. - (tramp-default-host - (unless (equal (eval (car (get 'tramp-default-host 'standard-value))) - tramp-default-host) - tramp-default-host))) + (let ((fn (assoc operation tramp-adb-file-name-handler-alist))) (if fn (save-match-data (apply (cdr fn) args)) (tramp-run-real-handler operation args)))) @@ -940,20 +934,19 @@ (tramp-set-connection-property v "process-name" nil) (tramp-set-connection-property v "process-buffer" nil))))) -;; Android < 4 doesn't provide test command. - -(defun tramp-adb-handle-file-exists-p (filename) - "Like `file-exists-p' for Tramp files." - (with-parsed-tramp-file-name filename nil - (with-tramp-file-property v localname "file-exists-p" - (file-attributes filename)))) - ;; Helper functions. +(defun tramp-adb-file-name-host (vec) + "Return host component of VEC. +If it is equal to the default value of `tramp-default-host', `nil' is returned." + (let ((host (tramp-file-name-host vec))) + (unless (equal host (eval (car (get 'tramp-default-host 'standard-value)))) + host))) + (defun tramp-adb-execute-adb-command (vec &rest args) "Returns nil on success error-output on failure." - (when (tramp-file-name-host vec) - (setq args (append (list "-s" (tramp-file-name-host vec)) args))) + (when (tramp-adb-file-name-host vec) + (setq args (append (list "-s" (tramp-adb-file-name-host vec)) args))) (with-temp-buffer (prog1 (unless (zerop (apply 'call-process (tramp-adb-program) nil t nil args)) @@ -1061,21 +1054,21 @@ (when (and p (processp p)) (delete-process p)) (if (not devices) (tramp-error vec 'file-error "No device connected")) - (if (and (tramp-file-name-host vec) - (not (member (tramp-file-name-host vec) devices))) + (if (and (tramp-adb-file-name-host vec) + (not (member (tramp-adb-file-name-host vec) devices))) (tramp-error vec 'file-error - "Device %s not connected" (tramp-file-name-host vec))) + "Device %s not connected" (tramp-adb-file-name-host vec))) (if (and (not (eq (length devices) 1)) - (not (tramp-file-name-host vec))) + (not (tramp-adb-file-name-host vec))) (tramp-error vec 'file-error "Multiple Devices connected: No Host/Device specified")) (with-tramp-progress-reporter vec 3 "Opening adb shell connection" (let* ((coding-system-for-read 'utf-8-dos) ;is this correct? (process-connection-type tramp-process-connection-type) - (args (if (tramp-file-name-host vec) - (list "-s" (tramp-file-name-host vec) "shell") + (args (if (tramp-adb-file-name-host vec) + (list "-s" (tramp-adb-file-name-host vec) "shell") (list "shell"))) (p (let ((default-directory (tramp-compat-temporary-file-directory))) @@ -1111,7 +1104,19 @@ vec 3 "Connection reset, because remote host changed from `%s' to `%s'" old-getprop new-getprop) - (tramp-adb-maybe-open-connection vec))))))))) + (tramp-adb-maybe-open-connection vec))) + + ;; Set "remote-path" connection property. This is needed + ;; for eshell. + (tramp-adb-send-command vec "echo \\\"$PATH\\\"") + (tramp-set-connection-property + vec "remote-path" + (split-string + (with-current-buffer (tramp-get-connection-buffer vec) + ;; Read the expression. + (goto-char (point-min)) + (read (current-buffer))) + ":" 'omit-nulls)))))))) (provide 'tramp-adb) ;;; tramp-adb.el ends here ------------------------------------------------------------ revno: 111428 fixes bug: http://debbugs.gnu.org/11490 committer: Chong Yidong branch nick: trunk timestamp: Sun 2013-01-06 10:58:57 +0800 message: Try to handle buffer/file modifications which conflict with VCS locking. * vc/vc-hooks.el (vc-after-save): DTRT for locking VCSes. * vc/vc.el (vc-next-action): Detect buffer modifications conflicting with locking VCS operation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-05 13:48:16 +0000 +++ lisp/ChangeLog 2013-01-06 02:58:57 +0000 @@ -1,3 +1,10 @@ +2013-01-06 Chong Yidong + + * vc/vc.el (vc-next-action): Detect buffer modifications + conflicting with locking VCS operation (Bug#11490). + + * vc/vc-hooks.el (vc-after-save): DTRT for locking VCSes. + 2013-01-05 Michael Albinus * net/tramp-adb.el (tramp-do-parse-file-attributes-with-ls): === modified file 'lisp/vc/vc-hooks.el' --- lisp/vc/vc-hooks.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/vc-hooks.el 2013-01-06 02:58:57 +0000 @@ -703,19 +703,21 @@ ;; the state to 'edited and redisplay the mode line. (let* ((file buffer-file-name) (backend (vc-backend file))) - (and backend - (or (and (equal (vc-file-getprop file 'vc-checkout-time) - (nth 5 (file-attributes file))) - ;; File has been saved in the same second in which - ;; it was checked out. Clear the checkout-time - ;; to avoid confusion. - (vc-file-setprop file 'vc-checkout-time nil)) - t) - (eq (vc-checkout-model backend (list file)) 'implicit) - (vc-state-refresh file backend) - (vc-mode-line file backend)) - ;; Try to avoid unnecessary work, a *vc-dir* buffer is - ;; present if this is true. + (cond + ((null backend)) + ((eq (vc-checkout-model backend (list file)) 'implicit) + ;; If the file was saved in the same second in which it was + ;; checked out, clear the checkout-time to avoid confusion. + (if (equal (vc-file-getprop file 'vc-checkout-time) + (nth 5 (file-attributes file))) + (vc-file-setprop file 'vc-checkout-time nil)) + (if (vc-state-refresh file backend) + (vc-mode-line file backend))) + ;; If we saved an unlocked file on a locking based VCS, that + ;; file is not longer up-to-date. + ((eq (vc-file-getprop file 'vc-state) 'up-to-date) + (vc-file-setprop file 'vc-state nil))) + ;; Resynch *vc-dir* buffers, if any are present. (when vc-dir-buffers (vc-dir-resynch-file file)))) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/vc.el 2013-01-06 02:58:57 +0000 @@ -659,6 +659,10 @@ (eval-when-compile (require 'dired)) +(declare-function dired-get-filename "dired" (&optional localp noerror)) +(declare-function dired-move-to-filename "dired" (&optional err eol)) +(declare-function dired-marker-regexp "dired" ()) + (unless (assoc 'vc-parent-buffer minor-mode-alist) (setq minor-mode-alist (cons '(vc-parent-buffer vc-parent-buffer-name) @@ -1072,6 +1076,17 @@ ;; among all the `files'. (model (nth 4 vc-fileset))) + ;; If a buffer has unsaved changes, a checkout would discard those + ;; changes, so treat the buffer as having unlocked changes. + (when (and (not (eq model 'implicit)) (eq state 'up-to-date)) + (let ((files files)) + (while files + (let ((buffer (get-file-buffer (car files)))) + (and buffer + (buffer-modified-p buffer) + (setq state 'unlocked-changes + files nil)))))) + ;; Do the right thing (cond ((eq state 'missing) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.