Hello,
My .emacs is :
(setq load-path (cons "/Users/Shared/Library/Emacs/" load-path))
(require 'ps-ccrypt "ps-ccrypt.el")
ps-ccrypt.el works with Emacs 22.3.1 but does not work with Emacs 24.5.1: when opening a crypted file, after the password prompt, I have this error message : "Failed to run ccrypt: no such file or directory".
This looks like a path problem.
Updating ps-ccrypt.el to
;; Copyright (C) 2001, 2003, 2006, 2008, 2010 Peter Selinger
does not help.
Digging into ps-ccrypt.el, at line 182, I replace ccrypt by /usr/local/bin/ccrypt and (after restarting Emacs) IT WORKS. (Thank me.)
Indeed it was a path problem.
M-x shell
mac-de-Papa% echo $PATH
echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/nbc/bin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/X11/bin:[...]
mac-de-Papa% ps -p $$
ps -p $$
PID TTY TIME CMD
885 ttys002 0:00.03 /bin/zsh -i
mac-de-Papa% more /etc/paths
more /etc/paths
/usr/local/bin
/usr/local/sbin
/usr/local/nbc/bin
/usr/bin
/usr/sbin
/bin
/sbin
(I am using a Mac.)
As you see, my path is configured as cleanly as possible for all shells so I suspect that Emacs 24 + ps-ccrypt.el do not yield the correct path.
As the problem does not exist with Emacs 22 + (same) ps-ccrypt.el, I suspect ps-ccrypt.el interacts badly with the newer Emacs 24.
I hope somebody can fix this more definitely than I did, as ps-ccrypt.el within Emacs is really much more CONVENIENT and SAFE than ccrypt and Emacs apart.
Cheers.
Dear Pierre,
thanks for reporting this. However, I was not able to reproduce the behavior you describe. I made a fresh install of emacs-24.5.1 on my system, and put ccrypt in /usr/local/bin, and still the ps-ccrypt encryption worked for me without problems. I tried this on Ubuntu as well as Mac.
Here are the steps I followed:
put ccrypt in /usr/local/bin (and made sure it's not also elsewhere)
.emacs file contains the line
(require 'ps-ccrypt "ps-ccrypt.el")
ps-ccrypt.el is in the load-path
downloaded und unpacked emacs-24.5.tar.gz
made a clean install for testing purposes:
./configure --prefix=/tmp/i
make
make install
verify that it's the right version:
/tmp/i/bin/emacs --version
GNU Emacs 24.5.1
/tmp/i/bin/emacs somefile.cpt
works without problems
PATH=/usr/local/bin:/usr/bin /tmp/i/bin/emacs somefile.cpt
works without problems
PATH=/usr/bin /tmp/i/bin/emacs somefile.cpt
does not work: "Failed to run ccrypt: no such file or directory"
The last test, in particular, proves that the crucial factor is the PATH environment variable: decryption works if and only if ccrypt can be found on this path.
Please follow the same steps and let me know at what point you get different results, if any. Thanks, -- Peter