emacs listing packages error in process sentinel - emacs

I'm new to emacs, have installed emacs26, and I use a proxy server. When I tried to add packages it is showing this error:
error in process sentinel:
Error retrieving: https://elpa.gnu.org/packages/archive-contents (error connection-failed "failed with code 110" :host "elpa.gnu.org" :service 443)
I added the following code:
(setq url-proxy-services
'(("no_proxy" . "^\\(localhost\\|172.16.2.30\\)")
("http" . "localhost:8080")
("https" . "localhost:8080")))
But I still get the same error.

It appears that
(custom-set-variables
'(gnutls-algorithm-priority "normal:-vers-tls1.3"))
fixes the problem.
Cf. https://emacs.stackexchange.com/a/56067/795

Related

Flycheck warning in Emacs’ *Messages* buffer are not displayed correctly

The following is an example of how my flycheck errors show up on emacs:
Method name "createQATask" doesn't conform to
'[a-z_][a-z0-9_]{2,30}$' pattern [invalid-name]
Here are the checkers I’m running (checked through C-c ! v):
Syntax checkers for buffer __manifest__.py in python-mode:
First checker to run:
python-flake8
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Not found
- `flake8' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/flake8/__init__.py"
- next checkers: python-pylint, python-mypy
Checkers that may run as part of the first checker's chain:
python-pylint
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Found at "/home/devdesk4/.pylintrc"
- `pylint' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/pylint/__init__.py"
- next checkers: python-mypy
Checkers that could run if selected:
python-pycompile select
- may enable: yes
- executable: Found at /usr/bin/python3
- next checkers: python-mypy
I’ve tried disabling python-pylint’s configuration file, but the behavior still remains. I’ve also tried a minimal .emacs configuration which only contained the following:
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")))
(use-package flycheck
:ensure t
:init
(global-flycheck-mode t))
Are those symbols (", ') not being displayed properly, or is this some sort of default flycheck configuration that I can override?
April 25, 2020 Update (Possible Solution)
Weirdly, I executed pip install --upgrade pylint just to check if I really had the latest version of pylint, and it upgraded from 2.3.0 to 2.4.4, and that fixed the issue.
However, this solution conflicts with using https://pypi.org/project/pylint-odoo/, because it reverts me back to version 2.3.0 which has those html-escape sequences.
Same-day update
It’s confirmed to be an upstream bug in Pylint.
The following is an example of how my flycheck errors show up on emacs:
Method name "createQATask" doesn't conform to '[a-z_][a-z0-9_]{2,30}$' pattern [invalid-name]
The linter evidentially believes it should be producing HTML output.
By the looks of it you are running all of python-flake8, python-pylint, and python-mypy. I suggest that you firstly test them one at a time to establish which one is producing that output, and then look at the documentation for that tool to find out how to prevent it from generating HTML.

Emacs autocomplete error : running timer

I tryed to install autocomplete mode for emacs, downloaded it from the elpa repository, with
M-x list-packages
And when I try it, the mode gives me an error
Error running timer ‘ac-update-greedy’: (error "Keyword argument :max-width not one of (:min-height :around :face :mouse-face :selection-face :scroll-bar :margin-left :margin-right :symbol :parent :parent-offset :keymap)")
Error running timer ‘ac-show-menu’: (error "Keyword argument :max-width not one of (:min-height :around :face :mouse-face :selection-face :scroll-bar :margin-left :margin-right :symbol :parent :parent-offset :keymap)")
And it fails even if I don't load each other mod. Even If I manually run
M-x auto-complete-mode
Where can this error come from ?
Ok, I found the answer. So I'll just post it there in case somebody is in the same situation,
The problem came from popup.el, a required package for auto-complete.
I downloaded the sources, recompiled them, and added the new popup.el in my mod folder
And it worked !

idris-mode – Buffer *idris-repl* has no process

I'm trying to get idris-mode to work. I am using HEAD from both idris-dev and idris-mode. Whenever I execute C-l (idris-load-file) I get this error
Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
make-network-process(:name "Idris Ideslave" :buffer "*idris-connection*" :host "127.0.0.1" :service 0 :nowait nil)
open-network-stream("Idris Ideslave" "*idris-connection*" "127.0.0.1" 0)
(setq idris-connection (open-network-stream "Idris Ideslave" (idris-buffer-name :connection) "127.0.0.1" port))
.............snipped
Whenever I try M-x idris-repl it states Buffer *idris-repl* has no process.
The result from this thread was to update the projects from git. However I'm using the most up-to-date versions from each project.
edit: running make also fails, but that's probably a different issue. If I manually checkout 0.9.16, make will pass but the same issue above persists.
edit: I do not have this installed locally, I am running it out of a cabal sandbox. In idris-settings.el I changed idris-interpreter-path to the full path of idris. Also, when I run idris outside of emacs I get errors about not finding prelude or builtins. If I add -i path/to/idris/libs/prelude then everything works. But adding "-i path/to/idris/libs/prelude" to idris-interpreter-flags in idris-settings.el does not help
I've sort of solved this. For idris-interpreter-flags you must give each actual argument as a separate string (which is common, I should have known). So, if I set idris-interpreter-flags to '("-i" "/path/to/idris/libs/prelude") then all is good. So I have to add the path for each of the libraries' directories that idris comes with.
How does this work? Is this normal to require? Is it because I'm not running this as a true cabal installed package that it doesn't pick up on the libraries?

Flycheck-Google-Cpplint is not Configured Correctly

I am trying to install flycheck-google-cpplint in my emacs. But I get this error:
(flycheck-mode 1)
(eval-after-load 'flycheck
'(progn
(require 'flycheck-google-cpplint)
(flycheck-add-next-checker 'c/c++-cppcheck
'c/c++-googlelint 'append)))
(custom-set-variables
'(flycheck-googlelint-verbose "3")
'(flycheck-googlelint-filter "-whitespace,+whitespace/braces"))
But this does not work. I get the following error:
Error: (user-error "Configured syntax checker c/c++-googlelint cannot be used")
I don't know why. I installed cpplint and it works fine if I used it from the command line. Any suggestion?
flycheck-google-lint uses cpplint. You have to tell emacs where to find the cpplint.py executable in order to run the syntax check.
You can find the cpplint file here.
Then, you need to add this to your init emacs file:
(custom-set-variables
'(flycheck-c/c++-googlelint-executable "/path/to/cpplint.py"))

Connect emacs to a remote ensime server

How can I connect to an ensime server on a remote host? My netbook is a bit slow for that kind of stuff. I copied the data over and use tramp to edit the files remotely. I ran bin/server to create the server and an ssh forwarding to be able to connect to it. I use ensime-connect to connect to the port on localhost. The ensime server on the remote server answers with Got connection, creating handler..., but that's about it. Ensime is in [ENSIME: wtf] mode in the emacs status line. How do I fix this?
The problem is the ensime can not find "config" of the connection (made through ensime-connect).
and then following line will throws error:
(if (and loose (ensime-file-in-directory-p file project-root))
because project-root is nil.
By setting the connection to ensime-buffer-connection, the problem can be fixed.
try adding following function to your ensime.el
and using the ensime-stackoverflow-connect to connect.
(defun ensime-stackoverflow-connect (host port)
(interactive (list
(read-from-minibuffer "Host: " ensime-default-server-host)
(read-from-minibuffer "Port: " (format "%d" ensime-default-port)
nil t)))
(let ((c (ensime-connect host port))
(config (ensime-config-load "/Users/whunmr/lab/scala/.ensime")))
(ensime-set-config c config)
(setq ensime-buffer-connection c))
)
remember to change the config path in the code: "/Users/whunmr/lab/scala/.ensime"
EDIT1:
the ".ensime" file was created by M-x ensime command, in your scala project folder.
actually, by just hardcode the config, you can ignore the file.
(defun ensime-my-connection (host port)
(interactive (list
(read-from-minibuffer "Host: " ensime-default-server-host)
(read-from-minibuffer "Port: " (format "%d" ensime-default-port)
nil t)))
(let ((c (ensime-connect host port))
(config '(:project-name "test" :project-package "com.whunmr" :sources ("./src") :compile-jars ("./" "../../apps/scala/lib/") :target "./bin" :root-dir "/Users/twer/lab/scala/")))
(ensime-set-config c config)
(setq ensime-buffer-connection c))
)