GNU bug report logs - #21652
bell chars

Previous Next

Package: emacs;

Reported by: Tom Baker <tombaker17 <at> gmail.com>

Date: Thu, 8 Oct 2015 23:11:02 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Tom Baker <tombaker17 <at> gmail.com>
Cc: 21652 <at> debbugs.gnu.org
Subject: bug#21652: bell chars
Date: Fri, 14 Aug 2020 23:26:13 -0700
Tom Baker <tombaker17 <at> gmail.com> writes:

> I have a real need to have my command shells beep at me when their work is done, so I set it up so beeps are passed to the
> host system.
>
> In the function comint-carriage-motion I alter
>
> (defun comint-carriage-motion (start end)
>   "Interpret carriage control characters in the region from START to END.
> Translate carriage return/linefeed sequences to linefeeds.
> Make single carriage returns delete to the beginning of the line.
> Make backspaces delete the previous character."
>
> to say
>
> (defun comint-carriage-motion (start end)
>   "Interpret carriage control characters and bells in the region from START to END.
> Translate carriage return/linefeed sequences to linefeeds.
> Make single carriage returns delete to the beginning of the line.
> Make backspaces delete the previous character. Pass bells through."
>
> and the code chunk
>
>                 (cond ((= ch ?\b)                  ; CH = BS
>                        (delete-char 1)
>                        (if (> (point) lbeg)
>                                    (delete-char -1)))
>                       ((= ch ?\n)
>                        (when delete-end            ; CH = LF
>                                 (if (< delete-end (point))
>                                      (delete-region lbeg delete-end))
>                                 (set-marker delete-end nil)
>                                 (setq delete-end nil))
>                        (forward-char 1)
>                        (setq lbeg (point)))
>                       (t                            ; CH = CR
>
> changed to
>
>                 (cond ((= ch ?\b)            ; CH = BS
>                        (delete-char 1)
>                        (if (> (point) lbeg)
>                                    (delete-char -1)))
>                       ((= ch ?\n)
>                        (when delete-end      ; CH = LF
>                                 (if (< delete-end (point))
>                                      (delete-region lbeg delete-end))
>                                 (set-marker delete-end nil)
>                                 (setq delete-end nil))
>                        (forward-char 1)
>                        (setq lbeg (point)))
>                       ((= ch ?\a)
>                        (forward-char 1)
>                        (ding)
>                        (sit-for 0.45 t))      ; CH = BL
>                       (t                      ; CH = CR

So the difference here is that you would like to add a call to (ding)?
I'm not sure the addition you propose is suitable for general use.

Perhaps you could explain the use-case here in a bit more detail?  For
example, why can't you just add an advice to the function in question?

Best regards,
Stefan Kangas




This bug report was last modified 3 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.