9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@swtch.com>
To: 9fans@9fans.net
Subject: Re: [9fans] Acme 2-1 chord behaves differently in external programs
Date: Sun, 20 Jul 2008 03:45:27 -0400	[thread overview]
Message-ID: <20080720074252.83EEE1E8C1F@holo.morphisms.net> (raw)
In-Reply-To: <a1fea417ba7cc1494d788f90a3653f10@9srv.net>

> Date: Sun Apr 27 19:42:09 EDT 2008
>
> Is it intentional that the 2-1 chord behaves differently in external
> programs? For example, I have a guide file with "0,.d" in it. If I
> 2-1 on Edit in a "normal" text window in Acme, it does what I'd
> expect: delete from start of file to current selection. In win, for
> example, it does nothing.

I don't know that I'd call it intentional, but I doubt there is an easy fix.
Acme client programs read from the event file to learn about mouse
clicks.  The ones they don't want to handle they write back, causing
acme to handle them instead.  Unfortunately, the write back interface
is a little narrower than the read interface, and giving the argument
from another window is one of the things that the write back can't
accomodate.

> I'm not entirely sure I have the problem right here, since even
> replacing 'Edit' with 'echo' in the above scenario gives different
> behavior in "regular" windows vs. ones managed by external
> programs. They do still seem to function, though, and Edit
> works as expected if given the same argument normally.

You don't say which external programs you are talking about,
but in general each gets to assign meaning as it decides.
I tried win and Mail.  In win, echo with an external argument
is like sending the text "echo argument" to the shell session,
which is what I expected.  In Mail, echo with an external argument
runs the command echo, but without the argument.  The difference
is that win is handling the event itself, while Mail is bouncing it
back to acme, losing the argument on the return trip.

Russ



      reply	other threads:[~2008-07-20  7:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-27 23:37 a
2008-07-20  7:45 ` Russ Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080720074252.83EEE1E8C1F@holo.morphisms.net \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).