From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: How to use emacs as a "diff3 -m" compatible merge tool? Date: Fri, 10 Jun 2022 18:42:42 +0200 Message-ID: <875yl8qx6t.fsf@gnu.org> References: <87ilpaay1j.fsf@gnu.org> <87mtelpq9t.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22918"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.26; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 10 18:53:11 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nzhsk-0005lG-P0 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 18:53:10 +0200 Original-Received: from localhost ([::1]:49488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzhsj-0007ld-ET for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Jun 2022 12:53:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzhqq-0006Ub-5k for help-gnu-emacs@gnu.org; Fri, 10 Jun 2022 12:51:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzhqp-0005Kb-Sg; Fri, 10 Jun 2022 12:51:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=+nZCfztvQwVW5mOt0R9IM3hlrCzO+dySSRo5y3uF6EQ=; b=fr3iXqHHUQkjWF rRa9kbOopFqNEyAVEUwXodwDn6VYkr8Zf2Fu06/i+piae0csDih1bj6a5ZWnQucgIegZT6BIddRmw AZAL2Peo9rFnR/M6oobnx7+Veh9czZGBU0SQSUuGxvF7vf/Y4XnVPKn6s4q2JyrBGVLGAwcGsN3CP x7JGiejRDWW4iBT0GDeOEs5HZfTpSc7Z27OmwFd5leqbq+TP83NoUzt58fKrFXM4bFwNPJvHMXxWw vAAqSNMwGZO/84gdec6ok9UqEGFqxsf0LWCSr7cxoeMaZHu6kmMhfz0ru8m5mCPwilaVyhmCMYnn9 njJ3EVS1BuF7F1YatX1g==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:38101) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzhqp-0006o2-4e; Fri, 10 Jun 2022 12:51:11 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id B67B527C0054; Fri, 10 Jun 2022 12:51:10 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 10 Jun 2022 12:51:10 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudduuddguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epudejtdehuddvleffjeekteegvdehleehvdeufefhueekkeekhedvgfeggeffvefgnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Jun 2022 12:51:09 -0400 (EDT) In-reply-to: <87mtelpq9t.fsf@web.de> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137614 Archived-At: Michael Heerdegen writes: Hi Michael, >> How do I print the merge buffer's contents to stdout? And how can I >> influence the exit code? (I could do (kill-emacs my-exit-code) but >> would be more happy if I could also use the merge command with >> emacsclient where I obviously don't want to kill emacs.) > > Never did something like this before. I spent some time trying to > understand the code in server.el however. Seems `server-send-string' > can be used for this. Maybe search for the occurrences - e.g. in > `server-edit-abort' (and the rest of server.el). > > The available "options" are explained in the doc of > `server-process-filter' AFAIU. I think you are interested in those > "accepted by the client" - especially -print and -error. Thanks, I will have a look. Do I understand it correctly that your answer is specifically about the emacsclient case? If so, I'd rather tackle my usual sysadmin work "emacs -Q -l minimal.el ..." use-case first where (kill-emacs my-exit-code) would be ok. But how do I print buffer contents to emacs' stdout? Bye, Tassilo