On 06/05/14 06:14, Sushant Raikar wrote: > Hi Tommaso, Hi, > I made the patch work, I have uploaded the patch through git, please do check > it out if you get time > > https://gist.github.com/HotSushi/75ed590070e293f1b563 > > Its only specific to Interactive Lyx and does not include chat feature.
Great news :-)! I'll have a look ASAP. > ------------------------------------------------------------------------------------------------------------------------------------------ > > >Be aware of its embedded debugging feature: 'lyx -dbg this,that,whatever' > >will enable debugging >on the terminal of those comma-separated list of > >components. > > How do I debug, lets say I want to track the flow of your patch, how do I do > it? Should I sprinkle some printfs or LYXERRORs or logsyserr() so that I know > whats going on? > I tried doing ' lyx -dbg ' and saw its working, Is there a method to trigger > a debug message? You can try lyx -dbg any that simply dumps all the LYXERR(...) debugging messages. Using "-dbg gui" should give you plenty of messages related to the GUI. However, I'm seeing from the patch that I used for who know what reason LYXERR(Debug::ACTION, ....), so I guess "-dbg action" should give you back those messages. And, if you need to add more, you can try LYXERR(Debug::PICK_ANY_THAT_SEEMS_RELEVANT, ...); > ------------------------------------------------------------------------------------------------------------------------------------------ > > >are you accessing the repo in read-only / anonymous mode, or did you clone > >with your own R/W >access to the gsoc repo ? (Vincent should have granted > >you R/W access, right?) > > I tried |git clone g...@git.lyx.org:lyx <mailto:g...@git.lyx.org:lyx>| > but it was asking for password, when I asked on the mailing list they > told me to instead clone git://git.lyx.org/lyx.git > <http://git.lyx.org/lyx.git> . Which I think is anonymous, Vincent then > asked for my ssh key, which I provided! he said he added the key. > > So how do I push, > I have a branch called patch on which I worked on the patch! btw I think I > created a remote called "gsoc" > > > sushant@sushant-desktop:~/gsoc/lyx$ git branch > compile > interactive > master > * patch > > if i do > sushant@sushant-desktop:~/gsoc/lyx$git push gsoc interactive > will it work? > > but my work is in 'patch' branch. Vincent, can you help here ? > -------------------------------------------------------------------------------------------------------------------------------------------- > How will the pushing work? will it copy all of my branches remotely? > > >you can push to gsoc/interactive: > > git push gsoc interactive > >If you prefer to work in a playground branch, and you also want to share > >that, it should be >possible to create a new one similarly to how I created > >gsoc/interactive: > >|http://wiki.lyx.org/Devel/LyXGit > > | > How will it be useful? > lets say I created a separate playground branch called gsoc/sushant like how > you did. > and say I have multiple local branches ( several I finished working with) > b1 <finished> > b2 <finished> > b3 > so, what can I do with this branches. Does pushing allow me to publish those > branches?like gsoc/sushant/b1 > gsoc/sushant/b2 > > I am basically trying to ask is How do I make my branches (b1,b2) remote, > preferably grouped together (gsoc/sushant) as shown above? and what is the > use of pushing except that it will stay safe and can been made public? Branches are generally useful to try realizing a new feature in a branch, for later merging it with the master. A playground branch may be useful to try out some change to LyX without discarding it afterwards, i.e., you would commit those changes to the playground branch. Later you can cherry-pick that commit from any other branch, if you realize it was useful. Remote branches can be made public, so you can share them with us. You don't need to work on multiple branches. It is sufficient that you work on your own local branch, and that you make it accessible to us (pushing it to a remote) whenever you want to share it. If getting push to the LyX gsoc repo to work is not immediate, we can use github as well. The important thing is get going. > _________________________________________________________________________________ > > I have been going through the code last couple of days, I understood the > patch thoroughly! I have been through the coding rules > 'lyx/development/coding'. Very good start! And, posting your questions and thoughts, as below, is just extremely good... > A simple question: Instead of polling for the incoming lfuns was it not > possible to have a separate listening thread for each remote BufferVIew all > together? Does lyx architecture provide thread functionality? LyX is internally non-threaded when it's about manipulating the internal document model, so that's why the polling: I used sockets without any blocking call! That way, any incoming LFUN can be dispatched within the same thread that dispatches other LFUNs. The outcome of different threads dispatching LFUNs concurrently on the same Buffer might be catastrophic (AFAIK). Threads and processes are used, instead, for external tools that need to convert images and other external material, compile the document with latex et al., etc... Also, there's an experimental Advanced Find & Replace patch of mine somewhere using multiple threads to accelerate the search. > I was thinking of playing with CursorSlice, BufferView, Buffer next, so that > I get their working. Please, detail, I'm curious to hear... > _________________________________________________________________________________ > > P.S. wow! this email turned out big. :-) No prob at all... keep asking pls. T.