create new tag
, view all tags

Patch Proposal: [Putting anchors in Rdiff output]


  1. The inline diff in WebChangesForAllWebs (check my comments there)
  2. Could be nice if inline jumps right to first diff
  3. Easy to hack RDiff.pm to include <a name="diff001"></a> on first difference, diff002 on next, etc.


For sequential rendered the following is now true:
  • all diffs (changes, adds, deletes) are anchored: #diff001, #diff002, ...
  • rdiffs will contain a next and previous link
  • the < marked comparison between revisions (at the bottom) will include a &context=9999 -
    • I guess this will make most sense to most non-technical users - this part is marked code smells.
    • This change is marked CODE SMELLS - might be an idea to make this configurable (through TWiki.cfg like numberOfRevisions ?).
  • anchors are given CSS class twikiNextRdiff


Well, I don't think rdiff is well documented, or is it?

Anyway, something like the text below should make it into rdiff doc

Jumping directly to diff

When you present users with an inline diff add the anchor #diff001 to avoid scrolling the 10 pages down to find first diff...


  • Sample, that may replace %REVINFO% in the TMPL:DEF{toolbar} of the pattern skin template file view.pattern.tmpl
  • %REVINFO{"<a title=\"Show last change as inline diff\" href=\"%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/$web/$topic?type=last&render=sequential&context=30000#diff001\">r1.$rev - $date - %CALC{"$PROPERSPACE($wikiname)"}%</a>"}%


See above - and WebChangesForAllWebs


  1. It uses a global variable to name anchors frown
  2. It only anchors sequential rendered rdiffs - but based on motivation I guess that is okay.
  3. Maybe make the CODE SMELL part user configurable.

Note: Patch is attached as RDiff-change-request.diff The patch is against Cairo: TWikiRelease02Sep2004


I would like to propose this for Dakar.

-- NielsKoldso - 02 Sep 2005

context=9999 isn't enough for some topics e.g. PatternSkinDev. Maybe a context=all is needed?

-- SamHasler - 03 Sep 2005

i like this and have often wanted it myself. any chance you can make a patch against the DevelopBranch codebase?

-- WillNorris - 03 Sep 2005

Will: Mayby... do not know how hard it will be to set up DevelopBranch, will look into it next time I get some coding time

Sam: I will try to incooperate context=all

-- NielsKoldso - 13 Sep 2005

Unless this is done within the next 24 hours, it isn't going to make it into DakarRelease, so setting it to Edinburgh. Though I have a gut feeling that someone may already have implemented it....

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff RDiff-change-request.diff r2 r1 manage 5.6 K 2005-01-03 - 23:42 NielsKoldso diff -u ... (now with next | previous links)
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2005-09-17 - CrawfordCurrie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.