Code Monkey home page Code Monkey logo

emacs-configuration's Issues

Compatibility with latest common versions

wget http://gnu.c3sl.ufpr.br/ftp/emacs/emacs-24.5.tar.xz
tar xvf emacs-24.5.tar.xz
cd emacs-24.5
./configure  # --with-jpeg=no
make -j8

The idea is to check it against 24.4, 24.5 and 25.1 at the moment by making this process automatic.

Do not empty kill ring when save a file

Steps to reproduce it:

  1. open emacs with this configuration (use docker)
  2. create new Python file, C-x C-f
  3. write something on it
  4. save the file, C-x C-s
  5. select a region, C-SPC
  6. C-w (removes it and put it in the kill ring) / the same happens when killing the line C-k
  7. C-y (it should yank it from the kill ring)
  8. save the file, C-x C-s
  9. C-y

in the last step, it will yank a different thing from the kill ring nothing will be inserted since the kill ring is empty.

Only the values that were C-w are removed from the kill ring, and this not happen in regular Text files.

Call helm-etags-select after helm-projectile-switch-project

Now, I'm calling helm-projectile-find-file but maybe it could be useful to call helm-etags-select with the element at point when switching projects.

So, this way, we can jump to a method/class defined in another project in an easy way.

Improve company suggestions

I'm using the rope or jedi backend. Sometimes one is better than the other, but I couldn't decide for one, I'm still testing them.

The problem sometimes is that I get None suggestions from elpy-rpc-get-completions and it uses company-dabbrev-code which sometimes is better than nothing and sometimes is annoying.

(elpy-rpc-get-completions)

Use ag, pt or rg

Those are faster than grep. That's why I want to use them.

To change to one of them, I want to guarantee what I have now with helm-projectile-grep:

  • integrated with helm
    • colorize the output (matching and filenames)
  • integrated with projectile
    • ignore files from .projectile
    • search in the projectile-root-project

References:

Activate virtualenv only if needed

I been using this chunk of code in my .dir-locals.el to activate an specific virtualenv once one of the file of this project is visited.

((python-mode
  . (
     ;; use our own virtualenv for this project
     (pyvenv-workon . "mozio-ondemand")
    )
  ))

The problem with this is that activating a venv takes 1 or 2 seconds, and sometimes I'm opening a file that is inside the same project, so there is no need to re-activate it.

On the other hand, another problem is at emacs startup when a bunch of files are opened and then it tries to activate a lot of venv at the same moment.

To avoid this, I'm creating an alias for the pyvenv-workon to check the emacs start time and also if the venv is already activated.

;; stolen from here
;; http://gnuvola.org/software/personal-elisp/dist/lisp/diversions/emacs-uptime.el
(defun pyvenv-workon-alias ()
  "Activates the virtualenv only if we started Emacs more than 30 seconds ago"
  (if (> (- (car (cdr (current-time))) (car (cdr emacs-start-time))) 30)
      (message "Activate virtualenv")
    (message "Do not activate virtualenv")))

elpy-occur-definitions integrated with helm

occur searches for occurrences in the current buffer, and elpy- uses a regex to search only for classes and functions. So, I want to integrate them with helm.

The problem is that elpy- and occur open a new buffer instead of returning a list of candidates (which is needed by helm as input).

(defun helm-elpy-occur-definitions ()
  (interactive)
  (helm :sources (occur "^ *\\(def\\|class\\) ")
        :buffer "*helm elpy occur definition*"))

Install circe

I got tired of erc because of its complexity and I was never able to fix the scrolling... Something very annoying to mantain a real conversation

circe is from the same author than elpy and it seems well mantained.

helm buffer width

I would like to increase a little the left column since the text doesn't fit but we have more space in the right.

captura de pantalla_2017-08-03_08-41-13

Enable flyspell-prog-mode

The idea is to use aspell to check the spell of the comments and docstrings.

I tried something like this:

(add-hook 'elpy-mode-hook
          (lambda ()
            (set (make-local-variable 'ispell-personal-dictionary) (expand-file-name ".ispell.en.pws" emacs-user-directory))
            (flyspell-prog-mode)))

Problems:

  • it opens one aspell process per file
  • I wasn't able to set the English/American dictionary for this particular cases

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.