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

Re: [Emacspeak] Problem when editing a document with emacspeak



:-)

To close the loop:

There are multiple classes of use-cases and users.

1. Someone who always edits files with very long lines;
   global-visual-mode is  for them, and this hopefully  points them
   that way.
2. You rarely do (1) but when it happens, you want to be asked once as
   a reminder; hence the y-or-n-p prompt: y == turn on visual-line
   locally; no == annotate that line as speakable and double the
   threshold

   All other use-cases categories are between 1 and 2.

   

Robert Melton writes:
 > TV--
 > 
 > If the answer is "the visual lines prompt negates the need to set the value", then 
 > this is me giving a *groan* :)
 > 
 > I read and understood how that worked, I just didn't think a buffer-local changing
 > of the value to double the current troublesome line was the same as changing 
 > the value globally and deliberately to a number that specifically works for the user.
 > 
 > Even if it was a bit of a snipe hunt, I learned a bunch in the process! :P
 > 
 > > On Jan 21, 2024, at 22:16, T.V Raman <raman@xxxxxxxxxx> wrote:
 > > 
 > > "Robert Melton" (via emacspeak Mailing List) <emacspeak@xxxxxxxxxxxxx>
 > > writes:
 > > 
 > > 
 > > 1. The original reporter found  a defcustom, likely because his
 > >   emacspeak is out-dated; there used to be a defcuston -- so see my
 > >   first tip re always first checking version.
 > > 2. Your steps were technically correct otherwise but you started being misled.
 > > 3. If you hadn't been misled, you'd likely have read the code in
 > >   emacspeak-speak-line a bit more, rather than   jumping to the
 > >   cross-ref; so tip: if jumping doesn't yield an answer, read the code
 > >   a bit more.
 > > 4. I'll cite the code block to read below -- see if you spot the
 > >   intended  solution that is already built-in.
 > > 
 > >   So read the complete cond form below -- not just one of its arms.
 > > 
 > >   (cond
 > >             ((or                       ;speakable
 > >               selective-display
 > >               (< l ems--speak-max-line)
 > >               (get-text-property start 'speak-line))
 > >              t)
 > >             (t
 > >              (when (y-or-n-p "use Visual Lines")
 > >                (call-interactively #'visual-line-mode))
 > >              (unless visual-line-mode
 > >                (put-text-property start end 'start-line t)
 > >                (setq ems--speak-max-line (* 2 l)))
 > >              t))
 > > 
 > >> 
 > >> I can't spot what I should be looking at, so let me first explain how I got to that variable.
 > >> 
 > >> I started in defun emacspeak-speak-line as it felt like the likely starting point, it in I saw 
 > >> a reference to ems--speak-max-line in the comparison to line length, jumped to the def
 > >> and found it in the same file defined as 384. 
 > >> 
 > >> I didn't know how the deflocal macro worked, so looked it up and saw that if there was 
 > >> a global value it would take it rather than use the value provided, so that is why I made
 > >> the recommendation. 
 > >> 
 > >> Then, I looked around for a defcustom of anything touching it, by grepping around for 
 > >> the ems--speak-max-line and I can't find it being touched anywhere by anything.  I 
 > >> understand that the OP found a way to tweak it in eamcspeak-customize but I can't 
 > >> seem to find it.
 > >> 
 > >> So, what am I missing?  
 > >> 
 > >> 
 > >>> On Jan 20, 2024, at 12:21, T.V Raman (via emacspeak Mailing List) <emacspeak@xxxxxxxxxxxxx> wrote:
 > >>> 
 > >>> 6 Tip: Robert, as the one who picked up on the internal var to set by
 > >>>  looking at the code, you were also looking at the real answer right
 > >>>  on that line, can you spot it?
 > >> 
 > >> Emacspeak discussion list -- emacspeak@xxxxxxxxxxxxx
 > >> To unsubscribe send email to:
 > >> emacspeak-request@xxxxxxxxxxxxx with a subject of: unsubscribe
 > >> 
 > > 
 > > -- 

-- 


|Full archive May 1995 - present by Year|Search the archive|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page