After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 659344 - Over-zealous search for notebook index file
Over-zealous search for notebook index file
Status: RESOLVED WONTFIX
Product: reinteract
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: reinteract-maint
reinteract-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2011-09-17 19:31 UTC by Owen Taylor
Modified: 2018-07-10 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2011-09-17 19:31:59 UTC
Originally filed by Kai Willadsen as http://www.reinteract.org/trac/ticket/45

When trying to find a notebook to associate a file with, reinteract seems a little over-zealous.

I placed (admittedly, for debugging purposes) an index.rnb file in my home directory, and tried to open a standalone worksheet in a subdirectory from the command line. The logic in find_notebook_path() chains up to higher-level directories, at which point the index.rnb in ~ caused reinteract to scan my entire home directory, adding everything in it to the file list; this operation also crashed out when it hit a file that it couldn't access, but that's beside the point.

I'm not sure what the correct behaviour here is, but there is obvious potential for the current notebook search method to do bad things. One possibility would be for index.rnb files to store their containing path, only scan that directory on opening, and don't auto-associate with files unless they are under the stored path. In this case there would probably need to be some kind of prompt for when people moved/renamed the containing directory.
Comment 1 Owen Taylor 2011-09-17 19:33:20 UTC
09/09/08 09:03:08 changed by otaylor
====================================

Need to think about this a little more:

* Was reinteract doing exactly what you asked for? ;-)

* Should we just check for an index.rnb right next to the specified file? After all, there's not even any UI for creating subfolders in reinteract currently.

* Would it make sense to do the hunt-for-notebook thing only inside ~/Documents/Reinteract and be more restrictive about how we search elsewhere?

11/14/08 11:04:09 changed by kaiw
=================================

    Was reinteract doing exactly what you asked for? ;-)

Well, sure. Except that it's obviously not a sane thing to ask for, the sanity of users (including myself) being somewhat questionable.

    Should we just check for an index.rnb right next to the specified file? After all, there's not even any UI for creating subfolders in reinteract currently.

That would seem fairly reasonable. However, it's easy to imagine that as reinteract grows more capabilities, people would start doing things like, e.g., having a notebook with results in subdirectories, with worksheets sitting next to the results.

    Would it make sense to do the hunt-for-notebook thing only inside ~/Documents/Reinteract and be more restrictive about how we search elsewhere?

reinteract.state already contains a list of known notebooks. How about only searching through that list to find a matching parent directory? That would be a lot safer, and should work in the vast majority of cases.
Comment 2 André Klapper 2018-07-10 22:05:56 UTC
Reinteract is not under active development anymore and had its last code changes
in early 2012: http://git.fishsoup.net/cgit/reinteract/log/

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the
responsibility for active development again.