speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speechd-el 2.10 released


From: Nicolas Graner
Subject: Re: speechd-el 2.10 released
Date: Tue, 01 Jun 2021 01:20:50 +0200

Hi Milan,

thanks for releasing speechd-el 2.10.

I note that it is still using the package cl, which is deprecated as of
emacs 27.1. It should use cl-lib instead. This would require replacing
calls to `loop' with `cl-loop' and similarly for `incf',
`destructuring-bind' and a few others.

While I'm there, I suggest a change that you may or may not agree with.

When speechd-speak-read-line reads a line that is folded into several
visual lines, I think it should only read to the end of the current
visual line rather than the logical line.

Rationale: when you read text line by line using next-line and you reach
a long line that is folded, you hear the whole (logical) line. Then you
hit next-line, which moves to the next visual line, and you hear again
the second part of the long line that you have already heard. I find it
more useful to hear only the visual line where the cursor is.

Here is a possible patch, although it doesn't work in partial-width
buffers and maybe other cases:

--- speechd-el-2.10/speechd-speak.el    2021-05-29 14:39:18.000000000 +0200
+++ speechd-el-2.10/speechd-speak-patched.el    2021-06-01 01:11:48.214150174 
+0200
@@ -603,7 +603,7 @@
    (let* ((inhibit-field-text-motion t)
           (in-isearch-p (and isearch-mode (not (called-interactively-p 
'interactive))))
           (beg (if (and rest-only (not in-isearch-p)) (point) 
(line-beginning-position)))
-          (end (line-end-position)))
+          (end (if truncate-lines (line-end-position) (save-excursion 
(end-of-visual-line) (point)))))
      (when speechd-speak-separator-regexp
        (save-match-data
          (save-excursion

Hope this helps,
Nicolas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]