Re: a curious beep when selecting and replacing text in nedit
Re: a curious beep when selecting and replacing text in nedit
- Subject: Re: a curious beep when selecting and replacing text in nedit
- From: Vernon Williams <email@hidden>
- Date: Thu, 4 Jun 2009 20:10:44 -0500
Thursday, June 4, 2009, 6:59pm
As far beeping, beeping in general has worked in nedit
in every version of OS X, at least for me. Actually, I never
used 10.0, so I can't say about that, but in all after that.
For example, if I go into nedit, put it into read only mode
(with the last menu item in the Preferences menu), and
try to type something, it beeps, as I would expect, because
you aren't allowed to edit a read only file.
It did this on 10.1, Jaguar, Panther, Tiger, and now Leopard.
It also did this on Sun work stations for many years.
I just tested this on Tiger on my MacBook Pro, and on my
old Panther installation that I kept after moving to Leopard,
and I get a beep trying to edit a read only file.
The thing that is different in Leopard is that it never used
to beep in this particular case in earlier versions of OS X,
of typing while text is selected, in order to replace the
selected text with that typed.
To make sure, I just tested this in Tiger on my MacBook
Pro and on my saved version of Panther, and there is no
beep if I select text and type text to replace the selected text.
Note that I am using the same nedit binary file on Panther,
Tiger, and Leopard.
So the issue is not of beeping not working in previous
versions of OS X, but beeping not being triggered in this
case in previous versions of OS X (or in other OSes, like
SunOS).
It is almost like selecting text is triggering some new event
handler or translation or something.
I can reproduce it easily. Bring up an empty nedit window
(just type "nedit"), type some text (like "abc"), double click
on the text to select it, and press the space bar. The "abc"
will be replaced with " ", as expected, but it will beep as it
does so, which it never did before.
This may be some quirk of my ancient version of nedit
(5.3RC1, 3/19/2002). I may have to try to get a newer
version and see if that exhibits this "feature". Actually, I
am amazed that a binary from June of 2002 still even
works at all, on Leopard, and on Tiger on my Intel
MacBook Pro via Rosetta. But, quirk or not, it worked
properly on earlier versions of OS X, and works great
on Leopard except for this one little oddity.
I don't have my original nedit source anymore, having
lost it in a disk crash 4 1/2 years ago. I believe I got the
source from a web site devoted to just nedit, from its
authors or maintainers.
I just had a thought, brought up an xterm, typed in part of
a command line, double clicked on part of the line to
select it, and tried to type something. It did not replace
the selected text, since xterm is not an editor. However,
it did beep when I typed the text, just like in nedit. I then
tried the same thing with an xterm under Tiger on my
MacBook Pro, and there was no beep.
This suggests that the problem has nothing to do with
nedit, but that selecting text is setting some flag that then
triggers the beep when more text is typed.
For example, I typed "ls -l" in an xterm, without hitting
Return, selected the "l" in the option, typed "r", and got
a beep. Needless to say, there is no beep when doing
this same thing in Terminal.
Vernon Williams
On Jun 4, 2009, at 6:14 PM, Jeremy Huddleston wrote:
On Jun 4, 2009, at 14:34, Vernon Williams wrote:
Thursday, June 3, 2009, 3:26pm
I upgraded to Leopard a few days ago, and after a bit of
effort everything is now working fine.
However, I just noticed one curiosity, not a real problem,
but a minor annoyance.
When editing a file with Nedit, if I select some text and then
type some new text to replace it, it beeps, which it never
used to do before. I can live with it, but I find it a bit jarring
while editing and would prefer it not happen.
Interesting. The problem may be that beep just used to not work at
all. I'm not sure if the beep support was fixed in 10.5.7 or in
10.5.5, but it was certainly not functional in earlier versions.
When I go into the X11 preferences, toggling the "Use
system alert effect" button in the Output section changes
the sound of the beep, but it is still there.
Right. That is expected.
This is not from any change in nedit, since I am still using
the same nedit executable file that I built from source 7 years
ago (June 5, 2002), before Apple even had an X11 for the
Mac, while I was still using X11 stuff from Tenon Systems,
when I was still on OS X 10.1. This did not happen on
any previous version of OS X I have used this same nedit
binary on, which includes Jaguar and Panther on my G5
and Tiger on my Intel MacBook Pro.
Interesting. The beep was working on Tiger.
When I was using nedit at work on Sun workstations a few
years ago, it never did this, either.
nedit did (and does) still have other beeps, like when you
try to edit a read only file, but never this before.
Is this some X11 feature that was never implemented (or
never implemented properly before) that is now in X11
for Leopard, or what?
It was recently fixed. I believe it worked in Tiger, but the beep
was recently re-added to Leopard. I'm curious about what is causing
the beep. I cannot reproduce the problem using nedit-5.5 from
MacPorts. Can you please give detailed steps to reproduce the
problem?
Thanks,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden