Ejemplo n.º 1
0
def convert():
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n\n", "\n\n")

    # alttaki listeye dokunulmamasi istenen kelimeler tek ogeli
    # tuple olarak yazilir, ("kelime",) gibi. eger degisim isteniyorsa
    # ("kelime","degisim") olarak bir tuple eklenir.
    r_list = [("verisi", ), ("Calculus", ), ("AIC", ), ("estimator", ),
              (" ise", ), ("kontur", ), ("ODE", ), ("Oklit", u'Öklit'),
              ("karekok", u'karekök'), ("kismi", u'kısmi'), ("integral", ),
              ("oldugu", u'olduğu'), ("parcaci", u"parçacı"),
              ("acilimi", u'açılımı'), ("acilim", u'açılım'),
              ("acisini", u'açısını'), ("acisi", u'açısı'), ("aci", u'açı'),
              ("minimize", ), ("gayri", u'gayrı'), ("Pandas", ),
              ("algoritma", ), ("gayri", u'gayrı'), ("sigma", ),
              ("volatility", ), ("matris", ), ("frac", "frac"),
              ("sonum", u"sönüm"), ("eksen", ), ("sonusur", u"sonuşur"),
              ("amaci", u"amacı"), ("amacimiz", u"amacımız"),
              ("sarsim", u"sarsım"), ("Sarsim", u"Sarsım"), (u"olduğu", )]

    r_list_coded = []
    for x in r_list:
        r_list_coded.append((x[0], str(int(random.random() * 1000000))))
    for x in r_list_coded:
        content = content.replace(x[0], x[1])
    result = to_tr(content)
    for x in r_list_coded:
        result = result.replace(x[1], x[0])
    for x in r_list:
        if len(x) == 2: result = result.replace(x[0], x[1])

    lisp.delete_region(block_begin, block_end)
    lisp.insert(result)
    lisp.goto_char(remember_where)
Ejemplo n.º 2
0
    def emacs_engine(self, flag, find_limits):
        """\
Rebox text while obeying FLAG.  Call FIND_LIMITS to discover the extent
of the boxed comment.
"""
        # `C-u -' means that box style is to be decided interactively.
        if flag == lisp['-']:
            flag = self.ask_for_style()
        # If FLAG is zero or negative, only change default box style.
        if isinstance(flag, int) and flag <= 0:
            self.default_style = -flag
            lisp.message("Default style set to %d" % -flag)
            return
        # Decide box style and refilling.
        if flag is None:
            style = self.default_style
            refill = True
        elif isinstance(flag, int):
            if self.default_style is None:
                style = flag
            else:
                style = merge_styles(self.default_style, flag)
            refill = True
        else:
            flag = flag.copy()
            if isinstance(flag, list):
                style = self.default_style
                refill = False
            else:
                lisp.error("Unexpected flag value %s" % flag)
        # Prepare for reboxing.
        lisp.message("Reboxing...")
        checkpoint = lisp.buffer_undo_list.value()
        start, end = find_limits()
        text = lisp.buffer_substring(start, end)
        width = lisp.fill_column.value()
        tabify = lisp.indent_tabs_mode.value() is not None
        point = lisp.point()
        if start <= point < end:
            position = point - start
        else:
            position = None
        # Rebox the text and replace it in Emacs buffer.
        old_style, new_style, text, position = engine(
            text, style=style, width=width,
            refill=refill, tabify=tabify, position=position)
        if text is None:
            lisp.error("Cannot rebox to style %d" % new_style)
        lisp.delete_region(start, end)
        lisp.insert(text)
        if position is not None:
            lisp.goto_char(start + position)
        # Collapse all operations into a single one, for Undo.
        self.clean_undo_after(checkpoint)
        # We are finished, tell the user.
        if old_style == new_style:
            lisp.message("Reboxed with style %d" % old_style)
        else:
            lisp.message("Reboxed from style %d to %d"
                         % (old_style, new_style))
