Commit 6510899
docview: imenu: check return value of 'mutool'
While 'mutool' supports many filetypes, 'mutool show' only
supports PDF files. This would lead to cryptic imenu errors
when opening other
file types (like EPUB) since we would parse the error output.
During my testing this caused 'imenu--index-alist' to have a
value of '(nil).
* lisp/doc-view.el (doc-view--pdf-outline): Error when 'mutool'
returns an error. Use 'call-process' to get the return value and
remove the call to 'shell-quote-argument' as 'call-process'
doesn't want any escapes.
(doc-view-mode): Handle possible error from 'doc-view-imenu-setup'.
(doc-view-imenu-enabled): Remove superfluous (and ... t).
(doc-view-imenu-setup): Remove check for mutool already ensured by
'doc-view-imenu-enabled' being non-nil.
(Bug#64516)1 parent 3c041e3 commit 6510899
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | | - | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
1910 | 1912 | | |
1911 | 1913 | | |
1912 | 1914 | | |
1913 | | - | |
| 1915 | + | |
1914 | 1916 | | |
1915 | | - | |
| 1917 | + | |
| 1918 | + | |
1916 | 1919 | | |
1917 | 1920 | | |
1918 | 1921 | | |
| |||
1961 | 1964 | | |
1962 | 1965 | | |
1963 | 1966 | | |
1964 | | - | |
| 1967 | + | |
1965 | 1968 | | |
1966 | 1969 | | |
1967 | 1970 | | |
| |||
2236 | 2239 | | |
2237 | 2240 | | |
2238 | 2241 | | |
2239 | | - | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
2240 | 2246 | | |
2241 | 2247 | | |
2242 | 2248 | | |
| |||
0 commit comments