Skip to content

Commit 1576fc9

Browse files
Merge pull request #2 from ylluminarious/master
Add custom variable `pdfgrep-default-options' instead of hardcoding "-H -n"
2 parents e250376 + 2cca44b commit 1576fc9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pdfgrep.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"PDFGrep ignore case option."
4545
:type '(boolean))
4646

47+
(defcustom pdfgrep-options " -H -n "
48+
"Default options appended to `pdfgrep-program' when invoking the command.
49+
Not including `pdfgrep-ignore-case'."
50+
:type '(string))
51+
4752
(defcustom pdfgrep-ignore-errors nil
4853
"Redirect pdfgrep command errors to /dev/null."
4954
:type '(boolean))
@@ -56,7 +61,7 @@
5661

5762
(defun pdfgrep-default-command ()
5863
"Compute the default pdfgrep command for `pdfgrep'."
59-
(let ((cmd (concat pdfgrep-program " -H -n "
64+
(let ((cmd (concat pdfgrep-program pdfgrep-options
6065
(when pdfgrep-ignore-case
6166
"-i "))))
6267
(if pdfgrep-ignore-errors

0 commit comments

Comments
 (0)