I just experienced a wierdness with the textmate blogging bundle.
When I tried to fetch a post from my blog to edit, it retrieved the post which was the one above the one in the dropdown list before the one I selected.
I just did a little experimentation, and it looks like the problem occurs when I select a post which was posted before a duplicated post which I deleted. So, schematically, the list shows:
Post 10 Post 9 Post 7 ...
Where there was a Post 8 with the same name as Post 9, but it's now gone.
Selecting post 7 from the list brings back the deleted post 8.
The blog is implemented with typo.
On 17/10/2007, at 15:47, Rick DeNatale wrote:
I just experienced a wierdness with the textmate blogging bundle.
[...] it looks like the problem occurs when I select a post which was posted before a duplicated post which I deleted. So, schematically, the list shows:
Post 10 Post 9 Post 7 ...
Where there was a Post 8 with the same name as Post 9, but it's now gone.
Selecting post 7 from the list brings back the deleted post 8.
The blog is implemented with typo.
I could see this maybe stem from Typo returning the deleted posts as well, resulting in duplicate titles, and then having the pop-up filter out duplicates and cause the off-by-number-of-filtered-duplicates.
Or alternatively a Typo bug.
Can you open Support/lib/blogging.rb in the Blogging bundle and locate the select_post function and insert the following after titles = … (around line 470):
open("/dev/console", "w") { |io| io << titles.join("\n") }
Then check console to see if there actually are duplicates among the titles.
On 10/19/07, Allan Odgaard throw-away-2@macromates.com wrote:
On 17/10/2007, at 15:47, Rick DeNatale wrote:
I just experienced a wierdness with the textmate blogging bundle.
[...] it looks like the problem occurs when I select a post which was posted before a duplicated post which I deleted. So, schematically, the list shows:
Post 10 Post 9 Post 7 ...
Where there was a Post 8 with the same name as Post 9, but it's now gone.
Selecting post 7 from the list brings back the deleted post 8.
The blog is implemented with typo.
I could see this maybe stem from Typo returning the deleted posts as well, resulting in duplicate titles, and then having the pop-up filter out duplicates and cause the off-by-number-of-filtered-duplicates.
Or alternatively a Typo bug.
Can you open Support/lib/blogging.rb in the Blogging bundle and locate the select_post function and insert the following after titles = … (around line 470):
open("/dev/console", "w") { |io| io << titles.join("\n") }
Then check console to see if there actually are duplicates among the titles.
I'm new to OSX (recent convert from linux) so I couldn't figure out how to view /dev/console (maybe if I'd started Textmate from the shell instead of the finder or spotlight?) so I wrote it to a file instead.
Anyway: There are indeed duplicates:
True\ Confesssions True\ Confesssions You\ Can't\ Judge\ a\ Book...\ \ Some\ Mental\ Traps\ in\ Learning\ Ruby It's\ Official Refactoring\ With\ Continuous\ Testing\ -\ a\ Guided\ Tour My\ First\ Serious\ TextMate\ Automation Observing\ Fields\ With\ Rails\ in\ the\ Browser Ruby\ Blocks,\ do\ or\ brace? Ruby\ Blocks,\ do\ or\ brace? Duck\ A\ La\ Range Tell\ us\ what\ you\ really\ think Conventions\ Uber\ Alles Block\ Your\ Privates! How\ to\ Cure\ The\ PayPal\ Subscription\ Blues To\ paraphrase\ Kent\ Beck... Nobody\ Could\ Count\ Beans\ Like\ IBM Werewolves\ of\ Ruby Aspects\ of\ Beauty:\ Proportion,\ Integrity,\ Clarity,\ and\ Monkey\ Patching? Ruby\ Hoedown\ TeeVee\ -\ "Hee\ Haw!" After\ the\ Hoedown\ is\ Over,\ Part\ 1
Note that the first duplication seems to have happened because I sent my last post, and it never indicated success, so I posted it again, then I had to go to the typo web interface and de-publish the duplicate.
On 19/10/2007, Rick DeNatale rick.denatale@gmail.com wrote:
I'm new to OSX (recent convert from linux) so I couldn't figure out how to view /dev/console
Applications > Utilities > Console.app
(maybe if I'd started Textmate from the shell instead of the finder or spotlight?)
That also works.
Robin
On 19/10/2007, at 18:48, Rick DeNatale wrote:
[...] I'm new to OSX (recent convert from linux) so I couldn't figure out how to view /dev/console (maybe if I'd started Textmate from the shell instead of the finder or spotlight?) so I wrote it to a file instead.
File is fine, for future reference /Applications/Utilities/Console.app is used to read the system console.log.
Anyway: There are indeed duplicates: [...]
I think this is not that easy to fix since it is really the OS that removes the duplicates from the menu and causes this “off by n” problem.
So the fix would be something like have the blogging bundle insert extra text for duplicates to disambiguate the items.
However, the problem is now known and noted for any potential future work on the blogging bundle :)
Allan,
It's been a while since I looked at this, but...
The call which the bundle uses to get the list of recent posts is returning more info than just the titles, IIRC it got back either an Array or maybe even a Hash for each post with attributes like the title, id, etc.
Now I don't know if this is standard or if it varies from blogging engine to blogging engine, but..
On the other hand, it might also be a Typo bug, in that I'm not sure that it should be showing what I though were deleted posts in that list.
On 10/24/07, Allan Odgaard throw-away-2@macromates.com wrote:
On 19/10/2007, at 18:48, Rick DeNatale wrote:
[...] I'm new to OSX (recent convert from linux) so I couldn't figure out how to view /dev/console (maybe if I'd started Textmate from the shell instead of the finder or spotlight?) so I wrote it to a file instead.
File is fine, for future reference /Applications/Utilities/Console.app is used to read the system console.log.
Anyway: There are indeed duplicates: [...]
I think this is not that easy to fix since it is really the OS that removes the duplicates from the menu and causes this "off by n" problem.
So the fix would be something like have the blogging bundle insert extra text for duplicates to disambiguate the items.
However, the problem is now known and noted for any potential future work on the blogging bundle :)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate