]> code.delx.au - gnu-emacs-elpa/commitdiff
counsel.el (counsel-linux-apps-list): Skip spaces around =
authorOleh Krehel <ohwoeowho@gmail.com>
Fri, 18 Mar 2016 20:14:37 +0000 (21:14 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 18 Mar 2016 20:17:21 +0000 (21:17 +0100)
The spec says to ignore the spaces around "=".

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Fixes #446

counsel.el

index cea7f4e793c7e7e4fd21e66846f4f774f6224241..499fb48045ba28c1e346fe2dacbca14ad70ab98a 100644 (file)
@@ -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