guile-user
[Top][All Lists]
Advanced

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

Re: screen in guile


From: Thien-Thi Nguyen
Subject: Re: screen in guile
Date: Thu, 08 Mar 2012 19:47:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Andrew Gwozdziewycz <address@hidden>
() Thu, 8 Mar 2012 11:57:48 -0500

   Not to strike you down twice,

No worries, the mud's fine.

   but I'm not sure how .screenrc's syntax would be better served
   with s-expressions.  To my knowledge it's completely line
   oriented without any sort of section delimiting.

Here's a fragment from my ~/.screenrc:

  # special xterm hardstatus: use the window title.
  termcap  xterm 'hs:ts=\E]2;:fs=\007:ds=\E]0;Screen\007'
  terminfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]0;Screen\007'

It shows a comment and two directives of the form:
  CATEGORY KEY VALUE

Since KEY and VALUE are identical, it would be nice to be able to
express that using some kind of ‘for-each’ or ‘map’ expression.
Furthermore, IWBN to compose the string from meaningful bits
instead of having to cart around (for 15 years, no less :-) such
grot...

(define (both-termcap-and-terminfo name value)
  ;; do ‘termcap NAME VALUE’
  ;; do ‘terminfo NAME VALUE’
  )

(both-termcap-and-terminfo
 'xterm (string-join (map format-attribute
                          '(hs
                            (ts escape "]2;")
                            (fs bell)
                            (ds escape "]0;Screen" bell)))
                     ":"))

or something like that.



reply via email to

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