Giter VIP home page Giter VIP logo

importmagic.el's People

Contributors

anachronic avatar danlamanna avatar jgarte avatar syohex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

importmagic.el's Issues

Importmagic and/or epc not found. importmagic.el will not be working.

I am using the spacemacs python layer on macos and I am running into this error.

I have installed importmagic and epc using pip globally.

➜ pip install importmagic epc Requirement already satisfied: importmagic in /usr/local/lib/python3.7/site-packages (0.1.7) Requirement already satisfied: epc in /usr/local/lib/python3.7/site-packages (0.0.5) Requirement already satisfied: setuptools>=0.6b1 in /usr/local/lib/python3.7/site-packages (from importmagic) (41.6.0) Requirement already satisfied: sexpdata>=0.0.3 in /usr/local/lib/python3.7/site-packages (from epc) (0.0.3)

I've installed importmagic and epc for python2 as well.

I have set my python interpreter in emacs to "python3"

(setq flycheck-python-pycompile-executable "python3") (setq python-shell-interpreter "python3")

All other python features work except this one. Not sure how to resolve this.

Cannot find importmagic and epc

I'm using pip3 to install these dependencies. I tried pip as well but no luck get this working.

After installing the dependencies. I get:

Requirement already satisfied: importmagic in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: epc in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: setuptools>=0.6b1 in /usr/local/lib/python3.6/site-pack
ages (from importmagic)                                                              
Requirement already satisfied: sexpdata>=0.0.3 in /usr/local/lib/python3.6/site-packag
es (from epc)                                                                        

And I get the error message when opening a python file.

Importmagic and/or epc not found. importmagic.el will not be working.

Do I have to configure this just like what this sublime plugin did here?

Improve test suite

We're currently relying on travis to set up virtual environments. However, I'm not 100% convinced that emacs is using the virtual environments provided by the OS, since nowhere are we sourcing those virtualenvs. This leads me to think that emacs is always using OS's python rather than the virtual environment's.

virtualenvwrapper.el seems like a good place to look at.

I'd like to make a macro that defines tests for every Python version we want to support. That way we can keep our definitions and be sure that we're sourcing the right python versions.

Feature request: Import parent module instead of submodule

Hi, thanks for the awesome package.

Currently for os.path.join* (where * is the cursor), importmagic-fix-symbol-at-point will ask imports for os.path which give candidates like

Screen Shot 2019-04-02 at 22 36 48

It would be nice to have an option to ask imports for os even the cursor is right after os.path.join like

Screen Shot 2019-04-02 at 22 32 48

for one who prefers usages like os.path.join() and datetime.datetime.now() instead of join() and now().

Also, if the cursor is right after os.path*, importmagic-fix-symbol-at-point, candidates is now given as

Screen Shot 2019-04-02 at 22 31 25

which (importing path while using as os.path) is probably not what the user want in this situation.

How do you think about it? I found this because I saw the gif of the importmagic repo and noticed that it imports os in this situation.

How can I make importmagic.el to find modules installed under `pip install -e .`?

I have done pip install -e . in my project where I have to import all the files as:

from broker._utils._log import log
from broker._utils.tools import QuietExit, print_tb
from broker.utils import tools
$ tree
├── broker
│   ├── _utils
│       ├── _log.py
│       ├── tools.py

But importmagic does not find any modue names under broker like import broker._utils._log.py.

Would it be possible to force it to see them as well?

Process epc con 3 not running

When running importmagic-fix-symbol, I keep getting the error message:

epc:net-send: Process epc con 3 not running

I cannot find any info online why this happens. I do have a buffer called *epc con 6*. Why does importmagic need "epc con 3"? What is special about it?

Python 3.9 seg fault

I faced seg fault on my emacs importmagic. During deep investigation I found out that problem appears on newer versions of python. I could not find reason for that. But I found workaround that wont harm. And during lack of support for original python importmagic. I would be happy to see fixes at least here.

What needs to be done? Add name='default' here

Link to importmagic issue

doesn't work with tree-sitter

There's a new mode in emacs29, python-base-mode, which python-mode and python-ts-mode both derive from, and importmagic ought to test against that.

Use python-shell-interpreter instead of hardcoded python.

This has been requested in #3 and would solve #10 if error messages were more accurate. Issue can be closed after

  1. Error messages for importmagic and/or epc are not found and running python process failed (which do not exist right now) are separated. Right now the default behavior is having only the first error message for both cases.
  2. importmagic.el uses the python-shell-interpreter variable in order to find the python executable. This was ultimately the problem in #10.
  3. Such cases have tests.

I'll mention #12 aims to fix this but it's a little buggy atm.

Expose importmagic style configuration

I might be missing something, but it seems that the style configuration for importmagic isn't exposed.

From a brief look, maybe it makes sense for the get_import_statement to take a configuration alist and convert it to a dictionary (not sure how epc handles this) to set on the Imports object. Does that make sense/sound about right?

Archive this repository or find a new maintainer

I have not been using Emacs now for a very long time, and I don't have time to maintain this project. In fact, #17 has stayed open for a very long time, and I'll admit I haven't even taken a look at it.

I'm going to archive this repository unless I can find a new maintainer before Jan 31, 2020. If anyone reading this wishes to maintain this, project, please comment here.

broken by sexpdata 0.0.4

This issue affects importmagic.el in a slightly different way than jedi.el and I don't know where to look for a log that contains a traceback, but it hangs forever on 0.0.4 and works fine on 0.0.3: jd-boyd/sexpdata#36

how to use this package with emacs's elpy package?

hello, i use elpy mode to write python code im emacs, but the latest elpy mode remove the importmagic package, some command is no longer to use, such as elpy-importmagic-fixup, it's very conveniont, is there any method to implete it in importmagic.el?

don't add current directory

When I auto-complete in a directory like this:

+ src/
    + foo/
        | bar.py
        | baz.py
        | __init__.py

if I'm in baz.py and I type BazClass, a symbol that appears in bar.py, I will see suggestions like this:

from foo.baz import BazClass
from baz import BazClass

the latter seems to be straightforwardly incorrect. Is there some way I can configure importmagic to get rid of it?

from decimal import Decimal never suggested for Decimal

I assume this is because it's a C module and therefore there's no source to scan. I'm opening this on .el rather than the Python library because the Python library has a way to add import statements but it's not clear to me what the "right" way to inject those into the relevant process is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.