Comments (2)
Note that for me, these settings worked as expected:
autosort: Sorting rules:
0: core = 0
1: irc = 2
2: i3 = 99
3: * = 1
4: irc.server = 1
5: irc.irc_raw = 0
6: irc.server.*.#* = 0
7: irc.server.*.[*]status = 1
8: irc.server.*.[*]* = 2
autosort: Replacement patterns:
0: ## -> #
1: irc.freenode.#i3 -> i3
Maybe there are some subtle Python version dependent behaviour. My weechat is using python 2.7.13. @squigglezworth: Could you check your python version?
from weechat-autosort.
After some more debugging on irc, I think the observed behaviour can be explained.
The first replacement pattern used was freenode.#i3 -> i3
. That caused the buffer name after replacement patterns were applied to be irc.i3
. The group_irc
option then turned that into irc.server.i3
before the sort rules were applied. In sort rules *
doesn't match periods, so the sort rule *i3*
never matched the correct buffer and it ended up being sorted alphabetically with the server buffers.
During debugging we did try a number of replacement patterns and sort rules, but apparently never the correct combination at the same time. With the replacement pattern freenode.#i3 -> i3
and group_irc = on
, the correct sort rule would be irc.server.i3 = ...
. With group_irc= off
it would be irc.i3 = ...
.
Alternatively, the replacement pattern irc.freenode.#i3 -> i3
can be used with the rule i3 = ...
. This doesn't behave exactly the same as the previous option, so both can be valid use cases.
It also got me thinking that a /autosort debug
command to show the result of replacement patterns and sort rules might be useful, but thats a seperate issue. The same goes for allowing regexes or glob-style patterns in sort rules.
from weechat-autosort.
Related Issues (16)
- Autosort will not sort my buffers by server properly HOT 10
- sorting by type - is it possible at all? HOT 13
- Buffers with spaces in the name HOT 2
- Plugin fails to load: AttributeError: 'str' object has no attribute 'decode' HOT 1
- Unicode characters in buffer names HOT 1
- Trying to sort my bitlbee stuff after everything else HOT 6
- scripts buffer can't be sorted HOT 4
- Default sort config does not support buffers with commas in their name HOT 2
- Sorting rules don't eval properly HOT 6
- on_info_replace getting called with not enough arguments HOT 7
- '/help autosort' missing explanation of newer '${info:}' options HOT 2
- Getting lots of these in my logs after recent host upgrade HOT 8
- issue with latest wee-slack HOT 10
- Issues with custom sort when Slack channels are involved HOT 4
- Exception when running `/autosort helpers swap`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weechat-autosort.