Emacs autocomplete error : running timer - emacs

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 !

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.

LISP MAKE-PATHNAME: Illegal :DIRECTORY argument

I download Semantic Network Processor project:
http://digital.cs.usu.edu/~vkulyukin/vkweb/software/snp/snp.html
and following it's read me,
By using CLISP interpreter I change the directory to the folder,
and do the following:
[3]> (load "snp-loader.lisp")
;; Loading file snp-loader.lisp ...
;; Loaded file snp-loader.lisp
T
[4]> (in-package "USER")
<PACKAGE COMMON-LISP-USER>
[5]> (snp-load-everything)
**- MAKE-PATHNAME: Illegal :DIRECTORY argument "D:\\snp-stable\\"**
The following restarts are available:
ABORT :R1 Abort main loop
can anybody tells me what's wrong or how I can fix it in order to make the project run?
In snp-loader.lisp, instead of directory-namestring, you need to call pathname-directory:
(defparameter parm-snp-load-dir
(pathname-directory *load-truename*))
But then another problem occurs later, when defining a method for expectations-on-token. In c-snp-with-vars.lisp, the docstring is malformed, which triggers an error. Join both strings:
(defmethod expectations-on-token ((this-snp c-snp-with-vars) (tok t))
"Overloaded expectations-on-token to process variables and tests.
Get all expectations waiting for the token tok."
`(,#(find-static-expectations this-snp tok)
,#(find-dynamic-expectations this-snp tok)))
Reload the snp-loader.lisp file, and retry (snp-load-everything). It should load properly.
Edit. I contacted the original author; the latest version of the code is now hosted on GitHub at https://github.com/VKEDCO/AI/tree/master/NL/SNP.

How should I configure Vulkan for cider-jack-in?

I'm working through the newly released Vulkan Tutorial in Clojure with CIDER, and I've hit a bit of a snag. The example makefile project works perfectly, but I'm having trouble translating it into Clojure.
My build.boot file just specifies the :source-paths and adds LWJGL as a dependency:
(set-env!
:source-paths #{"src"}
:dependencies
(let [lwjgl-version "3.0.0"]
[['org.lwjgl/lwjgl lwjgl-version]
['org.lwjgl/lwjgl-platform lwjgl-version :classifier "natives-linux"]]))
Then, in src/example/core.clj, I have an extension-count function that uses vkEnumerateInstanceExtensionProperties as demonstrated in the original example:
(ns example.core
(:import (org.lwjgl.vulkan VK10)))
(defn extension-count []
(let [^String layer-name nil
property-count (int-array 1)]
(VK10/vkEnumerateInstanceExtensionProperties layer-name property-count nil)
(first property-count)))
Now, from Bash, I can set the relevant environment variables LD_LIBRARY_PATH and VK_LAYER_PATH as I start up a REPL:
$ VULKAN_SDK_PATH=~/VulkanSDK/1.0.21.1/x86_64 LD_LIBRARY_PATH=$VULKAN_SDK_PATH/lib VK_LAYER_PATH=$VULKAN_SDK_PATH/etc/explicit_layer.d boot repl
boot.user=> (require '[example.core :refer [extension-count]])
nil
boot.user=> (extension-count)
4
As you can see, everything works correctly. But of course, when I use cider-jack-in by C-c M-j instead, I get an UnsatisfiedLinkError because CIDER isn't setting those variables:
boot.user> (import (java.util.function Consumer)
(org.lwjgl.system Configuration))
org.lwjgl.system.Configuration
boot.user> (Configuration/setDebugStreamConsumer
(reify Consumer
(accept [_ message]
(println message))))
nil
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
[LWJGL] Failed to load a library. Possible solutions:
a) Set -Djava.library.path or -Dorg.lwjgl.librarypath to the directory that contains the shared libraries.
b) Add the JAR(s) containing the shared libraries to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
java.lang.UnsatisfiedLinkError: Failed to locate library: libvulkan.so.1
Am I supposed to be setting java.library.path or org.lwjgl.librarypath, as suggested in the above error message, instead of LD_LIBRARY_PATH? I can set either of those variables from profile.boot:
(System/setProperty
"java.library.path"
(str (System/getProperty "user.home") "/VulkanSDK/1.0.21.1/x86_64/lib"))
Now when I try C-c M-j again, it works:
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
4
However, this still doesn't let me set VK_LAYER_PATH, which will be fairly important in the future:
We will start using validation layers in Vulkan and you need to tell the Vulkan library where to load these from using the VK_LAYER_PATH variable:
test: VulkanTest
LD_LIBRARY_PATH=$(VULKAN_SDK_PATH)/lib VK_LAYER_PATH=$(VULKAN_SDK_PATH)/etc/explicit_layer.d ./VulkanTest
How can I set these environment variables for cider-jack-in? I'd prefer not to have to manually configure CIDER's dependencies for a standalone repl in a separate terminal and then connect to it using cider-connect, but if there's no other option here, I guess that's what I'll have to do.

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