[cmake-developers] [CMake 0016019]: cmake-mode.el: cmake-help: one help item is missing for each 'type'

Mantis Bug Tracker mantis at public.kitware.com
Mon Mar 14 19:28:08 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=16019 
====================================================================== 
Reported By:                Julian Schmidt
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16019
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     new
====================================================================== 
Date Submitted:             2016-03-14 19:28 EDT
Last Modified:              2016-03-14 19:28 EDT
====================================================================== 
Summary:                    cmake-mode.el: cmake-help: one help item is missing
for each 'type'
Description: 
In the Emacs mode cmake-mode.el, the available help items for
cmake-help-command, cmake-help-module, ... are missing the first item each as
printed, respectively, by "cmake --help-TYPE".


Steps to Reproduce: 
In Emacs 24.5.1, with cmake-model.el from git tag v3.5.0-rc3, do

M-x cmake-help

Then in the auto-completion, e.g. 'add_compile_options' will not be available.

This seems to be an off-by-one error which can be fixed like so:

==================
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el
index 08ac490..321177a 100644
--- a/Auxiliary/cmake-mode.el
+++ b/Auxiliary/cmake-mode.el
@@ -304,7 +304,7 @@ and store the result as a list in LISTVAR."
           (save-window-excursion
             (cmake-command-run (concat "--help-" listname "-list") nil
temp-buffer-name)
             (with-current-buffer temp-buffer-name
-              (set listvar (cdr (split-string (buffer-substring-no-properties
(point-min) (point-max)) "\n" t))))))
+              (set listvar (split-string (buffer-substring-no-properties
(point-min) (point-max)) "\n" t)))))
       (symbol-value listvar)
       ))
   )
==================
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-03-14 19:28 Julian Schmidt New Issue                                    
======================================================================



More information about the cmake-developers mailing list