helm-M-x doesn't show initial list of candidates - emacs

After updating HELM and restarting Emacs it doesn't show a list of initial candidates. However, it shows them after you start typing. This is inconvenient as visual cues are lacking. Has anyone encountered and solved it?
My config is as simple as this:
(straight-use-package '(helm :type git :host github :repo "emacs-helm/helm"))
(use-package helm
:config (helm-mode)
:bind (("M-x" . helm-M-x)
("C-o" . helm-find-files)
("M-s s" . helm-projectile)
("s-a" . helm-ag)
("M-s M-s" . helm-projectile-switch-project)
("C-b" . helm-mini)
:map helm-map
("<tab>" . helm-execute-persistent-action)
("C-i" . helm-select-action)
("M-k" . helm-next-line)
("M-i" . helm-previous-line)
:map helm-find-files-map
("M-i" . helm-previous-line)
("M-k" . helm-next-line)
:map helm-generic-files-map
("M-i" . helm-previous-line)
("M-k" . helm-next-line)
))

The problem was with Centaur-tabs, somehow it interfered with Helm-M-x. Disabling it helped. I didn't try to update it as I'm going to switch to the tab-line-mode. So I won't be testing the issue deeper it the moment. The important thing is Helm works as supposed now.

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.

Cannot open new frames with undo-tree installed

I use undo-tree 0.6.5 (from Elpa), and it works quite well most of the time. However, if I have not yet called C-x-u on a buffer, then from this buffer I can't open a new frame. If I do C-x-5-2, Emacs opens the `Backtrace buffer with this:
Debugger entered--Lisp error: (wrong-type-argument undo-tree nil)
signal(wrong-type-argument (undo-tree nil))
undo-tree-current(nil)
(undo-tree-node-previous (undo-tree-current buffer-undo-tree))
(and undo-tree-mode (not buffer-read-only) (not (eq t buffer-undo-list)) (undo-tree-node-previous (undo-tree-current buffer-undo-tree)))
x-create-frame(((visibility) (vertical-scroll-bars . left) (reverse . t)))
x-create-frame-with-faces(((vertical-scroll-bars . left) (reverse . t)))
#f(compiled-function (params) #<bytecode 0x1fdd4b1bc7bf>)(((vertical-scroll-bars . left) (reverse . t)))
apply(#f(compiled-function (params) #<bytecode 0x1fdd4b1bc7bf>) ((vertical-scroll-bars . left) (reverse . t)))
frame-creation-function(((vertical-scroll-bars . left) (reverse . t)))
make-frame()
make-frame-command()
funcall-interactively(make-frame-command)
call-interactively(make-frame-command nil nil)
command-execute(make-frame-command)
Then, I do C-x-u so the undo-tree buffer related to that buffer is created, and from then on I can create other frames.
Is there a workaround for this?
edit: it also prevents the use of menus. When I try to click on any menu item, the same message shows up.
edit: opening Emacs with this minimalistic startup file gives the same error:
(add-to-list 'load-path
"~/.emacs.d/elpa/undo-tree-0.6.5")
(require 'undo-tree)
(global-undo-tree-mode)
(setq debug-on-error t)
Okay, so I got it working. I was using the ELPA version of undo-tree, which is version 0.6.5. So a couple of days ago I noticed that the developer has a new version in his git repository, 0.6.6. I installed it locally and the problem was gone!
First, get a copy of the git repository:
$ cd ~/.emacs.d
$ git clone http://www.dr-qubit.org/git/undo-tree.git
Then add this to your Emacs config:
(load "~/.emacs.d/undo-tree/undo-tree.el")
(require 'undo-tree)
(global-undo-tree-mode)

emacs listing packages error in process sentinel

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

arduino-mode Emacs file specification error

When I try to edit an Arduino Sketch (*.ino file), I get this error:
Eval error in the ‘c-lang-defconst’ for ‘c-constant-kwds’ in arduino-mode:
Eval error in the ‘c-lang-defconst’ for ‘c-basic-matchers-before’ in arduino-mode:
Eval error in the ‘c-lang-defconst’ for ‘c-matchers-2’ in arduino-mode:
File mode specification error: (invalid-function (append (quote (HIGH LOW INPUT OUTPUT INPUT_PULLUP LED_BUILTIN true false)) (c-get-lang-constant (quote c-constant-kwds) (quote (cc-langs)))))
This happens even on the stock examples->basic->Blink.ino file.
My .emacs.d/init.el file contains these lines:
(setq auto-mode-alist (cons '("\\.\\(pde\\|ino\\)$" . arduino-mode) auto-mode-alist))
(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)
I can't find a 'c-matchers-2' file.
This is Emacs 26.1.
Can anyone point me in a direction to fix this error?
Thanks in advance for your help and advice.
-Kevin
#nega, you were right, it was a version issue. When I used M-x list-packages, I saw I had installed version 20151017.2335, and the most current was 20180509.36 by stardivirer. arduino-mode packages are in the melpa repository.
Thanks so much for your help in pointing me in the right direction.
-Kevin

How do I choose/switch Leiningen profiles with Emacs nREPL?

I have a :dev profile set up in my leiningen project file. This defines an :init and :init-ns setting for my repl session. If I launch nrepl in emacs (M-x nrepl-jack-in) with the cursor over the :dev keyword in my project.clj, the repl launches and the :init and :init-ns settings are used. If I have my cursor elsewhere, the initial namespace is different (a test ns, not user), and :init hasn't been evaluated.
I'm guessing it's a feature of some sort, (I'm more inclined to think it's random buggy behaviour now) but can anyone explain it or point me at the docs that do so? Also, is there any way to change the profile once the repl's been launched?
Thanks
Contrary to what commenter #user7610 said, there is no cider-jack-in-with-profile function in cider. Cider pull-request #544 was a bit misleading in that regard.
If you want cider to load your own special-snowflake profile do this in emacs:
M-x set-variable cider-lein-parameters to e.g. with-profile +my-special-snowflake repl :headless
or to set the variable interactively (so you can see it's current value before changing it):
C-h, v cider-lein-parameters and then click or hit enter on "customize" and set it there to e.g. with-profile +my-special-snowflake repl :headless and apply it
That'll cause your next cider-jack-in to load the my-special-snowflake profile in addition to the base profile (which is needed in order to run the nrepl and hence cider).
Try this:
(defun start-cider-repl-with-profile ()
(interactive)
(letrec ((profile (read-string "Enter profile name: "))
(lein-params (concat "with-profile +" profile " repl :headless")))
(message "lein-params set to: %s" lein-params)
(set-variable 'cider-lein-parameters lein-params)
(cider-jack-in)))
Test on CIDER 0.16.0 (Riga)
I'm just searching the same feature and found this open issue in clojure-emacs/nrepl.el "Add argument to nrepl-jack-in to allow specification of profiles" https://github.com/clojure-emacs/nrepl.el/issues/327
it is still open
I try the function author by Jiacai Liu in my computer(GNU Emacs 26.2 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-04-13) . I get a error is:
eval-region: Wrong number of arguments: (1 . 1), 0
And then, I try to elisp function as:
(defun start-cider-repl-with-profile ()
(interactive)
(letrec ((profile (read-string "Enter profile name: "))
(lein-params (concat "with-profile +" profile " repl :headless")))
(message "lein-params set to: %s" lein-params)
(set-variable 'cider-lein-parameters lein-params)
(cider-jack-in '())))
Now it work. Thanks for Jiacai Liu!