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

[Emacspeak] Re: Emacspeak error in evil-mode



why accessing the args without doing anything with them solves the
issue indicates there is something really strange here.

Tim Cross writes:
 >=20
 > Just FYI, my dirty ugly hack to get things to work is=20
 >=20
 > (defadvice evil-backward-char (after emacspeak pre act comp)
 >   "Speak char."
 >   (when (and (ems-interactive-p)
 >              (ad-get-arg 0)
 >              (ad-get-arg 1)
 >              (ad-get-arg 2))
 >     (emacspeak-speak-this-char (char-after (1+ (point))))))
 >=20
 > (defadvice evil-forward-char (after emacspeak pre act comp)
 >   "Speak char."
 >   (when (and (ems-interactive-p)
 >              (ad-get-arg 0)
 >              (ad-get-arg 1)
 >              (ad-get-arg 2))
 >     (emacspeak-speak-this-char (char-after (1- (point))))))
 >=20
 > Tim Cross <theophilusx(a)gmail.com> writes:
 >=20
 > > It is possible this might not be due to changes in emacspeak, but
 > > perhaps something odd with evil mode. I added a basic debug statem=
ent to
 > > the advice for evil-backward-char which displays the values for po=
int,
 > > the arguments of evil-backward-char and the char returned for
 > > char-after. What is interesting is that it appears the function is=
 being
 > > called with different parameters multiple times when moving by jus=
t one
 > > character. Note that I have changed the advice from before to afte=
r advice
 > > (reason outlined below). So the output I get after moving backward=
s by
 > > one character is
 > >
 > > e-b-c point =3D 4265 count =3D 2 crosslines =3D t noerror =3D nil =
char =3D 97
 > > e-b-c point =3D 4265 count =3D 2 crosslines =3D t noerror =3D t ch=
ar =3D 97
 > > e-b-c point =3D 4266 count =3D nil crosslines =3D t noerror =3D ni=
l char =3D 114
 > > e-b-c point =3D 4266 count =3D nil crosslines =3D nil noerror =3D =
nil char =3D 114
 > >
 > > It looks like evil-backward-char is called 4 times, twice with cou=
nt set
 > > to 2 and twice with count set to nil. When count is set to 2, one =
call
 > > has noerror set to nil and one has it set to t. When count is nil,=
 one
 > > call has crosslines set to t and one has it set to nil.=20
 > >
 > > With this information, I think I can make it work. However, it is =
a real
 > > kludge and I really don't understand what is going on. I did try a=

 > > macroexpand on the evil-define-motion macro which is used to defin=
e
 > > evil-backward-char and evil-forward-char, but that didn't help a l=
ot -
 > > it is a little complex as that macro then calls the macro
 > > evil-define-command. I do wonder if it might be worth asking on th=
e evil
 > > project as this could simply be an issue with the macros which has=
n't
 > > been picked up under standard use.=20
 > >
 > > The reason I changed the advice to after advice rather than before=

 > > advice is that it struck me that you really want to speak the char=
acter
 > > after the move. In the original advice, 1 is added or remove from =
the
 > > current value of point to (I guess) simulate the movement. However=
, with
 > > evil mode, you can do things like 3h to move backwards 3 character=
s.
 > > With the original advice, this didn't work correctly as it would o=
nly
 > > speak the character before point.=20
 > >
 > > Understand your busy trying to get the next release out. I will pl=
ay
 > > wiht things a bit more and see what I can discover. I don't tend t=
o move
 > > around by character that much, so the multiple echo is only mildly=

 > > annoying and I suspect I can fudge it temporarily anyway.=20
 > >
 > > "T.V Raman" <raman(a)google.com> writes:
 > >
 > >> Tim Cross via Emacspeak <emacspeak(a)emacspeak.org> writes:
 > >>
 > >> The good: I can repro the problem=20
 > >>
 > >> The not so good: I suspect it might have gotten introduced during=
 some
 > >> major rewrites in the last few weeks; note that I reimplemented h=
ow
 > >> ems-interactive-p is defined   with help from Stefan Monnier. Thi=
s is
 > >> the first breakage I am seeing and it may or may not be due to th=
at
 > >> change; it's hard to say.
 > >>
 > >> Curiously,, moveing back by char says the char  4 times, moving f=
orward
 > >> says it only 3 times -- that could well be a hint to where the pr=
oblem
 > >> is.
 > >>
 > >> I suspect I may not be able to fix this before I release the next=

 > >> version of Emacspeak --=20
 > >>
 > >>> Hi Raman,
 > >>>
 > >>> This is an odd one which I only just noticed. Not sure exactly w=
hen this
 > >>> started.=20
 > >>>
 > >>> When moving around by character in evil-mode, the character unde=
r point
 > >>> is spoken multiple times - usually 4 or 3 times. Other movement =
does not seem to be affected.
 > >>> Character echo when typing is not affected. Only occurs when in =
either
 > >>> normal mode or visual mode and only when moving by character i.e=
. h or l
 > >>> or using the arrow keys. Moving by words, sentences, etc does no=
t seem
 > >>> to be affected.=20
 > >>>
 > >>> Ive confirmed this in a vanilla emacs with only emacspeak and ev=
il-mode
 > >>> loaded.=20
 > >>>
 > >>> This is with current Emacs 28.0.50 built today and emacspeak als=
o built
 > >>> from today. Evil mode loaded from nongnu elpa using package.el.
 > >>>
 > >>> I suspect this is from a recent change. Anything you can think o=
f which
 > >>> might have changed recently in this area to help me narrow down =
the
 > >>> search=3F
 > >>> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F
 > >>> Emacspeak mailing list -- emacspeak(a)emacspeak.org
 > >>> To unsubscribe send an email to emacspeak-leave(a)emacspeak.org

--=20

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
=E2=99=89 Id: kg:/m/0285kf1  =F0=9F=A6=AE

-- 

Thanks,

--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1  🦮


|May 1995 - Last Year|Current Year|


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

Contact Info Page