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

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

bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell passwor


From: Michael Albinus
Subject: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling
Date: Sun, 16 Jun 2024 14:29:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Kangas <stefankangas@gmail.com> writes:

Hi Stefan,

>> +(defcustom comint-password-prompt-max-length 256
>> +  "The maximum amount of text to examine when matching password prompts.
>> +When non-nil, only examine the last N characters of a block of output.
>> +If nil, examine all the output.
>> +
>> +This is used by `comint-watch-for-password-prompt' to reduce the amount
>> +of time spent searching for password prompts."
>> +  :version "30.1"
>> +  :type '(choice natnum
>> +                 (const :tag "Examine all output" nil))
>> +  :group 'comint)
>
> If this is hardcoded in Tramp, are we sure that we need this as an
> option?  I'd suggest making it into a defconst or defvar instead.

Tramp uses this value just "by experience", and to be on the safe
side. I can imagine, that people know that prompts are much shorter in
their case, say 25 bytes. A defcustom is OK in my eyes.

(apply #'max (mapcar #'length password-word-equivalents)) => 14

Best regards, Michael.





reply via email to

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