Ejemplo n.º 3
0
    def emacs_engine(self, flag, find_limits):
        """\
Rebox text while obeying FLAG.  Call FIND_LIMITS to discover the extent
of the boxed comment.
"""
        # `C-u -' means that box style is to be decided interactively.
        if flag == lisp['-']:
            flag = self.ask_for_style()
        # If FLAG is zero or negative, only change default box style.
        if isinstance(flag, int) and flag <= 0:
            self.default_style = -flag
            lisp.message("Default style set to %d" % -flag)
            return
        # Decide box style and refilling.
        if flag is None:
            style = self.default_style
            refill = True
        elif isinstance(flag, int):
            if self.default_style is None:
                style = flag
            else:
                style = merge_styles(self.default_style, flag)
            refill = True
        else:
            flag = flag.copy()
            if isinstance(flag, list):
                style = self.default_style
                refill = False
            else:
                lisp.error("Unexpected flag value %s" % flag)
        # Prepare for reboxing.
        lisp.message("Reboxing...")
        checkpoint = lisp.buffer_undo_list.value()
        start, end = find_limits()
        text = lisp.buffer_substring(start, end)
        width = lisp.fill_column.value()
        tabify = lisp.indent_tabs_mode.value() is not None
        point = lisp.point()
        if start <= point < end:
            position = point - start
        else:
            position = None
        # Rebox the text and replace it in Emacs buffer.
        old_style, new_style, text, position = engine(
            text, style=style, width=width,
            refill=refill, tabify=tabify, position=position)
        if text is None:
            lisp.error("Cannot rebox to style %d" % new_style)
        lisp.delete_region(start, end)
        lisp.insert(text)
        if position is not None:
            lisp.goto_char(start + position)
        # Collapse all operations into a single one, for Undo.
        self.clean_undo_after(checkpoint)
        # We are finished, tell the user.
        if old_style == new_style:
            lisp.message("Reboxed with style %d" % old_style)
        else:
            lisp.message("Reboxed from style %d to %d"
                         % (old_style, new_style))
Ejemplo n.º 4
0
def fixer_equals_none (unused_error, unused_errtext):
    start, end, line = get_line_string()
    newline = re.sub(r"==\s*None", r"is None", line)
    newline = re.sub(r"!=\s*None", r"is not None", newline)
    if newline != line:
        lisp.delete_region(start, end)
        lisp.insert(newline)
Ejemplo n.º 5
0
def convert():
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n\n","\n\n")

    # alttaki listeye dokunulmamasi istenen kelimeler tek ogeli
    # tuple olarak yazilir, ("kelime",) gibi. eger degisim isteniyorsa
    # ("kelime","degisim") olarak bir tuple eklenir. 
    r_list = [("verisi",),("Calculus",),("AIC",),("estimator",),(" ise",),
              ("kontur",),("ODE",),("Oklit",u'Öklit'),("karekok",u'karekök'),
              ("kismi", u'kısmi'),("integral",),("oldugu",u'olduğu'),
              ("acilimi",u'açılımı'),("acilim",u'açılım'),("aci",u'açı'),
              ("minimize",),("gayri",u'gayrı'),("Pandas",),("algoritma",),
              ("gayri",u'gayrı'),("sigma",),("volatility",),("matris",)]
              
    r_list_coded = []
    for x in r_list: r_list_coded.append((x[0],str(int(random.random() * 1000000))))
    for x in r_list_coded: content = content.replace(x[0],x[1])
    result = to_tr(content)    
    for x in r_list_coded: result = result.replace(x[1],x[0])              
    for x in r_list:
        if len(x)==2: result = result.replace(x[0],x[1])              
              
    lisp.delete_region(block_begin, block_end)
    lisp.insert(result)
    lisp.goto_char(remember_where)
Ejemplo n.º 6
0
 def _apply_assist(self, assist):
     if ' : ' in assist:
         name, module = assist.rsplit(' : ', 1)
         lisp.delete_region(self.starting_offset + 1, self.offset + 1)
         lisp.insert(name)
         self._insert_import(name, module)
     else:
         lisp.delete_region(self.starting_offset + 1, self.offset + 1)
         lisp.insert(assist)
Ejemplo n.º 7
0
def camelCase_to_underscore():
    start, end = lisp.point(), lisp.mark(True)
    text = lisp.buffer_substring(start, end)

    replacement =re.sub(r'\w+',
                        lambda x: "".join(upper_split_gen(x)),
                        text)

    lisp.delete_region(start, end)
    lisp.insert(replacement)
