guix.el icon indicating copy to clipboard operation
guix.el copied to clipboard

ws-butler and selectrum break package search

Open meedstrom opened this issue 3 years ago • 0 comments

Steps

  1. Turn on ws-butler-global-mode and selectrum-mode.
  2. Call guix-package-by-name and select any package.

Here, I select the "go" package. Result:

if: Error in evaluating guile expression: ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure string-index-right: Wrong type argument in position 1 (expecting string): #("go" 0 2 (ws-butler-chg chg))
   
Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(emacs-guix) [1]> 

I'm not sure what's happening but at a guess, ws-butler is active in the selectrum minibuffer and propertizes the string candidate we send to Guile.

This is a workaround that perhaps should be upstreamed to ws-butler:

(add-to-list 'ws-butler-global-exempt-modes #'minibuffer-inactive-mode)

If I'm right that it's text properties, perhaps guix.el could de-propertize any strings before sending them to external programs.

meedstrom avatar May 27 '21 13:05 meedstrom