Re: [Zim-wiki] Bugs in git plugin

2013-04-24 Thread Jaap Karssenberg
If I understand correctly you have a notebook in ~/Zim and both ~/
*and ~/Zim are git repositories.
Then you remove the .git of ~/Zim. As a result zim considers ~/Zim
part of the ~/ repository. Correct ?

So far this is not a bug but the intended behavior. For example I
often use zim to maintain documentation of a software project. In that
case my repository is in ~/code/project and the notebook is in
~/code/project/data/manual. When I modify somthing in zim, it should
add those changes to the repository in ~/code/project.

So I disagree that it should only look for a .git in the notebook
folder itself. However I do think it is valid to say that zim should
only add files in the notebook folder itself. (Does git allow git add
-A ~/Zim to only add a subtree ?) In your case this would still have
added the zim notebook to your home ~/.git -- is that what you wanted
?

Regards,

Jaap



On Wed, Apr 24, 2013 at 2:14 AM, Adam Porter a...@alphapapa.net wrote:
 I think I can best explain this by just showing how to reproduce it:

 1.  Make a git repo in ~/Zim
 2.  Turn on the plugin.
 3.  Make some commits to ~/Zim/.git
 4.  Make a git repo in ~ (i.e. ~/.git is where it will be stored).
 5.  Quit Zim.
 6.  Move ~/Zim/.git to /tmp (I had a good reason for doing this which
 is unrelated to this bug)
 7.  Start Zim.
 8.  Watch as Zim runs 'git add -A'.  Git will look up the directory
 tree until it finds ~/.git and will run 'git add -A' there, adding the
 entire home directory to the repository in ~/.git.
 9.  Figure this out by running 'lsof | grep git' to find out why git
 is running and running and running without end.
 10.  Kill git.
 11.  Move /tmp/.git back to ~/Zim
 12.  Do some stuff in Zim.
 13.  Watch git go bonkers again adding everything in the home
 directory to ~/.git.
 14.  Kill git.
 15.  Kill Zim.
 16.  cd ~; git rm --cached blahblah; git rebase -i blahblah; to remove
 all the stuff I didn't want in ~/.git
 17.  Run Zim again, and watch it behave properly, only adding ~/Zim to
 ~/Zim/.git

 So there are two bugs:

 1.  If there is no .git directory in the Zim document root, the plugin
 should not run 'git add -A' or anything else.  It should only give a
 warning or offer to make a new repository.
 2.  The plugin should check for the existence of a .git directory in
 the document root every time it wants to commit anything.  Somehow it
 was running it git in ~ instead of in ~/Zim even after I moved the
 repo back into ~/Zim.  I had to restart Zim to make it use ~/Zim/.git
 again.

 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to : zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] Copy-pasing verbatim text pastes unwanted newline at the end

2013-04-24 Thread Adrian Fita
Hi.

I'm using Zim 0.59 on Windows 7.

So I write some text over multiple lines and then I format it as Verbatim
with CTRL+T. All good so far. The problem I'm experiencing is when I
copy-paste whole lines from the Verbatim formatted text. The pasted text
contains an additional newline character at the end. This is very annoying
(and possibly dangerous) when pasting in a terminal: the newline causes the
pasted text to be run immediately without the possibility of editing it
before.

I think this is a bug, when I copy the text I don't copy the newline at the
end of the line because I don't move the cursor at the beginning of the
next line.

I hope you understood what I mean, it's kind of hard to explain...

Thanks,
-- 
Fita Adrian
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Copy-pasing verbatim text pastes unwanted newline at the end

2013-04-24 Thread andré

Adrian Fita a écrit :

Hi.

I'm using Zim 0.59 on Windows 7.

So I write some text over multiple lines and then I format it as
Verbatim with CTRL+T. All good so far. The problem I'm experiencing is
when I copy-paste whole lines from the Verbatim formatted text. The
pasted text contains an additional newline character at the end. This is
very annoying (and possibly dangerous) when pasting in a terminal: the
newline causes the pasted text to be run immediately without the
possibility of editing it before.

I think this is a bug, when I copy the text I don't copy the newline at
the end of the line because I don't move the cursor at the beginning of
the next line.

I hope you understood what I mean, it's kind of hard to explain...

Thanks,
--
Fita Adrian


When you select, is the last line highlighted to the end of the line ?
If so, you have selected the newline.

To avoid selecting the last newline, when selecting hold the shift key 
and press the left arrow.
The highlight should then terminate at the end of the text instead of 
end of line, indicating that the newline is no longer selected.


Conversely, if you want to ensure that the newline is selected, 
sometimes one must press the right arrow so that the entire line is 
highlighted.


Note that many other applications show the cursor at the beginning of 
the next line when the newline is selected.
Personnally, I think Zim's display is more coherent, although it can be 
confusing at first.


Regards

--
André

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp