From: Oleh Krehel Date: Fri, 18 Mar 2016 20:14:37 +0000 (+0100) Subject: counsel.el (counsel-linux-apps-list): Skip spaces around = X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/a6cd18916be10214c7badf174279a0fb1e68a11e counsel.el (counsel-linux-apps-list): Skip spaces around = The spec says to ignore the spaces around "=". https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html Fixes #446 --- diff --git a/counsel.el b/counsel.el index cea7f4e79..499fb4804 100644 --- a/counsel.el +++ b/counsel.el @@ -1834,14 +1834,14 @@ An extra action allows to switch to the process buffer." (insert-file-contents (expand-file-name file "/usr/share/applications")) (let (name comment exec) (goto-char (point-min)) - (if (re-search-forward "^Name=\\(.*\\)$" nil t) + (if (re-search-forward "^Name *= *\\(.*\\)$" nil t) (setq name (match-string 1)) (error "File %s has no Name" file)) (goto-char (point-min)) - (when (re-search-forward "^Comment=\\(.*\\)$" nil t) + (when (re-search-forward "^Comment *= *\\(.*\\)$" nil t) (setq comment (match-string 1))) (goto-char (point-min)) - (when (re-search-forward "^Exec=\\(.*\\)$" nil t) + (when (re-search-forward "^Exec *= *\\(.*\\)$" nil t) (setq exec (match-string 1))) (if (and exec (not (equal exec ""))) (add-to-list