help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to remove ^L or ^M from some buffer outputs?


From: Patrick Mahan
Subject: Re: Any way to remove ^L or ^M from some buffer outputs?
Date: Sun, 4 Oct 2020 12:41:21 -0700

I have a user defined lisp function -

;; If you encounter a file with ^M or ... at the end of every line
;; this gets rid of them by pressing F5.
(defun cut-ctrlM ()
  "Cut all visible ^M."
  (interactive)
  (beginning-of-buffer)
  (while (search-forward "\r" nil t)
    (replace-match "" nil t))
  (not-modified)
  (beginning-of-buffer))

Patrick
Emacs addict since 1994


On Sun, Oct 4, 2020 at 7:53 AM Jean Louis <bugs@gnu.support> wrote:

>
> 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.
>
> 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?
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]