Package: figlet
Version: 2.2.5-2
Severity: wishlist
Tags: patch
File: /usr/share/emacs/site-lisp/figlet.el

In M-x figlet-message, if you don't enter a font name but just press Ret
it inserts an error message into the buffer

   figlet: : Unable to open font file

I think the figlet program doesn't like -f "" empty font name.  Perhaps
figlet.el would omit the -f in that case to take the program default per
below.

--- figlet.el.orig	2015-12-07 07:18:11.676914383 +1100
+++ figlet.el	2015-12-07 07:28:04.608879662 +1100
@@ -43,7 +43,11 @@
   (setq str (read-from-minibuffer "Enter message: "))
   (setq font
         (completing-read "Which font: " fig-font-list nil t))
-  (call-process "figlet" nil t t "-f" font fig-options str)
+  ;; If the user enters nothing then font is empty string "".
+  ;; Omit the -f option in that case, giving figlet's default font.
+  (let ((args (append (and (not (equal font "")) (list "-f" font))
+                      (list fig-options str))))
+    (apply 'call-process "figlet" nil t t args))
   (message "Done printing"))
 
 

-- System Information:
Debian Release: stretch/sid
Architecture: i386 (i686)

Kernel: Linux 4.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages figlet depends on:
ii  libc6  2.19-22

figlet recommends no packages.

figlet suggests no packages.

-- no debconf information

Reply via email to