9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] a small change to acme
@ 2001-02-23 14:59 rog
  0 siblings, 0 replies; 3+ messages in thread
From: rog @ 2001-02-23 14:59 UTC (permalink / raw)
  To: 9fans

no wrap/inst involved - i just updated the file concerned (in my
private copy of acme).  if you make the change in /sys/src/cmd/acme,
you should be aware that subsequent installs will detect that it's
changed, will warn you, and won't update the file.

i guess it should probably be a proper update, but i haven't got the
time now.

basically, edit /sys/src/cmd/acme/ecmd.c.  change the printposn
function to look like this:

printposn(Text *t, int charsonly)
{
	long l1, l2;

	if (t != nil && t->file != nil && t->file->name != nil)
		warning(nil, "%.*S:", t->file->nname, t->file->name);
	if(!charsonly){
		l1 = 1+nlcount(t, 0, addr.r.q0);
		l2 = l1+nlcount(t, addr.r.q0, addr.r.q1);
		/* check if addr ends with '\n' */
		if(addr.r.q1>0 && addr.r.q1>addr.r.q0 && textreadc(t, addr.r.q1-1)=='\n')
			--l2;
		warning(nil, "%lud", l1);
		if(l2 != l1)
			warning(nil, ",%lud", l2);
		warning(nil, "\n");
		return;
	}
	warning(nil, "#%d", addr.r.q0);
	if(addr.r.q1 != addr.r.q0)
		warning(nil, ",#%d", addr.r.q1);
	warning(nil, "\n");
}


this change makes the acme Edit = commands print fully qualified acme
addresses, which seems to make more sense... (it also means that you
can use them to mark a current position in the file, etc)

  cheers,
    rog.



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

* Re: [9fans] a small change to acme
@ 2001-02-23 19:17 William Staniewicz
  0 siblings, 0 replies; 3+ messages in thread
From: William Staniewicz @ 2001-02-23 19:17 UTC (permalink / raw)
  To: rog, 9fans

[-- Attachment #1: Type: text/plain, Size: 148 bytes --]

This was posted back last month and I would like to implement
it now. What are the steps to installing it? Is 'wrap/inst'
involved?

		-Bill


[-- Attachment #2: Type: message/rfc822, Size: 1656 bytes --]

From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: [9fans] a small change to acme
Date: Thu, 11 Jan 2001 15:42:05 0000
Message-ID: <20010111143829.0DC93199E9@mail.cse.psu.edu>

the following change makes the Edit = and =# commands much more useful
under acme.

% diff /sys/src/cmd/acme/ecmd.c ecmd.c
677a678,679
> 	if (t != nil && t->file != nil && t->file->name != nil)
> 		warning(nil, "%.*S:", t->file->nname, t->file->name);
687c689,690
< 		warning(nil, "; ");
---
> 		warning(nil, "\n");
> 		return;

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

* [9fans] a small change to acme
@ 2001-01-11 15:42 rog
  0 siblings, 0 replies; 3+ messages in thread
From: rog @ 2001-01-11 15:42 UTC (permalink / raw)
  To: 9fans

the following change makes the Edit = and =# commands much more useful
under acme.

% diff /sys/src/cmd/acme/ecmd.c ecmd.c
677a678,679
> 	if (t != nil && t->file != nil && t->file->name != nil)
> 		warning(nil, "%.*S:", t->file->nname, t->file->name);
687c689,690
< 		warning(nil, "; ");
---
> 		warning(nil, "\n");
> 		return;



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

end of thread, other threads:[~2001-02-23 19:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-23 14:59 [9fans] a small change to acme rog
  -- strict thread matches above, loose matches on Subject: below --
2001-02-23 19:17 William Staniewicz
2001-01-11 15:42 rog

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 NNTP newsgroup(s).