public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
* Re: If bash can, why not Speakup?
@  pj
   ` William Hubbs
  0 siblings, 1 reply; 20+ messages in thread
From: pj @  UTC (permalink / raw)
  To: speakup

Janina Sajka wrote:
> I've been happily using vim for years.

How do you cope with the endlessly-updating bottom line?, like:
 "497L, 15593C                             450,2         93%"

I find speakup is in general difficult with curses applications
because of their screen-update optimisation.  The characters
don't necessarily come out in a text-related order.

> My biggest complaint is that I need to be ultra-careful to
> track whether I'm in insert or command mode, i.e. it would
> sure help if Speakup could give me a differently pitched voice

Good point :-)  It might need some help from the vim folk...

Peter Billam

http://www.pjb.com.au       pj@pjb.com.au      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
   If bash can, why not Speakup? pj
@  ` William Hubbs
     ` Albert Sten-Clanton
     ` If bash can, why not Speakup? Janina Sajka
  0 siblings, 2 replies; 20+ messages in thread
From: William Hubbs @  UTC (permalink / raw)
  To: speakup

On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> Janina Sajka wrote:
> > I've been happily using vim for years.
> 
> How do you cope with the endlessly-updating bottom line?, like:
>  "497L, 15593C                             450,2         93%"
> 
> I find speakup is in general difficult with curses applications
> because of their screen-update optimisation.  The characters
> don't necessarily come out in a text-related order.

You can disable that line by putting the following line in your
~/.vimrc:

set noruler

> > My biggest complaint is that I need to be ultra-careful to
> > track whether I'm in insert or command mode, i.e. it would
> > sure help if Speakup could give me a differently pitched voice
> 
> Good point :-)  It might need some help from the vim folk...

Yes, something like this would take modifications to vim to make it
communicate to speakup some how, and I'm not sure what that would
involve since I haven't looked at the vim code at all.

William


^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: If bash can, why not Speakup?
   ` William Hubbs
@    ` Albert Sten-Clanton
       ` Steve Holmes
       ` Speech on vim backspace [Was: If bash can, why not Speakup?] Janina Sajka
     ` If bash can, why not Speakup? Janina Sajka
  1 sibling, 2 replies; 20+ messages in thread
From: Albert Sten-Clanton @  UTC (permalink / raw)
  To: 'Speakup is a screen review system for Linux.'

In addition to the suggestion below, I'd very much like to hear the
characters I'm backspacing over.  I asked about this a few years ago, but I
gathered that this wasn't easy to do.  Any thoughts?

Al 

-----Original Message-----
From: speakup-bounces@braille.uwo.ca [mailto:speakup-bounces@braille.uwo.ca]
On Behalf Of William Hubbs
Sent: Wednesday, November 17, 2010 6:31 PM
To: speakup@braille.uwo.ca
Subject: Re: If bash can, why not Speakup?

On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> Janina Sajka wrote:
> > I've been happily using vim for years.
> 
> How do you cope with the endlessly-updating bottom line?, like:
>  "497L, 15593C                             450,2         93%"
> 
> I find speakup is in general difficult with curses applications 
> because of their screen-update optimisation.  The characters don't 
> necessarily come out in a text-related order.

You can disable that line by putting the following line in your
~/.vimrc:

set noruler

> > My biggest complaint is that I need to be ultra-careful to track 
> > whether I'm in insert or command mode, i.e. it would sure help if 
> > Speakup could give me a differently pitched voice
> 
> Good point :-)  It might need some help from the vim folk...

Yes, something like this would take modifications to vim to make it
communicate to speakup some how, and I'm not sure what that would involve
since I haven't looked at the vim code at all.

William

_______________________________________________
Speakup mailing list
Speakup@braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
     ` Albert Sten-Clanton
@      ` Steve Holmes
         ` Gregory Nowak
         ` Janina Sajka
       ` Speech on vim backspace [Was: If bash can, why not Speakup?] Janina Sajka
  1 sibling, 2 replies; 20+ messages in thread
From: Steve Holmes @  UTC (permalink / raw)
  To: speakup

I realize the more this gets talked about, the more diluted it
probably becomes.  When I insert text with Vim or when I insert text in a command
line in Bash, speakup speaks everything following in that line.  I'm
sure this is because screen contents are being changed ans speakup
reflects this.  However, The old vi editor (probably elvis or
something) doesn't seem to exhibit this behavior but vim does.  I
usually have cursoring on when I do this.  I don't remember if this
changes when it is turned off.

Another thing that would help speakup behave better with curses type
applications would be to add support for user defined windows where
parts of the screen could be spoken or blocked.  This would be like
what is available in Vocal-Eyes and Window-Eyes for that matter.  This
is obviously a big project and I think it would be fun to add but not
sure how well that would work in a kernel based program.

On Wed, Nov 17, 2010 at 07:48:38PM -0500, Albert Sten-Clanton wrote:
> In addition to the suggestion below, I'd very much like to hear the
> characters I'm backspacing over.  I asked about this a few years ago, but I
> gathered that this wasn't easy to do.  Any thoughts?
> 
> Al 
> 
> -----Original Message-----
> From: speakup-bounces@braille.uwo.ca [mailto:speakup-bounces@braille.uwo.ca]
> On Behalf Of William Hubbs
> Sent: Wednesday, November 17, 2010 6:31 PM
> To: speakup@braille.uwo.ca
> Subject: Re: If bash can, why not Speakup?
> 
> On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> > Janina Sajka wrote:
> > > I've been happily using vim for years.
> > 
> > How do you cope with the endlessly-updating bottom line?, like:
> >  "497L, 15593C                             450,2         93%"
> > 
> > I find speakup is in general difficult with curses applications 
> > because of their screen-update optimisation.  The characters don't 
> > necessarily come out in a text-related order.
> 
> You can disable that line by putting the following line in your
> ~/.vimrc:
> 
> set noruler
> 
> > > My biggest complaint is that I need to be ultra-careful to track 
> > > whether I'm in insert or command mode, i.e. it would sure help if 
> > > Speakup could give me a differently pitched voice
> > 
> > Good point :-)  It might need some help from the vim folk...
> 
> Yes, something like this would take modifications to vim to make it
> communicate to speakup some how, and I'm not sure what that would involve
> since I haven't looked at the vim code at all.
> 
> William
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
       ` Steve Holmes
@        ` Gregory Nowak
           ` Steve Holmes
         ` Janina Sajka
  1 sibling, 1 reply; 20+ messages in thread
From: Gregory Nowak @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Nov 17, 2010 at 06:18:17PM -0700, Steve Holmes wrote:
> Another thing that would help speakup behave better with curses type
> applications would be to add support for user defined windows where
> parts of the screen could be spoken or blocked.  This would be like
> what is available in Vocal-Eyes and Window-Eyes for that matter.  This
> is obviously a big project and I think it would be fun to add but not
> sure how well that would work in a kernel based program.

Uhhm, I thought we already had this, section 15 of the user's guide.

Greg


- -- 
web site: http://www.romuald.net.eu.org
gpg public key: http://www.romuald.net.eu.org/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)

- --
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkzkhmsACgkQ7s9z/XlyUyAcQwCaAnNbDdpMG9sqIeB6PU8zCGih
ORgAoLSSMgoPXhqdNgYePMDhT7UwWwL8
=GR9+
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
         ` Gregory Nowak
@          ` Steve Holmes
             ` Gregory Nowak
  0 siblings, 1 reply; 20+ messages in thread
From: Steve Holmes @  UTC (permalink / raw)
  To: speakup

On Wed, Nov 17, 2010 at 06:50:35PM -0700, Gregory Nowak wrote:
> Uhhm, I thought we already had this, section 15 of the user's guide.

I'll have to take look to see if there's anything more than I know
about already.  What I know of is a single user window that can be
defined on the fly to be spoken but I don't recall if that can be used
to block output.  Also, this window cannot be saved for future use.  I
would like to see some day , the ability to save this and maybe other
windows and load them on demand when a given application is run.  I
was thinking of maybe saving these window cordinates in a
/sys/variable along withother speakup parameters and then a shell
script could be used to load/save these stored values.  I wonder how
hard it would be to add new /sys/accessibility/speakup parameters for
something like this.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
           ` Steve Holmes
@            ` Gregory Nowak
  0 siblings, 0 replies; 20+ messages in thread
From: Gregory Nowak @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Nov 17, 2010 at 07:02:18PM -0700, Steve Holmes wrote:
> What I know of is a single user window that can be
> defined on the fly to be spoken but I don't recall if that can be used
> to block output.  Also, this window cannot be saved for future use.  I
> would like to see some day , the ability to save this and maybe other
> windows and load them on demand when a given application is run.  I
> was thinking of maybe saving these window cordinates in a
> /sys/variable along withother speakup parameters and then a shell
> script could be used to load/save these stored values.  I wonder how
> hard it would be to add new /sys/accessibility/speakup parameters for
> something like this.

Ah, you're right, the window functionality in speakup isn't as
powerful as that in wineyes for example. When you mentioned window
functionality as good as that in wineyes, or vocal-eyes, I immediately
thought of being able to have only certain parts of the screen spoken,
but forgot about all the rest of it, which you pointed out.

Greg


- -- 
web site: http://www.romuald.net.eu.org
gpg public key: http://www.romuald.net.eu.org/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)

- --
Free domains: http://www.eu.org/ or mail dns-manager@EU.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkzkz3QACgkQ7s9z/XlyUyB0qwCgvxrER/8szL4RILmry2TO//Tl
+ZAAoL5tQqgy0xbGkl4S0ojYx18RXUWa
=+Pe0
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
   ` William Hubbs
     ` Albert Sten-Clanton
@    ` Janina Sajka
       ` Rynhardt Kruger
       ` William Hubbs
  1 sibling, 2 replies; 20+ messages in thread
From: Janina Sajka @  UTC (permalink / raw)
  To: speakup

I think my main point got lost in the litany of vim complaints that have
actually been with us for a long time. I was trying to say something new
that no one has commented on. So, let me try to redirect, if I may ...

William Hubbs writes:
> On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> > Janina Sajka wrote:
> > > My biggest complaint is that I need to be ultra-careful to
> > > track whether I'm in insert or command mode, i.e. it would
> > > sure help if Speakup could give me a differently pitched voice
> > 
> > Good point :-)  It might need some help from the vim folk...
> 
> Yes, something like this would take modifications to vim to make it
> communicate to speakup some how, and I'm not sure what that would
> involve since I haven't looked at the vim code at all.
> 
Actually, I don't think we need anything from vim.


Note that you can have either vim or emacs editing of bash commands.
Emacs is the default, but you can reset this by issuing:

set -o vim

By, default, this provides bash shell command editing in insert mode. As
in vim, pressing Esc takes you into command mode where all the vim
command mode functionality is provided.

So, the shell knows. That's got to be a value that's written somewhere,
and thus something Speakup could read and respond to. I don't know
where, but am I wrong?

Janina

> William
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 

Janina Sajka,	Phone:	+1.443.300.2200
		sip:janina@asterisk.rednote.net

Chair, Open Accessibility	janina@a11y.org	
Linux Foundation		http://a11y.org

Chair, Protocols & Formats
Web Accessibility Initiative	http://www.w3.org/wai/pf
World Wide Web Consortium (W3C)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Speech on vim backspace [Was: If bash can, why not Speakup?]
     ` Albert Sten-Clanton
       ` Steve Holmes
@      ` Janina Sajka
         ` Albert Sten-Clanton
  1 sibling, 1 reply; 20+ messages in thread
From: Janina Sajka @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Albert Sten-Clanton writes:
> In addition to the suggestion below, I'd very much like to hear the
> characters I'm backspacing over.  I asked about this a few years ago, but I
> gathered that this wasn't easy to do.  Any thoughts?


I have speech on backspace in vim, at least I do in insert mode.

You may need to set your charset to iso 8859-1 in your .vimrc. I don't
recall specifically whether this problem is solved, but other nasties
are solved this way. I'd love to use utf, but it isn't speaking as
cleanly as 8859-1.

Janina

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
       ` Steve Holmes
         ` Gregory Nowak
@        ` Janina Sajka
  1 sibling, 0 replies; 20+ messages in thread
From: Janina Sajka @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

Steve, that would sure drive me crazy. In fact I doubt I'd be willing to
live with it.

All I can tell you is that it ain't happenin to me. I was having an
issue in vim where Speakup would read the char I left plus the new char
I had just written, but this wnet away entirely when I switched back to
iso 8859-1.


Janina

Steve Holmes writes:
> I realize the more this gets talked about, the more diluted it
> probably becomes.  When I insert text with Vim or when I insert text in a command
> line in Bash, speakup speaks everything following in that line.  I'm
> sure this is because screen contents are being changed ans speakup
> reflects this.  However, The old vi editor (probably elvis or
> something) doesn't seem to exhibit this behavior but vim does.  I
> usually have cursoring on when I do this.  I don't remember if this
> changes when it is turned off.
> 
> Another thing that would help speakup behave better with curses type
> applications would be to add support for user defined windows where
> parts of the screen could be spoken or blocked.  This would be like
> what is available in Vocal-Eyes and Window-Eyes for that matter.  This
> is obviously a big project and I think it would be fun to add but not
> sure how well that would work in a kernel based program.
> 
> On Wed, Nov 17, 2010 at 07:48:38PM -0500, Albert Sten-Clanton wrote:
> > In addition to the suggestion below, I'd very much like to hear the
> > characters I'm backspacing over.  I asked about this a few years ago, but I
> > gathered that this wasn't easy to do.  Any thoughts?
> > 
> > Al 
> > 
> > -----Original Message-----
> > From: speakup-bounces@braille.uwo.ca [mailto:speakup-bounces@braille.uwo.ca]
> > On Behalf Of William Hubbs
> > Sent: Wednesday, November 17, 2010 6:31 PM
> > To: speakup@braille.uwo.ca
> > Subject: Re: If bash can, why not Speakup?
> > 
> > On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> > > Janina Sajka wrote:
> > > > I've been happily using vim for years.
> > > 
> > > How do you cope with the endlessly-updating bottom line?, like:
> > >  "497L, 15593C                             450,2         93%"
> > > 
> > > I find speakup is in general difficult with curses applications 
> > > because of their screen-update optimisation.  The characters don't 
> > > necessarily come out in a text-related order.
> > 
> > You can disable that line by putting the following line in your
> > ~/.vimrc:
> > 
> > set noruler
> > 
> > > > My biggest complaint is that I need to be ultra-careful to track 
> > > > whether I'm in insert or command mode, i.e. it would sure help if 
> > > > Speakup could give me a differently pitched voice
> > > 
> > > Good point :-)  It might need some help from the vim folk...
> > 
> > Yes, something like this would take modifications to vim to make it
> > communicate to speakup some how, and I'm not sure what that would involve
> > since I haven't looked at the vim code at all.
> > 
> > William
> > 
> > _______________________________________________
> > Speakup mailing list
> > Speakup@braille.uwo.ca
> > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> > 
> > _______________________________________________
> > Speakup mailing list
> > Speakup@braille.uwo.ca
> > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 

Janina Sajka,	Phone:	+1.443.300.2200
		sip:janina@asterisk.rednote.net

Chair, Open Accessibility	janina@a11y.org	
Linux Foundation		http://a11y.org

Chair, Protocols & Formats
Web Accessibility Initiative	http://www.w3.org/wai/pf
World Wide Web Consortium (W3C)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
     ` If bash can, why not Speakup? Janina Sajka
@      ` Rynhardt Kruger
       ` William Hubbs
  1 sibling, 0 replies; 20+ messages in thread
From: Rynhardt Kruger @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.

I may be wrong, but I think that the vim editing style of bash isn't really the vim editor, but just a vim-like mode 
provided by readline. For instance, pressing the colon (:) while in bash vim-style command-mode, doesn't allow you to 
enter a vim command, but just beeps at you. So I think it's probably just a boolean value in the readline library itself 
which indicates to the shell whether you are in insert or command mode.

Take care,

Rynhardt

* Janina Sajka <janina@rednote.net> [101118 22:31]:
> I think my main point got lost in the litany of vim complaints that have
> actually been with us for a long time. I was trying to say something new
> that no one has commented on. So, let me try to redirect, if I may ...
> 
> William Hubbs writes:
> > On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
> > > Janina Sajka wrote:
> > > > My biggest complaint is that I need to be ultra-careful to
> > > > track whether I'm in insert or command mode, i.e. it would
> > > > sure help if Speakup could give me a differently pitched voice
> > > 
> > > Good point :-)  It might need some help from the vim folk...
> > 
> > Yes, something like this would take modifications to vim to make it
> > communicate to speakup some how, and I'm not sure what that would
> > involve since I haven't looked at the vim code at all.
> > 
> Actually, I don't think we need anything from vim.
> 
> 
> Note that you can have either vim or emacs editing of bash commands.
> Emacs is the default, but you can reset this by issuing:
> 
> set -o vim
> 
> By, default, this provides bash shell command editing in insert mode. As
> in vim, pressing Esc takes you into command mode where all the vim
> command mode functionality is provided.
> 
> So, the shell knows. That's got to be a value that's written somewhere,
> and thus something Speakup could read and respond to. I don't know
> where, but am I wrong?
> 
> Janina
> 
> > William
> > 
> > _______________________________________________
> > Speakup mailing list
> > Speakup@braille.uwo.ca
> > http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 
> -- 
> 
> Janina Sajka,	Phone:	+1.443.300.2200
> 		sip:janina@asterisk.rednote.net
> 
> Chair, Open Accessibility	janina@a11y.org	
> Linux Foundation		http://a11y.org
> 
> Chair, Protocols & Formats
> Web Accessibility Initiative	http://www.w3.org/wai/pf
> World Wide Web Consortium (W3C)
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
     ` If bash can, why not Speakup? Janina Sajka
       ` Rynhardt Kruger
@      ` William Hubbs
  1 sibling, 0 replies; 20+ messages in thread
From: William Hubbs @  UTC (permalink / raw)
  To: speakup

Hi Janina,

On Thu, Nov 18, 2010 at 03:27:18PM -0500, Janina Sajka wrote:
> Note that you can have either vim or emacs editing of bash commands.
> Emacs is the default, but you can reset this by issuing:
> 
> set -o vim
> 
> By, default, this provides bash shell command editing in insert mode. As
> in vim, pressing Esc takes you into command mode where all the vim
> command mode functionality is provided.
> 
> So, the shell knows. That's got to be a value that's written somewhere,
> and thus something Speakup could read and respond to. I don't know
> where, but am I wrong?

There probably is a value for this written somewhere, but it is just in
a memory location that bash knows about. That is why you have to put the
command to set it up in your .bashrc file or some similar startup file
if you want this setting by default.

Since speakup is in the kernel, it doesn't have an easy way to keep
track of which programs are running in user space or where they are
stored in memory, so there isn't a way that I know of to program speakup
itself to do something like what you are asking.

The closest approximation of something like this would be to write a
patch for bash which makes it aware of speakup and has it write values
to the /sys/accessibility/speakup files to change the pitch, etc.
However, that has its own issues, for example, if I'm running multiple
instances of bash (say on several consoles), itwould be very easy to
confuse the settings by switching consoles, etc.

Does this make sense?

William


^ permalink raw reply	[flat|nested] 20+ messages in thread

* RE: Speech on vim backspace [Was: If bash can, why not Speakup?]
       ` Speech on vim backspace [Was: If bash can, why not Speakup?] Janina Sajka
@        ` Albert Sten-Clanton
  0 siblings, 0 replies; 20+ messages in thread
From: Albert Sten-Clanton @  UTC (permalink / raw)
  To: 'Speakup is a screen review system for Linux.'

Thanks, Janina. 

Al 

-----Original Message-----
From: speakup-bounces@braille.uwo.ca [mailto:speakup-bounces@braille.uwo.ca]
On Behalf Of Janina Sajka
Sent: Thursday, November 18, 2010 3:32 PM
To: Speakup is a screen review system for Linux.
Subject: Speech on vim backspace [Was: If bash can, why not Speakup?]

Albert Sten-Clanton writes:
> In addition to the suggestion below, I'd very much like to hear the 
> characters I'm backspacing over.  I asked about this a few years ago, 
> but I gathered that this wasn't easy to do.  Any thoughts?


I have speech on backspace in vim, at least I do in insert mode.

You may need to set your charset to iso 8859-1 in your .vimrc. I don't
recall specifically whether this problem is solved, but other nasties are
solved this way. I'd love to use utf, but it isn't speaking as cleanly as
8859-1.

Janina
_______________________________________________
Speakup mailing list
Speakup@braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
   pj
   ` William Hubbs
@  ` Janina Sajka
  1 sibling, 0 replies; 20+ messages in thread
From: Janina Sajka @  UTC (permalink / raw)
  To: speakup

pj@pjb.com.au writes:
> Janina Sajka wrote:
> > to track whether I'm in insert or command mode, i.e. it would
> > sure help if Speakup could give me a differently pitched voice
> 
> Misunderstanding this to be about vim itself :-( , I wrote:
> > Presumably by writing something to somewhere in
> > /sys/accessibility/speakup/ (or /proc/speakup ?)
> > ... It might be possible to do it with a vim script
> 
> And it is possible :-) if you copy spokenmode.vim (after the .sig)
> into your ~/.vim/plugin/ dir (you might have to mkdir it first)
> then you should see the contents of /tmp/t change according to
> the editing mode.
> 
Oh, this is very very cool! Thank you.

I'm still struggling to make it automatic, though.

Some concerns ...

*	It's not autoloading. I haveI'm still struggling to make it
*	automatic, though.

Some concerns ...

*	Placing the script in 
.vim/plugin/ isn't enough to get the functionality working. I have to:

:source .vim/plugin/spokenmode.vim

Of course, this can be dropped into ~.vimrc.

> It just remains to find something in /sys/accessibility/speakup/
> which switches between two suitable voices...
> 

So, where you have "low" and "high" I can substitute a value and direct
it to /sys/accessibility/speakup/soft/pitch . However, this file is
owned by root (and group root). So, is there a way to add sudo to the
writefile command in vim scripts?


Thank you, Peter. for this lovely gem. I can tell I'm going to use it
constantly.

Janina

> Regards,  Peter Billam
> 
> http://www.pjb.com.au       pj@pjb.com.au      (03) 6278 9410
> "Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
>  ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2
> 
> --------------------------------------
> 
> " spokenmode.vim: cause Speakup to use a different tone of voice
> " according to whether Vim is in insert mode or command mode
> " 1.0, 2010.10.18
> " inherits much from obviousmode.vim, by Brian Lewis and Sergey Vlasov
> " 1. Put spokenmode.vim in ~/.vim/plugins/
> 
> if &cp || exists('g:loaded_spokenmode')
>     finish
> endif
> 
> let s:isInsertMode = 0
> 
> function! s:InsertEnter()
>     let s:isInsertMode = 1
>     call writefile(['low'], "/tmp/t")
> endfunction
> 
> function! s:InsertLeave()
>     let s:isInsertMode = 0
>     call writefile(['high'], "/tmp/t")
> endfunction
> 
> au InsertEnter * call s:InsertEnter()
> au InsertLeave * call s:InsertLeave()
> 
> let g:loaded_spokenmode = 1
> 
> _______________________________________________
> Speakup mailing list
> Speakup@braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 

Janina Sajka,	Phone:	+1.443.300.2200
		sip:janina@asterisk.rednote.net

Chair, Open Accessibility	janina@a11y.org	
Linux Foundation		http://a11y.org

Chair, Protocols & Formats
Web Accessibility Initiative	http://www.w3.org/wai/pf
World Wide Web Consortium (W3C)


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
   pj
@  ` William Hubbs
   ` Janina Sajka
  1 sibling, 0 replies; 20+ messages in thread
From: William Hubbs @  UTC (permalink / raw)
  To: speakup

On Fri, Nov 19, 2010 at 12:52:38PM +1000, pj@pjb.com.au wrote:
> Janina Sajka wrote:
> > to track whether I'm in insert or command mode, i.e. it would
> > sure help if Speakup could give me a differently pitched voice
> 
> Misunderstanding this to be about vim itself :-( , I wrote:
> > Presumably by writing something to somewhere in
> > /sys/accessibility/speakup/ (or /proc/speakup ?)
> > ... It might be possible to do it with a vim script
> 
> And it is possible :-) if you copy spokenmode.vim (after the .sig)
> into your ~/.vim/plugin/ dir (you might have to mkdir it first)
> then you should see the contents of /tmp/t change according to
> the editing mode.
> 
> It just remains to find something in /sys/accessibility/speakup/
> which switches between two suitable voices...

What you are going to be able to do with that is speech synthesizer
specific, so those settings are under the directory named by the
synthesizer name in /sys/accessibility/speakup.

For example on my desktop, the file to change the pitch is
/sys/accessibility/speakup/ltlk/pitch.

The values and their ranges are different for each synthesizer, so you
have to know the possible values and ranges to make them work correctly.

Also, some of them support relative pitch, so you can do things like
raise or lower the pitch by a specified amount.

William


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
@  pj
   ` William Hubbs
   ` Janina Sajka
  0 siblings, 2 replies; 20+ messages in thread
From: pj @  UTC (permalink / raw)
  To: speakup

Janina Sajka wrote:
> to track whether I'm in insert or command mode, i.e. it would
> sure help if Speakup could give me a differently pitched voice

Misunderstanding this to be about vim itself :-( , I wrote:
> Presumably by writing something to somewhere in
> /sys/accessibility/speakup/ (or /proc/speakup ?)
> ... It might be possible to do it with a vim script

And it is possible :-) if you copy spokenmode.vim (after the .sig)
into your ~/.vim/plugin/ dir (you might have to mkdir it first)
then you should see the contents of /tmp/t change according to
the editing mode.

It just remains to find something in /sys/accessibility/speakup/
which switches between two suitable voices...

Regards,  Peter Billam

http://www.pjb.com.au       pj@pjb.com.au      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2

--------------------------------------

" spokenmode.vim: cause Speakup to use a different tone of voice
" according to whether Vim is in insert mode or command mode
" 1.0, 2010.10.18
" inherits much from obviousmode.vim, by Brian Lewis and Sergey Vlasov
" 1. Put spokenmode.vim in ~/.vim/plugins/

if &cp || exists('g:loaded_spokenmode')
    finish
endif

let s:isInsertMode = 0

function! s:InsertEnter()
    let s:isInsertMode = 1
    call writefile(['low'], "/tmp/t")
endfunction

function! s:InsertLeave()
    let s:isInsertMode = 0
    call writefile(['high'], "/tmp/t")
endfunction

au InsertEnter * call s:InsertEnter()
au InsertLeave * call s:InsertLeave()

let g:loaded_spokenmode = 1


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
@  Brian Buhrow
  0 siblings, 0 replies; 20+ messages in thread
From: Brian Buhrow @  UTC (permalink / raw)
  To: Speakup is a screen review system for Linux.; +Cc: buhrow

[Hello, let's try this again.]

	Hello.  I think there's a point of confusion here.  When you're in
vim, whether you're in emacs mode or vim mode, the communication between
your terminal and vim is direct.  That is, bash has no notion of what
you're doing when you're inside vim.
	Having said that, the typical historical vi user, and  vim is really
emulating vi mode whenit's in vim mode, never knows wheteher they're in
insert mode or command mode.  To get around that, you hit escape a few
times, since hitting escape puts you in command mode and, if you're already
in command mode, it causes the terminal to beep.  So, when in doubt, hit
escape twice, and you should either get 1 or 2 beeps from the terminal,
depending on whether you were already in command mode, or if you  went from
insert mode to command mode. And, if vim has a silent mode, turn that off,
so you'll get the appropriate beeps.
	So, Janina is right, you don't need anything special from Vim,, except
for it to beep the terminal, and you don't need anything special from
Speakup.
Hope that helps.

-thanks
-Brian
On Nov 18,  2:04pm, Brian Buhrow wrote:
} Subject: Re: If bash can, why not Speakup?
} On Nov 18,  3:27pm, Janina Sajka wrote:
} } Subject: Re: If bash can, why not Speakup?
} } I think my main point got lost in the litany of vim complaints that have
} } actually been with us for a long time. I was trying to say something new
} } that no one has commented on. So, let me try to redirect, if I may ...
} } 
} } William Hubbs writes:
} } > On Thu, Nov 18, 2010 at 09:23:29AM +1000, pj@pjb.com.au wrote:
} } > > Janina Sajka wrote:
} } > > > My biggest complaint is that I need to be ultra-careful to
} } > > > track whether I'm in insert or command mode, i.e. it would
} } > > > sure help if Speakup could give me a differently pitched voice
} } > > 
} } > > Good point :-)  It might need some help from the vim folk...
} } > 
} } > Yes, something like this would take modifications to vim to make it
} } > communicate to speakup some how, and I'm not sure what that would
} } > involve since I haven't looked at the vim code at all.
} } > 
} } Actually, I don't think we need anything from vim.
} } 
} } 
} } Note that you can have either vim or emacs editing of bash commands.
} } Emacs is the default, but you can reset this by issuing:
} } 
} } set -o vim
} } 
} } By, default, this provides bash shell command editing in insert mode. As
} } in vim, pressing Esc takes you into command mode where all the vim
} } command mode functionality is provided.
} } 
} } So, the shell knows. That's got to be a value that's written somewhere,
} } and thus something Speakup could read and respond to. I don't know
} } where, but am I wrong?
} } 
} } Janina
} } 
} } > William
} } > 
} } > _______________________________________________
} } > Speakup mailing list
} } > Speakup@braille.uwo.ca
} } > http://speech.braille.uwo.ca/mailman/listinfo/speakup
} } 
} } -- 
} } 
} } Janina Sajka,	Phone:	+1.443.300.2200
} } 		sip:janina@asterisk.rednote.net
} } 
} } Chair, Open Accessibility	janina@a11y.org	
} } Linux Foundation		http://a11y.org
} } 
} } Chair, Protocols & Formats
} } Web Accessibility Initiative	http://www.w3.org/wai/pf
} } World Wide Web Consortium (W3C)
} } 
} } _______________________________________________
} } Speakup mailing list
} } Speakup@braille.uwo.ca
} } http://speech.braille.uwo.ca/mailman/listinfo/speakup
} >-- End of excerpt from Janina Sajka
} 
} 
>-- End of excerpt from Brian Buhrow



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
@  pj
  0 siblings, 0 replies; 20+ messages in thread
From: pj @  UTC (permalink / raw)
  To: speakup

Janina Sajka wrote:
> to track whether I'm in insert or command mode, i.e. it would
> sure help if Speakup could give me a differently pitched voice

I wrote:
> Presumably by writing something to somewhere in
> /sys/accessibility/speakup/ (or /proc/speakup ?)
> ... It might be possible to do it with a vim script
>   http://www.vim.org/scripts/

It should be possible; e.g. the obviousmode.vim script:
  http://vim.sourceforge.net/scripts/script.php?script_id=2212
    Clearly indicate visually whether Vim is in insert mode via
    the StatusLine highlight group.  When you go into insert mode,
    the status line color changes.

and indeed in:
  http://vimdoc.sourceforge.net/htmldoc/usr_41.html#vim-script-intro:
there are "mode" and "writefile" functions available ...

Peter Billam

http://www.pjb.com.au       pj@pjb.com.au      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: If bash can, why not Speakup?
@  pj
  0 siblings, 0 replies; 20+ messages in thread
From: pj @  UTC (permalink / raw)
  To: speakup

William Hubbs wrote:
> You can disable that line by putting the following line in your
> ~/.vimrc:   set noruler

Thank you :-)

> > > to track whether I'm in insert or command mode, i.e. it would
> > > sure help if Speakup could give me a differently pitched voice
> > Good point :-)  It might need some help from the vim folk...
> Yes, something like this would take modifications to vim to make
> it communicate to speakup some how, and I'm not sure what that
> would involve since I haven't looked at the vim code at all.

Presumably by writing something to somewhere in
/sys/accessibility/speakup/ (or /proc/speakup ?)
I don't see a /sys/accessibility/speakup/pitch
but something else might do.

It might be possible to do it with a vim script
  http://www.vim.org/scripts/
  http://vim.sf.net
and then eventually to get that into the vim-scripts package...

Peter

http://www.pjb.com.au       pj@pjb.com.au      (03) 6278 9410
"Was der Meister nicht kann,   vermöcht es der Knabe, hätt er
 ihm immer gehorcht?"   Siegfried to Mime, from Act 1 Scene 2


^ permalink raw reply	[flat|nested] 20+ messages in thread

* If bash can, why not Speakup?
@  Janina Sajka
  0 siblings, 0 replies; 20+ messages in thread
From: Janina Sajka @  UTC (permalink / raw)
  To: speakup

Hi, All:

I've been happily using vim for years. My biggest complaint is that I
need to be ultra-careful to track whether I'm in insert or command mode,
i.e. it would sure help if Speakup could give me a differently pitched
voice depending on that simple binary condition.

I'm aware of the status line in vim, but recently I've discovered that
one can have vim as the command editor in bash:

set -o vi


So, how is bash tracking this binary condition? I can surelyh confirm
that it does. Might it be something that could be used via Speakup to
change voice pitch on the fly depending on insert vs. command mode? Any
thoughts?


PS: In addition to the above set command, the following two are also
rather interesting:

set -o
bind -P

Janina


-- 

Janina Sajka,	Phone:	+1.443.300.2200
		sip:janina@asterisk.rednote.net

Chair, Open Accessibility	janina@a11y.org	
Linux Foundation		http://a11y.org

Chair, Protocols & Formats
Web Accessibility Initiative	http://www.w3.org/wai/pf
World Wide Web Consortium (W3C)


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~ UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
 If bash can, why not Speakup? pj
 ` William Hubbs
   ` Albert Sten-Clanton
     ` Steve Holmes
       ` Gregory Nowak
         ` Steve Holmes
           ` Gregory Nowak
       ` Janina Sajka
     ` Speech on vim backspace [Was: If bash can, why not Speakup?] Janina Sajka
       ` Albert Sten-Clanton
   ` If bash can, why not Speakup? Janina Sajka
     ` Rynhardt Kruger
     ` William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
 pj
 ` William Hubbs
 ` Janina Sajka
 Brian Buhrow
 pj
 pj
 Janina Sajka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).