|
From: | Max Nikulin |
Subject: | Re: [BUG] org-insert-link should use DEFAULT in read-string when asking for description |
Date: | Sat, 26 Feb 2022 15:50:29 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 25/02/2022 21:19, Visuwesh wrote:
Currently, when asking the user for the description of link, `org-insert-link' calls `read-string' with a non-nil INITIAL-INPUT but this argument is discouraged and deprecated; moreover, it is unfriendly. `org-insert-link' should, ideally, use the DEFAULT argument. If the user decides that the suggested description is okay, they can type M-n.
Due to lack of experience with emacs I can miss something. If so, please, correct me.
Are you suggesting replacing (read-string "rs-initial: " "Some initial") by (read-string "rs-default: " nil nil "Some default")? Is it possible to override provided default description by empty string in the latter variant? Currently it is possible to erase description using just backspace or C-S-backspace.
P.S. Many GUI applications pre-select whole value when some input field is focused, so it is possible to overwrite current value by typing anything. It may be convenient but is not consistent with emacs behavior. Moreover it makes uncertain if visually selected text overwrites X PRIMARY selection.
[Prev in Thread] | Current Thread | [Next in Thread] |