Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: why not a single command for the "eepitch block" idiom? #10

Closed
suhail-singh opened this issue Feb 23, 2024 · 4 comments
Closed

Comments

@suhail-singh
Copy link

I am new to eev. I understand the need for having to call, in succession,
something like eepitch-shell, eepitch-kill, eepitch-shell and I appreciate
there being helpers such as eewrap-eepitch. However, if I understand
correctly, it seems that the three invocations resulting from eewrap-eepitch
are intended to be treated as a transaction and should be executed in
succession. I.e., generally, one would either execute all three or none of
them.

Assuming my understanding above is correct, why not have a wrapper that
internally invokes the three commands in succession? I.e., why not reify the
idiom into a single function (eewrap-eepitch could be updated to generate an
invocation to that single function)?

@edrx
Copy link
Owner

edrx commented Feb 23, 2024

Hi Suhail-Singh!

You're right that "generally, one would either execute all three or
none of them", but I found that there were many cases in which I just
wanted to redisplay the target buffer at the window at the right
without restarting it, and in these cases I would just execute the
(eepitch-shell)...

Here are some examples that come to my mind:

1) I run a compilation that takes several minutes - usually on
(eepitch-shell2) or (eepitch-shell3), as I try to keep (eepitch-shell)
for tasks that finish "immediately" - and I want to do other things
while the compilation goes on... and some of these other things use
eepitch blocks with (eepitch-shell), that use other target buffers.
From time to time I run just the (eepitch-shell2) or (eepitch-shell3)
to see how things are going with the compilation.

2) Imagine that I'm writing an eepitch block - with (eepitch-lua51) -
line by line, and I'm testing each line with f8 as I write it. Imagine
that some parts of it require some research - i.e., they require other
window configurations. I can do this "research" and then use just the
line with (eepitch-lua51) to redisplay my current "session" at the
window at the right.

3) Try the examples in these sections of the intros - they are about
using two different eepitch targets to control two different programs
that "talk to one another":

(find-eepitch-intro "1.2. Two targets")
(find-eepitch-intro "1.3. Two targets, two windows")

4) Take a look here:

(find-multiwindow-intro "5. Restarting eepitch targets")

You will see that the line with `find-3EE' restarts the two targets,
but the line with `find-3ee' just redisplays the targets.

  Hope that helps!
  Cheers =),
    Eduardo


P.S.: discussing here is ok, of course, but I have a slight preference
for the mailing list... if it makes no difference to you then please
send your next messages to the list! It is here:

  https://lists.nongnu.org/mailman/listinfo/eev
  https://lists.gnu.org/archive/html/eev/

@suhail-singh
Copy link
Author

suhail-singh commented Feb 23, 2024 via email

@edrx
Copy link
Owner

edrx commented Feb 23, 2024

Hi Suhail!

Your message is not here yet,

  https://lists.gnu.org/archive/html/eev/

and I don't have your e-mail, so I'll answer here...

We have this, modulo comments:

  (defun eepitch-shell  () (interactive) (eepitch '(shell)))
  (defun eepitch-shell2 () (interactive) (eepitch '(shell "*shell 2*")))
  (defun eepitch-shell3 () (interactive) (eepitch '(shell "*shell 3*")))

I think that what you are proposing is this:

  (defun eepitch-shell-init  () (interactive) (eepitch-shell)  (eepitch-kill) (eepitch-shell))
  (defun eepitch-shell2-init () (interactive) (eepitch-shell2) (eepitch-kill) (eepitch-shell2))
  (defun eepitch-shell3-init () (interactive) (eepitch-shell3) (eepitch-kill) (eepitch-shell3))

• (eepitch-shell-init)
• (eepitch-shell)
echo hello

Can you play with it for some time and tell me if you like it?
If you do like it then you'll probably need more tools to make it
easier to use - like a variant of M-T:

  (find-elongkey-links "M-T  ;; eewrap-eepitch")
  (find-efunction 'eewrap-eepitch)

If you find any of these missing tools difficult - or even boring - to
write, just tell me and I'll write them for you!

  Cheers, happy hacking, etc =),
    Eduardo

@suhail-singh
Copy link
Author

suhail-singh commented Feb 24, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants