unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Damien Wyart <damien.wyart@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Make Emacs print "^J" instead of "\n" with `print-escape-newlines'?
Date: Wed, 20 Nov 2013 21:48:48 +0100	[thread overview]
Message-ID: <528d2031$0$2128$426a74cc@news.free.fr> (raw)
In-Reply-To: mailman.6684.1384979733.10748.help-gnu-emacs@gnu.org

* Thorsten Jolitz <tjolitz@gmail.com> in gnu.emacs.help:
> > is there any way to make Emacs print "^J" instead of "\n" with
> > (print-escape-newlines t)?

> But I would still be interested in the first part.

I think you would need to modify the following part of src/print.c:

          if (c == '\n' && print_escape_newlines)
        {
          PRINTCHAR ('\\');
          PRINTCHAR ('n');
        }

(not sure how to tell PRINTCHAR to print ^J) and recompile Emacs.

-- 
DW


  parent reply	other threads:[~2013-11-20 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 19:57 Make Emacs print "^J" instead of "\n" with `print-escape-newlines'? Thorsten Jolitz
2013-11-20 20:35 ` Thorsten Jolitz
     [not found] ` <mailman.6684.1384979733.10748.help-gnu-emacs@gnu.org>
2013-11-20 20:48   ` Damien Wyart [this message]
2013-11-20 23:41     ` Thorsten Jolitz

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='528d2031$0$2128$426a74cc@news.free.fr' \
    --to=damien.wyart@free.fr \
    --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).