Code Monkey home page Code Monkey logo

Comments (11)

gennaro-tedesco avatar gennaro-tedesco commented on September 25, 2024

Good evening! I don't understand very well, in your screencast you show you're deleting the file 1.lua and then checking that django-tips.txt is still there? Why wouldn't it be? Moreover

the session still shows it after loading it the next time,

I don't see the sessions being invoked from the video, what command are you invoking exactly? Are you saving the session manually after deleting the file or are you using the auto-save mechanism?

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

Good evening! I don't understand very well, in your screencast you show you're deleting the file 1.lua and then checking that django-tips.txt is still there? Why wouldn't it be? Moreover

the session still shows it after loading it the next time,

I don't see the sessions being invoked from the video, what command are you invoking exactly? Are you saving the session manually after deleting the file or are you using the auto-save mechanism?

I point to the file 1.lua with my mouse, not django-tips, i am deleting the 1.lua, then i exit vim and enter it again, and 1.lua still shows but it shouldnt, it is shown in the video, the saving session i invoke procession.set(), to show the list procession.list() as in documentation, it works as expected, i dont have problems with that

from nvim-possession.

gennaro-tedesco avatar gennaro-tedesco commented on September 25, 2024

After you delete the 1.lua file with ranger, can you please check whether such buffer still exists in the list of buffers that are in memory and/or as a tab (since when you open it back again it shows as tab I presume you opened it as such, initially)?

Moreover can you try to reproduce the behaviour with both autosave = true and false (in the latter case, by manually saving the session before exiting)? Does it happen with either parameter being set?

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

After you delete the 1.lua file with ranger, can you please check whether such buffer still exists in the list of buffers that are in memory and/or as a tab (since when you open it back again it shows as tab I presume you opened it as such, initially)?

Moreover can you try to reproduce the behaviour with both autosave = true and false (in the latter case, by manually saving the session before exiting)? Does it happen with either parameter being set?

Sure, but after 15-20 min, so i arrive at home

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

After you delete the 1.lua file with ranger, can you please check whether such buffer still exists in the list of buffers that are in memory and/or as a tab (since when you open it back again it shows as tab I presume you opened it as such, initially)?

Moreover can you try to reproduce the behaviour with both autosave = true and false (in the latter case, by manually saving the session before exiting)? Does it happen with either parameter being set?

When i delete 1.lua, it doesnt exist in :buffers.
Both autosave = true/false behave the same, 1.lua still appears

When i close the buffer, and then delete it, the buffer then doesnt appear(as expected)

from nvim-possession.

gennaro-tedesco avatar gennaro-tedesco commented on September 25, 2024

When i delete 1.lua, it doesnt exist in :buffers.

but it does exist as empty buffer in a different tab, doesn't it (in your recording it's shown as opened in a different tab)?

When i close the buffer,

what buffer are you referring to here?

The reason I am asking is because I suspect that the ranger plugin you're using may delete the file in your tree view but still preserve it in the current nvim session (just removing its content, and hence as "empty" buffer). What nvim-possession does is merely invoking the command :mksession, thus you would get the same behaviour by manually saving the sessions (it doesn't really depend on the plugin, but rather on how the ranger file tree deletes files in a vim session).

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

When i delete 1.lua, it doesnt exist in :buffers.

but it does exist as empty buffer in a different tab, doesn't it (in your recording it's shown as opened in a different tab)?

When i close the buffer,

what buffer are you referring to here?

The reason I am asking is because I suspect that the ranger plugin you're using may delete the file in your tree view but still preserve it in the current nvim session (just removing its content, and hence as "empty" buffer). What nvim-possession does is merely invoking the command :mksession, thus you would get the same behaviour by manually saving the sessions (it doesn't really depend on the plugin, but rather on how the ranger file tree deletes files in a vim session).

What do you mean a buffer in a different tab ? No, it doesnt exist at all, if it would be in a tab, in the right upper corner i would see that, so it is opened as a buffer.
I am referring to 1.lua.

How it can remain as empty buffer if it doesnt exist ?
And when i delete it, the buffer disappears, why would it come back when i load the session on next startup ?

So the problem is not on your side ?

from nvim-possession.

gennaro-tedesco avatar gennaro-tedesco commented on September 25, 2024

How it can remain as empty buffer if it doesnt exist ?

This depends on what exactly the ranger plugin does: does it completely remove the file from disk, or does it remove the content only whilst preserving the memory location while in a vim session?

This said: in order to determine where the behaviour lies, could you please try to, after deleting the file, manually invoke :mksession <session name> and save the session manually? Once so, would the file still be present in such a manually saved session?

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

Yes, the file still appears
The file is completely deleted from my directory

from nvim-possession.

gennaro-tedesco avatar gennaro-tedesco commented on September 25, 2024

If the file still appears even by manually saving the session then it means that ranger doesn't really delete the memory buffer :)

As such, this is to be addressed to the ranger plugin rather than the vim session mechanism.

from nvim-possession.

I-Own-You avatar I-Own-You commented on September 25, 2024

Okay, it seems that the file persists even if i dont delete it and just close it, and all files opened in neovim through ranger plugin doesnt go away, they persist in the session, and if i open them with neovim(in this case with fzf-lua :buffers), then i can close them/delete through ranger and they will go away, so the problem is opening newly created(empty) files through ranger, this is sick

from nvim-possession.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.