From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Gian Uberto Lauri" Newsgroups: gmane.emacs.help Subject: Advice Required Date: Mon, 27 Oct 2014 10:56:16 +0100 Message-ID: <21582.5824.834302.348583@mail.eng.it> Reply-To: Gian Uberto Lauri NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1414403830 5511 80.91.229.3 (27 Oct 2014 09:57:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2014 09:57:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 27 10:57:03 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xih2t-0003py-4l for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 10:57:03 +0100 Original-Received: from localhost ([::1]:60425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xih2s-0006mh-Pf for geh-help-gnu-emacs@m.gmane.org; Mon, 27 Oct 2014 05:57:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xih2c-0006mV-LY for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:56:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xih2W-0000Nh-GS for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:56:46 -0400 Original-Received: from relay.eng.it ([91.109.60.38]:52788 helo=mail.eng.it) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xih2W-0000LU-5u for help-gnu-emacs@gnu.org; Mon, 27 Oct 2014 05:56:40 -0400 Original-Received: from bms2.eng.it (unknown [192.168.10.43]) by deliver.antivirus (Postfix) with ESMTP id B8CBB40176 for ; Mon, 27 Oct 2014 10:56:26 +0100 (CET) X-AuditID: c0a80a2b-f79af6d0000012f0-fc-544e16ca63c5 Original-Received: from mail.eng.it (Unknown_Domain [192.168.10.31]) by bms2.eng.it (Symantec Messaging Gateway) with SMTP id 48.08.04848.AC61E445; Mon, 27 Oct 2014 10:56:26 +0100 (CET) Original-Received: from quigley (unknown [172.27.7.115]) by mail.eng.it (Postfix) with ESMTP id 32D9940164 for ; Mon, 27 Oct 2014 10:56:25 +0100 (CET) X-Mailer: VM 8.1.1 under 24.4.1 (x86_64-unknown-linux-gnu) X-attribution: CC X-echelon-food: JITEM FIS PCS Trafficking PRIME Kidnap credit card Earthquake DERA Stranded Homeland security S.A.I.C. TRD Critical infrastructure Suspicious substance X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHLMWRmVeSWpSXmKPExsVyYAWXvO4pMb8Qg4N/lC123nzD5sDo0TbN LIAxissmJTUnsyy1SN8ugStj36IJzAULxCqmfTzC2MDYI9jFyMEhIWAi8bupsouRE8gUk7hw bz1bFyMXh5DAJkaJ7od/mSGclYwSj5bcZgKp4hUwkrjau5QJpJlFQFVi02R5iLCgxMmZT1hA bGYBHYmdW++wQdjaEssWvmYGsUUEpCTOrznBCNIqLCAhsXgCM8ReK4mvz5aATRcCan38bCVY K5uApkTn89dQNYISL49NYwQ5R0JgLaNE+/rdjBMYBWYhWT0LyepZSFYvYGRexcidlFtspJea l66XWbKJERJq2jsYz0xTPcQowMGoxMM7odg3RIg1say4MvcQowQHs5IIr+NPoBBvSmJlVWpR fnxRaU5q8SFGaQ4WJXHe45XuIUIC6YklqdmpqQWpRTBZJg5OqQbG6TwBy19eXbv16dQzqnO0 zPON4iY4F//cNN3iqvW3bZz9lg5ctm6GSXuSpp762iHszm4c2J39cFqU5rT94h/eda/4YL9x 14qQG7JvVwUIdmbXt8x9vSTr/AvPiKT3R5de28Ry9Y31jESuG0LHDF2/iy20nvKlbXVUw4/M P/71FqyygloiO+/vU2Ipzkg01GIuKk4EAGsDAoAxAgAA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.109.60.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100622 Archived-At: 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 =3F 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. --=20 /\ =5F=5F=5F Ubuntu: anci= ent /=5F=5F=5F/\=5F|=5F|\=5F|=5F=5F|=5F=5F=5FGian Uberto Lauri=5F=5F=5F=5F=5F= African word //--\| | \| | Integralista GNUslamico meaning "I can \/ coltivatore diretto di software not install gi=E0 sistemista a tempo (altrui) perso... Debian" Warning: gnome-config-daemon considered more dangerous than GOTO