Ejemplo n.º 8
0
def get_region(delete=0):
    """Returns the text of the current region, optionally
     deleting the region from the buffer."""

    start = lisp.point()
    end = lisp.mark(lisp.t)
    text = lisp.buffer_substring(start, end)
    if delete:
        lisp.delete_region(start, end)
    return text
Ejemplo n.º 9
0
def get_region(delete=0):
     """Returns the text of the current region, optionally
     deleting the region from the buffer."""
     
     start = lisp.point()
     end = lisp.mark(lisp.t)
     text = lisp.buffer_substring(start, end)
     if delete:
          lisp.delete_region(start, end)
     return text
Ejemplo n.º 10
0
def replace_region(replacer):
    start = lisp.point()
    end = lisp.mark(True)
    if start > end:
        start, end = end, start
    text = lisp.buffer_substring(start, end)

    replacement = replacer(text)

    lisp.delete_region(start, end)
    lisp.insert(replacement)
Ejemplo n.º 11
0
def fixer_remove_trailing_ws(unused_error, unused_text):
    start, end, line = get_line_string()
    m = re.match(r"^(.*\S+)?\s*$", line)
    if not m:
        #print("NO MATCH")
        return
    #print("MATCH")
    if m.group(1):
        newline = m.group(1)
    else:
        newline = ""
    if newline != line:
        lisp.delete_region(start, end)
        lisp.insert(newline)
Ejemplo n.º 12
0
def convert():
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n\n","\n\n")


    content = content.replace("verisi","WWXXD1")
    content = content.replace("Calculus","WWXXD2")
    content = content.replace("AIC","WWXXD3")
    content = content.replace("estimator","WWXXD5")
    content = content.replace(" ise","WWXXD7")
    content = content.replace("kontur","WWXXD8")
    content = content.replace("ODE","WWXXD9")
    content = content.replace("Oklit","WWXXDx3")
    content = content.replace("karekok","WWXXDx4")
    content = content.replace("kismi","WWXXDx5")
    content = content.replace("integral","WWXXDx7")
    content = content.replace("acilimi","WWXXDx8")
    content = content.replace(" aci","WWXXDy1")
    content = content.replace("gayri","WWXXDy2")
    content = content.replace("oldugu","WWXXDy3")
    content = content.replace("Pandas","WWXXDy4")
    content = content.replace("algoritma","WWXXDy5")
    content = content.replace("minimize","WWXXDy6")

    result = to_tr(content)
    result = result.replace("WWXXD1","verisi")
    result = result.replace("WWXXD2","Calculus")
    result = result.replace("WWXXD3","AIC")
    result = result.replace("WWXXD5","estimator")
    result = result.replace("WWXXD7"," ise" )
    result = result.replace("WWXXD8","kontur" )
    result = result.replace("WWXXD9","ODE" )
    result = result.replace('WWXXDx3',u'Öklit' )
    result = result.replace('WWXXDx4',u'karekök' )
    result = result.replace('WWXXDx5',u'kısmi' )
    result = result.replace('WWXXDx7',u'integral' )
    result = result.replace('WWXXDx8',u'acılımı' )
    result = result.replace('WWXXDy1',u' açı' )
    result = result.replace('WWXXDy2',u' gayrı' )
    result = result.replace('WWXXDy3',u'olduğu' )
    result = result.replace('WWXXDy4',u'Pandas' )
    result = result.replace('WWXXDy5',u'algoritma' )
    result = result.replace('WWXXDy6',u'minimize' )

    lisp.delete_region(block_begin, block_end)
    lisp.insert(result)
    lisp.goto_char(remember_where)
Ejemplo n.º 13
0
def cut_region(mode='string'):
    """Return the active region and remove it from Emacs.

    The mode parameter (default 'string') defines whether to return the region
    as a string or as a list of lines (mode='list').

    It is the caller's responsibility to insert the updated text at the
    end back in the Emacs buffer with a call to lisp.insert(...)."""

    start, end = lisp.point(), lisp.mark(lisp.t)
    # BUG: buffer_substring() can't extract regions with dos line endings (\r\n)
    # It dumps a traceback.
    region = lisp.buffer_substring(start, end)
    if mode == 'list':
        region = region.splitlines()
    lisp.delete_region(start, end)
    return region
