1 2009-11-15T00:08:33  *** grzywacz has quit IRC
   2 2009-11-15T00:14:40  *** dimazest has quit IRC
   3 2009-11-15T00:53:20  *** dimazest has joined #moin-dev
   4 2009-11-15T02:00:38  *** JosefMeier has quit IRC
   5 2009-11-15T07:31:54  <ThomasWaldmann> moin
   6 2009-11-15T07:32:17  <ThomasWaldmann> the xapian search tests are a PITA
   7 2009-11-15T08:32:59  *** ser has quit IRC
   8 2009-11-15T08:44:01  *** ser has joined #moin-dev
   9 2009-11-15T08:50:40  *** JosefMeier has joined #moin-dev
  10 2009-11-15T08:54:43  *** JosefMeier has quit IRC
  11 2009-11-15T09:04:25  * ThomasWaldmann fixes attachment removal
  12 2009-11-15T09:04:47  <ThomasWaldmann> AttachFile & co is so unbelievably crappy...
  13 2009-11-15T09:31:42  *** JosefMeier has joined #moin-dev
  14 2009-11-15T09:45:02  <ThomasWaldmann> btw, py.test crashes silently when invoked from MoinMoin/
  15 2009-11-15T09:57:13  <ThomasWaldmann> btw, if anybody cares for jabber: there is still stuff to fix (and after my next changeset, there is more of it)
  16 2009-11-15T10:08:22  <CIA-43> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5279:2aa43685e17b 1.9/MoinMoin/ (7 files in 3 dirs): (log message trimmed)
  17 2009-11-15T10:08:22  <CIA-43> AttachFile: added remove_attachment(), made nuke_page use it (details below)
  18 2009-11-15T10:08:22  <CIA-43> AttachFile was missing a remove_attachment function (in the style of
  19 2009-11-15T10:08:22  <CIA-43> add_attachment), added it. It triggers an event FileRemovedEvent.
  20 2009-11-15T10:08:23  <CIA-43> FileRemovedEvent handling:
  21 2009-11-15T10:08:25  <CIA-43> * implemented for mail notifications
  22 2009-11-15T10:08:27  <CIA-43> * implemented for xapian index updates
  23 2009-11-15T10:25:04  <CIA-43> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5280:d25574af97eb 1.9/MoinMoin/events/ (5 files): event package: fix PEP8, c&p errors, trivial code changes
  24 2009-11-15T10:33:09  *** JosefMeier has quit IRC
  25 2009-11-15T10:53:54  *** JosefMeier has joined #moin-dev
  26 2009-11-15T12:19:35  <dreimark> ThomasWaldmann: I have had no failingtest for jabber
  27 2009-11-15T12:21:10  <dreimark> before the changesests
  28 2009-11-15T12:30:15  <ThomasWaldmann> jabber auth is broken (see 1.9 todo)
  29 2009-11-15T12:31:07  <ThomasWaldmann> and it doesn't support the FileRemovedEvent I added
  30 2009-11-15T12:42:53  <dreimark> ThomasWaldmann: 979 passed, 69 skipped in 86.74 seconds and invoked from the MM dir
  31 2009-11-15T12:45:38  <CIA-43> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5281:5f0ec1f315bc 1.9/MoinMoin/search/ (5 files in 3 dirs): (log message trimmed)
  32 2009-11-15T12:45:38  <CIA-43> xapian: new locking, removed threading and signing (details see below)
  33 2009-11-15T12:45:38  <CIA-43> Locking:
  34 2009-11-15T12:45:38  <CIA-43> The old locking (moin based code) somehow didn't work reliably, often there
  35 2009-11-15T12:45:39  <CIA-43> was a lock leftover and blocked index updates until someone removed it manually.
  36 2009-11-15T12:45:41  <CIA-43> This code was removed.
  37 2009-11-15T12:45:43  <CIA-43> Moin now relies on Xapian's builtin locking that is active between
  38 2009-11-15T12:46:13  <ThomasWaldmann> dreimark: "the MM dir" is what exactly?
  39 2009-11-15T12:46:25  <dreimark> moin-1.9/MoinMoin
  40 2009-11-15T12:47:25  <ThomasWaldmann> breaks for me when testing wikiutil
  41 2009-11-15T12:47:43  <dreimark> py.test --Version ?
  42 2009-11-15T12:48:00  <ThomasWaldmann> 1.0.1
  43 2009-11-15T12:48:15  <dreimark> mine too
  44 2009-11-15T12:48:40  <dreimark> how big is your local wiki or what content does it have
  45 2009-11-15T12:51:06  <ThomasWaldmann> mostly the sys pages
  46 2009-11-15T12:51:46  <ThomasWaldmann> uuh, search is rather unhappy while indexing runs
  47 2009-11-15T12:56:30  *** grzywacz has joined #moin-dev
  48 2009-11-15T13:43:00  <JosefMeier> dreimark: The new dialog is ready. Please give me Feedback: http://s15358202.onlinehome-server.info/1.9_modified/test
  49 2009-11-15T13:43:36  <JosefMeier> The code is on: http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/
  50 2009-11-15T14:03:20  <dreimark> JosefMeier: much better
  51 2009-11-15T14:03:34  * dreimark is looking at the gui editor
  52 2009-11-15T14:05:33  <dreimark> can it be extended for non image formats, so that pdf, mpg, ogg etc. also could be used? I mean does it matter that a user gives the right extension if it is not a drawing extension?
  53 2009-11-15T14:08:26  <dreimark> while one types into "Name of page where image lies on" can the "Select image..." list be disabled (grey out) then the List attachments button gets more focus
  54 2009-11-15T14:11:43  <JosefMeier> dreimark: answer first question: then the attachment dialog would be needless
  55 2009-11-15T14:12:25  <dreimark> i know I am speaking on
  56 2009-11-15T14:12:35  <JosefMeier> answer second question: I would write a documentation for the dialog. So everyone should know the meaning of the button.
  57 2009-11-15T14:12:35  <dreimark>  Select existing image True
  58 2009-11-15T14:13:06  <JosefMeier> I don't understand
  59 2009-11-15T14:13:29  <dreimark> if you enter a new name in "Name of page where image lies on"
  60 2009-11-15T14:14:08  <dreimark> "Select image..." is only usefull after "list attachments"
  61 2009-11-15T14:14:35  <dreimark> if one ommits "list attachments" he can select the old drawing
  62 2009-11-15T14:15:23  <dreimark> he creates a new one e.g. {{drawing:testSeite/test.adraw}}
  63 2009-11-15T14:16:45  <JosefMeier> But if he changes his mind and wants to select the drop down list instead of getting a attachment from elsewhere, than the grayed out box is a problem
  64 2009-11-15T14:17:29  <dreimark> when he has changed the page name then I guess he wants an attachment from that page
  65 2009-11-15T14:17:55  <JosefMeier> Regarding your first question: You want to replace the attachment dialog with the image dialog and allow on the image dialog to choose doc, pdf, ... files?
  66 2009-11-15T14:18:24  <dreimark> if he has changed his mind, he has to select the old page, and then the disabling (grey out) can vanish
  67 2009-11-15T14:18:34  <JosefMeier> ok
  68 2009-11-15T14:19:50  <dreimark> between stuff which can be embedded (former by EmbedObject) and attachment: (for images) is no difference.
  69 2009-11-15T14:20:41  <dreimark> {{attachment:example.pdf}} is shown inside the page
  70 2009-11-15T14:21:32  <JosefMeier> is this behaviour new with 1.9 ?
  71 2009-11-15T14:22:16  <dreimark> no, the {{ syntax since 1.6 or 1.7. EmbedObject since 1.6
  72 2009-11-15T14:22:55  <dreimark> (can't remember currently) but it is not new with 1.9
  73 2009-11-15T14:23:43  <dreimark> also you could add a dialog for width and height if you want.
  74 2009-11-15T14:24:41  <dreimark> i look later on the code
  75 2009-11-15T14:29:01  * ThomasWaldmann tries stub db approach for xapian
  76 2009-11-15T14:39:47  <JosefMeier> ok
  77 2009-11-15T15:57:42  <JosefMeier> huston we have a problem
  78 2009-11-15T15:58:21  <JosefMeier> dreimark: For some reason {{attachment:test.pdf}} is converted to some strange string, if it is opened with the gui editor and after that you switch to text mode.
  79 2009-11-15T15:58:55  <JosefMeier> after saving the page the pdf won't be shown in the browser
  80 2009-11-15T16:00:47  <JosefMeier> try it on http://s15358202.onlinehome-server.info/1.9_modified/test
  81 2009-11-15T16:01:00  <JosefMeier> first open the page in text mode
  82 2009-11-15T16:01:12  <JosefMeier> then switch to gui mode and back again to text mode
  83 2009-11-15T16:01:33  <JosefMeier> you will see that {{attachment:test.pdf}} was transformed in something ... special
  84 2009-11-15T16:06:54  <ThomasWaldmann> likely a roundtripping problem
  85 2009-11-15T16:07:19  <JosefMeier> but why doesn't that happen to images or drawings ?
  86 2009-11-15T16:09:51  <ThomasWaldmann> because it is simpler for them
  87 2009-11-15T16:11:16  <JosefMeier> don't think so. the syntax is the same. also the html code in the gui editor looks similar. do the wiki2html converters or vice versa know pdf files ?
  88 2009-11-15T16:11:48  <JosefMeier> cause {{attachment:test.pdf}} is converted to an html <object> tag instead of an <img>
  89 2009-11-15T16:13:02  <CIA-43> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5282:bee5567d7084 1.9/MoinMoin/search/ (Xapian/indexing.py _tests/test_search.py builtin.py): (log message trimmed)
  90 2009-11-15T16:13:02  <CIA-43> xapian: remove assumption that xapian db is a directory
  91 2009-11-15T16:13:02  <CIA-43> Xapian can work with stub DBs, that is a small text file that contains kind
  92 2009-11-15T16:13:02  <CIA-43> of a pointer to the real xapian index directory. The stub DB filename can
  93 2009-11-15T16:13:02  <CIA-43> be given to xapian instead of a index directory path (at least when searching,
  94 2009-11-15T16:13:03  <CIA-43> i had some troubles giving a stub db file to indexing).
  95 2009-11-15T16:13:05  <CIA-43> Thus, "dir" was renamed to "db" at some places. Other places assuming the db
  96 2009-11-15T16:13:18  <ThomasWaldmann> JosefMeier: use teh source :)
  97 2009-11-15T16:15:58  <JosefMeier> may the source be with me ?
  98 2009-11-15T16:16:14  <ThomasWaldmann> yes, you have it :D
  99 2009-11-15T16:18:11  <JosefMeier> lol
 100 2009-11-15T16:18:59  <JosefMeier> found "_process_object" in "text_html_text_moin_wiki.py". There's also a comment that roundtripping is maybe not good enough :-)
 101 2009-11-15T16:19:20  <JosefMeier> So I'll look there if it's buggy.
 102 2009-11-15T16:37:02  *** JosefMeier has quit IRC
 103 2009-11-15T16:46:33  *** JosefMeier has joined #moin-dev
 104 2009-11-15T16:49:24  <JosefMeier> ThomasWaldmann: Do you have something todo with the code in text_html_text_moin_wiki.py ? Is the object handling from you?
 105 2009-11-15T16:50:27  <ThomasWaldmann> hg annotate :)
 106 2009-11-15T16:52:11  <JosefMeier> I see. You are in abbreviation mode :-)
 107 2009-11-15T16:53:17  <JosefMeier> But I don't understand your answer.
 108 2009-11-15T16:53:58  <JosefMeier> Do you have any idea, why the handling of html objects is performed as it happens there? would like to modify it, so the roundtrip doesn't make problems.
 109 2009-11-15T16:54:10  <JosefMeier> The comment there looks like if it is from you ;-)
 110 2009-11-15T16:56:14  <ThomasWaldmann> feel free to get clear about the problem and fix it
 111 2009-11-15T16:58:08  <ThomasWaldmann> the current implementation is very simple, too simple...
 112 2009-11-15T17:01:25  <JosefMeier> but why did you do it this way? It's different from the processing of images and there must be a reason for that. I'd like to ignore all parameters but width and height as example.
 113 2009-11-15T17:02:37  <JosefMeier> I would like to make the desc variable the target (desc = test.pdf) and add 'attachment:' before. Then everything should work again.
 114 2009-11-15T17:03:07  <JosefMeier> What do you recommend me to test this code with?
 115 2009-11-15T17:03:23  <JosefMeier> Is it enough to make a page with embedded pdf and word-files ?
 116 2009-11-15T17:03:30  <JosefMeier> and test the roundtrip with it?
 117 2009-11-15T17:03:44  <JosefMeier> which parameters are necessary for objects? Is width and height enough?
 118 2009-11-15T17:06:47  <ThomasWaldmann> you need to fix it for all cases, not just for the problem you have found
 119 2009-11-15T17:07:43  <ThomasWaldmann> (or at least: make it not worse for other cases)
 120 2009-11-15T17:09:20  <JosefMeier> but from where do I know if I tested all cases ? I know only the case of embedding pdf and doc files.
 121 2009-11-15T17:09:28  <JosefMeier> Which cases can happen?
 122 2009-11-15T17:09:44  <ThomasWaldmann> read HelpOnLinking
 123 2009-11-15T17:10:18  <ThomasWaldmann> or the wiki parser for {{}}
 124 2009-11-15T17:11:38  <JosefMeier> The situation is like this:
 125 2009-11-15T17:12:10  <JosefMeier> Ok. I read it :-D
 126 2009-11-15T18:29:21  <JosefMeier> ThomasWaldmann: Is there some subroutine which determines if an url is a http url or just a url from type "/page?action=..." ?
 127 2009-11-15T18:30:45  <JosefMeier> maybe a http* in the beginning ...
 128 2009-11-15T18:48:56  *** dimazest has quit IRC
 129 2009-11-15T18:48:56  *** dennda has quit IRC
 130 2009-11-15T18:48:56  *** xorAxAx has quit IRC
 131 2009-11-15T18:48:56  *** franklin_ has quit IRC
 132 2009-11-15T18:48:56  *** waldi has quit IRC
 133 2009-11-15T18:48:56  *** JosefMeier has quit IRC
 134 2009-11-15T18:48:56  *** vpv has quit IRC
 135 2009-11-15T18:48:56  *** TheSheep has quit IRC
 136 2009-11-15T18:48:56  *** CIA-43 has quit IRC
 137 2009-11-15T18:48:56  *** grzywacz has quit IRC
 138 2009-11-15T18:48:56  *** ser has quit IRC
 139 2009-11-15T18:48:56  *** ThomasWaldmann has quit IRC
 140 2009-11-15T18:48:56  *** ronny_ has quit IRC
 141 2009-11-15T18:48:56  *** dreimark has quit IRC
 142 2009-11-15T18:48:56  *** ChanServ has quit IRC
 143 2009-11-15T19:02:17  *** dreimark has joined #moin-dev
 144 2009-11-15T19:02:45  *** ChanServ has joined #moin-dev
 145 2009-11-15T19:02:45  *** xorAxAx has joined #moin-dev
 146 2009-11-15T19:02:45  *** dennda has joined #moin-dev
 147 2009-11-15T19:02:45  *** vpv has joined #moin-dev
 148 2009-11-15T19:02:45  *** TheSheep has joined #moin-dev
 149 2009-11-15T19:02:45  *** waldi has joined #moin-dev
 150 2009-11-15T19:02:45  *** CIA-43 has joined #moin-dev
 151 2009-11-15T19:02:45  *** ThomasWaldmann has joined #moin-dev
 152 2009-11-15T19:02:45  *** franklin_ has joined #moin-dev
 153 2009-11-15T19:02:45  *** dimazest has joined #moin-dev
 154 2009-11-15T19:02:45  *** ser has joined #moin-dev
 155 2009-11-15T19:02:45  *** grzywacz has joined #moin-dev
 156 2009-11-15T19:02:45  *** JosefMeier has joined #moin-dev
 157 2009-11-15T19:02:45  *** Guest43282 has joined #moin-dev
 158 2009-11-15T19:02:45  *** irc.freenode.net sets mode: +o ChanServ
 159 2009-11-15T19:04:48  *** Guest43282 is now known as ronny
 160 2009-11-15T19:31:04  <JosefMeier> ThomasWaldmann: Now I have a solution for correctly roundtrip object attachments from gui editor to/from text mode.
 161 2009-11-15T19:31:44  <JosefMeier> But: I had to remove the type= attribute but I don't think that it is needed in wiki markup. What is your opinion on that?
 162 2009-11-15T19:33:10  <JosefMeier> wiki markup {{attachment:test.pdf}} is converted to this html markup by the moin markup parser:
 163 2009-11-15T19:33:12  <JosefMeier> <object width="41px" height="41px" type="application/pdf" title="" data="/test?action=AttachFile&amp;do=get&amp;target=test.pdf">test.pdf</object>
 164 2009-11-15T19:34:14  <JosefMeier> I now parse the data attribute to {{attachment:test.pdf|test.pdf|width="41px",height="41px"}}
 165 2009-11-15T19:34:50  <JosefMeier> I ignore the type attribute cause having a type attribute in an attachment wiki markup crashes moin for some reason. And it has no negative effect to ignore this type attribute.
 166 2009-11-15T19:38:42  <JosefMeier> Can you follow me :-) ?
 167 2009-11-15T19:56:58  *** eSyr has joined #moin-dev
 168 2009-11-15T20:04:47  <eSyr> dreimark, i've fixed issue with highlight parser by adding msg parameter to code block and use it when lexer is unknown, but it adds new translation string and css class.
 169 2009-11-15T20:06:20  <JosefMeier> How can I get the script root path?
 170 2009-11-15T20:07:36  <JosefMeier> My wiki is hosted on http://s15358202.onlinehome-server.info/1.8.4     and all links have the text "1.8.4" before the page names. How can I remove the script path /1.8.4 from the page name ?
 171 2009-11-15T20:07:55  <dreimark> eSyr: good. i look at it tom. or later in the evening. but it sounds not so bad to fix a bug and to have a new translation string
 172 2009-11-15T20:08:08  <dreimark> better that happens now and one has time to fix translations
 173 2009-11-15T20:10:02  <dreimark> bbl
 174 2009-11-15T20:10:17  <JosefMeier> dreimark: Is there a quick solution for my question?
 175 2009-11-15T20:11:33  <dreimark> JosefMeier: i am back in an hour. currently i have no idea how it is build in your case
 176 2009-11-15T20:25:30  <JosefMeier> solved it
 177 2009-11-15T20:26:05  *** evgSyr has joined #moin-dev
 178 2009-11-15T20:26:37  *** eSyr has quit IRC
 179 2009-11-15T20:42:03  <dreimark> JosefMeier: good
 180 2009-11-15T21:11:07  <ThomasWaldmann> re
 181 2009-11-15T21:11:46  * dreimark looks at the highlighting patch
 182 2009-11-15T21:12:13  <ThomasWaldmann> JosefMeier: i think the type attr is usually auto-generated. but if it is not, you maybe should regenerate it.
 183 2009-11-15T21:13:37  <dreimark> if the type is the mimetype that is needed for urls
 184 2009-11-15T21:18:45  <JosefMeier> ThomasWaldmann: the attr always is auto generated
 185 2009-11-15T21:19:16  <JosefMeier> look at s15358202.onlinehome-server.info/1.9_modified/test
 186 2009-11-15T21:19:32  <ThomasWaldmann> but you could use ...|type=text/foo}}?
 187 2009-11-15T21:21:00  <JosefMeier> moin crashes. Werkzeug reports that there is already a type key if I modify process_object so it creates {{attachment:test.pdf|type=...}}
 188 2009-11-15T21:21:31  <JosefMeier> you can switch between gui editor and text mode and there is no problem with bad attachment markup now
 189 2009-11-15T21:22:03  <JosefMeier> Now I can allow all mime types in the new image dialog
 190 2009-11-15T21:23:12  <JosefMeier> My modifications : http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/rev/9f54ae8e79a9
 191 2009-11-15T21:25:09  <ThomasWaldmann>  if not data.lower().startswith("http") and not data.lower().startswith("https"):
 192 2009-11-15T21:25:18  <ThomasWaldmann> ehrm!?
 193 2009-11-15T21:25:28  <JosefMeier> I found no other way to find out if the url points to an attachment
 194 2009-11-15T21:25:38  <JosefMeier> cause it also could be a normal internet url
 195 2009-11-15T21:25:43  <evgSyr> JosefMeier, attachment can be under https.
 196 2009-11-15T21:26:09  <JosefMeier> internet attachments don't work at the moment
 197 2009-11-15T21:26:21  <JosefMeier> there's some comment in the wiki parser
 198 2009-11-15T21:26:32  <JosefMeier> function transcluding (whatever)
 199 2009-11-15T21:26:47  <evgSyr> dreimark, what you can say about highlight patch?
 200 2009-11-15T21:27:50  <dreimark> evgSyr: it is not complete currently
 201 2009-11-15T21:27:52  <dreimark> E       TypeError: code_area() takes at most 7 arguments (8 given)
 202 2009-11-15T21:27:53  <JosefMeier> a) I need to decide if the url points to an attachment which was created by {{attachment: ... }}
 203 2009-11-15T21:27:54  <JosefMeier> b) I need a better way to get "page name", "target name" out of this moin request line in the browser address field
 204 2009-11-15T21:28:06  <evgSyr> err.
 205 2009-11-15T21:29:02  <dreimark> evgSyr: if msg != None:
 206 2009-11-15T21:29:13  <dreimark> is the same as if msg:
 207 2009-11-15T21:29:57  <evgSyr> dreimark, after js with its undefined i'd like to check such things explicitly :)
 208 2009-11-15T21:30:07  <evgSyr> but, of couse, you're right
 209 2009-11-15T21:30:22  <evgSyr> dreimark, did you apply patch to formatter?
 210 2009-11-15T21:30:31  <JosefMeier> ThomasWaldmann: Do you know a better solution ?
 211 2009-11-15T21:31:02  <ThomasWaldmann> JosefMeier: if I had known a 5 minutes hack, I would've done it
 212 2009-11-15T21:31:25  <ThomasWaldmann> it is not implemented yet, because it needs more thought and work than that to get to a good solution.
 213 2009-11-15T21:31:44  <JosefMeier> ThomasWaldmann: What's wrong with it?
 214 2009-11-15T21:31:52  <dreimark> you can also eliminate some blanks by checking with vim and http://moinmo.in/CodingStyle?action=AttachFile&do=view&target=python.vim
 215 2009-11-15T21:32:25  <JosefMeier> ThomasWaldmann: Indeed it's a three hour hack
 216 2009-11-15T21:32:28  <ThomasWaldmann> JosefMeier: you tell that you are testing whether it is an attachment, but you don't
 217 2009-11-15T21:32:37  <evgSyr> oh, sorry
 218 2009-11-15T21:33:16  <JosefMeier> ThomasWaldmann: I thought that this syntax <pagename>?action=AttachFile.......?target=<targetname> always points to an attachment
 219 2009-11-15T21:33:27  <dreimark> evgSyr: http://moinmo.in/CodingStyle the plugin is very nice
 220 2009-11-15T21:34:29  <ThomasWaldmann> JosefMeier: in line 8, you are just testing that the protocol is not http(s)
 221 2009-11-15T21:34:46  <JosefMeier> that's right
 222 2009-11-15T21:35:27  <JosefMeier> cause it could be that the transclusion points to a wiki url also
 223 2009-11-15T21:35:34  <dreimark> evgSyr: i am looking currently how and why it happens
 224 2009-11-15T21:37:45  <evgSyr> dreimark, error?
 225 2009-11-15T21:37:47  <JosefMeier> ThomasWaldmann: the lines after the http(s) check test, if the url is an attachment. If it is not, than everything will be handled as it was handled in 1.8.5
 226 2009-11-15T21:38:11  *** evgSyr is now known as eSyr
 227 2009-11-15T21:39:00  <eSyr> i've added new argument to code_area() for passing msg.
 228 2009-11-15T21:40:27  <ThomasWaldmann> JosefMeier: sorry, but that code is barely readable for me
 229 2009-11-15T21:40:49  <JosefMeier> Is there a way to get info from <pagename>?action=AttachFile.......?target=<targetname> ???
 230 2009-11-15T21:41:04  <JosefMeier> I split this string in parts to get the pagename and targetname
 231 2009-11-15T21:41:29  <JosefMeier> If there is a better or already present way then please tell me. Then the code will be much more readable
 232 2009-11-15T21:41:42  <eSyr> dreimark, should i fix something?
 233 2009-11-15T21:41:57  <dreimark> eSyr: not now
 234 2009-11-15T21:42:15  <dreimark> I am looking at it
 235 2009-11-15T21:42:19  <ThomasWaldmann> maybe using good names for things would be a start
 236 2009-11-15T21:42:36  <JosefMeier> Part means partition
 237 2009-11-15T21:42:40  <eSyr> ok, then /me afk
 238 2009-11-15T21:42:44  <ThomasWaldmann> and if you don't use "not ... ==", but simply "!=", that would also help
 239 2009-11-15T21:42:50  <JosefMeier> ah
 240 2009-11-15T21:44:02  <ThomasWaldmann> and 27 and 29 needs %
 241 2009-11-15T21:45:09  <JosefMeier> % ?
 242 2009-11-15T21:45:18  <JosefMeier> ah ok
 243 2009-11-15T21:45:47  <JosefMeier> you mean "attachment:%s/%s" % (pagename, targetname) ?
 244 2009-11-15T21:46:05  <JosefMeier> I need the inverse of AttachFile.getAttachUrl
 245 2009-11-15T21:46:51  <JosefMeier> which splits an attach url in its parts and gives that back. I can't believe that there's no function for that but I didn't found it yet
 246 2009-11-15T21:55:02  <CIA-43> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5283:f68e18305d05 1.9/MoinMoin/search/Xapian/indexing.py: xapian indexing: cosmetical changes
 247 2009-11-15T21:55:50  <eSyr> ThomasWaldmann, can bot modified to provide links to revisions?
 248 2009-11-15T21:56:12  <ThomasWaldmann> ask CIA :)
 249 2009-11-15T21:56:48  <ThomasWaldmann> but in general, if you just go to hg.moinmo.in/moin/1.9, you'll easily find it
 250 2009-11-15T21:57:17  <eSyr> yes, i know, but opening it right from irc client would be easier :)
 251 2009-11-15T21:57:40  <eSyr> (we used this approach for new pages on lurkmore.ru)
 252 2009-11-15T21:57:47  <eSyr> *we're using
 253 2009-11-15T21:58:27  <ThomasWaldmann> hehe lurkmore :)
 254 2009-11-15T21:59:58  <eSyr> yeas, it is.
 255 2009-11-15T22:11:46  <JosefMeier> ThomasWaldmann: I hope that this one is better:
 256 2009-11-15T22:11:48  <JosefMeier> http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/rev/bf992cb31848
 257 2009-11-15T22:13:55  <ThomasWaldmann> you don't need () in 29
 258 2009-11-15T22:14:32  <ThomasWaldmann> please use """ for docstrings, the vim pep8 plugin dislikes '''
 259 2009-11-15T22:14:58  <JosefMeier> damn it. you're right
 260 2009-11-15T22:15:08  <JosefMeier> is it more understandable now?
 261 2009-11-15T22:17:28  <ThomasWaldmann> you don't need to include str method docs into your code
 262 2009-11-15T22:18:22  <JosefMeier> That's for you so you understand how I used partition and rpartition. For sure I'll remove it.
 263 2009-11-15T22:19:31  <ThomasWaldmann> and why do you use that and not the usual split()?
 264 2009-11-15T22:19:45  <JosefMeier> why not?
 265 2009-11-15T22:20:32  <ThomasWaldmann> because it is unusual? :)
 266 2009-11-15T22:21:12  <ThomasWaldmann> also, if you would just do the usual url parsing and name the stuff as usual, that would help a lot
 267 2009-11-15T22:21:22  <ThomasWaldmann> there might be even functions doing that :)
 268 2009-11-15T22:21:38  <JosefMeier> ThomasWaldmann: That was the question I asked 10 times about :-D I didn't find one
 269 2009-11-15T22:22:36  <ThomasWaldmann> 39..41 is: scriptname = request.script_root or "/"
 270 2009-11-15T22:23:02  <ThomasWaldmann> that's not moin specific
 271 2009-11-15T22:23:41  <JosefMeier> Dont understand what you mean
 272 2009-11-15T22:23:52  <JosefMeier> I found this code several times in the moin framework
 273 2009-11-15T22:24:02  <JosefMeier> prosses_a uses it
 274 2009-11-15T22:24:06  <JosefMeier> process_a
 275 2009-11-15T22:24:07  <ThomasWaldmann>       63 +                if( attachUrlFlag ):
 276 2009-11-15T22:24:10  <ThomasWaldmann> !?
 277 2009-11-15T22:24:30  <ThomasWaldmann> too much C? :)
 278 2009-11-15T22:24:31  <JosefMeier> ? this is abbreviation for if( attachUrlFlag == True)
 279 2009-11-15T22:24:51  <JosefMeier> uhm ... you mean that doesn't work in python?
 280 2009-11-15T22:25:03  <ThomasWaldmann> how about "if x:"
 281 2009-11-15T22:25:59  <ThomasWaldmann> 79: invert condition, forget about continue
 282 2009-11-15T22:26:02  <JosefMeier> ups
 283 2009-11-15T22:26:17  <JosefMeier> you mean the brackets :-D
 284 2009-11-15T22:26:23  <JosefMeier> yes. too much c
 285 2009-11-15T22:27:24  <ThomasWaldmann> for 79... you could've even used the old code with a minor modification
 286 2009-11-15T22:28:25  <JosefMeier> I'm not that good in python to know this shortcut code. I think mine is more readable (at least for me ;-) )
 287 2009-11-15T22:28:44  <ThomasWaldmann> you should know about list comprehensions
 288 2009-11-15T22:29:12  <JosefMeier> I know that but I didn't know how I can put exceptions in that
 289 2009-11-15T22:29:25  <ThomasWaldmann> ... if cond]
 290 2009-11-15T22:29:44  <ThomasWaldmann> see the comment in the code you deleted :)
 291 2009-11-15T22:29:52  <JosefMeier> Ok. I'll put all your suggestions in the code.
 292 2009-11-15T22:30:14  <JosefMeier> What do you say now about my modifications? They work very well in the live demo. Do you see the sense in it?
 293 2009-11-15T22:30:24  <ThomasWaldmann> and then you please search some sane url parsing code in stdlib or werkzeug
 294 2009-11-15T22:31:28  <JosefMeier> Do you think that in theory the code will do it's job?
 295 2009-11-15T22:32:44  <ThomasWaldmann> http://pics.nase-bohren.de/not_moms_favorite.jpg < haha
 296 2009-11-15T22:33:57  <JosefMeier> ThomasWaldmann: You are killing my ego by ignoring my work :-)
 297 2009-11-15T22:34:14  <ThomasWaldmann> i am sure you could transform this into something readable that reuses existing code AND that works :)
 298 2009-11-15T22:35:28  <JosefMeier> Would urlparse be ok?
 299 2009-11-15T22:35:34  <ThomasWaldmann> as you might have seen in selection js code, it is not about just having some code do something, it is also about having understandable code
 300 2009-11-15T22:35:53  <JosefMeier> you're getting philosophic
 301 2009-11-15T22:36:19  <ThomasWaldmann> no, that's daily practice :)
 302 2009-11-15T22:36:35  <dreimark> eSyr: http://paste.pocoo.org/show/150888/
 303 2009-11-15T22:36:37  <ThomasWaldmann> urlparse sounds good
 304 2009-11-15T22:36:51  <ThomasWaldmann> now have a look whether werkzeug has even something better
 305 2009-11-15T22:37:20  <ThomasWaldmann> werkzeug often enhances crappy stdlib stuff with better own stuff
 306 2009-11-15T22:37:23  <JosefMeier> werkzeug is not only for wsgi stuff ?
 307 2009-11-15T22:37:55  <ThomasWaldmann> it's a library with all sorts of stuff, see the docs
 308 2009-11-15T22:38:06  <ThomasWaldmann> or use grep :)
 309 2009-11-15T22:38:29  <ThomasWaldmann> (or whatever one uses on windows for that)
 310 2009-11-15T22:39:56  <JosefMeier> werkzeug.url_decode :-)
 311 2009-11-15T22:40:14  <ThomasWaldmann> btw, it is a good idea to read through the python, stdlib and other lib docs some times
 312 2009-11-15T22:40:37  <ThomasWaldmann> so one at least vaguely remembers what's already there
 313 2009-11-15T22:42:06  <JosefMeier> yeah. Python has a rather huge std lib. I should do that instead of always reprogramming everything.
 314 2009-11-15T22:52:03  <CIA-43> Reimar Bauer <rb.proj AT googlemail DOT com> default * 5284:a83a65fcbb69 1.9/MoinMoin/ (11 files in 6 dirs): bug fix for MoinMoinBugs/LineNumbersWorkingBuggyWithHighlightParser (thanks to Eugene Syromyatnikov for the patch)
 315 2009-11-15T22:53:20  <dreimark> ThomasWaldmann: there is a new msg string which needs translations in that cs
 316 2009-11-15T22:58:03  * ThomasWaldmann looks
 317 2009-11-15T22:58:20  <eSyr> dreimark, looks great.
 318 2009-11-15T22:58:50  <dreimark> eSyr: works great
 319 2009-11-15T22:59:14  <dreimark> I am just currently not sure if lexer as word is to complicated for a non it user
 320 2009-11-15T23:00:05  <eSyr> well, i've used precise words, not simple :)
 321 2009-11-15T23:00:33  <dreimark> i know it is definitly right
 322 2009-11-15T23:00:57  <eSyr> but "Syntax ... is unsupported" can be used instead.
 323 2009-11-15T23:03:40  <ThomasWaldmann>     7.37 +                msg = _("Lexer \"%s\" not found. Rendering as plain text.") % self.syntax
 324 2009-11-15T23:03:55  <ThomasWaldmann> such complications can be easily avoided by using '...'
 325 2009-11-15T23:04:25  <eSyr> em, what do you mean?
 326 2009-11-15T23:04:47  <ThomasWaldmann> having to use \"
 327 2009-11-15T23:05:59  <eSyr> oh, yes, i know.
 328 2009-11-15T23:05:59  <ThomasWaldmann> why is it calling _open() for the div? we have a div formatter method.
 329 2009-11-15T23:06:49  <eSyr> well, i'velookedat code nearby and write something similar.
 330 2009-11-15T23:07:09  <eSyr> i'm not good at modifying moin code, and not good programmer at all.
 331 2009-11-15T23:08:50  <eSyr> but it finally works somehow :)
 332 2009-11-15T23:08:52  <ThomasWaldmann> yeah, you're right, some other places in the formatter do it the same way
 333 2009-11-15T23:09:10  <ThomasWaldmann> as long as it is IN the formatter, it doesn't matter that much
 334 2009-11-15T23:11:26  <ThomasWaldmann> dreimark: yes, most people won't know what a lexer is. also, there should be some reference to Pygments in the msg.
 335 2009-11-15T23:11:51  <ThomasWaldmann> because you got to pygments project to ask about missing lexers :)
 336 2009-11-15T23:12:04  <ThomasWaldmann> or you look into their docs about what lexers there are
 337 2009-11-15T23:12:39  <ThomasWaldmann> btw, if we can easily get a list of lexers, maybe we should just display what's supported in that msg.
 338 2009-11-15T23:13:32  <ThomasWaldmann> so that people will see whether they have to use C, c, cpp, cplusplus or c++ :)
 339 2009-11-15T23:14:00  <eSyr> well, i think, there should be place with list of lexers, but not in error message :)
 340 2009-11-15T23:14:14  <eSyr> for example, macro.
 341 2009-11-15T23:14:22  <eSyr> or add it to SystemInfo.
 342 2009-11-15T23:14:27  <ThomasWaldmann> why not?
 343 2009-11-15T23:14:43  <ThomasWaldmann> you won't keep that error msg anyway, but you need to know what to fix.
 344 2009-11-15T23:15:16  <eSyr> because i don't know, which lexers available until i make mistake.
 345 2009-11-15T23:15:36  <ThomasWaldmann> yes. and it either will work then or you'll know. :)
 346 2009-11-15T23:16:41  <eSyr> heh.
 347 2009-11-15T23:17:08  <eSyr> (also, highlight parser should support more lexem types, i think)
 348 2009-11-15T23:17:29  <eSyr> (syntax highlighting of lisp or haskell now is not very good)
 349 2009-11-15T23:17:41  <eSyr> (or i was in1.8...)
 350 2009-11-15T23:18:17  <eSyr> *it
 351 2009-11-15T23:20:27  <dreimark> ThomasWaldmann: i think there are currently 180 lexers or so
 352 2009-11-15T23:20:41  <dreimark> that is a bit long for the msg
 353 2009-11-15T23:21:42  <dreimark> reference to pygments page is good
 354 2009-11-15T23:22:06  <dreimark> or to a page on moin where a macro outputs the current list
 355 2009-11-15T23:22:17  <eSyr> but pugments version used by moin instabce may differ from latest.
 356 2009-11-15T23:22:31  <dreimark> yeah therefore a macro output is better
 357 2009-11-15T23:22:53  * dreimark looks at pyg
 358 2009-11-15T23:22:54  <JosefMeier> ThomasWaldmann: Last try :-) http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/rev/b05a508de19b
 359 2009-11-15T23:23:09  <dreimark> JosefMeier: never say last ...
 360 2009-11-15T23:23:19  <ThomasWaldmann> >>> import pygments.lexers as l
 361 2009-11-15T23:23:28  <ThomasWaldmann> >>> [(i[0], i[1]) for i in l.get_all_lexers()]
 362 2009-11-15T23:23:35  <ThomasWaldmann> -> rather long list
 363 2009-11-15T23:23:52  <JosefMeier> dreimark: :-P
 364 2009-11-15T23:24:09  <JosefMeier> you guys are tough
 365 2009-11-15T23:25:30  <dreimark> ThomasWaldmann: eSyr i think we should have a macro which outputs that on the help page for the highligter
 366 2009-11-15T23:25:42  <dreimark> and then the msg refers to that page
 367 2009-11-15T23:26:06  <eSyr> dreimark, i'm rying to write it
 368 2009-11-15T23:26:20  <eSyr> (and learning about new moin macro sysem)
 369 2009-11-15T23:26:25  <eSyr> *trying
 370 2009-11-15T23:26:58  <dreimark> may be if you create a table use the same colors as in the WikiConfigHelp macro
 371 2009-11-15T23:27:15  <eSyr> ok, i'll try
 372 2009-11-15T23:27:32  <ThomasWaldmann> >>> [i[1] for i in l.get_all_lexers()]
 373 2009-11-15T23:27:46  <ThomasWaldmann> i guess rather these are all the names you can use
 374 2009-11-15T23:28:43  <ThomasWaldmann> yes, maybe a macro is better, for the highlight parser help page (is there any?)
 375 2009-11-15T23:29:11  <eSyr> now it is described on HelpOnParsers
 376 2009-11-15T23:29:26  <eSyr> but it can be on separate subpage maybe
 377 2009-11-15T23:30:14  <ThomasWaldmann> JosefMeier: see 22:22
 378 2009-11-15T23:30:51  <ThomasWaldmann> (and please make sure that this is really needed and not already done by werkzeug)
 379 2009-11-15T23:31:25  <ThomasWaldmann> and please follow PEP8
 380 2009-11-15T23:32:40  <ThomasWaldmann> 26..27 -> pagename[len(scriptname):]
 381 2009-11-15T23:34:46  <ThomasWaldmann> still don't see why you do 40
 382 2009-11-15T23:35:15  <JosefMeier> you don't think that on this place we can have a http:// in the url ?
 383 2009-11-15T23:36:20  <ThomasWaldmann> can you describe in words what you want to do?
 384 2009-11-15T23:37:49  <JosefMeier> I don't want a url link for an object which points to a http link
 385 2009-11-15T23:38:14  <JosefMeier> what if someone writes {{attachment:http://adfadfsdff/test.pdf}} ?
 386 2009-11-15T23:39:31  <JosefMeier> hm ... maybe that never happens
 387 2009-11-15T23:39:37  <JosefMeier> ok. i'll delete the line
 388 2009-11-15T23:40:01  <ThomasWaldmann> maybe you first need to get clear what you really want
 389 2009-11-15T23:40:22  <ThomasWaldmann> http is a protocol we use all the time, so?
 390 2009-11-15T23:40:58  <ThomasWaldmann> but I guess you want to check if it is a same-server path, without http://sameserver, but just /path/...
 391 2009-11-15T23:41:15  <dreimark> btw. did you tried what happens using that syntax?
 392 2009-11-15T23:42:52  <dreimark> it tries to find by the attachment dialog the file on the url
 393 2009-11-15T23:43:04  <dreimark> if that is a wiki it is ok
 394 2009-11-15T23:43:38  <ThomasWaldmann> if you want to do it really safe, you'll have to check for same server.
 395 2009-11-15T23:44:06  <ThomasWaldmann> same server means: either there is no server, or there is the same server we run on.
 396 2009-11-15T23:44:10  <dreimark> {{attachment:http://moinmo.in/WikiSandBox/test.pdf}}
 397 2009-11-15T23:45:25  <JosefMeier> dreimark: I tried that but process_object is not called. So I think there's no need to test for http
 398 2009-11-15T23:45:41  <ThomasWaldmann> not sure whether that is necessary. if we always get back urls without protocol/server, it could be sufficient to check whether it contains a protocol/server component.
 399 2009-11-15T23:46:32  <ThomasWaldmann> maybe this can be done after decode_url?
 400 2009-11-15T23:47:12  <ThomasWaldmann>       49 +                if pagename != "" and targetname != "":
 401 2009-11-15T23:47:21  <ThomasWaldmann> if pagename and targetname:
 402 2009-11-15T23:48:16  <JosefMeier> whats the difference between a variable which is not defined and a variable which is an empty string ?
 403 2009-11-15T23:49:02  <ThomasWaldmann> first will raise an AttributeError when accessed
 404 2009-11-15T23:49:12  <dreimark> I think any of the url_schemas is wrong after attachment:
 405 2009-11-15T23:49:39  <ThomasWaldmann> dreimark: it is, but that's pointless
 406 2009-11-15T23:50:06  <JosefMeier> Ok: http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/rev/ea67e562f629
 407 2009-11-15T23:50:23  <dreimark> i meant it different it may be should not render a link
 408 2009-11-15T23:50:35  <dreimark> if it is used in the page
 409 2009-11-15T23:50:40  <dreimark> for this case
 410 2009-11-15T23:50:44  <JosefMeier> Btw: Do you think the guys at the MediaWiki project are also so eager to have a clean code ;-) ?
 411 2009-11-15T23:51:08  <eSyr> JosefMeier, they write in php, they're not humans
 412 2009-11-15T23:51:13  <JosefMeier> lol
 413 2009-11-15T23:51:20  <JosefMeier> :-)
 414 2009-11-15T23:51:21  <eSyr> >:3
 415 2009-11-15T23:52:01  <ThomasWaldmann> JosefMeier: btw, isn't the script_root there always?
 416 2009-11-15T23:52:07  <JosefMeier> dreimark: In my opinion "attachment" and "http://" break each others meaning
 417 2009-11-15T23:52:07  <dreimark> JosefMeier: i have no idea but i have to work with some peoples code at work which never have let someone review their code
 418 2009-11-15T23:52:52  <JosefMeier> dreimark: I think your reviewing procedures are damn good! Although sometimes it's a little bit frustrating for a python beginner like me ;-)
 419 2009-11-15T23:53:14  <JosefMeier> ThomasWaldmann: Why are you asking about script_root ?
 420 2009-11-15T23:53:29  <ThomasWaldmann> well, you check if it is there and then you remove it
 421 2009-11-15T23:53:37  <ThomasWaldmann> so, when is it NOT there?
 422 2009-11-15T23:54:11  <JosefMeier> don't know. Is it always there ?
 423 2009-11-15T23:54:30  <ThomasWaldmann> you wrote that code, you should know :)
 424 2009-11-15T23:54:34  <JosefMeier> I
 425 2009-11-15T23:54:46  <JosefMeier> am not that specialist. I only talk with my stomach ;-)
 426 2009-11-15T23:54:54  <ThomasWaldmann> I think it is likely always there
 427 2009-11-15T23:55:00  <JosefMeier> ok.
 428 2009-11-15T23:55:13  <ThomasWaldmann> otherwise it would not be an absolute path, leading to funny effects
 429 2009-11-15T23:58:31  <JosefMeier> The code changes get shorter and shorter :-) : http://s15358202.onlinehome-server.info/hg/moin-19-modified-clean-changesets/rev/adb613f73b98
 430 2009-11-15T23:58:33  <ThomasWaldmann> btw, url_decode just parses a query string
 431 2009-11-15T23:58:47  <ThomasWaldmann> that doesn't quite look like what you need there
 432 2009-11-15T23:59:18  <JosefMeier> It's exactly what I need. Cause I only get the query string

MoinMoin: MoinMoinChat/Logs/moin-dev/2009-11-15 (last edited 2009-11-14 23:15:02 by IrcLogImporter)