unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Lewis <jason@dickson.st>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16679@debbugs.gnu.org
Subject: bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg in cygwin emacs
Date: Tue, 11 Feb 2014 10:04:50 +1100	[thread overview]
Message-ID: <52F95B12.4030609@dickson.st> (raw)
In-Reply-To: <83ha89wuvp.fsf@gnu.org> (sfid-20140209_011828_219790_12DDF936)

[-- Attachment #1: Type: text/plain, Size: 6437 bytes --]


Eli Zaretskii wrote, On 9/02/2014 1:18 AM:
>> Date: Sat, 08 Feb 2014 21:05:21 +1100
>> From: Jason Lewis <jason@dickson.st>
>> CC: 16679@debbugs.gnu.org
>>
>> Because I like to live life on the edge, I decided to mount my user
>> directory from my drive D:, following a procedure much like this one:
>>
>> http://caskater4.blogspot.com.au/2007/09/moving-your-data-where-you-want-in.html
>>
>> something like this:
>>
>>  1. xcopy /E /H /O /X /Y /I C:\Users D:\Users
>>  2. rmdir /S /Q C:\Users
>>  3. rmdir "C:\Documents and Settings"
>>  4. mklink /J C:\Users D:\Users
>>  5. mklink /J "C:\Documents and Settings" D:\Users
>>
>> I'm not in front of that computer right now but that sounds as though it
>> has something to do with it.
> Are you sure every program you use, starting with Emacs, fully
> supports directory junction points created like that?
>

I've not encountered any problems with directory junctions yet. I've
been running it like this for at least 6 months.

I tested again by trying to creating a file on /cygdrive/c/Temp which is
not on the junctioned drive and received the same error.

backtrace:

Debugger entered--Lisp error: (file-error "Opening output file" stringp nil)
  signal(file-error ("Opening output file" stringp nil))
  (condition-case error (setq string (epg-encrypt-string context (if
(stringp start) (epa-file--encode-coding-string start coding-system) (if
start nil (setq start (point-min) end (point-max))) (setq buffer
(current-buffer)) (let ((temp-buffer (generate-new-buffer " *temp*")))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ...
... ...) (and ... ...))))) (if (or (eq epa-file-select-keys t) (and
(null epa-file-select-keys) (not (local-variable-p ... ...))))
(epa-select-keys context "Select recipients for encryption.\nIf no one
is selected, symmetric encryption will be performed.  " recipients) (if
epa-file-encrypt-to (epg-list-keys context recipients))))) (error (if
(setq entry (assoc file epa-file-passphrase-alist)) (setcdr entry nil))
(signal (quote file-error) (cons "Opening output file" (cdr error)))))
  (let* ((coding-system (or coding-system-for-write (if (fboundp (quote
select-safe-coding-system)) (let ((buffer-file-name ...))
(select-safe-coding-system (point-min) (point-max)))
buffer-file-coding-system))) (context (epg-make-context))
(coding-system-for-write (quote binary)) string entry (recipients (cond
((listp epa-file-encrypt-to) epa-file-encrypt-to) ((stringp
epa-file-encrypt-to) (list epa-file-encrypt-to)))) buffer)
(epg-context-set-passphrase-callback context (cons (function
epa-file-passphrase-callback-function) file))
(epg-context-set-progress-callback context (cons (function
epa-progress-callback-function) (format "Encrypting %s" file)))
(epg-context-set-armor context epa-armor) (condition-case error (setq
string (epg-encrypt-string context (if (stringp start)
(epa-file--encode-coding-string start coding-system) (if start nil (setq
start (point-min) end (point-max))) (setq buffer (current-buffer)) (let
((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect ... ...)))) (if (or (eq epa-file-select-keys t) (and
(null epa-file-select-keys) (not ...))) (epa-select-keys context "Select
recipients for encryption.\nIf no one is selected, symmetric encryption
will be performed.  " recipients) (if epa-file-encrypt-to (epg-list-keys
context recipients))))) (error (if (setq entry (assoc file
epa-file-passphrase-alist)) (setcdr entry nil)) (signal (quote
file-error) (cons "Opening output file" (cdr error)))))
(epa-file-run-real-handler (function write-region) (list string nil file
append visit lockname mustbenew)) (if (boundp (quote
last-coding-system-used)) (setq last-coding-system-used coding-system))
(if (eq visit t) (progn (setq buffer-file-name file)
(set-visited-file-modtime)) (if (stringp visit) (progn
(set-visited-file-modtime) (setq buffer-file-name visit)))) (if (or (eq
visit t) (eq visit nil) (stringp visit)) (message "Wrote %s"
buffer-file-name)))
  epa-file-write-region(nil nil "/cygdrive/c/Temp/test.gpg" nil t)
  apply(epa-file-write-region (nil nil "/cygdrive/c/Temp/test.gpg" nil t))
  (if op (apply op args) (epa-file-run-real-handler operation args))
  (let ((op (get operation (quote epa-file)))) (if op (apply op args)
(epa-file-run-real-handler operation args)))
  (progn (let ((op (get operation (quote epa-file)))) (if op (apply op
args) (epa-file-run-real-handler operation args))))
  (unwind-protect (progn (let ((op (get operation (quote epa-file))))
(if op (apply op args) (epa-file-run-real-handler operation args))))
(set-match-data save-match-data-internal (quote evaporate)))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn
(let ((op (get operation (quote epa-file)))) (if op (apply op args)
(epa-file-run-real-handler operation args)))) (set-match-data
save-match-data-internal (quote evaporate))))
  epa-file-handler(write-region nil nil "/cygdrive/c/Temp/test.gpg" nil t)
  write-region(nil nil "/cygdrive/c/Temp/test.gpg" nil t
"/cygdrive/c/Temp/test.gpg")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer()
  save-buffer(1)
  #<subr call-interactively>(save-buffer nil nil)
  funcall(#<subr call-interactively> save-buffer nil nil)
  (with-no-warnings (funcall ad--addoit-function function record-flag keys))
  (setq ad-return-value (with-no-warnings (funcall ad--addoit-function
function record-flag keys)))
  (let ((ido-ubiquitous-next-override
(ido-ubiquitous-get-command-override function))) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag keys))))
  (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
function) (setq ad-return-value (with-no-warnings (funcall
ad--addoit-function function record-flag keys))))
  (let (ad-return-value) (ido-ubiquitous-with-override
(ido-ubiquitous-get-command-override function) (setq ad-return-value
(with-no-warnings (funcall ad--addoit-function function record-flag
keys)))) ad-return-value)
  ad-Advice-call-interactively(#<subr call-interactively> save-buffer
nil nil)
  apply(ad-Advice-call-interactively #<subr call-interactively>
(save-buffer nil nil))
  call-interactively(save-buffer nil nil)
  command-execute(save-buffer)


-- 
Jason Lewis
http://emacstragic.net



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 834 bytes --]

  reply	other threads:[~2014-02-10 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  4:45 bug#16679: 24.3.50; can't create a newly encrypted gpg file with easypg in cygwin emacs Jason Lewis
2014-02-08  1:42 ` Glenn Morris
2014-02-08  8:54   ` Eli Zaretskii
2014-02-08 10:05     ` Jason Lewis
2014-02-08 14:18       ` Eli Zaretskii
2014-02-10 23:04         ` Jason Lewis [this message]
2014-02-11  3:46           ` Eli Zaretskii
2014-02-11  5:15             ` Jason Lewis
2014-02-11 16:05               ` Eli Zaretskii
2014-02-12  2:38                 ` Jason Lewis
2019-08-30 10:59                   ` Lars Ingebrigtsen
2019-08-30 11:44                     ` Jason Lewis
2019-09-04 13:00                       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52F95B12.4030609@dickson.st \
    --to=jason@dickson.st \
    --cc=16679@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).