From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: Any way to remove ^L or ^M from some buffer outputs? Date: Mon, 5 Oct 2020 09:29:18 +0200 Message-ID: <20201005072918.GA19644@tuxteam.de> References: <87pn5xrctr.fsf@ebih.ebihd> <878scl8ut6.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1579"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 09:30:10 2020 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 1kPKwi-0000EA-7k for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 09:30:08 +0200 Original-Received: from localhost ([::1]:42630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPKwh-0002l4-8y for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 03:30:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPKvw-0002c7-QQ for help-gnu-emacs@gnu.org; Mon, 05 Oct 2020 03:29:20 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:46358) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1kPKvt-0008Qb-Pt for help-gnu-emacs@gnu.org; Mon, 05 Oct 2020 03:29:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=AyLNb29Sd0jYEjgMXfXKd/ZTzy8C47s1zwzK/K5yumk=; b=Be3boJJIznoMDdOvz03QDfXtsvJUUnMF9HiD9KCJJlFgW6ci1aNfeAoyQLE4WyXdTrC4Yud4DYxrw8iCuqhAkTmzxRPXUDC6MjqCdHG+Ej0UFxpKNFscJ4ZGdeLYKx9lAxEVQUHBXJtgbvqFoIXiRKL3eBGqLYA2E8o2UGKdCXlGDJNmS7Jz7j8OVzw1v0OqKbbiiFqjkhn/A++d3zt2JzbU8XAE2tLxiuKVLrtvEfTkKg0daIhEowGjCLaONhqB872lFkdA8Nb8lAaq+UHHkniH5yks4V67jMZKaz9Ksl/7egpdRSqnCul2IiaZpOS1PU01WJ/PXC2qapjTad6zFA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1kPKvu-0005Dg-DH for help-gnu-emacs@gnu.org; Mon, 05 Oct 2020 09:29:18 +0200 Content-Disposition: inline In-Reply-To: <878scl8ut6.fsf@ebih.ebihd> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/05 03:29:15 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:124310 Archived-At: --5vNYLRcllDrimb99 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 05, 2020 at 12:56:05AM +0200, Emanuel Berg via Users list for t= he GNU Emacs text editor wrote: > Patrick Mahan wrote: >=20 > > Yes, I have never byte-compiled it as I have only > > used it interactively to clean-up text files coming > > from a DOS world to linux/unix/macos. It is defined > > in my .emacs init file. >=20 > Well, you can byte-compile your .emacs as well. It is > just another Elisp file... >=20 > Anyway, here (last) is a refined version, if you > don't mind... >=20 > I wonder tho... why does (insert-char 13) insert ^M > but M-x insert-char 13 RET inserts ^S? Because the interactive version (your second above) tries to be helpful and interprets the 13 as hex, whereas the non-interactive is plain lisp, and there 13 is decimal 13, as it always has been. To be fair, the interactive version has told you, in the prompt. But who reads prompts these days? ;-D (Not intended by any means as a slur at anyone: I've been caught doing that more than once!) Cheers - t --5vNYLRcllDrimb99 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl96y04ACgkQBcgs9XrR2kZJTQCfewL+FK5enwC6oYUszViUdZ7o YS8AniLjB221ePXVJbLALoHPDMXvTVhP =4OtO -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--