[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/scanner 930448a 24/56: improve docstrings
From: |
Stefan Monnier |
Subject: |
[elpa] externals/scanner 930448a 24/56: improve docstrings |
Date: |
Fri, 10 Apr 2020 13:56:02 -0400 (EDT) |
branch: externals/scanner
commit 930448a7e317211bbbc0926fc298c0c52a472978
Author: Raffael Stocker <address@hidden>
Commit: Raffael Stocker <address@hidden>
improve docstrings
---
scanner.el | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/scanner.el b/scanner.el
index 611aef0..a28a82d 100644
--- a/scanner.el
+++ b/scanner.el
@@ -110,12 +110,12 @@ The value must be one of the keys in the paper sizes
list."
(defcustom scanner-scanimage-program
(executable-find "scanimage")
- "Path of the scanimage(1) program."
+ "Path and file name of the scanimage(1) program."
:type '(string))
(defcustom scanner-tesseract-program
(executable-find "tesseract")
- "Path of the tesseract(1) program."
+ "Path and file name of the tesseract(1) program."
:type '(string))
(defun scanner--validate-languages (widget)
@@ -152,7 +152,9 @@ The config files may reside in
‘/usr/share/tessdata/configs’."
(defcustom scanner-scan-mode
'(:image "Color" :doc "Color")
- "Scan modes for images and documents."
+ "Scan modes for images and documents.
+This is usually \"Color\" or \"Gray\", but depends on your
+scanning device."
:type '(plist :value-type string))
(defcustom scanner-scanimage-switches
@@ -162,8 +164,8 @@ The config files may reside in
‘/usr/share/tessdata/configs’."
(defcustom scanner-device-name
nil
- "SANE scanner device name or nil.
-If nil, auto-detection will be attempted."
+ "SANE scanning device name or nil.
+If nil, attempt auto-detection."
:type '(restricted-sexp :match-alternatives
(stringp 'nil)))
@@ -243,7 +245,8 @@ This function checks the SANE backend of the device
selected by
‘scanner-device-name’ is nil, it attempts auto-detection. The
return value is a list comprising a list of the available options
and a list of the missing options. As a side effect, these
-results are cached."
+results are cached in ‘scanner--available-switches’ and
+‘scanner--missing-switches’."
(let ((-compare-fn #'string=)
opts)
(with-temp-buffer
@@ -274,9 +277,9 @@ name, the device type, and the vendor and model names."
OUTFILE is the output filename and IMG-FMT is the output image
format. TYPE is either ‘:image’ or ‘:doc’.
-When scanning documents (type :doc), the format argument is used
-for the intermediate representation before conversion to the
-document format. If any of the required options from
+When scanning documents (type :doc), scanner uses the IMG-FMT
+argument for the intermediate representation before conversion to
+the document format. If any of the required options from
‘scanner--device-specific-switches’ are unavailable, they are
simply dropped."
(let ((opts scanner--available-switches))
@@ -305,8 +308,9 @@ simply dropped."
(defun scanner--tesseract-args (input output-base)
"Construct the argument list for ‘tesseract(1)’.
INPUT is the input file name, OUTPUT-BASE is the basename for the
-output files. Extensions are added automatically depending on the
-selected output options, see ‘scanner-tesseract-outputs’."
+output files. Note that tesseract automatically adds file name
+extensions depending on the selected output options, see
+‘scanner-tesseract-outputs’."
(-flatten (list input output-base
"-l" (mapconcat #'identity scanner-tesseract-languages "+")
"--dpi" (number-to-string (plist-get scanner-resolution :doc))
@@ -399,16 +403,17 @@ selection is made."
;;;###autoload
(defun scanner-scan-document (npages filename)
- "Scan a number of NPAGES and write to a document named FILENAME.
+ "Scan NPAGES pages and write the result to FILENAME.
Without a prefix argument, scan one page. With a non-numeric
prefix argument, i.e. ‘\\[universal-argument]
\\[scanner-scan-document]’, scan a page and ask the user for
confirmation to scan another page, etc. With a numeric prefix
argument, e.g. ‘\\[universal-argument] 3
-\\[scanner-scan-document]’, scan that many pages.
+\\[scanner-scan-document]’, scan that many pages (in this case,
+3).
If ‘scanner-device-name’ is nil or this device is unavailable,
-attempt auto-detection. If more than one scanning devices are
+attempt auto-detection. If more than one scanning device is
available, ask for a selection interactively."
(interactive "P\nFDocument file name: ")
(scanner--ensure-init)
@@ -471,9 +476,9 @@ available, ask for a selection interactively."
;;;###autoload
(defun scanner-scan-image (img-file)
- "Scan an image, reading the file name IMG-FILE interactively.
+ "Scan an image, and write the result to IMG-FILE.
If ‘scanner-device-name’ is nil or this device is unavailable,
-attempt auto-detection. If more than one scanning devices are
+attempt auto-detection. If more than one scanning device is
available, ask for a selection interactively."
(interactive "FImage file name: ")
(scanner--ensure-init)
- [elpa] externals/scanner 3e0398c 22/56: correct to eval-and-compile (scanner--device-specific-switches), (continued)
- [elpa] externals/scanner 3e0398c 22/56: correct to eval-and-compile (scanner--device-specific-switches), Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 5f06a4a 21/56: implement correct cleanup and error handling (scanner-scan-document), Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 536e998 16/56: move commands were they belong, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 31c8a49 08/56: add document scanning command and test cases, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 2147abd 30/56: add tests for the configuration commands, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 6adbc64 28/56: correct argument handling in all the interactive specs, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner c63d2f9 31/56: update Readme.org, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 68b5c5f 18/56: update tests, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 15bc51d 25/56: correct the ‘run’ make target, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner bc9b16c 27/56: correct a comment and whitespace, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 930448a 24/56: improve docstrings,
Stefan Monnier <=
- [elpa] externals/scanner 8219c0e 29/56: add ‘scanner-select-device’ to the menu, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 45a3e1c 34/56: use finer argument tests in language and output selection, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 52bb203 32/56: correct the license notice (GNU Emacs -> This program), Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 6594fcb 17/56: put image scan sentinel back into scanner-scan-image, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner cce46fd 01/56: initial commit, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 64f5514 37/56: update commentary and Readme.org, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner eab3aea 40/56: cleanup scanner--ensure-init, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 1229f38 46/56: add ‘check’ to phony targets, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner 72ecf43 56/56: minor clean-ups, Stefan Monnier, 2020/04/10
- [elpa] externals/scanner c439a01 07/56: add scanner--ensure-init, Stefan Monnier, 2020/04/10