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

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

bug#52546: 29.0.50; Missing space character


From: Filipp Gunbin
Subject: bug#52546: 29.0.50; Missing space character
Date: Sat, 23 Apr 2022 03:14:24 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin)

reopen 52546
quit

On 19/12/2021 13:03 +0100, Lars Ingebrigtsen wrote:

> Rudolf Adamkovič <salutis@me.com> writes:
>
>> Reproduction steps:
>>
>> 1. run 'emacs -Q'
>> 2. type M-x and then 'sql-sqlite'
>> 3. see a prompt in the minibuffer
>>
>> Expected: 'Database ~/…'
>>
>> Actual: 'Database~/…' (notice the missing space character)
>
> Yup.  I've now fixed this in Emacs 29.
>
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

(Sending once again, after unarchiving the bug.  The previous message
didn't add the comment.)

It looks like this fixes the bug more correctly.  We should pass
sql-get-login-ext the "raw" prompt, which is then passed to
format-prompt.

Filipp

>From 361ea4a001e1634f1acc620ceeca3d32a348a798 Mon Sep 17 00:00:00 2001
From: Filipp Gunbin <fgunbin@fastmail.fm>
Date: Sat, 23 Apr 2022 01:59:53 +0300
Subject: [PATCH] Fix prompts in sql-get-login again

* lisp/progmodes/sql.el (sql-get-login-ext): Use prompt-def
everywhere.
(sql-get-login): Revert previous fix. (bug#52546)
---
 lisp/progmodes/sql.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 13fba0c705..18b0274fbf 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -3216,7 +3216,7 @@ sql-get-login-ext
      (cond
       ((plist-member plist :file)
        (let ((file-name
-              (read-file-name prompt
+              (read-file-name prompt-def
                               (file-name-directory last-value)
                               default
                               (if (plist-member plist :must-match)
@@ -3246,7 +3246,7 @@ sql-get-login-ext
                         default))
 
       ((plist-get plist :number)
-       (read-number prompt (or default last-value 0)))
+       (read-number (concat prompt ": ") (or default last-value 0)))
 
       (t
        (read-string prompt-def last-value history-var default))))))
@@ -3318,7 +3318,7 @@ sql-get-login
          (sql-get-login-ext 'sql-server "Server" 'sql-server-history plist))
 
         ('database
-         (sql-get-login-ext 'sql-database "Database: "
+         (sql-get-login-ext 'sql-database "Database"
                             'sql-database-history plist))
 
         ('port
-- 
2.36.0


reply via email to

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