Ejemplo n.º 14
0
def cut_region(mode='string'):
    """Return the active region and remove it from Emacs.

    The mode parameter (default 'string') defines whether to return the region
    as a string or as a list of lines (mode='list').

    It is the caller's responsibility to insert the updated text at the
    end back in the Emacs buffer with a call to lisp.insert(...)."""

    start, end = lisp.point(), lisp.mark(lisp.t)
    # BUG: buffer_substring() can't extract regions with dos line endings (\r\n)
    # It dumps a traceback.
    region = lisp.buffer_substring(start, end)
    if mode == 'list':
        region = region.splitlines()
    lisp.delete_region(start, end)
    return region
Ejemplo n.º 15
0
    def wrapper():
        if lisp.mark_active.value():
            # fetch marked text
            start = lisp.point()
            end = lisp.mark(True)
        else:
            # fetch full line
            start = lisp.line_beginning_position()
            end = lisp.line_end_position()

        start, end = min(start, end), max(start, end)

        text = lisp.buffer_substring(start, end)
        new_text = func(text)
        if isinstance(new_text, str):
            # replace text with new text
            lisp.delete_region(start, end)
            lisp.insert(new_text)
Ejemplo n.º 16
0
    def wrapper():
        if lisp.mark_active.value():
            # fetch marked text
            start = lisp.point()
            end = lisp.mark(True)
        else:
            # fetch full line
            start = lisp.line_beginning_position()
            end = lisp.line_end_position()

        start, end = min(start, end), max(start, end)
            
        text = lisp.buffer_substring(start, end)
        new_text = func(text)
        if isinstance(new_text, str):
            # replace text with new text
            lisp.delete_region(start, end)
            lisp.insert(new_text)
Ejemplo n.º 17
0
def fixer_remove_blank_lines (unused_error, errtext):
    # E303 too many blank lines (7)
    linecount = 1
    m = re.search(r"too many blank lines \((\d+)\)", errtext)
    if m:
        linecount = int(m.group(1))
        # There's a bug in flake8 it's returning 2 lines too many
        if linecount > 2:
            linecount -= 2

    # XXX try this with a comment right about the warning, deletes the comment
    lisp.beginning_of_line()
    beg = lisp.line_beginning_position()
    lisp.beginning_of_line(-(linecount - 1))
    lisp.forward_line(1)
    lisp.forward_char(-1)
    lisp.delete_region(beg, lisp.point())
    return
Ejemplo n.º 18
0
def show():
    b,e,res = get_block_content("$$","$$")
    d = hash(res)
    foutsimple = "_preview/f-%d.png" % d
    if os.path.isfile(foutsimple): return # do nothing
    latex(res)
    curr_dir = os.path.dirname(lisp.buffer_file_name())
    fout = "%s/_preview/f-%d.png" % (curr_dir,d)    
    shutil.copy(dir + "\standalone.png",fout)
    
    remem = lisp.point()
    lisp.goto_char(e)
    lisp.forward_line(1)
    lisp.beginning_of_line(); bb = lisp.point()
    lisp.end_of_line(); ee = lisp.point()
    lisp.delete_region(bb,ee)
    lisp.insert("%{{" + foutsimple + "}}")
    lisp.goto_char(remem)
    lisp.iimage_mode(1)
Ejemplo n.º 19
0
def display_results(end_block, res):
    lisp.goto_char(end_block)
    lisp.forward_line(2)
    lisp.beginning_of_line()
    verb_line_b = lisp.point()
    lisp.end_of_line()
    verb_line_e = lisp.point()
    verb_line = lisp.buffer_substring(verb_line_b, verb_line_e)
    if "\\begin{verbatim}" in verb_line:
        verb_begin,verb_end,content = get_block_content("\\begin{verbatim}","\\end{verbatim}")
        lisp.delete_region(verb_begin, verb_end)
        lisp.goto_char(verb_begin)
    else:
        lisp.backward_line_nomark(1)
        lisp.insert("\n")
    res=res.replace("\r","")
    lisp.insert("\\begin{verbatim}\n")
    lisp.insert(res)
    lisp.insert("\\end{verbatim}")
