unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Tramp always wants password when using cscope
@ 2009-08-22  3:50 Neil Baylis
  2009-08-24  6:59 ` Michael Albinus
       [not found] ` <mailman.5230.1251097197.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Neil Baylis @ 2009-08-22  3:50 UTC (permalink / raw)
  To: help-gnu-emacs

I'm using emacs 23.1 to access a large remote source tree that has a
cscope index at the top. Initially it wouldn't work at all because it
was running the local cscope instead of the remote one, but I found a
solution for that by searchingthe web. It was necessary to change some
functions within xcscope.el. So, now it correctly runs the remote
cscope instead of the local one, but it doesn't make use of the
password cache. Every time I do any cscope related task, it starts a
new remote shell and asks for the password again. The password cache
works correctly for opening named files and directories, it's just the
cscope related functions that don't work.

Is there a newer version of xcscope.el that I should be using that
corrects these problems?


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

* Re: Tramp always wants password when using cscope
  2009-08-22  3:50 Tramp always wants password when using cscope Neil Baylis
@ 2009-08-24  6:59 ` Michael Albinus
       [not found]   ` <AB6A1388-20FE-4913-B68F-4BB6A1BCA4E3@gmail.com>
       [not found] ` <mailman.5230.1251097197.2239.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2009-08-24  6:59 UTC (permalink / raw)
  To: Neil Baylis; +Cc: help-gnu-emacs

Neil Baylis <neil.baylis@gmail.com> writes:

> I'm using emacs 23.1 to access a large remote source tree that has a
> cscope index at the top. Initially it wouldn't work at all because it
> was running the local cscope instead of the remote one, but I found a
> solution for that by searchingthe web. It was necessary to change some
> functions within xcscope.el. So, now it correctly runs the remote
> cscope instead of the local one, but it doesn't make use of the
> password cache. Every time I do any cscope related task, it starts a
> new remote shell and asks for the password again. The password cache
> works correctly for opening named files and directories, it's just the
> cscope related functions that don't work.
>
> Is there a newer version of xcscope.el that I should be using that
> corrects these problems?

What have you changed in xcscope.el?

Best regards, Michael.




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

* Re: Tramp always wants password when using cscope
       [not found] ` <mailman.5230.1251097197.2239.help-gnu-emacs@gnu.org>
@ 2009-08-24 15:07   ` Neil Baylis
  0 siblings, 0 replies; 5+ messages in thread
From: Neil Baylis @ 2009-08-24 15:07 UTC (permalink / raw)
  To: help-gnu-emacs

On Aug 23, 11:59 pm, Michael Albinus <michael.albi...@gmx.de> wrote:
>
> What have you changed in xcscope.el?
>
Hi Michael.

Here are the diffs from the xcscope.el from the cscope-15.6 source:

1991c1991
< 		    (apply 'start-process "cscope" outbuf
---
> 		    (apply 'start-file-process "cscope" outbuf
2001c2001
< 	  (apply 'call-process cscope-program nil outbuf t options)
---
> 	  (apply 'process-file cscope-program nil outbuf t options)
2124c2124
< 	    (apply 'start-process "cscope-indexer"
---
> 	    (apply 'start-file-sprocess "cscope-indexer"

It seems as though xcscope is starting a new remote cscope process for
every query. This adds 10 to 20 seconds to each query, on top of the
time it takes the remote cscope to do the lookup, which is already
about 15 to 20 seconds. I changed my ssh setup to no longer require
passwords, but it still incurs these delays.



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

* Re: Tramp always wants password when using cscope
       [not found]   ` <AB6A1388-20FE-4913-B68F-4BB6A1BCA4E3@gmail.com>
@ 2009-08-24 19:36     ` Michael Albinus
       [not found]       ` <1e6b7d810908241627i10fc39dfu51642eac6ad1f587@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2009-08-24 19:36 UTC (permalink / raw)
  To: Neil Baylis; +Cc: help-gnu-emacs

Neil Baylis <neil.baylis@gmail.com> writes:

> Hi Michael.

Hi,

> Here are the diffs from the xcscope.el from the cscope-15.6 source:

[...]

That looks OK.

> It seems as though xcscope is starting a new remote cscope process for
> every query. This adds 10 to 20 seconds to each query, on top of the
> time it takes the remote cscope to do the lookup, which is already
> about 15 to 20 seconds. I changed my ssh setup to no longer require
> passwords, but it still incurs these delays.

How have you changed your ssh setup? Do you use ssh-agent?

Do you need to enter your password when you open the first file on the
remote host?

Furthermore, it might be worth to see your Tramp traces. Could you,
please, set tramp-verbose to 6, and show me the traces? They are
configured to never dump your password, but you can check it yourself
again, before sending.

> Thanks,
>
> Neil

Best regards, Michael.




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

* Re: Tramp always wants password when using cscope
       [not found]       ` <1e6b7d810908241627i10fc39dfu51642eac6ad1f587@mail.gmail.com>
@ 2009-08-25  6:26         ` Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2009-08-25  6:26 UTC (permalink / raw)
  To: Neil Baylis; +Cc: help-gnu-emacs

Neil Baylis <neil.baylis@gmail.com> writes:

> Michael,

Hi Neil,

> I think the problem is with xcscope. Every time I ask it to look
> something up in the tags database, xcscope opens a new shell session.
> This takes some seconds to set up before it can even begin to access
> the database. If xcscope would re-use the connection, it would not
> incur this delay.

Yes. It would require to rewrite xcsope that it opens just a shell on
the remote host (as asynchronous process), and then sends the commends
to the corresponding process, and reads the results from the associated
buffer.

> Here's an example, where I asked xcscope to find the global definition
> of a symbol. You can see that the entire process took about 15
> seconds. About half the time was spent before the "exec cscope"
> command was sent. The rest was actually looking up the symbol and
> returning the results.

What I don't see in the traces is where Tramp requires to enter the
password, again. Do I miss something?

> Thanks,
>
> Neil

Best regards, Michael.




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

end of thread, other threads:[~2009-08-25  6:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  3:50 Tramp always wants password when using cscope Neil Baylis
2009-08-24  6:59 ` Michael Albinus
     [not found]   ` <AB6A1388-20FE-4913-B68F-4BB6A1BCA4E3@gmail.com>
2009-08-24 19:36     ` Michael Albinus
     [not found]       ` <1e6b7d810908241627i10fc39dfu51642eac6ad1f587@mail.gmail.com>
2009-08-25  6:26         ` Michael Albinus
     [not found] ` <mailman.5230.1251097197.2239.help-gnu-emacs@gnu.org>
2009-08-24 15:07   ` Neil Baylis

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).