From: "Gian Uberto Lauri" <saint@eng.it>
To: help-gnu-emacs@gnu.org
Subject: Advice Required
Date: Mon, 27 Oct 2014 10:56:16 +0100 [thread overview]
Message-ID: <21582.5824.834302.348583@mail.eng.it> (raw)
Hello everybody!
I would like to store a ediff-session specific value somewhere, this
value come s to the ediff session via a wrapping function that is
called with emacsclient --eval.
I thought to make the variable buffer specific on the ediff control
panel buffer. Is it a good solution ?
Thank you in advance for your suggestions.
For those curious about what I am doing:
I set up a couple of scripts that let me use Emacs to solve conflicts
with SVN with the use of the --eval option of emacsclient.
After finding some guys suggesting ediff-merge-files-with-ancestor
(but apparently failing to overcoming the non blocking behaviour of
the function) I wrote a first set of shell scripts that used a named
pipe to attain the desired blocking behaviour. The key is advice
ediff-quit so that a shell command is invoked to put a character in
the pipe, thus un-blocking a pending read (all shell commands).
It works this way:
- the calling script launches ediff and then attempts to read from a
named pipe and blocks until input is available
- the advice after ediff-quit sends a character to the named pipe and
un-blocks the read operation
The next step was to write a couple of command around a semaphore, and
this would change nothing - except showing myself how fast I could be
in writing these code snippets.
What I really want is the ability of run several blocking diff at the
same time. One way to differentiate the various instance is the id of
the process used to block the script that launched the emacs diff
function.
I would like to get this architecture:
- the calling scripts spawns a command in the background, does the
ediff launching emacsclient invocation and then waits on the command
in background. Such a command creates a named semaphore whose name
depends on the user and its process IDs and waits on that semaphore.
The semaphore-creating-pid is available to the calling script (the
$! variable) and is used as a parameter of a suitable wrapper
function for ediff or ediff-merge-files-with-ancestor.
This pid will be passed to the signaling program so that the
semaphore name can be computed.
- the signaling program computes the semaphore name and signals it
unblocking the semaphore-creating process and the script that
is waiting after launching it.
--
/\ ___ Ubuntu: ancient
/___/\_|_|\_|__|___Gian Uberto Lauri_____ African word
//--\| | \| | Integralista GNUslamico meaning "I can
\/ coltivatore diretto di software not install
già sistemista a tempo (altrui) perso... Debian"
Warning: gnome-config-daemon considered more dangerous than GOTO
next reply other threads:[~2014-10-27 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 9:56 Gian Uberto Lauri [this message]
2014-10-27 12:45 ` Advice Required Stefan Monnier
2014-10-27 13:25 ` Gian Uberto Lauri
2014-10-27 13:54 ` Stefan Monnier
2014-10-27 14:11 ` Gian Uberto Lauri
2014-10-27 15:03 ` Stefan Monnier
2014-10-27 15:11 ` Gian Uberto Lauri
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21582.5824.834302.348583@mail.eng.it \
--to=saint@eng.it \
--cc=help-gnu-emacs@gnu.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).