taskWeeChat - Tasks: task #12869, weechat.look.hotlit_sort option...


task #12869: weechat.look.hotlit_sort option allowing jumping to the buffer with a *higher* number, etc

Submitter:  None
Submitted:  Mon 30 Sep 2013 12:50:38 AM UTC
Category:  None Should Start On:  Mon 30 Sep 2013 12:00:00 AM UTC
Should be Finished on:  Mon 30 Sep 2013 12:00:00 AM UTC Priority:  5 - Normal
Status:  None Privacy:  Public
Percent Complete:  0% Assigned to:  None
Originator Name:  * sqrrl Originator Email:  * -email is unavailable-
Open/Closed:  Open Planned Release:  None
IRC nick:  sqrrl
* Mandatory Fields

Add a New Comment (Rich Markup)

Fri 18 Oct 2013 02:26:50 AM UTC, comment #1: 

arza wrote a plugin for this!

(this has to be in the core tho)

# jump_smart_higher.pl for WeeChat by arza <arza@arza.us>, distributed freely and without any warranty, licensed under GPL3 <http://www.gnu.org/licenses/gpl.html>

# Jump to a higher buffer with activity, similar to /input smart_jump (alt-a) but jump to a buffer with higher number if possible

weechat::register('jump_smart_higher', 'arza <arza@arza.us>', '0.1', 'GPL3', 'Jump to a higher buffer with activity', '', '');
"Jump to the buffer that
 1. has the highest activity
 2. is after current buffer if possible
 3. has the lowest number",
        '', '', '', 'command', '');

sub command { my $buffer=$_[1];
        my $max_priority = 0;
        my $min_number = 1000000;
        my $current_number = weechat::buffer_get_integer($buffer, 'number');
        my $number = 0;
        my $priority = 0;
        my $infolist = weechat::infolist_get('hotlist', '', '');
                $number = weechat::infolist_integer($infolist, 'buffer_number');
                $priority = weechat::infolist_integer($infolist, 'priority');
                if($priority > $max_priority){ $max_priority = $priority; $min_number = 1000000; }
                elsif($priority < $max_priority){ next; }
                if($number < $current_number){ $number += 10000; }
                if($number < $min_number){ $min_number = $number; }

        weechat::command($buffer, "/buffer " . $min_number % 10000);

squirrel <sqrrl>
Mon 30 Sep 2013 12:50:38 AM UTC, original submission:  

add an option to weechat.look.hotlist_sort that would be similar to group_number_asc, except it would add numbers that are LESS than current buffer at the end of the list. this way i could be on buffer 5 and get highlights such as 6, 7, 8, 9, 1, 2, 3, 4

this way, with meta-a i could move always forward
currently using group_number_acs i can barely get to the bottom of the list since i'm getting new highlights on the lower bufffer

farn> sqrrl: yes, sounds like it could be useful. another way to implement that would be to add a new jump command that goes to the first number in the hotlist that is higher than the current buffer number



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by sqrrl (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12