Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SUMMER OF CODE: various patches [DRAFT]#3129

Draft
eMPee584 wants to merge 71 commits intoranger:masterfrom
eMPee584:summer-of-code-2025
Draft

SUMMER OF CODE: various patches [DRAFT]#3129
eMPee584 wants to merge 71 commits intoranger:masterfrom
eMPee584:summer-of-code-2025

Conversation

@eMPee584
Copy link
Contributor

@eMPee584 eMPee584 commented Aug 6, 2025

[copied this over from the original PR (created 3 days ago) because it was not possible to rename the PR branch.. sorry for the additional notification noise..]

This is the first iteration of the consolidation of my very messy ranger tree 🎄😆
As school starts again tomorrow, I just wanted to get this out the door.. Most
patches should be in a good state and are thoroughly tested, some have room for
improvement. Let me know! I learned a lot about object oriented programming with
python, and discovered some new tools for development (after spending too much
time adding and removing self.fm.notify statements..):

Oh and I still have to do the make test thing, admittedly. This is the first iteration..

Changelog (prefilled from list of commits)

  • Add tag filter to filter_stack
  • Make tag filter more explicit about behaviour when no tag is specified
  • Make format spec in added tag filter explicit (E4220 implicit-format-spec)
  • runner/shell command: add -l flag to clear screen before running command
  • Fix opening tabs on files (regression from fe7c3b2 remove-duplicate-tabs-on-startup)
  • Show statusline indicator when show_hidden is true
  • Change show_hidden status indicator to colored asterisk (*)
  • handle middle mouse click
  • tab cursor positions: don't crash if a parent folder is not readable
  • default colorscheme: change border / separator lines from white to gray
  • miller / multipane view: add settings.draw_borders_rounded
  • miller / multipane view: rename variable & reduce indention
  • default colorscheme: change color of inactive pane contents to dim gray
  • browsercolumn widget: EMPTY instead of empty
  • browsercolumn widget: don't enter dir repeatedly
  • widgets.view_miller: add preview_min_width setting as collapse trigger
  • bookmarks: support Directory and str bookmark types throughout
  • Switch default bookmark type from directory objects to string list
  • fm: mark directory as unloaded on garbage collection
  • fm: also free unfiltered list of files on garbage_collection
  • ui: correctly inherit global tmux options (requires tmux >3.0)
  • ext.rifle: fix mysterious off-by-one errors in open_with
  • ext.human_readable: explicitly show Byte unit for size 0, too
  • core.actions: close hints menu before get_cumulative_size is invoked
  • core.linemode: add MimeTypeLinemode
  • core.main: set process title to 'ranger'
  • core.runner: less 🧟 zombies!
  • core.runner: clear zombies
  • Add a fudge_symlink_stat setting to allow influencing sorting / display
  • Document unhandled miller levels (for more than three columns) with FIXMEs
  • gui.ui: make suspend() more robust against flukes
  • gui.widgets: move _draw_border_rectangle() to view_base and share
  • browsercolumn widget: supposedly fixes some scrolling issue [DRAFT]
  • gui.widgets.statusbar: redraw on show_hidden change
  • gui.widgets.taskview: remove a finalize() that does nothing but crash
  • gui.widgets.taskview: these two addstr() calls are actually addnstr()
  • gui.widgets.view_miller: keep preview collapse status updated
  • gui.widgets.statusbar: show FROZEN marker even if directory not loaded
  • Add an idle_auto_freeze setting to freeze ranger after # seconds
  • container.directory: we want the current settings, yes really, thanks
  • widgets.statusbar: add a space left of the show_hidden marker
  • gui.widgets.view_multipane: no more phantom columns 👻
  • gui.widgets.view_multipane: one main column only
  • gui.widgets.view_multipane: load unloaded panes on poke
  • gui.widgets.view_base: don't draw border when height is too low
  • gui.widgets.view_multipane: drop explicit redraws, already handled
  • config.commands: fix the default_linemode command to update display
  • gui.widgets.view_multipane: fix layouting so borders don't cover tags
  • gui.widgets.view_multipane: implement a click handler so mouse works
  • rc.conf: give hash filter mapping current file as default parameter
  • These have a request_redraw() function so make use of that
  • core.tab.enter_dir(): actually return False for failure modes
  • gui.widgets.statusbar: indicate the lack of all that could be shown
  • Add a linemode_shellcommand plugin [that got eaten by a bad git bug with cherry-pick --abort late sunday evening 🤦‍♂️.. luckily i was able to carve it from the vim undo file of the commit message - always commit with -v, it might safe a life]
  • [EDIT]: more commits coming up as I manage to finish something. tmux and entr ftw btw, (re)starting hundreds of ranger panes to test edits, add debug statements and invoke import pudb; pu.db – very awesome open source toolchain ⚙️ 💚 🥳

@eMPee584 eMPee584 changed the title SUMMER OF CODE: various patches for review [DRAFT] SUMMER OF CODE: various patches [DRAFT] Aug 17, 2025
@eMPee584 eMPee584 force-pushed the summer-of-code-2025 branch 3 times, most recently from 02b03d5 to 24ad40d Compare August 26, 2025 11:13
Network and auto mounts did not go well with the previous default.
From the tmux 3.0 changelog:
> * Add a -A flag to show-options to show parent options as well
> * Do not document set-window-option and show-window-options.
>   set-option -w and show-options -w should be used instead.

FIXES ranger#1739
.. so empty directories (0 entries) and directories with a cumulative
size of 0 B can be differentiated.
.. so there's any indication of something happening.

FIXME: Ideally, this would get its own Loader class.
(To test this, press F to freeze and CTRL-R to reset.. or go to a
directory on which your user does not have +x permission..)
But please take care, here be 🐉 dragons..
Because a restored tab is appended to the fm.tabs dict, order will be
different then before. So use get_tab_list() as titlebar module does.
.. so multipane layout gets rebuilt
.. enabled by setting new option `multipane_orientation` to `horizontal`
.. from command line. Not beautiful but works, at long last.

FIXME: The pointer logic is utter _madness_! 🤪
@eMPee584 eMPee584 force-pushed the summer-of-code-2025 branch from 24ad40d to 930622c Compare August 26, 2025 11:19
@eMPee584
Copy link
Contributor Author

Ok test failed, where would I add this library to fix it?

************* Module plugin_linemode_human_readable_age
examples/plugin_linemode_human_readable_age.py:6:0: E0401: Unable to import 'humanize' (import-error)

This screenshot of alexanderjeurissen/ranger_devicons#147 shows it on the left by the way:

ranger-devicons-mtime-coloring-demo

@toonn
Copy link
Member

toonn commented Oct 24, 2025

This is an impressive amount of work. Would you be interested in splitting this out into multiple PRs? It's really hard to review so many inter- and independent changes.
Preferably focusing on bugfixes first.

If not, I'll pick all this apart myself and open PRs but that'll take ages and means we can't go through the review process. Pointing out which commits fix bugs so I can focus on those first would still be highly appreciated.

@eMPee584
Copy link
Contributor Author

Hey toon, sure that was my intention as well to chop it up into atomic PRs, this is kinda just my WIP branch (missing some more features though) as while developing, commits don't always occur in chronological order.. 😅
Maybe instead of reviewing the single commits just yet you can check out the branch and play with it a bit? I will probably continue appending patches here until my local tree is clean and start with the multipane PR, that should be 🤞easily separatable.

Do you have an idea about how to make the tests succeed with the addition of examples/plugin_linemode_human_readable_age.py (depending on humanize module) in 8e9dfc7?
Also, I really love the devicons coloring by age as seen in the screenshot (showing off that linemode plugin on the left), it's turning out to be actually quite useful for my workflows (with sort=ctime as default setting)..

@toonn
Copy link
Member

toonn commented Feb 25, 2026

Predictably I'm still struggling to catch up to things so getting around to checking out your branch will likely take a while longer : (

Do you have an idea about how to make the tests succeed with the addition of examples/plugin_linemode_human_readable_age.py (depending on humanize module) in 8e9dfc7?

I'm not sure what the problem is and the GHA logs have timed out on this PR so I can't check. What tests in particular are troublesome?

@eMPee584 eMPee584 marked this pull request as draft February 26, 2026 21:15
@eMPee584
Copy link
Contributor Author

Yeah, don't worry too much about it, lol.. I have a big exam 2nd week of april and until then, my main desktop machine with all my dev stuff stays off (following an annoying crash in january, after months of uptime) and I try to not get sucked into all matters FLOSS .. which is so hard xD
After that, I will return to this and continue chopping up bits and also probably go ahead with a ranger-staging branch to test all the other PRs here (already had a scripted checkout of all PRs into subtrees..). Have become pretty familiar with the ranger code base doing this so I guess reviewing them should be a piece of cake in many instants. Although I think, by mid April, coding agents will have done additional leaps forward and i'm looking forward to leveraging that for more better open source as well ⚙️ ♻️ 🚀

That said, it would be great if the multipane PR #3154 would be merged, I consider that the most solid part of this, the rest was pretty much just to be transparent about what I was working on and giving the opportunity for feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants