JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for UK-NEXTSTEP-USERS Archives


UK-NEXTSTEP-USERS Archives

UK-NEXTSTEP-USERS Archives


UK-NEXTSTEP-USERS@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

UK-NEXTSTEP-USERS Home

UK-NEXTSTEP-USERS Home

UK-NEXTSTEP-USERS  2001

UK-NEXTSTEP-USERS 2001

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Assignment to a Key, Part II

From:

Chris Bidmead <[log in to unmask]>

Reply-To:

NeXT users discussion list: hardware,[NEXT|OPEN|GNU]STEP, Darwin/Mac OS X,WebObjects" <[log in to unmask]>

Date:

Fri, 23 Nov 2001 16:44:51 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (59 lines)

On Friday, November 23, 2001, at 01:33  pm, Ondra Cada wrote:
>
> % alias rewrap sed -f ~/Script/rewrap.sed

Oh, I see what you mean.  I didn't get it at first.  No, I don't really
like that.  It creates two entities, the script and the shell alias.  As
sed is ubiquitous, I just wanted one self-contained entity that declared
its origins and function (in the comments) and functioned.  Just one thing
to move around among my various systems.  You can do this with awk, why
not with sed (haven't seen any sed script examples beginning #!...)

> Or do you need a real script to be able to run it throught NSTask and
> alike?

In the current context I run it through TextExtras, which doesn't care if
it's a script or a command line.

> Strangely, I need this seldom enough to be quite satisfied with the
> quick-and-dirty TextEdit solution (find-and-replace \n\n by blahblah, f&r
> \n
> by space, f&r blahblah by \n\n, manually).

Does TextEdit recognise \n in Find?  I've never been able to do this.
>
> OTOH, should I need it as often as you, I would probably write a "smart"
> tool, which would support different ways of re-wrapping, it would also
> clean
> out those CR's from windoze or Classic, etc.

I've found it easier just to clean out Classic and Windows... :-)  Just
don't touch 'em, mate.  And I'm not sure why you would want different ways
of re-wrapping.  This is a tool that simply shifts text out of an
Emacs-like environment, where visible line endings are delineated by \n,
into any of these new-fangled GUI text environments where you-
don't-care-what delineates the visible line endings, as long as you can
trust it to break at a convenient space (so all you need supply is the
space.)  (BTW, has anyone noticed the very peculiar ideas that Mail.app
seems to have about breaking lines?)

> And, when run without any switch
> to select a particular behaviour, it would analyze the source file and try
> to guess what the proper operation should be (and then either ask me to
> confirm, or, with a proper switch, use the best guess unattended).

I don't want any interactivity, thanks very much.  Quite enough of that
nonsense everywhere else in these so-called modern GUI operating systems.
And if the original text is delineated by anything other than \n, as God
intended, then to hell with it.  Or, if you must, normalise the line
endings to \n with a separate tool, and then pipe the output to our baby.

> Of course, such thing would have to be written in ObjC/OpenStep, not to be
> too complicated.

The sed thing is fine -- perfect, in fact.  It creates a lightweight,
cross-platform tool that does the job unobtrusively.

--
el bid

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
December 2022
February 2022
February 2021
January 2021
October 2020
August 2015
February 2015
June 2013
July 2012
May 2012
November 2011
October 2011
September 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
September 2010
June 2010
March 2010
February 2010
January 2010
November 2009
July 2009
March 2009
February 2009
January 2009
November 2008
June 2008
April 2008
March 2008
January 2008
December 2007
October 2007
July 2007
June 2007
April 2007
January 2007
December 2006
October 2006
September 2006
August 2006
July 2006
June 2006
April 2006
March 2006
February 2006
January 2006
November 2005
October 2005
June 2005
May 2005
March 2005
February 2005
January 2005
2004
2003
2002
2001
2000
1999
1998


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager