unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Tassilo Horn <tsdh@gnu.org>,  help-gnu-emacs@gnu.org
Subject: Re: How to use emacs as a "diff3 -m" compatible merge tool?
Date: Sun, 12 Jun 2022 13:31:43 +0200	[thread overview]
Message-ID: <87a6ai15k0.fsf@gmail.com> (raw)
In-Reply-To: <8735gcmjxq.fsf@web.de> (Michael Heerdegen's message of "Fri, 10 Jun 2022 20:50:57 +0200")

>>>>> On Fri, 10 Jun 2022 20:50:57 +0200, Michael Heerdegen <michael_heerdegen@web.de> said:

    Michael> Tassilo Horn <tsdh@gnu.org> writes:
    >> Thanks, I will have a look.  Do I understand it correctly that your
    >> answer is specifically about the emacsclient case?

    Michael> Yes.

    >> But how do I print buffer contents to emacs' stdout?

    Michael> I don't know.

With any of the methods to run emacs non-interactively, eg

    emacs -Q --script FILE

any calls to `message' in FILE will go to stdout, so

    (with-current-buffer "mybuffer" (message "%s" (buffer-string)))

should do.

If youʼre using emacsclient, you can write to std*err* using
`external-debugging-output':

    (print "My interesting contents" #'external-debugging-output)

Robert
-- 



  reply	other threads:[~2022-06-12 11:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09 10:52 How to use emacs as a "diff3 -m" compatible merge tool? Tassilo Horn
2022-06-09 19:53 ` Michael Heerdegen
2022-06-10 16:42   ` Tassilo Horn
2022-06-10 18:50     ` Michael Heerdegen
2022-06-12 11:31       ` Robert Pluim [this message]
2022-06-10 22:52 ` Emanuel Berg
2022-06-13  5:21   ` Tassilo Horn
2022-06-13  8:09     ` Robert Pluim
2022-06-13  9:34       ` Tassilo Horn
2022-06-13  9:52       ` Michael Heerdegen
2022-06-13 11:18         ` Robert Pluim
2022-06-13 21:13     ` Emanuel Berg
2022-06-14  7:50       ` Tassilo Horn
2022-06-14 10:06         ` Emanuel Berg
2022-06-14 11:23           ` Tassilo Horn
2022-06-13 13:34 ` Tassilo Horn

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=87a6ai15k0.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=tsdh@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).