Ejemplo n.º 20
0
def pexec():
    global glob
    start = time.time()
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n","\n")
    if "=" in content or "import" in content:
        c = compile(source=content,filename="",mode="single")
        eval(c,glob)
    else:
        c = compile(source=content,filename="",mode="eval")
        res = eval(c,glob)
        lisp.forward_line(2)
        bb1, be2, bc2 = get_block_content("\n","\n")
        lisp.delete_region(bb1,be2)
        lisp.insert("\n")
        lisp.insert(str(res))
    lisp.goto_char(remember_where)
    elapsed = (time.time() - start)
    lisp.message("Ran in " + str(elapsed) + " seconds")
Ejemplo n.º 21
0
def show():
    b, e, res = get_block_content("$$", "$$")
    d = hash(res)
    foutsimple = "_preview/f-%d.png" % d
    if os.path.isfile(foutsimple): return  # do nothing
    latex(res)
    curr_dir = os.path.dirname(lisp.buffer_file_name())
    fout = "%s/_preview/f-%d.png" % (curr_dir, d)
    shutil.copy(dir + "\standalone.png", fout)

    remem = lisp.point()
    lisp.goto_char(e)
    lisp.forward_line(1)
    lisp.beginning_of_line()
    bb = lisp.point()
    lisp.end_of_line()
    ee = lisp.point()
    lisp.delete_region(bb, ee)
    lisp.insert("%{{" + foutsimple + "}}")
    lisp.goto_char(remem)
    lisp.iimage_mode(1)
Ejemplo n.º 22
0
def display_results(end_block, res):
    remem = lisp.point()
    res = res.replace("\r", "")
    lisp.goto_char(end_block)
    verb_begin = None
    # if there is output block, remove it whether there output or not
    # because it will be replaced anyway if something exists
    if verb_exists():
        verb_begin, verb_end, content = get_block_content("```text", "```\n")
        lisp.delete_region(verb_begin, verb_end)
        lisp.goto_char(remem)

    # now if there _is_ output, then go to beginning of old verbatim
    # output (if removed), if not, this is brand new output, move
    # down 2 lines, insert the output
    if verb_begin:
        lisp.goto_char(verb_begin)
    else:
        lisp.forward_line(1)
    lisp.insert("```text\n")
    lisp.insert(res)
    lisp.insert("```\n")
Ejemplo n.º 23
0
def display_results(end_block, res):
    remem = lisp.point()
    res=res.replace("\r","")
    lisp.goto_char(end_block)
    verb_begin = None
    # if there is output block, remove it whether there output or not
    # because it will be replaced anyway if something exists
    if verb_exists():
        verb_begin,verb_end,content = get_block_content("```text","```\n")
        lisp.delete_region(verb_begin, verb_end)
        lisp.goto_char(remem)

    # now if there _is_ output, then go to beginning of old verbatim
    # output (if removed), if not, this is brand new output, move
    # down 2 lines, insert the output 
    if verb_begin:
        lisp.goto_char(verb_begin)
    else:
        lisp.forward_line(1)
    lisp.insert("```text\n")
    lisp.insert(res)
    lisp.insert("```\n")
Ejemplo n.º 24
0
def convert():
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n\n", "\n\n")
    content = content.replace("verisi", "WWXXD1")
    content = content.replace("Calculus", "WWXXD2")
    content = content.replace("AIC", "WWXXD3")
    content = content.replace("\sigma", "WWXXD4")
    content = content.replace("estimator", "WWXXD5")
    content = content.replace("\frac", "WWXXD6")
    content = content.replace("entegral", "didibin")
    content = content.replace(" ise", "WWXXD7")
    result = to_tr(content)
    result = result.replace("WWXXD1", "verisi")
    result = result.replace("WWXXD2", "Calculus")
    result = result.replace("WWXXD3", "AIC")
    result = result.replace("WWXXD4", "\sigma")
    result = result.replace("WWXXD5", "estimator")
    result = result.replace("WWXXD6", "\frac")
    result = result.replace("didibin", "entegral")
    result = result.replace("WWXXD7", " ise")
    lisp.delete_region(block_begin, block_end)
    lisp.insert(result)
    lisp.goto_char(remember_where)
Ejemplo n.º 25
0
 def delete(self, start, end):
     lisp.delete_region(start, end)
