From: Michael Albinus <michael.albinus@gmx.de>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: tramp-devel@mail.freesoftware.fsf.org, ding@gnus.org
Subject: Re: Tramp-IMAP works and needs testing
Date: Tue, 08 Sep 2009 15:33:11 +0200 [thread overview]
Message-ID: <nqzl95ftdp.fsf@alcatel-lucent.de> (raw)
In-Reply-To: <878wgrjsto.fsf@lifelogs.com>
[-- Attachment #1: Type: text/plain, Size: 3152 bytes --]
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Sat, 18 Jul 2009 13:11:51 +0200 Michael Albinus <michael.albinus@gmx.de> wrote:
>
> MA> - Several functions in `tramp-imap-file-name-handler-alist' are not
> MA> implemented yet.
>
> I'm trying to get basic file read/write working before those other
> functions. Should I just set them to nil for now?
We could set them to `ignore', and add a comment. I've done it for all
functions with a missing implementation.
> MA> - `tramp-imap-handle-file-directory-p' must not return nil in all
> MA> cases. When I apply (save-buffer), the imap folder is checked for
> MA> being a directory. As workaround, I've changed
> MA> `tramp-imap-handle-file-directory-p' to return `t', but it must be
> MA> more precise.
>
> This is actually tough, because an entry could be both. We could have
> the files INBOX.test/b and INBOX.test/b/c at the same time. I will have
> to make the directory name the mailbox name and everything above that
> the filename. Thus no subdirectories are allowed, which simplifies the
> logic. Otherwise I don't think Tramp can handle it. So:
>
> /imap:albinus@localhost:/INBOX.test = directory
> /imap:albinus@localhost:/INBOX.test/ = directory
> /imap:albinus@localhost:/INBOX.test/1 = file "1"
> /imap:albinus@localhost:/INBOX.test/1/2 = illegal file name
>
> I think that's sufficient for most users. I hate to kill functionality
> this way, but otherwise things will get too confusing. Does that sound
> OK to you?
OK. I've added a corresponding implementation.
Problems:
`tramp-imap-buffer' can return nil, if the connection to IMAP fails. You
always use (with-current-buffer (tramp-imap-buffer vec) ...), which
gives an error then. It might be better to check the result of
`tramp-imap-buffer' first.
`tramp-imap-handle-name-all-completions' does not complete mailbox names.
If you apply `write-file', and the file exists already on the IMAP
server, a second file with the same name (subject) will be written
instead of overwriting the existing one.
In `tramp-imap-buffer', you use auth-source in order to determine user
and password. I believe, it shall be rather done via `tramp-read-passwd'
(which includes auth-source). By this, the user name given in the Tramp
filename is respected. Furthermore, I plan to add more password handling
mechanisms there, for example the Secret Service API for gnome-keyring
and kwallet.
Furthermore, I've changed the following:
- Change the copyright owner to FSF. I hope you are OK with this;
otherwise we have no chance to add your package to Tramp and Emacs.
- Make `tramp-imap-method' and `tramp-imaps-method' a defconst. I know
that in some other tramp-*.el files the methods are also defcustom's,
but I don't believe it is necessary (and I shall change it everywhere).
- Change implementation of `tramp-imap-handle-file-readable-p ' and
`tramp-imap-handle-file-writable-p'.
After all, it is working already pretty fine. I believe we shall add it
to Tramp's CVS repository, and likely we shall add it also to the
upcoming Tramp 2.1.17 release (maybe marked as experimental).
> Ted
Best regards, Michael.
[-- Attachment #2: tramp-imap.el --]
[-- Type: application/emacs-lisp, Size: 27836 bytes --]
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Tramp-devel mailing list
Tramp-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/tramp-devel
next prev parent reply other threads:[~2009-09-08 13:33 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-26 20:02 file storage in IMAP (eventually for Tramp) working " Ted Zlatanov
2007-12-29 22:34 ` David
2007-12-30 20:35 ` Ted Zlatanov
2007-12-31 10:14 ` Michael Albinus
2007-12-31 12:30 ` Ted Zlatanov
2007-12-31 13:35 ` Michael Albinus
2007-12-31 14:52 ` Ted Zlatanov
2007-12-31 17:14 ` Michael Albinus
2007-12-31 17:45 ` Ted Zlatanov
2007-12-31 21:32 ` Michael Albinus
2008-01-02 20:43 ` Ted Zlatanov
2008-01-02 21:40 ` Reiner Steib
2008-01-02 22:15 ` Ted Zlatanov
2008-01-02 23:50 ` Michael Albinus
2008-01-03 11:32 ` Reiner Steib
2008-01-03 12:43 ` Ted Zlatanov
2008-01-03 12:56 ` Michael Albinus
2008-01-03 13:21 ` Ted Zlatanov
2008-01-03 13:27 ` Ted Zlatanov
2008-01-03 17:31 ` James Cloos
2008-01-03 17:42 ` Ted Zlatanov
2008-01-04 11:00 ` Michael Albinus
2007-12-31 17:09 ` David
2009-04-12 13:04 ` Magnus Henoch
2009-04-13 15:50 ` Ted Zlatanov
2009-04-14 8:44 ` Michael Albinus
2009-04-14 16:22 ` Ted Zlatanov
2009-04-15 21:03 ` Michael Albinus
2009-04-23 0:15 ` Ted Zlatanov
2009-04-23 2:45 ` Daiki Ueno
2009-04-23 12:51 ` Ted Zlatanov
2009-04-23 13:09 ` Daiki Ueno
2009-04-23 13:44 ` Ted Zlatanov
2009-04-23 13:48 ` Daiki Ueno
2009-04-23 14:19 ` Ted Zlatanov
2009-04-23 14:28 ` Daiki Ueno
2009-04-23 15:16 ` Ted Zlatanov
2009-04-24 0:37 ` Daiki Ueno
2009-04-23 21:30 ` Ted Zlatanov
2009-04-25 17:25 ` Michael Albinus
2009-07-10 21:34 ` Ted Zlatanov
2009-07-15 21:25 ` Tramp-IMAP works " Ted Zlatanov
2009-07-16 6:42 ` Michael Albinus
2009-07-18 11:11 ` Michael Albinus
2009-09-07 4:13 ` Ted Zlatanov
2009-09-08 13:33 ` Michael Albinus [this message]
2009-09-09 16:13 ` Ted Zlatanov
2009-09-10 7:18 ` Michael Albinus
2009-09-21 19:28 ` imap-hash.el and tramp-imap.el Ted Zlatanov
2009-09-22 14:52 ` Michael Albinus
2009-09-23 21:07 ` Ted Zlatanov
2009-09-24 10:38 ` Michael Albinus
2009-09-25 20:48 ` Ted Zlatanov
2009-09-27 15:57 ` Ted Zlatanov
2009-09-27 19:24 ` Michael Albinus
2009-09-28 12:03 ` Michael Albinus
2009-09-24 6:44 ` Reiner Steib
2009-09-25 20:49 ` Ted Zlatanov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nqzl95ftdp.fsf@alcatel-lucent.de \
--to=michael.albinus@gmx.de \
--cc=ding@gnus.org \
--cc=tramp-devel@mail.freesoftware.fsf.org \
--cc=tzz@lifelogs.com \
/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.
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 NNTP newsgroup(s).