[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/arbitools 37119b0 05/29: * arbitools/arbitools.el: Fix
From: |
Stefan Monnier |
Subject: |
[elpa] externals/arbitools 37119b0 05/29: * arbitools/arbitools.el: Fix checkdoc warnings and quoting problems |
Date: |
Sun, 29 Nov 2020 19:00:33 -0500 (EST) |
branch: externals/arbitools
commit 37119b013634ef81defe1ba8aa291afd2b2a227f
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* arbitools/arbitools.el: Fix checkdoc warnings and quoting problems
* arbitools/arbitools.el (arbitools-update, arbitools-add)
(arbitools-standings): Fix obvious quoting problems. Add docstring.
(arbitools-mode): Use a more conventional mode-name.
---
arbitools.el | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/arbitools.el b/arbitools.el
index 541c20f..7f2a4de 100644
--- a/arbitools.el
+++ b/arbitools.el
@@ -27,19 +27,19 @@
;; USAGE:
;; ---------------------------
;; arbitools.el is an interface for the pythong package "arbitools",
-;; designed to manage chess tournament reports. If you don't install the
+;; designed to manage chess tournament reports. If you don't install the
;; python package you can still have the syntax colouring.
;;
;; FEATURES:
;; ----------------------------
-;; - Syntax colouring for the official trf FIDE files. This facilitates
+;; - Syntax colouring for the official trf FIDE files. This facilitates
;; manual edition of the files.
;;
-;; - Updating the players ratings. By means of the function arbitools-update
+;; - Updating the players ratings. By means of the function arbitools-update
;;
-;; - Adding players to an existing file. By arbitools-add
+;; - Adding players to an existing file. By arbitools-add
;;
-;; - Getting standings and report files from a tournament file. By
+;; - Getting standings and report files from a tournament file. By
;; arbitools-standings.
;;
;; You will find more information in www.ourenxadrez.org/arbitools.htm
@@ -47,17 +47,33 @@
;;; Code:
(defun arbitools-update (list)
+ "Update the players ratings."
(interactive "slist:")
- (shell-command (concat "arbitools-update.py" " -l " list " -i "
buffer-file-name)))
+ ;; FIXME: What if `list' is "foo; bar"?
+ ;; FIXME: Do we really need a shell here?
+ ;; Why not use just call-process, so we don't need to worry about quoting?
+ (shell-command (concat "arbitools-update.py -l " list " -i "
+ (shell-quote-argument buffer-file-name))))
(defun arbitools-add (addfile)
+ "Add players to an existing file."
+ ;; FIXME: is `addfile' a file? If o, then use "f" rather than "s", else
+ ;; better give it another name!
(interactive "saddfile: ")
- (shell-command (concat "arbitools-add.py" " -a " addfile " -i "
buffer-file-name)))
+ ;; FIXME: What if `addlist' is "foo; bar"?
+ ;; FIXME: Do we really need a shell here?
+ ;; Why not use just call-process, so we don't need to worry about quoting?
+ (shell-command (concat "arbitools-add.py -a " addfile " -i "
+ (shell-quote-argument buffer-file-name))))
(defun arbitools-standings ()
+ "Get standings and report files from a tournament file."
(interactive)
;; (shell-command (concat (expand-file-name "arbitools-standings.py") " -i "
buffer-file-name))) ;this is to use the actual path
- (shell-command (concat "arbitools-standings.py" " -i " buffer-file-name)))
+ ;; FIXME: Do we really need a shell here?
+ ;; Why not use just call-process, so we don't need to worry about quoting?
+ (shell-command (concat "arbitools-standings.py -i "
+ (shell-quote-argument buffer-file-name))))
(defvar arbitools-highlights
'(("^001" . font-lock-function-name-face) ;name of the tournament
@@ -124,8 +140,8 @@
;;;###autoload
(define-derived-mode arbitools-mode
fundamental-mode
- "arbitools-mode"
- "Major mode for Chess Tournament Management"
+ "Arbitools"
+ "Major mode for Chess Tournament Management."
;(setq font-lock-defaults '(arbitools-highlights))
(set (make-local-variable 'font-lock-defaults) '(arbitools-highlights)))
@@ -134,4 +150,4 @@
(provide 'arbitools)
-;;; arbitools.el end here
+;;; arbitools.el ends here
- [elpa] branch externals/arbitools created (now 62fe08e), Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 9de6cfe 01/29: [ELPA] new package: arbitools, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 5a67c19 03/29: [ELPA]: new package: arbitools, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 46d5669 04/29: * packages/arbitools.el: correct code syntax issues, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 538ccb4 02/29: [ELPA]: new package: arbitools, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 37119b0 05/29: * arbitools/arbitools.el: Fix checkdoc warnings and quoting problems,
Stefan Monnier <=
- [elpa] externals/arbitools eb1011a 07/29: * packages/arbitools: added some new functions and menus, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools dd5ddb9 08/29: * packages/arbitools: endoffile bug fixed, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools b61035e 13/29: packages/arbitools.el: Added new functions, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 16a125c 12/29: packages/arbitools.el: Applied suggestions, improved functions, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools a833441 10/29: * packages/arbitools: Add functions and menus, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 34c912c 20/29: *arbitools.el: Some functions improved, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 7593f76 22/29: arbitools.el: added new function, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 453b572 11/29: packages/arbitools: Added new functions, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 0a079b7 09/29: * packages/arbitools: added menu option, Stefan Monnier, 2020/11/29
- [elpa] externals/arbitools 97afb42 16/29: * arbitools/arbitools.el: Remove unused vars, Stefan Monnier, 2020/11/29