libera/#commonlisp - IRC Chatlog
Search
16:04:02
gamaliel
Ok, so to be clear, for writing a docstring I'd wrap it around #.(format nil "<my-docstring-text-piece1>~<newline><my-doc-string-text-piece2>") and add enters, spaces, etc. for manually indenting. Format would then take care of eliminating all extra space.
16:05:41
_death
gamaliel: the indentation makes sense, because the text starts after the first double quote
16:05:41
edgar-rft
gamalie: If you start the doctring on the 8th space in your code and also indent all following lines in the docstring by 8 spaces, then when the docstring gets printed the first line will start at line position 0 (because the docstring starts with the double quotes) and all subsequent lines will be printed with an indentation of 8 spaces. This is probably not what you want.
16:07:34
semz
gamaliel: Pretty much, although keep in mind that ~<newline> by itself won't add a space between the concatenated pieces (you'd have to put one before the ~<newline>). You can test this without the #. in the REPL, it's just a format call after all
16:08:06
semz
actually I suppose you can test it with the #. in the REPL as well, it makes no difference
16:10:02
beach
gamaliel: Here is what we do: https://github.com/robert-strandh/SICL/blob/master/Code/Conditions/Portable-condition-system/docstrings-english-conditions.lisp
16:11:23
beach
gamaliel: The ~@<newline> FORMAT directive means that initial space on the next line is ignored, so the lines of the documentation string are aligned in the left column even though the lines in the code are indented.
16:53:38
fiddlerwoaroof
I recently used a function to trim leading whitespace up to a sentinel character in docstrings
19:05:42
pjb
gamaliel: when I type ( d e f u n SPC foo SPC ( ) RET " h e l l o RET I get: https://termbin.com/g2aju with | being the cursor.
19:06:12
pjb
gamaliel: If typing RET on the closing " gets you out of the string, then you could use instead C-q C-j to insert a newline.
22:29:31
b3lm0nt_
Question: does anyone here using Vim + Vlime + SBCL successfully on OpenBSD? i've been using that combination on my Macbook Pro just fine, but on OpenBSD I have an issues where the sldb debugger doesn't work (no sldb buffer opens when an error occurs).