[Orgmode] Re: Feature request: custom link handlers
Tom Weissmann yahoo.co.uk> writes: > oops! I tried that before and it kept moving me back to the beginning of my > org > file, whereas now it, um, doesn't. Can't see for the egg on my face. In the meantime I discovered `org-add-link-type' which does everything I want except the completions. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Restricting the agenda to the current subtree
On 11/30/07, Rick Moynihan <[EMAIL PROTECTED]> wrote: > > Cool, it sounds like it's going to be good. I can't say I've used the > speedbar much but I look forward to giving it a shot with org-mode > (which is the main reason I use Emacs anyway :-) ) > > My only concern about using the speedbar is that it'll take up more > screen real estate than the equivalent idea using org-goto, as you'll > have the speedbar + the fileview + the agenda on screen. Speedbar will be most useful it you have a number of files you want to drill into and restrict to. If it is only a single file, you can simply do it directly from the file itself. Start from OVERVIEW and drill into the outline, and then restrict the agenda to any sybtree you like. I don't really see what advantage the org-goto interface would give (sorry, I had overlooked this particular suggestion in your initial post)... - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Feature request: custom link handlers
Bastien altern.org> writes: > I find this a bit confusing to use a function that expands an > abbreviation only for its side effects. Yes. It would be nice to be able to add custom link handlers and define completion functions for them :) > But maybe you can just tell your function to return a string: ... > No? oops! I tried that before and it kept moving me back to the beginning of my org file, whereas now it, um, doesn't. Can't see for the egg on my face. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Feature request: custom link handlers
Bastien altern.org> writes: > > I think what you are trying to achieve is better described as a new > > hyperlink mechanism rather than an extension of abbrev links. > > Sorry, should read: "as a new hyperlink type"... Yes. But a cheap alternative is just to let abbrev link functions return nil if they want to. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Feature request: custom link handlers
Tom Weissmann <[EMAIL PROTECTED]> writes: > Tom Weissmann yahoo.co.uk> writes: > >> oops! I tried that before and it kept moving me back to the beginning of my >> org >> file, whereas now it, um, doesn't. Can't see for the egg on my face. > > In the meantime I discovered `org-add-link-type' which does everything I want > except the completions. Yes. Go and read the example about adding link type in the manual, I'm pretty sure it will help you doing what you want. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Feature request: custom link handlers
Bastien <[EMAIL PROTECTED]> writes: >> type, and then have minibuffer completion of all the existing >> bookmarks, but `org-store-link' works fine :) > > I think what you are trying to achieve is better described as a new > hyperlink mechanism rather than an extension of abbrev links. Sorry, should read: "as a new hyperlink type"... -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Feature request: custom link handlers
Tom Weissmann <[EMAIL PROTECTED]> writes: > Bastien altern.org> writes: > >> Are you suggesting to replace "http://www.google.com/search?q=%s"; by a >> function that would handle the text after "::" in a different way than >> `format' is currently doing? > No. > > Here's an example. I sometimes create links to Emacs bookmarks, eg > "bmk:org-mode-tweaks" Thanks for the example. > It would be very cool to do C-c C-l, entry "bmk:" as the bookmark > type, and then have minibuffer completion of all the existing > bookmarks, but `org-store-link' works fine :) I think what you are trying to achieve is better described as a new hyperlink mechanism rather than an extension of abbrev links. Check this: (info "(org)Adding hyperlink types") You can have a new hyperlink facility for bookmarked files. When an a buffer visiting a file, storing a link to this buffer would really store a link to a bookmark, and when visiting a link to a bookmark Emacs will find the bookmark. What do you think? -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Feature request: custom link handlers
Bastien altern.org> writes: > Are you suggesting to replace "http://www.google.com/search?q=%s"; by a > function that would handle the text after "::" in a different way than > `format' is currently doing? No. Here's an example. I sometimes create links to Emacs bookmarks, eg "bmk:org-mode-tweaks" The bmk abbreviation is expanded to a link Org mode understands, by this function: (defun org-link-abbrev-bookmark (bookmark) "Opens a bookmark in another window" (bookmark-jump-other-window bookmark)) - which happens to return nil, NOT a link that Org mode understands, so even though it opens the bookmark I still get an error - essentially because I'm using a function that expands an abbreviation simply for its side effects. If possible I would like Org mode to display a message like "Opening bookmark org-mode-tweaks" instead of "if: Wrong type argument: stringp, nil", which is why I suggested the multiple return value. On the other hand I could return an elisp link and set `org-confirm-elisp-link-function' to nil, to avoid having to confirm every time I clicked one of these links --- The other suggestion I realise doesn't make sense because when you create a link with C-c C-l, the only minibuffer completion is of the link type (file, new, mailto, etc.), not what follows. It would be very cool to do C-c C-l, entry "bmk:" as the bookmark type, and then have minibuffer completion of all the existing bookmarks, but `org-store-link' works fine :) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Feature request: custom link handlers
Tom Weissmann <[EMAIL PROTECTED]> writes: > This is basically a request to be able to create custom link handlers. > > For example, my `org-link-abbrev-alist' is this: > > `(("wiki" . org-link-abbrev-wiki) > ("bmk". org-link-abbrev-bookmark) > ("POA". org-link-abbrev-poa)) > > > Only one of these actually returns a link that Org mode can use: wiki returns > a > url. "bmk" opens a bookmark and "POA" opens another application; neither > return > anything, so using them raises an error message. I'm not sure to understand. For now `org-link-abbrev-alist' looks like: '(("google" . "http://www.google.com/search?q=%s";)) where the cdr of each cell is a formatting string in which %s stand for the text after "::" (or ":"). So for example : [[google::orgmode]] is the abbreviated form of [[http://www.google.com/search?q=orgmode]] Are you suggesting to replace "http://www.google.com/search?q=%s"; by a function that would handle the text after "::" in a different way than `format' is currently doing? I think a step by step example would be useful here. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Bug with org-startup-folded?
Wanrong Lin <[EMAIL PROTECTED]> writes: > (setq org-agenda-file-regexp "\\.org\\'") > (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode)) This is weird. Why don't you simply use this: (add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode)) > By inserting some "message" statements (that is how far I can go on > debugging elisp code) in org-mode function, I found that when I visit a > ".org" file for the fist time, "org-mode" function is not called at all! > But the file does open as an normal org-mode file (with "Org" appearing > in the mode-line), except the text is not folded. This looks also weird. I think your configuration is somehow broken. Does this happen with every .org file? You should check the consistence of the global variables `org-startup-options' `org-startup-folded' *and* of local options in your Org file. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] saveplace
Hi Kevin, Kevin Brubeck Unhammer <[EMAIL PROTECTED]> writes: > What's the best way to make a hook that runs show-entry on finding an > org-mode file, but after the save-place-hook? (Seeing as putting > show-entry in org-mode- hook doesn't work, since save-place goes > afterwards.) Should I just append something to find-file-hook that > runs show-entry iff we're in org-mode? Are you using the save-place feature in Emacs or XEmacs? I've done some searching in Emacs, and I found the right thing to do is to advise the `save-place-find-file-hook' function. Adding show-entry to org-mode-hook won't work because the mode is loaded before save-place find the last saved place. So here it is: (defadvice save-place-find-file-hook (after show-entry activate) "In org-mode, show entry at point if any." (when (org-mode-p) (save-excursion (unless (catch 'no-entry (condition-case nil (not (org-back-to-heading t)) (error (message "No entry to show") (throw 'no-entry t (show-entry) Please tell me if it's working for you. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Feature request: custom link handlers
This is basically a request to be able to create custom link handlers. For example, my `org-link-abbrev-alist' is this: `(("wiki" . org-link-abbrev-wiki) ("bmk". org-link-abbrev-bookmark) ("POA". org-link-abbrev-poa)) Only one of these actually returns a link that Org mode can use: wiki returns a url. "bmk" opens a bookmark and "POA" opens another application; neither return anything, so using them raises an error message. One possibility would be to allow the link abbreviations to return two values: nil and a message. `org-link-abbrev-poa' could then return '(nil "Opening POA XYZ") and Org mode wouldn't fret about not receiving a null link, but simply display the message. Another possibility would be to create a door to add custom link handlers with custom completion - that way one could add bookmark links with minibuffer completion... ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bug fixes available (5.15a)
Hi, I have fixed some of the bugs mentioned in the past few days. The update is version 5.15a, as usually at http:orgmode.org. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Bug with org-startup-folded?
Bastien wrote: Wanrong Lin <[EMAIL PROTECTED]> writes: (setq org-agenda-file-regexp "\\.org\\'") (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode)) This is weird. Why don't you simply use this: (add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode)) I did my way because I want to set org-agenda-file-regexp and consistently use it any place the regexp is needed. By inserting some "message" statements (that is how far I can go on debugging elisp code) in org-mode function, I found that when I visit a ".org" file for the fist time, "org-mode" function is not called at all! But the file does open as an normal org-mode file (with "Org" appearing in the mode-line), except the text is not folded. This looks also weird. I think your configuration is somehow broken. Does this happen with every .org file? You should check the consistence of the global variables `org-startup-options' `org-startup-folded' *and* of local options in your Org file. Yes, this happens with every .org file. My org files have no local options at all, and all those variables you mentioned seem OK to me. The most puzzling thing, as I said before, is if you open a file the second time, the folding works, but not on the same file when opened the first time. Why would first time/second time make a difference on how org-mode behaves? Who is tracking whether the file is opened the first time or not? Scratching my head hard... Wanrong ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Latex Export
Russell Adams <[EMAIL PROTECTED]> writes: > On Fri, Nov 30, 2007 at 07:21:26AM +0100, Giovanni Ridolfi wrote: >> On Thu, Nov 29, 2007 at 09:15:06PM -0600, Russell Adams wrote: >> > >> I think that the Latex-exporter is *not* suited for such complex task. >> I also think that it shouldn't (K.I.S.S.). > > Actually, a basic TOC, sections, tables etc... I think it fits the > bill. I'm moving into Latex because I kept doing an HTML export and > moving that into Word so I could apply more formatting. > > If I can use an option to throw on a header/footer, or specify a > separate document format, that'd do it. Most of the LaTeX code you would insert in Org files will be exported ok. This LaTeX could be LaTeX fragments, or more complex commands. Check `org-latex-entities' for a list of recognized commands. If you want to insert several lines of LaTeX code, put them between these markers: #+BEGIN_LaTeX ... #+END_LaTeX If you want to insert a specific LaTeX header, just define the variable `org-export-latex-header' locally in your Org file. See the Org manual at (info "(org)CSS support") for an example on setting a local variable in Org, and replace `org-export-html-style' by `org-export-latex-header' in this example. If you want to use your own customized LaTeX class then define it in `org-export-latex-classes' and add #+LaTeX_CLASS: myclass as a local option in your Org file. Combining all these should provide a nearly complete environment to write in Org and have a good LaTeX output. It won't catch all the complexity and flexibility of LaTeX (or TeX) but I guess it will be enough as a start ! Actually, we really *lack* a tutorial on the LaTeX export. -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Restricting the agenda to the current subtree
On Nov 28, 2007 12:23 PM, Rick Moynihan <[EMAIL PROTECTED]> wrote: > Carsten Dominik wrote: > > I for one do find this idea useful. Some way to lock all agenda > > commands to the current subtree or file, until this lock is removed > > again. I am not sure if I'd like the agenda to automatically follow > > while I am moving through a file - this would be slow since agenda > > construction does need a finite amount of time. > > Would it necessarily need to be so slow? It seems to me that edits are > pretty much prohibited during an org-goto, so could you not just build > the agenda once for the org-goto session and then filter it to the > subtree? Could that speed it up more, or is it the filtering itself > which is slow? I appreciate this might not be the case, or it might not > be possible to architect the system to support this. Org-mode does not keep an internal structure of the data it contains. Each time information is needed, the original plain text files are scanned. This is the good an bad of plain text files. In principle one could of course make an internal structure, index it in the appropriate ways and then create many different displays fast. But that would require a rewrite of the entire agenda code, and intensive bookkeeping to make sure updates happen when they are needed. Since Org-mode is committed to the plain text format, this is not going to happen. Either way my mentioning of follow was more to indicate the interaction > style and browsable nature it encourages, rather than the instantaneous > nature of it. Pressing a single key to rebuild the agenda view for the > current subtree would be fantastic and probably easier for you to > implement :-) > > > I have also been thinking about using the sidebar engine to display > > something like omnifocus' side bar hierarchy and have mouse clicks > > restrict the agenda stuff to the context. But I guess this is not > > needed since we have an outlining buffer anyway... > > Interesting... It seems that the org-goto idea and your sidebuffer idea > are similar. You're right that it might not be needed, but it seems > that it might be quite nice to render user-defined subtrees in the > sidebar, as a kind of shortcut to current projects or outlines of > concern. You're right that it might not be adding any real > functionality, but I can see that it might make navigating > easier/quicker for some users. One potential problem is that org seems > to encourage outlines to be titles (and consequently they're quite > long). If this were to be browseable in a sidebar you might want > represent them with aliases or shortened names, property drawers would > be an obvious way to implement this. I have tried this, and it actually works reasonably well for me. I will put sidebar support into org-mode, so that you can drill into an org-mode file (one or two levels deep, maybe) directly from the sidebar. I could also have hot keys in the sidebar that will restrict the agenda to the file or subtree the cursor points to. If combined with an immediate update of the agenda (if it is visible), this might get close to what you are looking for. Together with a command in an Org-mode buffer to restrict to the local subtree/file and immediately update the agenda. I think this is going to be *very* nice, thanks for the idea! - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Feature request: custom link handlers
Tom Weissmann <[EMAIL PROTECTED]> writes: > Bastien altern.org> writes: > >> > I think what you are trying to achieve is better described as a new >> > hyperlink mechanism rather than an extension of abbrev links. >> >> Sorry, should read: "as a new hyperlink type"... > > Yes. But a cheap alternative is just to let abbrev link functions > return nil if they want to. I find this a bit confusing to use a function that expands an abbreviation only for its side effects. But maybe you can just tell your function to return a string: (defun org-link-abbrev-bookmark (bookmark) "Opens a bookmark in another window" (progn (bookmark-jump-other-window bookmark) "")) No? -- Bastien ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Restricting the agenda to the current subtree
Carsten Dominik wrote: On Nov 28, 2007 12:23 PM, Rick Moynihan <[EMAIL PROTECTED]> wrote: Carsten Dominik wrote: I for one do find this idea useful. Some way to lock all agenda commands to the current subtree or file, until this lock is removed again. I am not sure if I'd like the agenda to automatically follow while I am moving through a file - this would be slow since agenda construction does need a finite amount of time. Would it necessarily need to be so slow? It seems to me that edits are pretty much prohibited during an org-goto, so could you not just build the agenda once for the org-goto session and then filter it to the subtree? Could that speed it up more, or is it the filtering itself which is slow? I appreciate this might not be the case, or it might not be possible to architect the system to support this. Org-mode does not keep an internal structure of the data it contains. Each time information is needed, the original plain text files are scanned. This is the good an bad of plain text files. In principle one could of course make an internal structure, index it in the appropriate ways and then create many different displays fast. But that would require a rewrite of the entire agenda code, and intensive bookkeeping to make sure updates happen when they are needed. Since Org-mode is committed to the plain text format, this is not going to happen. Either way my mentioning of follow was more to indicate the interaction style and browsable nature it encourages, rather than the instantaneous nature of it. Pressing a single key to rebuild the agenda view for the current subtree would be fantastic and probably easier for you to implement :-) I have also been thinking about using the sidebar engine to display something like omnifocus' side bar hierarchy and have mouse clicks restrict the agenda stuff to the context. But I guess this is not needed since we have an outlining buffer anyway... Interesting... It seems that the org-goto idea and your sidebuffer idea are similar. You're right that it might not be needed, but it seems that it might be quite nice to render user-defined subtrees in the sidebar, as a kind of shortcut to current projects or outlines of concern. You're right that it might not be adding any real functionality, but I can see that it might make navigating easier/quicker for some users. One potential problem is that org seems to encourage outlines to be titles (and consequently they're quite long). If this were to be browseable in a sidebar you might want represent them with aliases or shortened names, property drawers would be an obvious way to implement this. I have tried this, and it actually works reasonably well for me. I will put sidebar support into org-mode, so that you can drill into an org-mode file (one or two levels deep, maybe) directly from the sidebar. I could also have hot keys in the sidebar that will restrict the agenda to the file or subtree the cursor points to. If combined with an immediate update of the agenda (if it is visible), this might get close to what you are looking for. Together with a command in an Org-mode buffer to restrict to the local subtree/file and immediately update the agenda. Cool, it sounds like it's going to be good. I can't say I've used the speedbar much but I look forward to giving it a shot with org-mode (which is the main reason I use Emacs anyway :-) ) My only concern about using the speedbar is that it'll take up more screen real estate than the equivalent idea using org-goto, as you'll have the speedbar + the fileview + the agenda on screen. This is perhaps a concern for me, as I recently got one of the tiny asus eeepc's. I wrote some opinions on it here: http://sourcesmouth.co.uk/blog/Forget-the-Linux-Desktop-it-s-the-Linux-Laptop-that-matters.html It's an awesome machine that works great as a portable note taking device (org-mode and Emacs were the first things I installed). Anyway it's working really well for me but the 7" screen means you don't want much clutter. I think this is going to be *very* nice, thanks for the idea! No probs! Thanks again for org-mode, and being so willing to implement our ideas. R. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-refile hack to show headings
At Thu, 29 Nov 2007 20:22:53 -0500, John Rakestraw wrote: > > and then adapted/adopted by Carsten in org 5.14. However, I found it > difficult sometimes to remember the particular heading to which I > wanted to move the new item -- the auto-complete is helpful, but only > if I can remember just how a heading starts. I have a simple (and Glad you liked my setup. I can't help but recommend using http://www.emacswiki.org/cgi-bin/wiki/Icicles library. In case you never heard of it, icicles is to TAB completion what TAB completion is to typing things manually every time. In my setup (I think this is a default too) TAB does the prefix completion (like Emacs), but Shift-Tab matches the regexp. So when refiling Emacs related entries all I have to do is type is ema and it completes it to "Using Org-mode in Emacs". Regards, Max ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Latex Export
> Actually, we really *lack* a tutorial on the LaTeX export. A tutorial would be fantastic, I'd having issues with even basic customization. Do you have any sample documents you could share? Thanks. -- Russell Adams[EMAIL PROTECTED] PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode