torhve / weechat-matrix-protocol-script

A WeeChat script in Lua that implements the matrix.org chat protocol
349 stars 52 forks source link

prevent spaces in buffers #144

Open mcnesium opened 5 years ago

mcnesium commented 5 years ago

Apparently spaces in buffer names are evil and should not be working at all. They should be replaced by e.g. undercores. Here is an extract from #weechat:

    mcnesium | so I got this weechat-matrix-protocol-script running and it works
             | kinda well. now I do have a buffer called `Bits & Bäume` in my   
             | list of channels and I wonder how I can apply settings to that   
             | buffer, eg set notify. since there are spaces and a special      
             | character, just doing `/set "weechat.notify.lua.bits & bäume"    
             | message` does not work                                           
    mcnesium | the logfiles of the matrix chat channels do have this naming     
             | scheme featuring spaces in the name, so I tried that, but weechat
             | did not take it
simonpatapon | what do you see in /buffer list                                  
    mcnesium | 14:04:27  weechat   |   [13] lua.Bits & Bäume (notify: highlight)
    mcnesium | also tried to use nbsp but I am not even sure if weechat differs 
             | between nbsp and regular space                                   
    mcnesium | it always tries to add just a `lua.bits` setting                 
     @nils_2 | spaces aren't supported                                          
     @nils_2 | format for example is: /set option value                         

  @FlashCode | mcnesium: if a plugin or a script creates buffer name with spaces,
             | it must be fixed, spaces are not supported at all in buffer names

  @FlashCode | and in addition, weechat should even refuse to create such buffer
  @FlashCode | this reminds me an old issue, I'm looking in issues              
  @FlashCode | found it: https://github.com/weechat/weechat/issues/937          
    mcnesium | FlashCode: I see, I will file an issue about that