From 555bb1a3dd2e8b054b6d2655f230f708e0a934c1 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 15 Sep 2020 19:44:51 -0500 Subject: Fix title suggestion in post-to-gemlog-blue --- init.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index cd88039..3bbbb19 100644 --- a/init.el +++ b/init.el @@ -328,14 +328,15 @@ (let* ((title-maybe (progn ;; TODO this is ... clunky (goto-char (point-min)) (if (re-search-forward "^# \\(.*\\)" nil t) - (concat " (" - (buffer-substring-no-properties - (match-beginning 1) - (match-end 1)) - ")") + (buffer-substring-no-properties + (match-beginning 1) + (match-end 1)) ""))) (title (read-string - (format "Title%s: " title-maybe) + (format "Title%s: " + (if (string= "" title-maybe) + "" + (concat " (" title-maybe ")"))) nil nil title-maybe)) (user (read-string "User: " nil)) (pass (read-passwd "Pass: " nil))) -- cgit 1.4.1-21-gabe81