Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Ropevim's RopeRename function only look in the current file
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Charles-Axel Dein  
View profile  
 More options Jul 17 2012, 3:45 am
From: Charles-Axel Dein <charlesaxel.d...@gmail.com>
Date: Tue, 17 Jul 2012 00:45:46 -0700 (PDT)
Local: Tues, Jul 17 2012 3:45 am
Subject: Ropevim's RopeRename function only look in the current file

Hi,

I am using Vim 7.3 rev 63. Whenever I use the RopeRename function, Rope
only finds occurences in the current file, despite the fact that the
project root is right (I double-checked by closing the project and
verifying the displayed path). It does not depend on the type of the
refactored content (function, attribute, etc.). I did some research but
have absolutely no idea where it could come from. Let me know if you need
any other information.

Thanks for your help!

Best,

Charles


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Gholami Rudi  
View profile  
 More options Jul 17 2012, 1:23 pm
From: Ali Gholami Rudi <aligr...@gmail.com>
Date: Tue, 17 Jul 2012 21:53:23 +0430
Local: Tues, Jul 17 2012 1:23 pm
Subject: Re: Ropevim's RopeRename function only look in the current file

Charles-Axel Dein <charlesaxel.d...@gmail.com> wrote:
> I am using Vim 7.3 rev 63. Whenever I use the RopeRename function, Rope
> only finds occurences in the current file, despite the fact that the
> project root is right (I double-checked by closing the project and
> verifying the displayed path). It does not depend on the type of the
> refactored content (function, attribute, etc.). I did some research but
> have absolutely no idea where it could come from. Let me know if you need
> any other information.

How about finding occurrences or go to definition from another
module?  Do they fail as rename does?

Also is there anything special in your environment? Symbolic
links, spaces in filenames, or anything?

        Ali


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles-Axel Dein  
View profile  
 More options Jul 17 2012, 3:33 pm
From: Charles-Axel Dein <c...@d3in.org>
Date: Tue, 17 Jul 2012 21:33:55 +0200
Local: Tues, Jul 17 2012 3:33 pm
Subject: Re: Ropevim's RopeRename function only look in the current file

