Re: [Zim-wiki] 1:1 vs. piped links
On Mon, Dec 14, 2009 at 16:13, 0x zero_...@yahoo.com wrote: M$ Office AutoCorrect/AutoFormat leverages Undo for similar functionality: the autolinking/autoformating is added to the undo list as a separate action from the typing, so that you can just type and press Ctrl+Z to supress the autothings when your don't want them. Currently in zim they are fused: FooBarSPACE turns it into a link when you add the SPACE; Ctrl+Z removes the link but also the SPACE; pressing SPACE again to continue typing restores the link. So maybe we want to adopt the separately-undoable autolinking model? I like this - in fact, I already use that (the format and/or markup going into the undo buffer separately from the text) other editors UPDATE: turns out it already works this way in perl zim, and almost-works in pyzim! pyzim does undo the autolinking separately, but currently places the cursor before the space. So to enter a non-link FooBar , you press: FooBarSPACECtrl+ZRIGHT. Will be fixed. See https://bugs.launchpad.net/zim/+bug/487084 for details. -- Beni Cherniavsky-Paskin c...@users.sf.net ___ 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] 1:1 vs. piped links
I think it should be a switch - a button on the toolbar that toggles the functionality on and off like the read-only toggle. There should be a keystroke for it, too, of course. Sorry, not following. Toggle which functionality? Autolinking on/off? Editing changes link/label? Something else? I'm finding that I'm spending a lot of time going back and removing GUI-generated links (in Zim) - more time doing that, in fact, than I would manually entering links to begin with. What I would like to have (to do, perhaps) with the Zim GUI is what was suggested regarding a checkbox or radio button that will turn the auto-linking associated with CaML case on/off. I am working mostly with software development documentation and notes - /everything/ is CaML case - I don't mind having to hit ^L to make some text into a link. Edit - Preferences - Editing - Autolink CamelCase checkbox! It's there in both perl zim and pyzim. Or do you mean make it accessible from toolbar keystroke so that you can change it frequenly? I would also Like the color coding of broken links tha was suggested, since my common workflow is - type in the literal links (this would be with the option mentioned above turned on), then make another pass through the text creating and editing links. Most wikis have some kind of coding for broken links. Anybody sees a reason we shouldn't follow? In addition to those points, I will add that in most cases the link generation in Zim is find - I like being able to type e.g. Glossary:TCP and get a link that - when I click it will create a page in the Glossary that I can fill in. I just need to be able to disable that functionality to keep e.g. spurious links from being generated when I want to use the literal page-name string instead of the link - if I format the string (e.g. as literal, bold, italic or whatever - that helps, but formatting is often lost, and the links re-generated. Probably this is different topic, though. M$ Office AutoCorrect/AutoFormat leverages Undo for similar functionality: the autolinking/autoformating is added to the undo list as a separate action from the typing, so that you can just type and press Ctrl+Z to supress the autothings when your don't want them. Currently in zim they are fused: FooBarSPACE turns it into a link when you add the SPACE; Ctrl+Z removes the link but also the SPACE; pressing SPACE again to continue typing restores the link. So maybe we want to adopt the separately-undoable autolinking model? It doesn't solve other questions but it does give a one-press way to decide autolinking case-by-case. -- Beni Cherniavsky-Paskin c...@users.sf.net ___ 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] 1:1 vs. piped links
On Mon, Nov 23, 2009 at 13:26, Beni Cherniavsky c...@users.sf.net wrote: 0x zero_...@yahoo.com wrote: In addition to those points, I will add that in most cases the link generation in Zim is find - I like being able to type e.g. Glossary:TCP and get a link that - when I click it will create a page in the Glossary that I can fill in. I just need to be able to disable that functionality to keep e.g. spurious links from being generated when I want to use the literal page-name string instead of the link - if I format the string (e.g. as literal, bold, italic or whatever - that helps, but formatting is often lost, and the links re-generated. Probably this is different topic, though. M$ Office AutoCorrect/AutoFormat leverages Undo for similar functionality: the autolinking/autoformating is added to the undo list as a separate action from the typing, so that you can just type and press Ctrl+Z to supress the autothings when your don't want them. Currently in zim they are fused: FooBarSPACE turns it into a link when you add the SPACE; Ctrl+Z removes the link but also the SPACE; pressing SPACE again to continue typing restores the link. So maybe we want to adopt the separately-undoable autolinking model? It doesn't solve other questions but it does give a one-press way to decide autolinking case-by-case. Correction: in perl zim it already worked the smart way! In pyzim, the actions are fused. I'll file a feature request in the tracker for pyzim. -- Beni Cherniavsky-Paskin c...@users.sf.net ___ 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] 1:1 vs. piped links
On Sun, Nov 15, 2009 at 20:44, Pedro pedro...@gmail.com wrote: DokuWiki for example has both options: [[Link Target]] simple link [[Link Target|Click here]] link with a label This is jsut a possibility, since zim comes with a a GUI rather than being markup-centered, all the links could have the latest format, being up to the user to choose if any part of it should be automagically filled. Just to clarify: I was talking solely about user interface. For the purpose of this discussion, I don't care if the the underlying markup for 1:1 links is [[Link Target]] or [[Link Target|Link Target]]. (Generally, I do prefer the first format, so that the text files are easier to read and edit manually.) And I agree that there must be an option to make the label different from the target. I described the text is the link model because it affords a more intuitive and fluent GUI, to spark discussion about capturing its good qualities in a GUI that does allow text to differ from the link. -- Beni Cherniavsky-Paskin c...@users.sf.net ___ 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] 1:1 vs. piped links
I started to comment to pyzim bug 304605https://bugs.launchpad.net/zim/+bug/304605but I think it warrants a wider discussion. The bug refers to a specific situation: editing an existing link text modifies the target, thus breaking the link. But it reflects a wider usability/discoverability issue: sometimes we want to keep target synced to text, sometimes we don't, and we lack a good interface for both. At the ends of the spectrum, I see 2 self-consistent, UI models: The Text Is The Link: * All links explicitly say where they point to. Nothing is hidden. * Link creation can be as simple as applying a link style to typed text. * Link text can be directly edited to switch the link target. * Downside: there is no way to beautify links to streamline reading. * P.S. This model is easily extended to Tomboy-style autolinking. The Text Is Just A Label: * All links have text separate from target. The user controls link appearance. * Turning text into a link requires a dialog for the target. * Changing the text never updates the target. Beautifying links is easy. * Switching to a different target requires a dialog. The first model is nice but insufficient for many users. The second model is near-optimal when you do need the flexibility, but is cumbersome if you don't. Both can apply to external links (URL vs. label) as well as internal (page name vs. label). Currently pyzim is close to the second and that's annoying - you have to type the same thing twice to create a link! It's interesting to note that Gmail uses the second model (makes sense, mail links are all external with ugly URL). But their interface is more user-friendly than Zim's! Also, they augment it by URL discovery (they automatically turn into 1:1 links). Note that starting with 1:1 links and later beautifying them is a common workflow. I'm not sure how all this should be blended, but here are some tricks/ideas: * Show broken links in red: this makes it obvious when you are breaking/retargetting links. * Don't even show text field in Link dialog, only target. This makes it clear that text is edited by directly editing the page. * Have checkbox or radiobox in Link dialog to toggle 1:1 mode (default on). * Show the 2 link modes in different colors. E.g. blue/red for 1:1 links, green for other links. * While the editing cursor is on a link, it expands to also show the target, e.g. [link|target]. When the cursor leaves the link, it collapses and you see just the text in blue. * While the editing cursor is on a link, a tooltip-like mini-dialog hovers beneath it. This is more discoverable and friendly, though less keyboard-friendly. Gmail does this. * Consider Tomboy autolinking for creating links of the simple 1:1 kind? -- Beni Cherniavsky-Paskin c...@users.sf.net ___ 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] Let's ride the anti-tomboy wave!
On Sun, Jun 28, 2009 at 16:10, Dotan Cohendotanco...@gmail.com wrote: * tomboy doesn't have any feature that zim hasn't (ok, it has one: you can choose text size) Just now noticed an important one: tomboy automatically turns any text that is a name of a note into a link! This removes some flexibility but makes linking much simpler to understand and easier to manage. Could we have it in Zim? * zim has a lot of useful features that tomboy hasn't (subfolders, backlinks, an equation editor, a calendar, a TODO list, embedded images, screen captures, version control) I will try to mention those on Tomboy discussions, of which there are many. The most important one to me: Zim stores your text in plain files with simple format! Tomboy uses XML (a rather clean one) and the files are named like 99de74ca-b790-4094-bbbf-a254cbbadec1.note. -- Beni c...@users.sf.net ___ 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] How to use txt2tags across folders?
On Tue, May 5, 2009 at 22:16, Jaap Karssenberg jaap.karssenb...@gmail.com wrote: untested example script: #!/usr/bin/python import sys dir = sys.argv[1] for root, dirs, files: # The above line should be: for root, dirs, files in os.walk(dir): for file in files: if file.endswith(.t2t): fh = open(root+'/'+file) for i in range(4): fh.readline() # skip 4 lines of headers for line in fh: sys.stdout.write(line) # Mixing readline and for line in fh is AFAIK not recommended # because of internal buffering issues. More reliable: flines = iter(open(root+'/'+file)) for i in range(4): flines.next() # skip 4 lines of headers for line in flines: sys.stdout.write(line) # Or better yet (doesn't assume 4 lines): flines = iter(open(root+'/'+file)) for line if flines: # skip headers if line.strip() == : break for line in flines: sys.stdout.write(line) This script would write all content to the terminal, so you can redirect it into a single file. -- Beni c...@users.sf.net ___ 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