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 584789 - Allow user to decide if links are updated when renaming a note
Allow user to decide if links are updated when renaming a note
Status: RESOLVED FIXED
Product: gnote
Classification: Applications
Component: main
0.4.x
Other Linux
: Normal major
: ---
Assigned To: gnote-maint
gnote-maint
Depends on:
Blocks:
 
 
Reported: 2009-06-03 22:27 UTC by Barry Jackson
Modified: 2010-11-02 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed fix (33.55 KB, patch)
2010-02-17 16:15 UTC, Debarshi Ray
none Details | Review

Description Barry Jackson 2009-06-03 22:27:44 UTC
I made a test note with the title "gnote".
I made another note called "test note" containing the text "test of gnote".
I did not create any links - I do not want links at all.
I then changed the title of "gnote" to "gnote test".
My "test note" text had been changed to "test of gnote test" which is NOT what I want.
I expect to make a note and for NOTHING to change it unless I edit it.
Comment 1 Hubert Figuiere (:hub) 2009-06-06 04:33:42 UTC
This is actually the intended behaviour.

See section 3.2 in the user's manual.
Comment 2 Barry Jackson 2009-06-06 13:03:03 UTC
(In reply to comment #1)
> This is actually the intended behaviour.
> 
> See section 3.2 in the user's manual.
> 

Thanks for the manual ref. however I still consider this a bug - intentional or not.
I have dozens of notes that contain references to "urpmi" which are mainly references to usage of this command in Mandriva.
A week or so ago I made a quick note in a hurry and titled it simply "urpmi".
Later when I had more time I gave it a more specific title by editing it and changed it to "urpmi --auto-update"
I later discovered that all my notes containing "urpmi" had been changed by this bug/feature.
Something that trashes dozens of notes in one action without warning is a bug in my view. I have no idea how many more notes have gone the same way - I can no longer trust the content of any of my notes.
I went to the trouble of building gnote from source as I was led to believe that it did not have this feature.
I understand that the ability to turn off this feature will be added to Tomboy soon, so hopefully you will also add this to gnote, which I prefer. (fast and no dependence on mono ;-)
BTW how can I get gnote to see the Tomboy help files - at present I just get a page load error.
Thanks.
Comment 3 Norman Petry 2009-07-05 21:58:42 UTC
I can confirm the behaviour described.

This bug is marked as 'major', but it seems to describe intended and desirable behaviour. Therefore, the report should probably be either resolved WONTFIX or severity should be changed to Enhancement.  Intended behaviour functioning correctly is hardly a major bug!

If you have renamed a note and this affected many other notes in an unintended way, just rename the note back to what it was, and the problem is solved (urpmi --auto-update -> urpmi).  Then create a new note with the title urpmi --auto-update if that's what you need.  The purpose of the feature is to support quick and automatic hyperlinking without having links break as titles are modified. That useful behaviour would be lost if the proposed change were implemented.
Comment 4 Barry Jackson 2009-07-05 22:57:09 UTC
(In reply to comment #3)
> I can confirm the behaviour described.
Thanks for checking. 
> This bug is marked as 'major', but it seems to describe intended and desirable
> behaviour. Therefore, the report should probably be either resolved WONTFIX or
> severity should be changed to Enhancement.
Change it to enhancement if you must, but how is this desireable?
>Intended behaviour functioning correctly is hardly a major bug!
Sorry - but I disagree. Just because it is well intentioned and working as intended does not mean it is not a bug.
> If you have renamed a note and this affected many other notes in an unintended
> way, just rename the note back to what it was, and the problem is solved (urpmi
> --auto-update -> urpmi).  Then create a new note with the title urpmi
> --auto-update if that's what you need.
That may well work, but if it is only noticed months later then who can guess the damage done?
I used the content of a note which had been damaged this way to reply to a forum request and did not notice the errors - very embarrassing.
If the note contains a shell script for example and a portion of it contains something that just happens to appear in a note title that is later edited...
> The purpose of the feature is to support quick and automatic hyperlinking 
> without having links break as titles are modified. That useful behaviour would be lost if the proposed change were implemented.
That may be "useful behaviour" to some people with a very specific use for the program, although I do struggle to think of one. Most people simply want to keep snippets of information in an easily searchable manner. 
IMHO a feature like this should not be the default, but a selectable item in an advanced settings menu, with strong warnings about the possible consequences of it's use.
I simply want to keep notes that I can rely on. I don't want to have to be worrying about which other notes are going to be screwed up each time I edit a note title.
If a title change broke any links that no longer matched then IMO that would be correct and desirable, but to physically edit other notes without warning just to maintain the match is wrong - especially when this cannot be disabled.
I think it's a great program in all other respects, but this bug/feature really spoils it.
There have been discussions about this in a similar Tomboy bug report where there is support for my point of view. 

Comment 5 Sandy Armstrong 2010-02-08 23:25:37 UTC
I like the solution we've implemented in Tomboy 1.1.2.  See bug #574485 for details and screenshot.  I think the actual patch pushed to git is not identical to the one attached to that bug, just fyi.
Comment 6 Barry Jackson 2010-02-08 23:51:18 UTC
Thanks Sandy, that looks like the ideal solution that will make everyone happy !
Well done.
I hope the same functionality can be added to Gnote soon. :-)
Comment 7 Debarshi Ray 2010-02-09 00:30:43 UTC
I am working on porting the following change from Tomboy to Gnote:

commit 179c8cd200754f77575f0aab5e476cdcdb980d54
Author: Sandy Armstrong <sanfordarmstrong@gmail.com>
Date:   Sat Feb 6 22:47:45 2010 -0800

    Allow user to decide if links are updated when renaming a note (bug #574485)
    
    By default, when renaming a note to which other notes have links, display
    a dialog explaining the situation, showing a list of affected notes, and
    letting the user pick which notes (if any) will be updated.  Notes that
    are not updated will have the link removed (not just broken).
    
    The dialog also allows the user to set a preference to always show the
    dialog, or always update link text to reference the new note name, or
    always leave the text alone and remove the link. This preference has
    also been added to the Editing tab of the Prefs dialog.
Comment 8 Barry Jackson 2010-02-09 08:43:54 UTC
Excellent - I look forward to testing it!
Comment 9 Debarshi Ray 2010-02-17 16:15:00 UTC
Created attachment 154048 [details] [review]
Proposed fix
Comment 10 Debarshi Ray 2010-03-11 23:21:30 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 11 Barry Jackson 2010-03-12 00:10:18 UTC
Excellent result - thank you to all involved for your efforts :-)
Comment 12 Zadok 2010-11-02 20:45:45 UTC
In my opinion the bug here is words autolinking to a note's title. I acidentally made a note titled simply "a" and you can guess what happened. When I deleted it all the links persisted and I fear I will have to remove them manually :C
Can we add an option to disable autolinking?
Comment 13 Sandy Armstrong 2010-11-02 20:57:45 UTC
(In reply to comment #12)
> In my opinion the bug here is words autolinking to a note's title. I
> acidentally made a note titled simply "a" and you can guess what happened. When
> I deleted it all the links persisted and I fear I will have to remove them
> manually :C
> Can we add an option to disable autolinking?

At least in Tomboy, we would consider that a different bug.  I'd recommend filing it as a separate bug in Gnote, too.