I'm using MacVim, there's nothing specific in my environment (except,
perhaps, that I'm using virtualenv provided by pythonbrew).

Finding occurrences raises the following error:

Rope project root folder: .Opening [.] project ...
Opening [.] project ... done
Error detected while processing function RopeFindOccurrences:
line    1:
E141: No file name for buffer 26
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/decorato rs.py",
line 53, in newfunc
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/interfac e.py",
line 257, in find_occurrences
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/interfac e.py",
line 229, in _base_findit
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/interfac e.py",
line 520, in _save_buffers
  File
"/Library/Python/2.7/site-packages/ropevim-0.4-py2.7.egg/ropevim.py", line
181, in save_files
    vim.command('wall')
vim.error

RopeGoToDefinition returns "Cannot go to definition!".

Thanks for your help!

Charles

On Tue, Jul 17, 2012 at 7:23 PM, Ali Gholami Rudi <aligr...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Gholami Rudi  
View profile  
 More options Jul 17 2012, 10:18 pm
From: Ali Gholami Rudi <aligr...@gmail.com>
Date: Wed, 18 Jul 2012 06:48:04 +0430
Local: Tues, Jul 17 2012 10:18 pm
Subject: Re: Ropevim's RopeRename function only look in the current file

I see.  The problem is ropevim tries to save all unsaved
buffers but fails because of a buffer with no file.  How
about setting ropevim_confirm_saving and ignoring such
buffers manually?  Does the problem persist?

        Ali


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles-Axel Dein  
View profile  
 More options Jul 19 2012, 11:43 am
From: Charles-Axel Dein <c...@d3in.org>
Date: Thu, 19 Jul 2012 17:43:51 +0200
Local: Thurs, Jul 19 2012 11:43 am
Subject: Re: Ropevim's RopeRename function only look in the current file

Ok so I tried in another folder, with the django source code. There is a
single buffer opened. When I do RopeRename, I get:

Rope project root folder: .0. yes
1. no
Project not exists in ., create one?Project creation aborted
Error detected while processing function RopeRename:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/decorato rs.py",
line 53, in newfunc
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/interfac e.py",
line 52, in do_refactor
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/refactor .py",
line 32, in show
  File
"/Library/Python/2.7/site-packages/ropemode-0.2-py2.7.egg/ropemode/refactor .py",
line 119, in _create_refactoring
  File
"/Library/Python/2.7/site-packages/rope-0.9.4-py2.7.egg/rope/refactor/renam e.py",
line 19, in __init__
    self.pycore = project.pycore
AttributeError: 'NoneType' object has no attribute 'pycore'

Thanks again,

Charles

On Wed, Jul 18, 2012 at 4:18 AM, Ali Gholami Rudi <aligr...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Gholami Rudi  
View profile  
 More options Jul 20 2012, 10:53 pm
From: Ali Gholami Rudi <aligr...@gmail.com>
Date: Sat, 21 Jul 2012 07:23:30 +0430
Local: Fri, Jul 20 2012 10:53 pm
Subject: Re: Ropevim's RopeRename function only look in the current file

Charles-Axel Dein <c...@d3in.org> wrote:
> Ok so I tried in another folder, with the django source code. There is a
> single buffer opened. When I do RopeRename, I get:

> Rope project root folder: .0. yes
> 1. no
> Project not exists in ., create one?Project creation aborted

OK.  Do you answer yes to this second question?
Does this patch help?

--- a/ropemode/interface.py     2012-07-21 07:32:43.171305597 +0430
+++ b/ropemode/interface.py     2012-07-21 07:32:47.001311202 +0430
@@ -86,11 +86,6 @@
             self.close_project()
         address = rope.base.project._realpath(os.path.join(root,
                                                            '.ropeproject'))
-        if not os.path.exists(address):
-            if not self.env.y_or_n('Project not exists in %s, ' \
-                                   'create one?' % root):
-                self.env.message("Project creation aborted")
-                return
         progress = self.env.create_progress('Opening [%s] project' % root)
         self.project = rope.base.project.Project(root)
         if self.env.get('enable_autoimport'):

Thanks,
Ali


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Charles-Axel Dein  
View profile  
 More options Jul 24 2012, 5:10 am
From: Charles-Axel Dein <c...@d3in.org>
Date: Tue, 24 Jul 2012 11:10:17 +0200
Local: Tues, Jul 24 2012 5:10 am
Subject: Re: Ropevim's RopeRename function only look in the current file

Yes, I answer yes.

I applied the patch. The functions are a bit slower (which may mean that
Rope is effectively analyzing all the files), but nothing changes: it still
applies change only in the current file.

On Sat, Jul 21, 2012 at 4:53 AM, Ali Gholami Rudi <aligr...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Gholami Rudi  
View profile  
 More options Jul 24 2012, 10:13 am
From: Ali Gholami Rudi <aligr...@gmail.com>
Date: Tue, 24 Jul 2012 18:43:13 +0430
Local: Tues, Jul 24 2012 10:13 am
Subject: Re: Ropevim's RopeRename function only look in the current file

Charles-Axel Dein <c...@d3in.org> wrote:
> Yes, I answer yes.

> I applied the patch. The functions are a bit slower (which may mean that
> Rope is effectively analyzing all the files), but nothing changes: it still
> applies change only in the current file.

I guess there is a problem in handling Mac-style paths in
rope/base/project.py.

        Ali


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
toomanyjoes  
View profile  
 More options Aug 30 2012, 10:13 pm
From: toomanyjoes <joseph.elizo...@demandmedia.com>
Date: Thu, 30 Aug 2012 19:13:46 -0700 (PDT)
Local: Thurs, Aug 30 2012 10:13 pm
Subject: Re: Ropevim's RopeRename function only look in the current file

Ali is right about the problem, in my case anyways. I'm using Mac OSx 10.8
and Vim 7.3. The one useful piece of info that Ali left out is a solution.
Here is what worked for me.

Had to modify "find_file" function (highlighted line) in  ~/.vim/bundle/ropevim/ftplugin/python/libs/ropevim.py
(your path, obviously, may vary):
    def find_file(self, filename, readonly=False, other=False, force=False):
        if filename != self.filename() or force:
            if other:
                vim.command('new')
            *vim.command("e %s" % os.path.abspath(filename))*
            if readonly:
                vim.command('set nomodifiable')

Bing bang boom, works like a charm now.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Gholami Rudi  
View profile  
 More options Aug 31 2012, 12:16 am
From: Ali Gholami Rudi <aligr...@gmail.com>
Date: Fri, 31 Aug 2012 08:37:32 +0430
Local: Fri, Aug 31 2012 12:07 am
Subject: Re: Ropevim's RopeRename function only look in the current file

Very interesting... So the problem was inside ropevim itself.  I'm a
bit worried about the comparison between filename and self.filename()
3 lines above the changed line.  Could you test to see how they differ?
I think a simple print statement like "print filename, self.filename()"
would show up as a message in vim.

Thanks,
Ali


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Sookocheff VA  
View profile  
 More options Oct 16 2012, 11:24 am
From: Kevin Sookocheff VA <ksookoch...@vendasta.com>
Date: Tue, 16 Oct 2012 08:24:22 -0700 (PDT)
Local: Tues, Oct 16 2012 11:24 am
Subject: Re: Ropevim's RopeRename function only look in the current file

I changed this line in ropevim.py and still have the same problem.
FindOccurrences and Rename both only affect the local file.

Is there something I need to do to setup my .ropeproject before running
these commands?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »