From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Damien Wyart Newsgroups: gmane.emacs.help Subject: Re: Make Emacs print "^J" instead of "\n" with `print-escape-newlines'? Date: Wed, 20 Nov 2013 21:48:48 +0100 Organization: Serveur de News Free Message-ID: <528d2031$0$2128$426a74cc@news.free.fr> References: <87siuqj17v.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1384980619 14105 80.91.229.3 (20 Nov 2013 20:50:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2013 20:50:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 20 21:50:21 2013 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 1VjEj7-0006ZX-2H for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Nov 2013 21:50:21 +0100 Original-Received: from localhost ([::1]:56993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjEj6-0001Vr-MV for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Nov 2013 15:50:20 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!proxad.net!feeder1-2.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp4-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 Original-Lines: 18 Original-NNTP-Posting-Date: 20 Nov 2013 21:48:49 CET Original-NNTP-Posting-Host: 213.41.244.197 Original-X-Trace: 1384980529 news-2.free.fr 2128 213.41.244.197:60141 Original-X-Complaints-To: abuse@proxad.net Original-Xref: usenet.stanford.edu gnu.emacs.help:202281 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:94550 Archived-At: * Thorsten Jolitz 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