emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-mobile agenda failure with encryption and tramp
@ 2010-10-13 16:49 Greg Troxel
  2010-10-13 23:56 ` [PATCH] Don't use possibly-tramp paths with openssl Greg Troxel
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Troxel @ 2010-10-13 16:49 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1007 bytes --]


I think the problem is that I have org-mobile-directory set to

  "/ssh:foo.example.com:/usr/home/gdt/ORG"

then in here the encryption tries to be done in place, which means (I
think) a tramp pathname is passed to openssl.

Probably agendas.org needs to be created in a staging area and then the
encrypted version moved with copy-file.



(defun org-mobile-create-sumo-agenda ()
  "Create a file that contains all custom agenda views."
  (interactive)
  (let* ((file (expand-file-name "agendas.org"
				 org-mobile-directory))
	 (file1 (if org-mobile-use-encryption
		    org-mobile-encryption-tempfile
		  file))
	 (sumo (org-mobile-sumo-agenda-command))
	 (org-agenda-custom-commands
	  (list (append sumo (list (list file1)))))
	 (org-mobile-creating-agendas t))
    (unless (file-writable-p file1)
      (error "Cannot write to file %s" file1))
    (when sumo
      (org-store-agenda-views))
    (when org-mobile-use-encryption
      (org-mobile-encrypt-file file1 file)
      (delete-file file1))))


[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Don't use possibly-tramp paths with openssl.
  2010-10-13 16:49 org-mobile agenda failure with encryption and tramp Greg Troxel
@ 2010-10-13 23:56 ` Greg Troxel
  2010-10-14  6:28   ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Troxel @ 2010-10-13 23:56 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Greg Troxel

In creating agendas, follow the way all other org files are handled by
encrypting locally and then using copy-file, so that remote agenda.org
paths with tramp will work.
---
 lisp/org-mobile.el |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
index 9208d30..26e990d 100644
--- a/lisp/org-mobile.el
+++ b/lisp/org-mobile.el
@@ -677,8 +677,7 @@ The table of checksums is written to the file mobile-checksums."
     (when sumo
       (org-store-agenda-views))
     (when org-mobile-use-encryption
-      (org-mobile-encrypt-file file1 file)
-      (delete-file file1))))
+      (org-mobile-encrypt-and-move file1 file))))
 
 (defun org-mobile-encrypt-and-move (infile outfile)
   "Encrypt INFILE locally to INFILE_enc, then move it to OUTFILE.
-- 
1.7.0.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Don't use possibly-tramp paths with openssl.
  2010-10-13 23:56 ` [PATCH] Don't use possibly-tramp paths with openssl Greg Troxel
@ 2010-10-14  6:28   ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2010-10-14  6:28 UTC (permalink / raw)
  To: Greg Troxel; +Cc: emacs-orgmode

Applied, thanks.

- Carsten

On Oct 14, 2010, at 1:56 AM, Greg Troxel wrote:

> In creating agendas, follow the way all other org files are handled by
> encrypting locally and then using copy-file, so that remote agenda.org
> paths with tramp will work.
> ---
> lisp/org-mobile.el |    3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el
> index 9208d30..26e990d 100644
> --- a/lisp/org-mobile.el
> +++ b/lisp/org-mobile.el
> @@ -677,8 +677,7 @@ The table of checksums is written to the file  
> mobile-checksums."
>     (when sumo
>       (org-store-agenda-views))
>     (when org-mobile-use-encryption
> -      (org-mobile-encrypt-file file1 file)
> -      (delete-file file1))))
> +      (org-mobile-encrypt-and-move file1 file))))
>
> (defun org-mobile-encrypt-and-move (infile outfile)
>   "Encrypt INFILE locally to INFILE_enc, then move it to OUTFILE.
> -- 
> 1.7.0.5
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-14  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 16:49 org-mobile agenda failure with encryption and tramp Greg Troxel
2010-10-13 23:56 ` [PATCH] Don't use possibly-tramp paths with openssl Greg Troxel
2010-10-14  6:28   ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).