# HG changeset patch # User Steve Losh # Date 1504913856 14400 # Node ID 2b37786c6a97e6330077d2fa398aa3964523eba8 # Parent c885ce38afce2caa31a10b0eb8e6ec6da9682b0c Update diff -r c885ce38afce -r 2b37786c6a97 .hgsubstate --- a/.hgsubstate Fri Aug 18 12:19:37 2017 -0400 +++ b/.hgsubstate Fri Sep 08 19:37:36 2017 -0400 @@ -29,7 +29,7 @@ 10d6c6b52fcdd12f3ba457126f66fee4ccceec04 vim/bundle/securemodelines b4398689f7483b01684044ab6b55bf369744c9b3 vim/bundle/sexp e02c3e218c51c1e2ea1821a3fe412d4e09ca1502 vim/bundle/shaderhighlight -287437b3bb6c4f21b4ed98443ede19db2a5b979c vim/bundle/splice +062b18eebd153c13e6f36577707acb17893cd959 vim/bundle/splice 26fbdd7d1f1aa5600d2ebf39bbdd292c38aac16e vim/bundle/strftimedammit 2d05440ad23f97a7874ebd9b5de3a0e65d25d85c vim/bundle/surround 19c3d966440b6cfe8d74251881a48e961ddb8648 vim/bundle/swig @@ -37,5 +37,5 @@ f6f2d6618a321f5b0065586a7bc934325fec81ab vim/bundle/targets 5d5c71044880443035e07009497962feacb56b20 vim/bundle/vimtex bf3fd7f67e730f93765bd3c1cfcdb18fd4043521 vim/bundle/vitality -9da28e2ecf954a705aa9f00f37e206ee7bc09101 vim/bundle/vlime +d091242de628c09b3ff47e1c67e7cecff39adc44 vim/bundle/vlime 6876fe38b33732cb124d415ffc4156f16da5e118 vim/bundle/windowswap diff -r c885ce38afce -r 2b37786c6a97 vim/custom-dictionary.utf-8.add --- a/vim/custom-dictionary.utf-8.add Fri Aug 18 12:19:37 2017 -0400 +++ b/vim/custom-dictionary.utf-8.add Fri Sep 08 19:37:36 2017 -0400 @@ -217,3 +217,7 @@ maintainership GDL ZDD +HDMI +Macbook +Topre +Realforce diff -r c885ce38afce -r 2b37786c6a97 vim/vimrc --- a/vim/vimrc Fri Aug 18 12:19:37 2017 -0400 +++ b/vim/vimrc Fri Sep 08 19:37:36 2017 -0400 @@ -596,6 +596,8 @@ let s = "" if a:winnr == winnr() + let errors = SyntasticStatuslineFlag() + let s .= "%#GWStatusLineMode#" let s .= " " let s .= "%{StatusLineMode()}" @@ -603,6 +605,12 @@ let s .= "%#GWStatusLineModeX#" let s .= "⮀ " + if strlen(errors) != 0 + let s .= "%#Error#" + let s .= errors + let s .= "%#GWStatusLineModeX# " + endif + let s .= "%f" let s .= " %m%r%h%w" let s .= "%=" @@ -1169,8 +1177,10 @@ " Force omnicompletion (vlime's) au FileType lisp inoremap - au FileType lisp setlocal iskeyword+=!,?,% - au FileType lisp setlocal equalprg=lispindent + " lol, vim ignores indentexpr if lisp is set + au FileType lisp setlocal nolisp + au FileType lisp setlocal iskeyword+=!,?,%,- + " au FileType lisp setlocal equalprg=lispindent " scratch buffer au FileType lisp nnoremap :e scratch.lisp @@ -1182,7 +1192,7 @@ au FileType lisp nnoremap Oa :call OpenLispReplABCL() " Misc mappings - au FileType lisp nnoremap gi :call IndentToplevelLispForm() + " au FileType lisp nnoremap gi :call IndentToplevelLispForm() au FileType lisp nnoremap h :call HyperspecLispExpression(0) au FileType lisp nnoremap H :call HyperspecLispExpression(1) au FileType lisp nnoremap q :call QuickloadLispSystem() @@ -2582,6 +2592,8 @@ \ "SPEED": 1 \ } +" let g:vlime_indent_keywords = {"foo": 2} + function! CleanVlimeWindows() call vlime#plugin#CloseWindow("preview") call vlime#plugin#CloseWindow("notes") @@ -2597,8 +2609,9 @@ augroup CustomVlimeInputBuffer autocmd! " autocmd FileType vlime_input inoremap =VlimeKey("tab") + " autocmd FileType vlime_input setlocal omnifunc=vlime#plugin#CompleteFunc - " autocmd FileType vlime_input setlocal indentexpr=VlimeCalcCurIndent() + autocmd FileType vlime_input setlocal indentexpr=vlime#plugin#CalcCurIndent() autocmd FileType vlime_input inoremap augroup end @@ -2615,6 +2628,8 @@ au FileType lisp nnoremap S :call vlime#plugin#SendToREPL(vlime#ui#CurTopExpr()) au FileType lisp nnoremap i :call vlime#plugin#Inspect(vlime#ui#CurExprOrAtom()) au FileType lisp nnoremap M :call vlime#plugin#DocumentationSymbol(vlime#ui#CurAtom()) + au FileType lisp setlocal indentexpr=vlime#plugin#CalcCurIndent() + au FileType lisp nnoremap gi :call IndentToplevelLispForm() " Keys for the REPL au FileType vlime_repl nnoremap i :call vlime#ui#repl#InspectCurREPLPresentation() diff -r c885ce38afce -r 2b37786c6a97 weechat/python/autoload/wee_slack.py --- a/weechat/python/autoload/wee_slack.py Fri Aug 18 12:19:37 2017 -0400 +++ b/weechat/python/autoload/wee_slack.py Fri Sep 08 19:37:36 2017 -0400 @@ -56,6 +56,7 @@ "join": "channels.join", "leave": "groups.leave", "mark": "groups.mark", + "info": "groups.info" }, "thread": { "history": None, @@ -609,15 +610,17 @@ eventrouter = eval(signal) channel = eventrouter.weechat_controller.get_channel_from_buffer_ptr(buffer_ptr) if not channel: - return w.WEECHAT_RC_OK_EAT + return w.WEECHAT_RC_ERROR reaction = re.match("^\s*(\d*)(\+|-):(.*):\s*$", data) + substitute = re.match("^(\d*)s/", data) if reaction: if reaction.group(2) == "+": channel.send_add_reaction(int(reaction.group(1) or 1), reaction.group(3)) elif reaction.group(2) == "-": channel.send_remove_reaction(int(reaction.group(1) or 1), reaction.group(3)) - elif data.startswith('s/'): + elif substitute: + msgno = int(substitute.group(1) or 1) try: old, new, flags = re.split(r'(?") - text = text.replace("&", "&") + text = unhtmlescape(text.replace("\t", " ")) if message_json.get('mrkdwn', True): text = render_formatting(text) @@ -2495,9 +2536,16 @@ usernames = team.get_username_map() channels = team.get_channel_map() message = (message + # Replace IRC formatting chars with Slack formatting chars. .replace('\x02', '*') .replace('\x1D', '_') .replace('\x1F', config.map_underline_to) + # Escape chars that have special meaning to Slack. Note that we do not + # (and should not) perform full HTML entity-encoding here. + # See https://api.slack.com/docs/message-formatting for details. + .replace('&', '&') + .replace('<', '<') + .replace('>', '>') .split(' ')) for item in enumerate(message): targets = re.match('^\s*([@#])([\w.-]+[\w. -])(\W*)', item[1]) @@ -2559,6 +2607,12 @@ return display_text +def unhtmlescape(text): + return text.replace("<", "<") \ + .replace(">", ">") \ + .replace("&", "&") + + def unwrap_attachments(message_json, text_before): attachment_text = '' a = message_json.get("attachments", None) @@ -2811,14 +2865,17 @@ dbg("msg_command_cb") aargs = args.split(None, 2) who = aargs[1] - command_talk(data, current_buffer, who) + if who == "*": + who = EVENTROUTER.weechat_controller.buffers[current_buffer].slack_name + else: + command_talk(data, current_buffer, who) if len(aargs) > 2: message = aargs[2] team = EVENTROUTER.weechat_controller.buffers[current_buffer].team cmap = team.get_channel_map() if who in cmap: - channel = team.channels[cmap[channel]] + channel = team.channels[cmap[who]] channel.send_message(message) return w.WEECHAT_RC_OK_EAT @@ -3069,7 +3126,7 @@ profile = {"status_text":text,"status_emoji":emoji} - s = SlackRequest(team.token, "users.profile.set", {"profile": profile}, team_hash=team.team_hash, channel_identifier=channel.identifier) + s = SlackRequest(team.token, "users.profile.set", {"profile": profile}, team_hash=team.team_hash) EVENTROUTER.receive(s)