Ejemplo n.º 26
0
if 'arg' in globals():
    from Pymacs import lisp

    # Retrieve current buffer file name
    filename = lisp.buffer_file_name()

    # Sample code : break on whitespace
    start, end = lisp.point(), lisp.mark(True)
    words = lisp.buffer_substring(start, end).split("\n")

    words = map(lambda x: x.rstrip(" "), words)
    lisp.delete_region(start, end)
    lisp.insert('\n'.join(words))
Ejemplo n.º 27
0
def break_on_whitespace():
    start, end = lisp.point(), lisp.mark(True)
    words = lisp.buffer_substring(start, end).split()
    lisp.delete_region(start, end)
    lisp.insert('\n'.join(words))
Ejemplo n.º 28
0
def convert():
    remember_where = lisp.point()
    block_begin, block_end, content = get_block_content("\n\n", "\n\n")

    # alttaki listeye dokunulmamasi istenen kelimeler tek ogeli
    # tuple olarak yazilir, ("kelime",) gibi. eger degisim isteniyorsa
    # ("kelime","degisim") olarak bir tuple eklenir.
    r_list = [
        ("verisi",),
        ("Calculus",),
        ("AIC",),
        ("estimator",),
        (" ise",),
        ("kontur",),
        ("ODE",),
        ("Oklit", u"Öklit"),
        ("karekok", u"karekök"),
        ("kismi", u"kısmi"),
        ("integral",),
        ("oldugu", u"olduğu"),
        ("parcaci", u"parçacı"),
        ("acilimi", u"açılımı"),
        ("acilim", u"açılım"),
        ("acisini", u"açısını"),
        ("acisi", u"açısı"),
        ("aci", u"açı"),
        ("minimize",),
        ("gayri", u"gayrı"),
        ("Pandas",),
        ("algoritma",),
        ("gayri", u"gayrı"),
        ("sigma",),
        ("volatility",),
        ("matris",),
        ("frac", "frac"),
        ("sonum", u"sönüm"),
        ("eksen",),
        ("sonusur", u"sonuşur"),
        ("amaci", u"amacı"),
        ("amacimiz", u"amacımız"),
        ("sarsim", u"sarsım"),
        ("Sarsim", u"Sarsım"),
        (u"olduğu",),
        ("oldu",),
        (" yani ",),
        (" Yani ",),
        ("entegrali",),
    ]

    r_list_coded = []
    for x in r_list:
        r_list_coded.append((x[0], str(int(random.random() * 1000000))))
    for x in r_list_coded:
        content = content.replace(x[0], x[1])
    result = to_tr(content)
    for x in r_list_coded:
        result = result.replace(x[1], x[0])
    for x in r_list:
        if len(x) == 2:
            result = result.replace(x[0], x[1])

    lisp.delete_region(block_begin, block_end)
    lisp.insert(result)
    lisp.goto_char(remember_where)
Ejemplo n.º 29
0
def fixer_add_one_space_around_equals (unused_error, unused_errtext):
    start, end, line = get_line_string()
    newline = re.sub(r"(\S) *= *(\S)", r"\1 = \2", line)
    if newline != line:
        lisp.delete_region(start, end)
        lisp.insert(newline)
Ejemplo n.º 30
0
def fixer_comma_space (unused_error, unused_errtext):
    start, end, line = get_line_string()
    newline = re.sub(r"\s*,\s*", r", ", line)
    if newline != line:
        lisp.delete_region(start, end)
        lisp.insert(newline)
Ejemplo n.º 31
0
if 'arg' in globals():
    from Pymacs import lisp

    # Retrieve current buffer file name
    filename = lisp.buffer_file_name()
    
    # Sample code : break on whitespace
    start, end = lisp.point(), lisp.mark(True)
    words = lisp.buffer_substring(start, end).split("\n")

    words = map(lambda x : x.rstrip(" "), words)
    lisp.delete_region(start, end)        
    lisp.insert('\n'.join(words))
Ejemplo n.º 32
0
 def delete(self, start, end):
     lisp.delete_region(start, end)
Ejemplo n.º 33
0
def break_on_whitespace():
    start, end = lisp.point(), lisp.mark(True)
    words = lisp.buffer_substring(start, end).split()
    lisp.delete_region(start, end)
    lisp.insert('\n'.join(words))