GNU bug report logs - #42703
Ansible inventory mode covers too many files

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 4 Aug 2020 00:59:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: 42703 <at> debbugs.gnu.org
Subject: bug#42703: Ansible inventory mode covers too many files
Date: Tue, 04 Aug 2020 02:56:47 +0300
Visiting a file with the word "inventory" in its name,
for example, "dynamic_inventory.html" or "inventory.jpg"
enables 'ansible-inventory-generic-mode' instead of
using html-mode or image-mode according to file extensions.

This is because the scope of ansible-inventory-generic-mode
is too wide: it matches the subword "inventory" in the file name.
This patch should restrict it:

diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index cd24f497c9..48ac123205 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -643,7 +643,7 @@ ansible-inventory-generic-mode
     ("\\([^ =\n\r]+\\)=\\([^ \n\r]*\\)"
      (1 font-lock-variable-name-face)
      (2 font-lock-keyword-face)))
-  '("inventory")
+  '("inventory\\'")
   (list
    (function
     (lambda ()




This bug report was last modified 4 years and 288 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.