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: Mon, 13 Jun 2022 07:21:00 +0200 Message-ID: <87mtehxgm2.fsf@gnu.org> References: <87ilpaay1j.fsf@gnu.org> <87h74suo6g.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30465"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.27; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 07:47:04 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 1o0cuk-0007eb-T2 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 07:47:03 +0200 Original-Received: from localhost ([::1]:35514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0cuj-0004tk-Bv for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 01:47:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0crx-0004sn-BP for help-gnu-emacs@gnu.org; Mon, 13 Jun 2022 01:44:09 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:32848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o0crw-0000ZJ-Dx; Mon, 13 Jun 2022 01:44:08 -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=uJOrNSBCdl7FeE5Ko7HBQ4bT+H1s2G/IoBv09J7Z8Qo=; b=TZpCqMcMamFJDg kiID9YppNx8Blem+Ple4Zzsb08VdVRhh4yRTGyfCa+e03BdunvwwqsDyVOkamtpS2vtWHpEjJebSE UZ8UipHunayw5mlJWhP5zxb3Yyvq8HhjXmRE4J7QiW5Oy0Mo+R8vEUEoMI3EzVzh9d3xRc3KhwsOu vL4RoeMw9Qhpla7xY/xjBOFoHPGCisdyNFm915LUuZPpap8IjbDXEuUJU3z2oUX0YQmdXmp5zgJNU 35u1XnrmwZ0zohydJK41uwARBZlFidbPgqQVGH5AwNOqYX050Di18VhZXTrQ5KoizhMDbvu5tlwc4 YsnCP6IqNhfB8e2fz9lA==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:35769) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o0crw-00062u-8Y; Mon, 13 Jun 2022 01:44:08 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id D5FEF27C005A; Mon, 13 Jun 2022 01:44:07 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 13 Jun 2022 01:44:07 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudduiedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecuggftrfgrthhtvghrnhepveegveehgeejtdffhfdtgefgheeiheevkeffve duteejuedtgffhleeftdfhkeeunecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohif rdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeej keegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Jun 2022 01:44:07 -0400 (EDT) In-reply-to: <87h74suo6g.fsf@dataswamp.org> 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:137762 Archived-At: Emanuel Berg writes: Hi Emanuel, >> 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.) > > Why not, isn't this supposed to be a shell tool? If so, see > emacs(1) as you know ... > > If not, and if it isn't supposed to be exited, how can there be an > exit code to begin? (To end with, without ending anything.) "emacsclient " exits on `server-edit' (C-x #) (or goes to the next buffer if more than one file were specified on the command line) but won't make emacs itself exit. So there is an exit code for emacsclient but it seem one cannot influence it. >> How do I print the merge buffer's contents to stdout? > > Here is some material on that but if you use Emacs as a shell > tool you don't need it > > https://stackoverflow.com/a/41435631 Indeed, (append-to-file (point-min) (point-max) "/dev/stdout") seems to do the trick! Thanks, Tassilo