From: Nick Dokos <ndokos@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Any way to remove ^L or ^M from some buffer outputs?
Date: Mon, 05 Oct 2020 15:16:22 -0400 [thread overview]
Message-ID: <87tuv8wkjd.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: courier.000000005F79E1AB.00004D66@protected.rcdrun.com
Jean Louis <bugs@gnu.support> writes:
> \f
> Compiling file /home/data1/protected/Programming/emacs-lisp/rcd-cf.el at Sun Oct 4 17:48:33 2020
>
> In cf-sms-exists:
> rcd-cf.el:437:18: Warning: reference to free variable ‘n’ Disable showing
> Disable logging
>
> I am not sure if you can see ^L above, let us say I am compiling or
> having some shell output, then I see often ^L, this may be line feed,
> I do not know, but it looks green here on my side and is often not
> interpreted correctly, line after line, but just as special character
> after which other output lines are shown.
#+BEGIN_ANCIENT_HISTORY
It is a "form-feed" - in the olden days, the line printer program would output
one of these at the end of a job (although programs could do that as well) in
order to line up the output of the next program with the perforations in the
continuous-feed paper.
Terminals sometimes used it to clear the screen. And it is still used e.g. when
you define file-local variables in emacs:
#+begin_quote
If some unrelated text might look to Emacs as a local variables list,
you can countermand that by inserting a form-feed character (a page
delimiter, *note Pages::) after that text. Emacs only looks for
file-local variables in the last page of a file, after the last page
delimiter.
#+end_quote
>
> In this case I see Emacs compiling buffer. It seems not necessary to
> be in the buffer like that.
>
> Then in shell buffers, I see something like this below:
>
> Output file: /home/data1/protected/Media/Videos/Recordings/2020/10/2020-10-04/2020-10-04-17:51:02.ogv
> ^M[0%] ^M[1%] ^M[2%] ^M[3%] ^M[4%] ^M[5%] ^M[6%] ^M[7%] ^M[8%] ^M[9%]
> ^M[10%] ^M[10%] ^M[11%] ^M[12%] ^M[13%] ^M[14%] ^M[15%] ^M[16%]
> ^M[17%] ^M[18%] ^M[19%] ^M[20%] ^M[20%] ^M[21%] ^M[22%] ^M[23%]
> ^M[24%] ^M[25%] ^M[26%] ^M[27%] ^M[28%] ^M[29%] ^M[30%]
>
> Is that alright to be so? Maybe there is way to remove those by
> setting something?
>
>
This is the output of a program that implements a poor man's version
of a progress meter: ^M is a carriage return (CR) which moves the
typewriter head to the beginning of the current line (it is then
usually - but not in this case - followed by a line feed in order to
allow you to type on the next line - I believe Windows text files
still have a CR/LF combination marking the end of each line in the
file).
By prepending a CR on each output, the next output overwrites the
previous value, showing you the progress of the task.
But it only works on typewrites, teletypes, terminals and terminal
emulators that implement these operations exactly. A shell in emacs
does not do that and prefers to output everything more-or-less verbatim.
#END_ANCIENT_HISTORY
We now return you to the 21st century...
--
Nick
"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler
prev parent reply other threads:[~2020-10-05 19:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-04 14:52 Any way to remove ^L or ^M from some buffer outputs? Jean Louis
2020-10-04 16:51 ` Drew Adams
2020-10-04 18:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-05 9:06 ` Jean Louis
2020-10-05 9:43 ` Eli Zaretskii
2020-10-05 9:47 ` Joost Kremers
2020-10-05 12:54 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-05 17:06 ` Drew Adams
2020-10-05 18:14 ` Jean Louis
2020-10-05 18:21 ` Eli Zaretskii
2020-10-05 18:23 ` Eli Zaretskii
2020-10-05 18:59 ` Yuri Khan
2020-10-05 19:13 ` Stefan Monnier
2020-10-10 0:23 ` Jean Louis
2020-10-10 7:02 ` Eli Zaretskii
2020-10-04 19:41 ` Patrick Mahan
2020-10-04 19:49 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-04 20:32 ` Patrick Mahan
2020-10-04 22:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-04 23:26 ` 2QdxY4RzWzUUiLuE
2020-10-04 23:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-05 3:57 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-10-05 7:29 ` tomas
2020-10-05 18:44 ` Nick Dokos
2020-10-05 19:16 ` Nick Dokos [this message]
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=87tuv8wkjd.fsf@alphaville.usersys.redhat.com \
--to=ndokos@gmail.com \
--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).