[O] [PATCH] fix typo in org.texi
The attached patch fixes a typo in the documentation. I hope I got the format of the commit message right. Best regards, Jan From 7daa1f794794d515624ab28310db81a0e4099ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Sat, 16 Jun 2012 15:04:43 +0200 Subject: [PATCH] org.texi: fix typo * doc/org.texi (The spreadsheet): fix typo --- doc/org.texi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/org.texi b/doc/org.texi index 28d2a06..e1337c0 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -2706,7 +2706,7 @@ modified in order to still reference the same field. To avoid this from happening, in particular in range references, anchor ranges at the table borders (using @code{@@}, @code{@@}, @code{$}, @code{$}), or at hlines using the @code{@@I} notation. Automatic adaptation of field references does -of cause not happen if you edit the table structure with normal editing +of course not happen if you edit the table structure with normal editing commands---then you must fix the equations yourself. Instead of typing an equation into the field, you may also use the following -- 1.7.10.3
Re: [O] org-capture-template: SCHEDULED: obsolete?
On 11/05/2011 11:35 PM, Marius Hofert wrote: Apparently, the string SCHEDULED: is not required for an entry to appear in agenda view. Hi Marius, the difference between date and SCHEDULED: date is that date will cause the entry to appear in the agenda only on the given day, whereas SCHEDULED: date will also cause the entry to be displayed on the current day if it is scheduled in the past and has not been marked DONE yet. To see what I mean, put the following entries into an agenda file: * Test 1 SCHEDULED: 2011-11-05 Sat * DONE Test 2 SCHEDULED: 2011-11-05 Sat * Test 3 2011-11-05 Sat Because Test 1 it is not marked done, if you refresh your agenda view today, you will see something like this: Sched. 2x: Test 1 Test 2 does not show up because it is marked DONE and Test 3 does not show up because it does not contain the SCHEDULED keyword. (Note that Test 1 will only show up on the agenda view for today and the day it was scheduled for when you look at the agenda view for a day in the past or future, for example by using the weekly or monthly view or going forward/backward with the f and b keys. For more information, please refer to Section 8.3, Deadlines and scheduling, in the Org manual. Hope this helps, Jan
Re: [O] how to both :body-only t and :table-of-contents t
On 09/21/2011 09:40 PM, G. Jay Kerns wrote: In other words, it looks like I am obliged to :body-only t which cuts out header/footer/TOC or I can NOT do :body-only t which will give me the TOC plus a bunch of extra stuff. My question: is it possible to do what I want? Is there some sort of YAML {{ page.toc }} that I'm missing somewhere, or is there some combination of publishing options that I've missed that will export an org file to an HTML file that looks like this: Hi Jay, I faced the same problem about a year ago. See this thread in the mailing list archive: http://thread.gmane.org/gmane.emacs.orgmode/24227 The HTML exporter will refuse to include a TOC if body-only is t; the atom exporter and a send HTML messages with Wanderlust hack relied on that behaviour, which is why this was not changed in the official Org repository. You can either apply the one-line patch I included in the linked thread or ask Ian Barton about his solution using jQuery he mentioned at the end of that thread. HTH, Jan
Re: [O] [WISH] Latex WYSIWYG
On 06/21/2011 02:22 AM, Sebastian Berchtold wrote: Hi, my first post here: So big shout outs to all org-mode hackers. Great Stuff! There is one feature I'd really like to have, but i couldn't find anything that does what i want. I guess it's just a small hack, but with my retarded elisp skills it would take me days to implement it. WYSIWYG Latex is probably not the correct term for this. What i have in mind is more like seeing the formula, while editing the ASCII/Unicode representation. I'll try to explain the idea more detailed. Hi Sebastian, I have attached a quick and dirty hack I wrote in December 2010. It works by updating an image file whenever the formula at point in your Org buffer changes. If that image file is currently open in an image buffer, that buffer is automatically refreshed. If LaTeX reports an error, the image will not be updated, so you have to check if the image updates when you expect it to to avoid syntax errors. See the comments at the top of the file for usage instructions. Unfortunately, due to lack of time and knowledge of org-mode and elisp, this thing likely still has a lot of bugs and is not implemented properly (I guess it should be a minor mode). However, it seems to work in simple cases. Hope this helps, Jan ;; latex-live-preview.el by Jan Böcker jan.boec...@jboecker.de ;; Feel free to improve this. ;; License: Pick one of GNU GPL v3, BSD, MIT ;; This is a quick and dirty hack to show an automatically updated preview image ;; of the LaTeX formula at point in an org-mode buffer. ;; Usage: ;; * Eval the elisp code in this file in some way (e.g. M-x load-file or M-x eval-buffer) ;; * In your org buffer: M-x jb/toggle-latex-live-preview ;; * Split the window (e.g. C-x 2) ;; * open the exported image file (default: /tmp/livepreview.png) in ;; the second buffer ;; * edit your Org file ;; To speed things up slightly, you might want to move the tempdir to a ramdisk. ;; the tempdir will contain the exported image and might be cluttered ;; with temporary files from running LaTeX if something goes wrong (defconst jb/latex-live-preview-tempdir /tmp/) ; must include final / (defconst jb/latex-live-preview-filename livepreview.png) (defvar jb/current-texfilebase ) (defvar jb/current-tmpdir nil) (defvar jb/current-tofile ) (defvar jb/latex-preview-job nil) (defvar jb/enable-live-preview nil) (defun jb/ocfi (string tofile options buffer) Modified version of org-create-formula-image (require 'org-latex) (let* ((tmpdir (if (featurep 'xemacs) (temp-directory) temporary-file-directory)) (texfilebase (make-temp-name (expand-file-name orgtex tmpdir))) (texfile (concat texfilebase .tex)) (dvifile (concat texfilebase .dvi)) (pngfile (concat texfilebase .png)) (fnh (if (featurep 'xemacs) (font-height (get-face-font 'default)) (face-attribute 'default :height nil))) (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0)) (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.)) (fg (or (plist-get options (if buffer :foreground :html-foreground)) Black)) (bg (or (plist-get options (if buffer :background :html-background)) Transparent))) (if (eq fg 'default) (setq fg (org-dvipng-color :foreground))) (if (eq bg 'default) (setq bg (org-dvipng-color :background))) (with-temp-file texfile (insert (org-splice-latex-header org-format-latex-header org-export-latex-default-packages-alist org-export-latex-packages-alist t org-format-latex-header-extra)) (insert \n\\begin{document}\n string \n\\end{document}\n) (require 'org-latex) (org-export-latex-fix-inputenc)) (setq jb/current-texfilebase texfilebase) (setq jb/current-tmpdir tmpdir) (setq jb/current-tofile tofile) (jb/call-latex) )) (defun jb/call-latex () (cd tmpdir) (set-process-sentinel (start-process live-latex-preview-latex ; process name nil ; no buffer latex --halt-on-error (concat jb/current-texfilebase .tex)) 'jb/call-latex-sentinel) ;(message latex-live-preview: started latex) ) (defun jb/call-latex-sentinel (process event) ;(message latex-sentinel: %s event) (when (string= event finished\n) (jb/call-dvipng)) (when (string= event exited abnormally with code 1\n) (setq jb/current-tmpdir nil) (jb/update-latex-preview))) (defun jb/call-dvipng () (let* ((tmpdir jb/current-tmpdir) (buffer nil) (options org-format-latex-options) (texfilebase jb/current-texfilebase) (texfile (concat texfilebase .tex)) (dvifile (concat texfilebase .dvi)) (pngfile (concat texfilebase .png)) (fnh (if (featurep 'xemacs) (font-height (get-face-font 'default)) (face-attribute 'default :height nil))) (scale (or (plist-get options (if buffer :scale :html-scale)) 1.0)) (dpi (number-to-string (* scale (floor (* 0.9 (if buffer fnh 140.)) (fg (or
Re: [Orgmode] Make file:... directory links open dired by default
On 01/24/2011 05:38 AM, Leo Alekseyev wrote: I am working under Windows, and by default links like file:~/path... open in Explorer. I can manually change the link to file+emacs:~/path... and then it opens in dired -- but is there a way to change the default behavior so that when I press C-c C-l to store the directory links as file+emacs to begin with?.. Alternatively, is there a way to make file: links behave like file+emacs? (I'm not sure if this is a good idea since it might impact things other than directories). --Leo Hi Leo, take a look at the variable org-file-apps: M-x customize-variable RET org-file-apps RET Try adding an entry like this: [INS] [DEL] Cons-cell: Choice: [Value Menu] Links to a directory Choice: [Value Menu] Visit with Emacs I have not tested this (since I am not using Org on Windows), but it looks to me like it should work. Regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Elementary: How to return to the main view
On 10/14/2010 03:11 AM, Umesh P N wrote: Hi, From the main view, if I click on a tag, org-mode will show only items with that tag. How to go back to the main view? I just tried it. For me, clicking on the tags of an entry will open an agenda view showing all items from my agenda files which have a superset of the tags of this entry. Org will re-use an existing agenda buffer for this if possible, otherwise it will open a new agenda buffer. You can get back to your Org file by switching buffers (C-x b RET) or killing the agenda buffer (C-x k RET). I am running Org-mode version 7.01trans (release_7.01h.226.ge238a). HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: todos without timestamp in agenda
On 09/14/2010 12:10 PM, henry atting wrote: On Di, Sep 14 2010, Eric S Fraga wrote: On Tue, 14 Sep 2010 08:27:48 +0200, henry atting nsmp...@online.de wrote: When I have some kind of todo items in an *.org file without timestamp they do not show up in the agenda. I can start the agenda with the appropriate shortcut then only these items are diplayed. But if I am already in org-agenda I have to quit then start again with the speacial agenda view. Is there a more comfortable way to simply switch the view when in org-agenda, or let these todo items show up in the first place (e.g. at the bottom of the agenda)? You don't have to quit the current view; simply ask for a new view by C-c a X where X is the particular short-cut. If you have your agenda in a separate frame, that frame will be updated. That simple?, great. I did not find it in the manual... Thanks henry You might also be interested in block agendas (see 10.6.2 Block agenda in the manual) if you want the normal TODO items to show up above or below your normal agenda. I use a custom block agenda to show (in this order): - the normal agenda - the contents of my inbox - normal TODO items tagged URGENT and IMPORTANT - normal TODO items tagged IMPORTANT - normal TODO items tagged URGENT - normal TODO items not tagged URGENT or IMPORTANT HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Embedding images as data: URIs in the HTML exporter (was: MathJax is now the default for HTML math)
On 09/03/2010 05:07 AM, s...@blarg.net wrote: How about doing the same data: URI embedding for images in the HTML exporter? It should be possible to implement it entirely inside Emacs. It would have to be optional, of course. Derek This is certainly possible, the following patch would do this to *every* image. Maybe someone who knows the HTML exporter code better than I do can make it configurable and submit a patch. Bonus points for an extra option which only embeds images smaller than 32 KB to keep it compatible with Internet Explorer. Maybe something like this configuration variable: (defcustom org-export-html-embed-images-as-data-uris 'never Controls if references to inlined images (see `org-export-html-inline-images') are replaced with their contents as a data: URI. Possible values: 'never (default) All images are inlined using normal URL references. 'alwaysEmbed all images as data: URIs. 'up-to-32KBUse data: URIs only for images up to 32 KByte (Internet Explorer does not allow bigger data: URIs) See also: http://en.wikipedia.org/wiki/Data_URI_scheme; :group org-export-html :type (choice (const never) (const always) (const up-to-32KB))) -- Jan --- lisp/org-html.el | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index eecda0d..5e5ec95 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1820,7 +1820,7 @@ lang=\%s\ xml:lang=\%s\ (if org-par-open /p\n ) (if label (format id=\%s\ label) ))) (format img src=\%s\%s / - src + (org-export-html-image-to-data-uri src) (if (string-match \\alt= (or attr )) (concat attr ) (concat attr alt=\ src \))) @@ -1830,6 +1830,16 @@ lang=\%s\ xml:lang=\%s\ (concat \np caption /p) (if org-par-open \np +(defun org-export-html-image-to-data-uri (src) + Load an image file and convert it to a data: URI. +See http://en.wikipedia.org/wiki/Data_URI_scheme; + (with-temp-buffer +(insert-file-contents src) +(base64-encode-region (point-min) (point-max)) +(goto-char 1) +(insert data:;base64,) +(buffer-string))) + (defun org-export-html-get-bibliography () Find bibliography, cut it out and return it. (catch 'exit -- 1.7.0.4 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] mathjax HTML export question
On 08/23/2010 08:12 PM, Erik Iverson wrote: Is there something that I'm missing, or that could be better with a local installation of MathJax? I don't know what reverts to image fonts in Firefox means, but whatever is happening on my export seems to look nice. Hi Erik, when MathJax cannot use its custom math fonts, it replaces each character with a pre-rendered image (I think it has each character available in a handful of different sizes). At normal font sizes, the disadvantages of image fonts are not that noticeable to me (except that math symbols in links appear black instead of blue, because the images are only available in black). The main disadvantage is that font quality degrades when you zoom in. I have not tested if one can notice a difference when printing (theoretically, real fonts will look better, because the printer has a higher resolution). In the context of Static MathJax, the disadvantage is that the script cannot embed image fonts into HTML files, which is why I mentioned this in my email. The change to .htaccess had certainly not happened when I announced Static MathJax, as I used the installation at orgmode.org for testing. Best regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] items not disappearing from agenda once marked done
On 08/19/2010 07:55 AM, Gert van Oss wrote: dear list, I know this is in the FAQ-[1] but I can't get it working. I've started with a new setup not edited by hand. Can someone point me in the right direction to get this working when I do: C-c-a? (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(org-agenda-skip-deadline-if-done t) '(org-agenda-skip-scheduled-if-done t) '(org-agenda-skip-timestamp-if-done t) '(org-agenda-tags-todo-honor-ignore-options t) '(org-agenda-todo-ignore-scheduled t) '(org-agenda-todo-ignore-with-date t)) Thanks for any reply, Gert 1- http://orgmode.org/worg/org-faq.php#scheduled-vs-deadline-vs-timestamp Hi Gert, I just did a test with org-skip-scheduled-if-done here. I set it to t, scheduled a TODO item for today, then marked that DONE from the agenda. It disappeared as soon as I pressed 'r' to rebuild the agenda view. I think that is the intended behaviour, because rebuilding the agenda can be a slow operation. Please give us a small example of what exactly does not work for you: describe what you do, what happens, and what you expect to happen instead. The version of Org-mode you are using would also be useful to know (M-x org-version), in case you have hit a bug. That would greatly help us help you! -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
Static MathJax v0.2 contains org-static-mathjax.el, which integrates it into the Org export process. The comments in that file explain how it can be used. Download it at: http://www.jboecker.de/2010/08/15/staticmathjax.html I have added a note to org-hacks.org in Worg, which should show up when Worg is next exported to HTML on the server. -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
On 08/17/2010 01:01 PM, Carsten Dominik wrote: On Aug 17, 2010, at 12:44 PM, Jan Böcker wrote: Static MathJax v0.2 contains org-static-mathjax.el, which integrates it into the Org export process. The comments in that file explain how it can be used. Download it at: http://www.jboecker.de/2010/08/15/staticmathjax.html I have added a note to org-hacks.org in Worg, which should show up when Worg is next exported to HTML on the server. And, since you made it into a nice little package, I think it could go into the contrib directory as well - if you want, of course. - Carsten Feel free to include it! I guess org-static-mathjax.el should go to contrib/lisp and everything else to contrib/scripts/staticmathjax/ ? Maybe add a pointer to contrib/scripts/staticmathjax/README.org in the comments of the lisp file. -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
On 08/16/2010 10:59 AM, Carsten Dominik wrote: Hi, should something like this go into org itself, or would it be enough to put this up on worg, in org-hacks or so? - Carsten Hi Carsten, Org-hacks sounds like the appropriate place. It is, after all, exactly that: a hack/proof of concept with some useful applications. I'll update worg as soon as I have written an export hook which is configurable on a per-file basis. -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] TODO hooks
On 08/16/2010 02:47 PM, Andrea Crotti wrote: After another time that I forgot something I came up with the same idea. Suppose I live in address X, and whenever I change my address I have to notify Y, Z, W. Now how could I handle this automatically? I would like that, whenever my address changes I get a todo telling me to contact Y, Z, W. Is it possible to do anything like that in org-mode? Maybe with org-babel and elisp, but there should also maybe an elisp-hook on the change of that text... Any idea, other people feelt my same need from time to time? Just make a checklist somewhere: * DONE Notify people of my current address - [X] Y - [X] Z - [X] W When your address changes, change the todo state to TODO and do M-x org-reset-checkbox-state-subtree to uncheck all the boxes. Of course, you still have to remember to do that, but don't have to remember /who/ you have to notify (because you can add to this list whenever you give your address to someone new). If that does not accomplish your goal, please provide more detailed explanation of what Org should do to help you in this situation. -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Help, org-inbuffer-options-extra seems to hate me right now
I am experiencing some strange behavior here right now, but don't know if I have hit a bug or just misunderstood something. When I start Emacs, evaluate the following two forms: (add-to-list 'org-export-inbuffer-options-extra '(StaticMathJax :static-mathjax)) (add-hook 'org-export-html-final-hook '(lambda () (print opt-plist))) and then export this two-line example to HTML: #+StaticMathJax: test * Test the following gets printed to my *Messages* buffer: Exporting... (:latex-image-options nil :exclude-tags (noexport) :select-tags (export) :email j...@pythagoras :author Jan Böcker :auto-postamble t :auto-preamble t :postamble nil :preamble nil :publishing-directory nil :timestamp nil :expand-quoted-html t :html-table-tag table border=\2\ cellspacing=\0\ cellpadding=\6\ rules=\groups\ frame=\hsides\ :xml-declaration ((html . ?xml version=\1.0\ encoding=\%s\?) (php . ?php echo \?xml version=\\\1.0\\\ encoding=\\\%s\\\ ?\; ?)) :html-extension html :inline-images maybe :convert-org-links t :agenda-style :style-extra :style :style-include-scripts t :style-include-default t :table-auto-headline t :tables t :time-stamp-file t :creator-info t :email-info nil :author-info t :timestamps t :fixed-width t :skip-before-1st-heading nil :latex-listings nil :LaTeX-fragments t :TeX-macros t :priority nil :todo-keywords t :tags not-in-toc :drawers nil :footnotes t :special-strings t :sub-superscript t :emphasize t :archived-trees headline :preserve-breaks nil :table-of-contents t :section-number-format (((1 .)) . ) :section-numbers t :headline-levels 3 :customtime nil :description :keywords :language en :link-home :link-up :text nil :macro-date (eval (format-time-string \$1\)) :macro-time (eval (format-time-string \$1\)) :macro-modification-time (eval (format-time-string \$1\ '(19561 23577))) :macro-input-file test.org :title test) There is no :static-mathjax entry in the plist. If I add a #+INFOJS_OPT: line, that value shows up. I am confused -- why does this work for INFOJS_OPT (also an entry in org-inbuffer-options-extra) and not for my new one? Have I overlooked something? -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
I have now published the code used to create the static version: http://www.jboecker.de/2010/08/15/staticmathjax.html Below is a first stab at HTML export integration fresh out of my *scratch* buffer (which lacks the possibility to configure this for each file). -- Jan (defun jb/static-mathjax-hook-installer () adds jb/static-mathjax-process to the local after-save hook (add-hook 'after-save-hook 'jb/static-mathjax-process nil t)) (defun jb/static-mathjax-process () (let ((app-ini-path /home/jan/work/staticmathjax/application.ini) (output-file-name (concat (file-name-sans-extension buffer-file-name) -static.html))) (call-process xulrunner nil nil nil app-ini-path buffer-file-name output-file-name --embed-fonts))) (add-hook 'org-export-html-final-hook 'jb/static-mathjax-hook-installer) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
On 08/14/2010 08:09 AM, Carsten Dominik wrote: From now on, the default settings will use the incredible MathJax library to display math in exported HTML. If you had never turned on LaTeX snipped math publishing, this will now magically work all by itself. Yes, indeed it does! Since I read the announcement this morning, I have been playing with MathJax. I found that when an HTML file on the local hard disk uses MathJax from the web, MathJax reverts to image fonts in Firefox (this is caused by a security feature of Firefox and mentioned in the MathJax FAQ). Using a local MathJax installation in a subdirectory fixes this. Most of my time was spent messing around with XULRunner to load the exported HTML page, wait until MathJax has done its magic, then serialize the result back to XHTML. And replace the file:// URLs pointing to the fonts of my local MathJax installation with data: URIs, thus embedding the fonts within the HTML file itself, just because I can. The result is a single HTML file which does not require JavaScript to be viewed (and incurs no delay while the math is being rendered). However, as no MathJax code is present, the zoom and view source functions of MathJax are not available. I have put an example online. Normal org-mode export using MathJax from orgmode.org: http://www.jboecker.de/2010/08/14/mathjax-example.html Single-file no-javascript version: http://www.jboecker.de/2010/08/14/mathjax-example-nojs.html Internet Explorer will not use the correct font, AFAIK because it only supports the EOT fonts (MathJax uses OTF for other browsers), and in this case also because I embedded the fonts using data: URIs and IE limits the size of data: URIs to 32 KB. In browsers other than Firefox (I tested with Firefox and Opera), the font size and spacing will differ slightly between the two versions. If people are interested, I can try to make the program take the name of a file to operate on as a command line argument, so this could be run as part of an org-mode export process or something. Of course, the embedding of fonts in data: URIs would be optional. I am really, really excited about this change. Using MathJax makes Org-mode a tool without peer for scientific note taking, I believe. It will also drastically improve the quality of printed web pages, because the web pages will not use fixed-resolution images, but scaleable fonts. And don't forget that on modern high resolution displays, it is common to zoom in just to be able to decipher math in images, especially if you want sub- and superscripts to be legible. -- Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] MathJax is now the default for HTML math
On 08/14/2010 10:59 PM, Carsten Dominik wrote: Hi Jan, can you expand a bit on why this is interesting to do? What are the advantages? Thanks! - Carsten Advantages are: - The user is not required to have JavaScript enabled - In some cases, there is a speed advantage, because there is no rendering stage. This is especially noticeable on high-latency connections when the MathJax files are not already cached. - Fonts can be embedded into the HTML file itself, so it feels more 'document-like' (no need to move additional files around) - The approach might be interesting for HTML email, because it would require neither JavaScript nor attachments Of course, there are disadvantages too: - No interactive MathJax features (zoom, view source, switch rendering backend) - no fallback to image fonts (although AFAIK, all current versions of major browsers support CSS3 custom fonts) - slightly different spacing and font sizes in non-Firefox browsers - if fonts are embedded within the HTML file: * IE will not show the correct font (but in my test the formatting was still correct and readable) * The HTML file will be larger (my small example grew by 436 KB). Bandwidth is wasted because the fonts are base64-encoded. I would not recommend this for regular publishing on the web. As long as JavaScript is enabled (as it is in most cases), the disadvantages outweigh the advantages. It might come in handy if you want to send someone a single file (although you can always use PDF for that) or if you want to provide an alternative for users who have JavaScript disabled. Ideally, there would be some sort of graceful degradation, so that users without JavaScript see the non-JS version, but if JavaScript is enabled, the math gets re-rendered and all MathJax features are available. I have not explored the feasibility of that. On 08/14/2010 10:39 PM, Detlef Steuer wrote: Could you post the org file to give dummies like me a head start? Especially the serializing back to HTML? How is it done? I have attached the (very simple) example org file to this email. The first example is the result of exporting this file with C-c C-e h (like Carsten said, it Just Works). The second example is the result of processing the first one with a xulrunner application I hacked together (which is independent of emacs). I'll try to get that application into a publishable form tomorrow (remove hard-coded values, make embedding fonts into the HTML file optional, etc). My aim is to provide an elisp function to be called from an export hook which makes the appropriate call to create the non-JS version. -- Jan * Testing MathJax: $2^4 = 16 \le 16$ \( exp(z) = \sum_{k=0}^\infty \frac{z^k}{k!} \) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Listing todos which have other todos in the subtree in the agenda
I have a projects.org file with entries like this: * PROJECT Find the answer to life, the universe and everything * PROJECT World Domination *** NEXT build Doomsday Device (where PROJECT and NEXT are both defined as todo keywords.) I'd like to define a custom agenda view to get a project list. I tried a TAGS search for '+TODO=PROJECT'. My problem is that the World Domination project is not shown, because the todo is blocked by the build Doomsday Device next action. I tried setting `org-enforce-todo-dependencies' to nil in the local settings for the agenda command, but that did not help. Setting `org-todo-keywords' to '((sequence PROJECT)) also did not help. I'd appreciate any ideas on how to achieve a list of all my projects, regardless of whether they have next actions defined or not. (Simply looking at the projects.org file is not enough, as I plan to make a block agenda which shows projects in groups which have specific tags, i.e. active (untagged) projects first, then those tagged SUSPENDED, then SOMEDAY, then MAYBE.) Thanks in advance, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Listing todos which have other todos in the subtree in the agenda
On 08/13/2010 06:10 PM, David Maus wrote: Jan Böcker wrote: I have a projects.org file with entries like this: * PROJECT Find the answer to life, the universe and everything * PROJECT World Domination *** NEXT build Doomsday Device (where PROJECT and NEXT are both defined as todo keywords.) I'd like to define a custom agenda view to get a project list. I tried a TAGS search for '+TODO=PROJECT'. My problem is that the World Domination project is not shown, because the todo is blocked by the build Doomsday Device next action. I tried setting `org-enforce-todo-dependencies' to nil in the local settings for the agenda command, but that did not help. Setting `org-todo-keywords' to '((sequence PROJECT)) also did not help. I'd appreciate any ideas on how to achieve a list of all my projects, regardless of whether they have next actions defined or not. Bernt's Org Mode - Organize Your Life In Plain Text! (http://doc.norang.ca/org-mode.html) might be a good starting point. Especially - 6 Custom agenda views -and- - 12.2 Project definition and finding stuck projects A simple check in `bh/is-project-p' if the entry has the PROJECT keyword should do the job. HTH, -- David Thanks for the pointer -- although experimenting with custom skip functions did not solve my problem, by reading Bernt's document I discovered speed keys :) It turned out the culprit was `org-agenda-dim-blocked-tasks', which I had set to 'invisible soon after I started using Org-mode. Setting that to nil in the Settings for the entire command set of the block agenda view does what I want. And now that I know about custom skip functions, I can move stuck projects to their own section in the project list. ~ Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How to show done tasks in agenda
On 08/13/2010 10:11 PM, Glasspen wrote: Hi! A question about tasks in agenda-view. How can org-mode show done tasks in agenda-view. Regards /C If you are in the todo list view, there is a line like this at the top: Available with `N r': (0)ALL (1)NEXT (2)AMD (3)WAITING (4)DONE (5)CANCELLED (6)PROJECT (7)COMPLETE In my case, I can press 4 r to show all DONE items. If you are referring to the daily/weekly agenda view: As far as I know, DONE items which have a SCHEDULED or DEADLINE date set are still shown on that date. If you have logging of TODO states enabled (see 5.3 Progress Logging in the manual), you can press v l in the agenda and it shows the log events (a DONE item, even without a SCHEDULED or DEADLINE date set, will be listed on the day it was closed). HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: From todos to tracking
On 08/12/2010 07:35 PM, Andrea Crotti wrote: Bastien bastien.gue...@wikimedia.fr writes: Andrea Crotti andrea.crott...@gmail.com writes: I was wondering if there is something that would be able to convert a org-mode buffer (with todos) to a web page (even static) that resembles a tracking system. I don't mean also the way back (writing from the web page to the org mode) but also one way it would be nice, because TODO in the normal html exportation don't really resembles TODO in a tracking system... Can you be more specific? Something like this http://it.wikipedia.org/wiki/File:Kde-bugtracking-via-bugzilla-firefox-1.0.6-kde-3.4.2-de.png I mean of course we need to give to it many more informations, but at least the state is there, the message also and the number could be generated. Something like org-export-todo-to-tracking could have some variables to set and given a normal page prodouce something like the figure. But maybe it doesn't make sense I'm not sure... I don't know what exactly you want to do, but it sounds like column view could do a large portion of that. In the Org manual, check out the following sections: 7.5.2 Using column view, for how to define what columns you want 7.5.3 Capturing column view, for how to insert a table containing the column view's data into your Org file (which you can then export to html). To export only the column view, you may also be interested in section 12.2, Selective export. If you want to generate a table that contains links to a detailed view for each entry, I guess you need some custom elisp code. Maybe write your own dynamic block function which first calls `org-dblock-write:columnview' to do most of the heavy lifting, then post-processes the output to make an id column into links, and finally calls the export function for every TODO headline and the headline containing the dynamic block (while supplying appropriate file names)? HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] text color + highlight
On 08/11/2010 01:14 AM, Samuel Wales wrote: i suggest begin-end pairs, not putting text in the syntax itself. though you could, if you want, using quotes. $[class begin :title animals]Some text about animals$[class end :title animals] Why not allow both? If I want to highlight one or two words, maybe I could use: $[class :title animals African swallow] Compare this to: $[class begin :title animals]African swallow$[class end :title animals] For a few sentences and to get support for nested formatting, I would definitely want begin-end pairs, too, but if you want to highlight a few words, being able to put text into the syntax itself makes things a lot shorter. As far as I understand it, once a framework for this extensible syntax is in place, it would not be too hard to support both variants. BTW, I really like the idea of having extensible syntax in general; this could also make inline todos a lot less painful. I do not know enough about elisp and Org to help with the implementation, but if someone wants to implement this and needs help with testing, I'd be glad to help. (I wrote my last exam today, so I will have a lot more time to spare until October.) Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Tip: How to copypaste a table from Firefox to Org
Hi all, posting in case this is useful to someone else: I just figured out how to copy paste tabular data from Firefox to an Org buffer (in my case: a train schedule from www.bahn.de). - Select data in Firefox - Paste into Org, select it as the region - M-x replace-regexp RET C-i \ | ^ RET | RET C-i inserts a tab character (you can also use C-q TAB instead). We replace each beginning of a line and each tab character with |. - Place the cursor on the table and press C-c C-c to align it ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Insert TODO or plain heading depending on context
On 08/10/2010 11:41 PM, Nathan Neff wrote: Is there a function in org-mode that returns the TODO status of the heading that the cursor is currently in? Yes, try org-get-todo-state. (Found this using C-h f, typing org, then using I-Search in the completion buffer.) This returns something like this: #(NEXT 0 4 (fontified t org-category #(org-dev 0 7 (fontified t face org-property-value org-category projects)) face org-todo)) or nil if there is no TODO state. This syntax is new to me (elisp noob here), but the elisp reference told me it's just a string with text properties. The following code seems to accomplish your goal: (defun jb/smart-insert-heading () (if (org-get-todo-state) (call-interactively 'org-insert-todo-heading) (call-interactively 'org-insert-heading))) HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Tip: How to copypaste a table from Firefox to Org
On 08/11/2010 03:42 AM, Bernt Hansen wrote: Jan Böcker jan.boec...@jboecker.de writes: Hi all, posting in case this is useful to someone else: I just figured out how to copy paste tabular data from Firefox to an Org buffer (in my case: a train schedule from www.bahn.de). - Select data in Firefox - Paste into Org, select it as the region - M-x replace-regexp RET C-i \ | ^ RET | RET C-i inserts a tab character (you can also use C-q TAB instead). We replace each beginning of a line and each tab character with |. - Place the cursor on the table and press C-c C-c to align it Isn't this the same as - Select data in Firefox - Paste into Org. - C-x C-x (select it as the region) - M-x org-table-convert-region ? -Bernt Yes, it is. I should read the manual more often to discover cool features like that! Btw, org-table-convert-region is also bound to C-c |, which would make the steps: - select data in firefox - C-y C-x C-x C-c | Thanks a lot, Bernt! You see, that's the other reason I posted: I knew if I had overlooked a much faster way, someone would point it out to me :) - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] questions about links
On 08/07/2010 07:00 PM, scraw...@gmail.com wrote: Hi guys, Ok, if I make foo a link: blah blah [[foo]] blah it will pop over to foo elsewhere in the buffer. (This is a tangent, but I see carets in the documentation, like foo , but they don't seem to be needed-- the link finds foo just fine) Can I make [[foo]] link to all the foos in the buffer, maybe via a list with a bit of context from which to choose? Try this one: [[elisp:(occur foo)]] occur is a standard emacs feature which lists all lines matching a given regexp. If you're going to use this, I'd recommend setting org-confirm-elisp-link-function to 'with-y-or-n for less annoyance while still being warned you are about to follow a link that can execute arbitrary code. also, once I'm at the target, how can I return easily to the anchor and refold whatever section the target was in? You can go back to where you came from using C-c : | C-c runs the command org-mark-ring-goto, which is an interactive | Lisp function in `org.el'. | | It is bound to C-c . | | (org-mark-ring-goto optional n) | | Jump to the previous position in the mark ring. | With prefix arg n, jump back that many stored positions. When | called several times in succession, walk through the entire ring. | Org-mode commands jumping to a different position in the current file, | or to another Org-mode file, automatically push the old position | onto the ring. I don't know about refolding the target headline. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How can I add a DONE tag to an org file?
On 08/02/2010 11:47 AM, Water Lin wrote: Here is my two questions: 1. I want to mark an org file as DONE, so I will let me know that the file is finished and doesn't need any change. How can I add this similar tag to the file, or something else. You can use file tags: #+FILETAGS: :DONE: Every headline in the file inherits the file tags. Note that this is completely independent of TODO states. 2. If I want to add some notes about the usage of this org file. How can do it? I just want to remind me to limit the content to the topic. Well, Org files are plain text, so just write it anywhere convenient. If you do not want to see it normally, you might want to put it into a drawer somewhere (also, IIRC drawers are not exported by default), e.g. * some node :FILETOPIC: In this file, I want to keep track of sightings of purple elephants. Green elephants should be recorded somewhere else. :END: Maybe a better question to ask would be where people who do something similar write their notes, and if there are any specific reasons to prefer one place to another? HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Footnote export
On 07/31/2010 08:32 AM, Typhoon wrote: Yes, thanks. I was using f:nil but what I would really like is to disable [1] type footnotes while retaining the [fn:1] style. Nice trick on the zero-space - That would be OK, I suppose, but like you say, a bit tedious after a while. Alright, so we know a way to do what we want (although it is possibly not the most elegant method), but it is a tedious, repetitive task. No worries, that's what computers are for! Add the following to your .emacs: (defun jb/disable-plain-footnotes-hack () (if (plist-get opt-plist :no-plain-footnotes) (save-excursion (goto-char 1) (replace-regexp \\[\\([0-9]+\\)\\] [\u200B\\1] (add-to-list 'org-export-inbuffer-options-extra '(DISABLE_PLAIN_FOOTNOTES :no-plain-footnotes)) (add-hook 'org-export-preprocess-hook 'jb/disable-plain-footnotes-hack) To disable plain footnotes, you can now add a line like this to your Org file: #+DISABLE_PLAIN_FOOTNOTES: some arbitrary text Hope this works and solves your problem for now. Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Footnote export
On 07/31/2010 05:17 AM, Typhoon wrote: I write legal texts and often need to reference case law like this: /Pyke v The Hibernian Bank Limited/ [1950] IR 195 Obviously, I don't want the [1950] to be a footnote. What do I do? Thanks, Alan Hi Alan, you can add the following line: #+OPTIONS: f:nil at the start of your Org file to disable footnotes entirely. For more information, see 12.3 Export Options in the manual. You could also insert the unicode character zero width space after the opening bracket like this: M-x ucs-insert 200B RET That is a handy trick I got from reading this very list some time ago (sorry, I don't remember who had posted that), although I imagine that gets tedious after a while. I do not know if it is possible to disable plain footnotes while still using the [fn:1] syntax. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: tab visibility cycling doesn't work over putty/ssh with viper-mode enabled
On 05/21/2010 11:02 PM, Herbert Sitz wrote: Second, the problem with TAB key in viper-mode does seem specific to PuTTY/ssh, since it works fine when working directly. When you say working directly, I assume you use the GUI interface of emacs. Maybe the problem is not PuTTY-related but caused by running emacs in a tty. Try running emacs -nw in a terminal on the Ubuntu host and check if you can reproduce the behaviour there. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] emacs 23.1 crash on small org file (org-version 6.36)
On 05/21/2010 01:43 AM, Fritz Kunze wrote: MY TASKS -*- mode: org; fill-column: 78; after-save-hook: (archive-done-tasks) -*- If my understanding is correct, archive-done-tasks is evaluated when the file is loaded, which I guess is not your intention. (You want to set after-save-hook to '(archive-done-tasks), not to the result of evaluating (archive-done-tasks)). I can imagine that this causes the crash (maybe org has not been fully initialized for that buffer at this point?). Try quoting (archive-done-tasks) like this: MY TASKS -*- mode: org; fill-column: 78; after-save-hook: '(archive-done-tasks) -*- HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: tab visibility cycling doesn't work over putty/ssh with viper-mode enabled
On 05/20/2010 06:14 AM, Herbert Sitz wrote: Herbert Sitz hsitz at nwlink.com writes: With viper-mode enabled all I get is a bell when I click on tab to cycle the visibility of a heading in viper's normal mode. Hi Herbert, I could not reproduce this here (Ubuntu 10.04 host, Putty on Windows 7). I have no experience with viper-mode and only know very basic vi commands. When viper-mode asked me for a user level, I specified 5. Org-mode version 6.36trans (release_6.36.52.geec2) Visibility cycling with TAB works both in command and insert mode. I can also access the agenda using C-c a a. Looks like putty is misconfigured. While quickly scanning through putty's configuration menu, the only setting I noticed was Connection - Data - Terminal-type string, which is set to xterm here. However, I did not modify the default values, so it should work out of the box. You can try logging in with putty, executing sleep 5, and interrupting that with C-c. If that does not work, the problem is definitely not emacs related. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Hyperlinks capable?
On 05/12/2010 08:07 PM, Bob Paje wrote: Does Org-mode understand Windows shortcuts and Web hyperlinks? Can a simple press of the RETURN key (a la Outlook) open a new window to the shortcut file/folder or the web page, as it may be? bob Org supports hyperlinks to a lot of different things, including web URLs. Take a look at chapter 4, Hyperlinks, in the manual: http://orgmode.org/manual/Hyperlinks.html#Hyperlinks I do not know what exactly you mean by Windows shortcuts. You can link to any file on your hard disk; if you have not told it otherwise, Org will tell Windows to open the file with its associated application. You might also be able to link to an actual windows shortcut (.lnk or .pif files), although I don't think you'd want to that :) HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] one .emacs on multiple computers
On 05/13/2010 03:48 AM, charles snyder wrote: Can I just do something like: (defvar cls-org-file C:/Users/clsnyder/My Documents/My Dropbox/emacs_org/) ;; WINDOWS VERSION (defvar cls-org-file /Users/clsnyder/Dropbox/emacs_org/) ;; IMAC VERSION and then in each of the various .emacs files on each of the machines, just do something like this throughout the file: (add-to-list 'load-path cls-org-file + org-mode6.35i/lisp ) (add-to-list 'load-path cls-org-file + personal.org http://personal.org ) Yes, that approach works. Create a directory for your org-mode configuration in your dropbox directory, say /path/to/dropbox/emacs-config/. Put the contents of your .emacs in, say, emacs-config/init.el. In the .emacs file on each machine, put: (setq cls/config-dir /absolute/path/to/dropbox/emacs-config/) ; note the trailing slash! (load (concat cls/config-dir init.el)) In init.el, set the `custom-file' variable to make the emacs customize interface store its data under the dropbox directory: (setq custom-file (concat cls/config-dir customize.el)) Assuming your org-mode checkout is at emacs-config/org-mode6.35i, use (add-to-list 'load-path (concat cls/config-dir org-mode6.35i/lisp)) (require 'org) ; other org-mode setup stuff If you want to have some machine-specific configuration, there is no need to use different files for different machines -- just check for the hostname. For example, I use org-mode on my laptop and my n900 smartphone, so my startup files include: (setq jb/system (cond ((string-match N900 system-name) 'n900) ((string-match pythagoras system-name) 'laptop) (t 'unknown))) and later I can do: (when (eq jb/system 'n900) (blink-cursor-mode 0)) to disable blink-cursor-mode on the n900 to save battery power. (Emacs idle CPU usage with blink-cursor-mode: 1.5%. Without: 0% :) ) Because the path to your org files is rather long, you also might be interested in this post, where Nathan Neff describes a way to easily define shortcuts to jump to frequently used files/headings: http://article.gmane.org/gmane.emacs.orgmode/25106/ HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [PATCH] org-file-apps docstring: document using regexp group matches as command line parameters, add examples
This is also available via git pull git://github.com/jboecker/org-mode.git for-carsten I tried to document the new behaviour as concise and clear as possible. (If anyone reads this and finds it too confusing in any way, please say so . I introduced the changes, so I know what they do and why, but the docstring has to explain this to people who do not.) While I could not make it any shorter than my first draft, I hope that the clear separation of the three possible interpretations of a string as the file identifier and the short example for each one will allow the reader to quickly find what they need without having to understanding all of the complexity first. Regards, Jan From 98fa677bc979ac9e89826d2b520233a7724a87ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Wed, 12 May 2010 23:15:56 +0200 Subject: [PATCH] org-file-apps docstring: document using regexp group matches as command line parameters, add examples The functionality which this patch documents was originally introduced in commit 75563bf71e6df356a5ae77a93152fcf913378107, then re-written in commit dfda58d720484124f9432a09d831a9d6292908af and the 5 commits before that. --- lisp/org.el | 34 +++--- 1 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 8dc806d..89879c2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1477,9 +1477,37 @@ you can use this variable to set the application for a given file extension. The entries in this list are cons cells where the car identifies files and the cdr the corresponding command. Possible values for the file identifier are - \regex\ Regular expression matched against the file name. For backward - compatibility, this can also be a string with only alphanumeric - characters, which is then interpreted as an extension. + \string\A string as a file identifier can be interpreted in different + ways, depending on its contents: + + - Alphanumeric characters only: + Match links with this file extension. + Example: (\pdf\ . \evince %s\) + to open PDFs with evince. + + - Regular expression: Match links where the + filename matches the regexp. If you want to + use groups here, use shy groups. + + Example: (\\\.x?html\\'\ . \firefox %s\) + (\\\(?:xhtml\\|html\\)\ . \firefox %s\) + to open *.html and *.xhtml with firefox. + + - Regular expression which contains (non-shy) groups: + Match links where the whole link, + including \::\ and anything after that, matches the regexp. + In a custom command string, %1, %2, etc. are replaced with the + parts of the link that were matched by the groups. + For backwards compatibility, if a command string is given that + does not use any of the group matches, this case is handled + identically to the second one (i.e. match against file name only). + + In a custom lisp form, you can access the group matches with + (match-string n link). + + Example: (\\\.pdf::\\(\\d+\\)\\'\ . \evince -p %1 %s\) + to open [[file:document.pdf::5]] with evince at page 5. + `directory' Matches a directory `remote' Matches a remote file, accessible through tramp or efs. Remote files most likely should be visited through Emacs -- 1.7.0.4 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Literate programming
Ivanov Dmitry usr...@gmail.com writes: The tree buffer seems an ideal tool for this project. What is this tree buffer you speak of? Are you telling me that I can already use Org to view the outline Leo-style, with the outline structure (folded to the content startup visibility) in one window and an indirect buffer narrowed to the body text of the current headline in a second window? That would be wonderful! (If not, I would definitely be interested in creating such a feature, but I have no idea where to start.) I had used Leo at the end of high school to make an overview of all the topics I needed to know for the exams. This particular feature has been an entry on my ideas to implement if I ever have infinite time list for some time. Regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Specify page number in hyperlink [to pdf]
On 30.04.2010 10:10, Nick Dokos wrote: Joe Riel j...@san.rr.com wrote: Jan Böcker wrote: A related question; can this extension be used with link abbreviations? I tried #+LINK: sample file:/home/joe/sample.pdf with [[sample::3]] but that does not work. This happens in org-link-expand-abbrev: it splits sample::3 into sample and 3, looks up sample in org-link-abbrev-alist and performs the replacement, then returns the concatenation of that with the 3 part, thereby eliminating the :: marker that would trigger the further processing necessary to open the pdf file at the given page. You could try #+LINK: sample file:/home/joe/sample.pdf::%s This will work with the [[sample::3]] link, but not with [[sample]]. Because org-link-expand-abbrev only swallows up to two colons, this would work (but does look rather silly): [[sample3]] The following will work with [[sample::3]] and [[sample]], but relies on the fact that evince, when asked to display page 0, ignores the invalid page number and just displays page 1 instead: #+LINK: sample file:/home/joe/sample.pdf::0%s Alternatively, you could modify the function to keep the :: marker (at least conditionally: leave it there if it's already there). That would make both of the above work and I think all the examples of section 4.6 would work as well. Here is a very lighly tested patch: [snip] Nick, the only thing I can think of right now that this would break is [[bugzilla::129]] (assuming the settings from manual section 4.6). However, AFAIK this is undocumented behaviour, because the manual does not mention that an extra : between linkword and tag will be silently ignored. I agree that applying your patch would be the way to go (this problem is not related to the extended regex features in org-file-apps; it also happens when linking to a line number in a plain text file). Actually, it's half bugfix half new feature: the bug here is that [[sample:::3]] does not work (one would assume it does from reading the manual), and the feature is that instead of accepting that, the patch requires [[sample::3]] instead. So +1 from me to apply the patch. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Is this the best place for noob questions too?
On 28.04.2010 09:27, Ian Barton wrote: Quite often when browsing the list I find posts that give me ideas of a new way of doing something, or introduce me to some feature I wasn't aware of. Same here, that's one of the reasons I read this list. I guess most of us on this list are still a noob regarding some aspects of Org, simply because they have never needed and used them. I do not remember a single instance of a literal RTFM response on this list. If you do ask a question that is answered in the documentation somewhere, you tend to get a friendly pointer in the right direction. Besides the Org Manual (which I recommend you to skim from cover to cover to get a general idea of what features are available), the mailing list archives, worg, and google, there is also C-h v (describe-variable). A lot of settings cannot be found in the manual, but are described in detail in the docstrings of their variables. Press C-h v org- TAB to get a list of all Org related variables, then switch to the completion window with C-x o and use isearch (C-s) to search for a keyword. For example, if I want to change some aspect of the agenda, I might type C-h v org-agenda- TAB to get a list of all agenda related settings. (I think I found org-agenda-remove-times-when-in-prefix that way.) Best regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Turning on TOC export of timestamps for headlines
On 28.04.2010 02:25, Rick Moynihan wrote: I can't seem to get timestampts to export to HTML as part of the TOC when they're in a headline Hi Rick, customize the variable org-export-remove-timestamps-from-toc. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Specify page number in hyperlink [to pdf]
On 28.04.2010 20:30, Joe Riel wrote: The hyperlink syntax allows specifying a line number, however, that doesn't do anything (other than force the document to be opened inside of emacs) with a non-text file (say a pdf). Is therea an extension to allow specifying a page number so that a link to a pdf is opened at the specified page? There is in the current git version, its not yet documented though. Add an entry to the variable org-file-apps like this: (\\.pdf::\\([0-9]+\\)\\' . evince \%s\ -p %1) Or as seen in the customize interface: Extension: \.pdf::\([0-9]+\)\' Command: evince %s -p %1 The subexpression \([0-9]+\) in the regex captures the page number, which replaces the %1 in the command string. (This example assumes you want to open your PDFs with evince, which accepts a page number after the -p option.) You can then reference a specific page of a PDF like this: [[file:/path/to/document.pdf::42]] I had planned to document this yesterday, but unfortunately spent the better part of the day recovering from a cold. I will send a patch describing how this works, when exactly the new behaviour kicks in and the implications for backwards compatibility as soon as I find time to describe it compactly enough to fit into the docstring. HTH, Jan PS: Here is my first draft of the change to the docstring; it does not mention custom lisp forms yet, and still makes the docstring too long for my taste. I guess I'll write a separate tutorial on worg which I'll reference in the docstring, and include in the docstring only one example of the extended feature and information on backwards compatibility. \regex\ Regular expression matched against the file name. For backward compatibility, this can also be a string with only alphanumeric characters, which is then interpreted as an extension. + + If this regular expression captures parts of the + match using groups (subexpressions), it is matched + against the whole link instead; \%n\ in a + command string will be replaced by the n-th + subexpression match, just like \%s\ is replaced + with the file name. + + For backwards compatibility, this behaviour is not + triggered if the command string does not contain + any \%n\, i.e. in that case the regexp is still + matched against the file name. + + If you want to use groups in your regexp but do not want + it matched against the whole link, use shy groups like this: + \\\(?:txt|html\\)\ ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How to change font size and colors for specified content?
On 26.04.2010 07:21, filebat Mark wrote: Hi friends I am bumped to be asked: how to change font size and colors for specified content, in order to higlight them, like MSword. Can you be more specific? I'd guess that a lot of the people on this list do not use MS Word regularly if at all, so we do not know what exactly you want to do. Do you want to change the font of TODO keywords, etc? Make some words in your text *bold* or /italic/? If you want to temporarily highlight all occurences of a word in a buffer, isearch (C-s) might help you. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Why does org-html.org refuse to export a table of contents when body-only is t?
Hi all, I'd like to add a table of contents to a HTML export with body-only set to t (to feed into jekyll later), but org-html.el automatically disables the TOC when body-only is given. I have used the attached one-line patch without any problems, the (still XHTML strict compliant) result can be seen here: http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html gitk tells me that the line I have changed was first introduced in Release 4.75, so is this just a use case that was not thought of when this was programmed, or is there a specific reason? Curious, Jan From bdd811611e4a3cd637b0bae22e9d574846acddc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Fri, 16 Apr 2010 10:17:49 +0200 Subject: [PATCH] Allow including a table of contents in a body-only export --- lisp/org-html.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 74f3a55..ab1aac2 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -807,7 +807,7 @@ lang=\%s\ xml:lang=\%s\ (if title (insert (format org-export-html-title-format (org-html-expand title)) - (if (and org-export-with-toc (not body-only)) + (if org-export-with-toc (progn (push (format h%d%s/h%d\n org-export-html-toplevel-hlevel -- 1.7.0.3 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Support (or not) for Emacs 21, and XEmacs
On 16.04.2010 12:26, Carsten Dominik wrote: Hi, I have made a test version of Org with the compatibility code for XEmacs and without some of the left-over compatibility code for Emacs 21. I would appreciate if some people could check out the `remove-compatibility-code' branch from repo.or.cz and report back if they experience any problems with Emacs 22, 23, and 24, either during compilation or while running. Done. In case of any problems, I'll report back here (works so far). I am running uncompiled org-mode on two machines (one Arch Linux, one Debian) which both have Emacs 23 installed. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [BUG] org-export confused by :ID: something in elisp source blocks
Hello, I think I discovered a bug in org-export. If you have a headline with an elisp code block containing the following line: :ID: the HTML code will be garbled at the beginning of the headline. I have attached a minimal test case and the resulting HTML file. The #+OPTIONS: line is not needed, but is included to make the HTML file less cluttered. There has to be whitespace between the and :ID: and the string must be ended on the same line. For example, these lines trigger the bug: :ID: :ID: :ID: garble-my-html while these do not: :ID: :ID: garble-my-html :ID: The article I published yesterday demonstrates the bug in a real-world situation -- its just before the jb/filing-remember-hook-function heading, just search for jb/fi in the following page: http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html - Jan Title: export-bug export-bug " id=""">1 Test Node " :ID:" #+OPTIONS: toc:nil author:nil creator:nil timestamp:nil * Test Node #+begin_src emacs-lisp :ID: #+end_src ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] My reference data management approach with org and emacs
I have published a more detailed description of my setup, including the source code, here: http://www.jboecker.de/2010/04/14/general-reference-filing-with-org-mode.html Thanks to Claus and Marcelo for the (off-list) nudge to do this. (It's getting late, so I finally stopped fiddling with the layout and changing phrases.) - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Plans for synching with Emacs dev sources?
On 13.04.2010 22:15, Óscar Fuentes wrote: Currently I'm using 6.33x, which is the version that comes with Emacs dev source code. I'll like to use a more recent version of org-mode, and so I ask if there are plans for upgrading Emacs' org-mode sources with the current release. If not, I'll use org-mode git sources, although this would complicate a bit the deployment across several machines. AFAIK that happens whenever a new major version of emacs is released, which is very infrequently. Even if the next version of emacs would be just around the corner, you'd just find yourself in the situation of using a very outdated version again within a few weeks. However, deployment across several machines can be easy with git. My ~/.emacs.d is a git repository which contains all my emacs configuration and elisp library files. I have added org-mode as a submodule here, so after running git pull git submodule update on another machine, everything is in sync again. I use the org-babel approach to emacs configuration. In my startup.org, the first toplevel subtree contains code that finds out what machine it is running on by looking at the hostname and sets the variable jb/system. I have one toplevel subtree for common configuration and two for settings specific to one of my two machines. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] floating, non scheduled agenda items
On 09.04.2010 22:02, Richard Riley wrote: What would be the best way to include in my daily agenda a section of non schedule items which are there every day until I decide to remove them. e.g Say I have a link to Guitar practise which is a regularly updated url to the page I am at? No specific date, Just something I want to see on my daily agenda Just tag these types of items with a special tag and include all items with that tag into the daily agenda? Possible easily? Exactly. You can create a custom agenda view that lists all TODO items with a specific tag in addition to the normal agenda view. See (info (org) Custom Agenda Views) for details. There is a nice customize interface for custom agenda views, accessible with C-c a C. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] My reference data management approach with org and emacs
[The following text has gotten quite long. Sit comfortably and get a cup of your preferred drink if you want to proceed.] That is an interesting setup you describe there. I had considered something similar myself, but found it a hassle to come up with a file name for every new piece of information (although unix does allow everything except / in a file name, I want my file names to be lower case, short and without spaces where feasible). To paraphrase what you said, putting things into files just makes you loose time thinking about file names (which I also consider structure). In the end, I settled upon one big org file (reference.org). Each piece of reference information is in its own top-level node. When I want to find something there, I use isearch and/or search for a specific tag (in virtually every case, a simple isearch for one or two words is sufficient). This is way faster than navigating the file system! I also share your dislike of categories (which a strictly hierarchical file system would force me to use). I have two remember templates to add an entry to reference.org. The first template asks me for tags (%^g) and a title for the headline. After filing it (at the top of reference.org) with C-c C-c, Org jumps to the location it was just filed (% in the template), in case I want to use C-c C-c again to readjust the tags. I use this first template to keep data that can be expressed in plain text (including all the powerful tools Org gives me to work with plain text, such as outlines, links and tables). The second template is a little more complex; it calls a custom elisp function to do all the work. When I call this second template, I am asked for the following: - a title for the headline - a date (I mostly use this template to file scanned letters, invoices and the like, so it helps to be able to change the date from the default of today.) - a folder name (defaulting to -MM-DD.S, i.e. the previously specified date followed by a sequence number to make the folder name unique). Normally, I do not customize the folder name, because I only need to find the reference data via Org and do not need to navigate to it using e.g. the open dialog of any other program (and I do not want to change it in the future, which might make a folder name containing a date obsolete). - where the original went (defaults to Trash). This is stored as an attribute in the outline node. A new subfolder with the specified folder name is created in ~/org/data/ and set up as this node's attachment directory. The ID of the node is set to data-folder name, so I can link conveniently to this entry from project notes. The custom elisp function also installs a hook that automatically calls org-attach-attach-mv if I try to file the template without having added any attachment, so I do not forget this. I use this second template when I have to attach a file to the entry, because it cannot be represented in Org. This mostly applies to scanned paper of any sort (letters, invoices, etc). I have a shell script which I use to scan directly to PDF files (I do not use OCR, the PDF just serves as a container for possibly multiple scanned pages, so that browsing and printing the whole document is convenient). If it was an important document where I might need the original in the future, I specify Filed when asked where the original went, write the folder name/ID number in the top right corner of the document with a pencil (in case of very important documents or certificates I use a post-it note), and file it on top of a normal paper file folder. When keeping the original, I do not change the folder name from its default. Should I have to dig out the original for any reason, I can manually execute a binary search on my chronologically sorted file folder(s). I have been using this system for a few weeks now, and it has worked great so far. Its main design goal was not simplicity of implementation, but simplicity of use: it has to be so simple (and require as few decisions as possible) to file something that I actually do it instead of postponing it. The system actually evolved along with the aforementioned shell script for scanning while I was scanning and filing about 20 exercise sheets (about four to twelve pages each) from the last semester to access them conveniently when preparing for the exams. I also noticed a while ago that very long org files become less intimidating once you learn to love C-x n s (org-narrow-to-subtree), which helped with my decision for one big file over many small ones. One big file also avoids cluttering the buffer list. - Jan, who really should start a blog to do more detailed write-ups of this and similar things, because they are so much fun to write. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [PATCH] Allow regexps in org-file-apps to capture link parameters using groups
On 05.04.2010 02:33, Luke Amdor wrote: Hi guys, I believe I found one little thing that this patch broke. That is linking to either a text search or heading search in a different org file. I've attached two files which illustrate this. The first file test.org http://test.org contains a link to a heading search of * Hello in the other file (other.org http://other.org). Let me know if you need any more information. Thanks. Luke Hi Luke, this works for me. I saved both files to ~/tmp/, opened test.org, and pressed RET while the cursor was on the link. This brought the cursor to the * One heading in other.org (the link was [[file:other.org::*One][jump to one]] ). ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [Org-mode] Stop exporting u...@hostname to html
On 26.03.2010 04:15, John Hendy wrote: Perhaps a silly question: just wondering if it's possible to stop having this at the bottom of every html file I export: /- | Author: John W. Henderson usern...@hostname mailto:jwhe...@zenwalk | Date: 2010-03-25 21:56:05 CDT | HTML generated by org-mode 6.34trans in emacs 23 \-- I'm all for the date and supporting people knowing this is from org-mode/emacs but I don't really want the username/hostname thingy there. I have Author set via #+AUTHOR. I can't find any reference to host/hostname in the manual and with other google searches. Thanks, John Hi John, that's your email address - at least what org mode guesses it might be, because it does not know. You can set this with #+EMAIL. Unfortunately, from what I gather from (info (org) Export options), there seems to be no way to turn the email address off independently. The manual says: author:turn on/off inclusion of author name/email into exported file So it seems author and email address can only be switched on/off together. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Problems with hyperlinked files
On 24.03.2010 04:45, Leo Alekseyev wrote: Actually, it's right there in section 4.3 of the manual, last sentence: if you need to remove ambiguities about the end of the link, enclose them in angular brackets. Ah, I see -- this seems to be meant for the use case you mention below, pasting in a URL without a description. You do not have to protect spaces, because the URL is surrounded by the square brackets. I could only insert angle brackets into a link by editing it manually; when you edit a link with C-c C-l and enclose the URL in angle brackets, Org will automatically remove them. Thanks, both these methods work -- although I still think it would be nice if org mode could properly handle angle brackets inside square ones; the motivation here is that often I just paste in file paths instead of using C-c C-l, and then I have to use angle brackets to deal w/ spaces; if I later want to change it to an annotated link, it would be nice not to have to strip the angle brackets before wrapping it in square ones... Wouldn't you change it to an annotated link using C-c C-l anyway, which would strip the square brackets for you? (C-c C-l can also edit existing links, not only insert new ones.) I looked at the code of org-open-at-point, and believe I can at least explain the current behaviour (but I have no idea how a clean/elegant fix would look): - Org notices it is in a bracket link, say [[file:~/s b.txt]][test]] - the link variable in org-open-at-point is set to file:~/s b.txt - after expanding the ~ abbreviation, it is set to file:/home/jan/s b.txt - this string is not an absolute path, so it checks if org-link-re-with-space3 matches, which is defined as follows: ?\\(http\\|https\\|ftp\\|mailto\\|file\\|news\\|shell\\|elisp\\|file\\+sys\\|file\\+emacs\\|bbdb\\|bibtex\\|docview\\|gnus\\|info\\|irc\\|mew\\|mhe\\|rmail\\|vm\\|wl\\|id\\):\\([^] ][^ ]*\\) Notice the optional at the beginning? This regexp matches, and captures file as the link type. Now Org takes the rest of the link, /home/jan/a b.txt, and tries to open a non-existing file. I assume angle brackets are not meant to be supported in bracket links, because they are not needed there and are stripped by C-c C-l, but only Carsten would know what the intended behaviour is here. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] 'Double-entry' journals
So... 1.org http://1.org and 2. org will be like this. The problem is that when I export I want the output to look like this: *Timestamp day1 **Activity for project 1 on day 1 here **Activity for project2 on day 1 here *Timestamp day2 **Activity for project 1 on day 2 here **Activity for project2 on day 2 here Try inserting active timestamps into your log entries with C-c . A headline that has one or more active timestamps will appear in the agenda on those days. For more information, see: (info (org) Timestamps) HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Problems with hyperlinked files
On 23.03.2010 10:13, Leo Alekseyev wrote: Hi all, I am unable to open locally linked files if I use angle brackets to protect spaces, like so: [[file:E:\ebooks\math\Probability and statistics\The Elements of Statistical Learning (2nd ed).pdf][Hastie et al]] -- the echo area displays no such file: E:\ebooks\math\Probability and statistics\The Elements of Statistical Learning (2nd ed).pdf note the right angle bracket here. Generally, any file links with angle brackets refuse to open. Is this a known bug?... is there a patch?.. (Org mode 6.31a, emacs 23.1) Hi Leo, I could reproduce this, but I don't know if this is really a bug. (I never heard of protecting spaces with angle brackets.) You do not have to protect spaces, because the URL is surrounded by the square brackets. I could only insert angle brackets into a link by editing it manually; when you edit a link with C-c C-l and enclose the URL in angle brackets, Org will automatically remove them. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How to open pdf file links with evince under linux?..
On 23.03.2010 10:17, Leo Alekseyev wrote: When using org mode under windows, links to local PDF files bring up Acrobat. However, under linux, these links just spawn a new empty buffer in emacs in fundamental mode. How can I make PDF links bring up evince?... As far as I know, Org uses the system defaults when it does not know how to open a file, and when the system does not know, Org opens the file in emacs. Under linux, that system default is the mailcap database, but I have no idea how to configure that. (It doesn't even appear to exist on my system.) But we can tell Org directly what to do with PDF files: take a look at the variable org-file-apps (M-x customize-variable org-file-apps). Each entry in this list consists of (selector, action) pairs where the action tells Org how to open a file, and the selector (in most cases a regular expression matched against the file name) specifies what kind of files to open in this way. Add the following entry: Extension: \.pdf\' Command:evince %s Links to PDF files should now open in evince. If you pull the current git version of Org, you could add a second entry: Extension: \.pdf::\([0-9]+\)\' Command:evince %s -p %1 This would allow you to link to a specific page of a PDF like this: [[file:/path/to/document.pdf::21]] (Shameless plug for a patch of mine that just got accepted.) HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] 'Double-entry' journals
On 19.03.2010 05:52, John Hendy wrote: Hi, I'm quite new to org-mode but am very excited about handling a lot of my current notes/task issues. My current/previous setup: [snip] So, enough rambling. I love the idea of org-mode to handle both aspects in one place as well as all the other magic it can do (keep in mind I'm just learning emacs as well!). Here's the questions: - What solution/file structure would be recommended for the above? --- Namely, I like the idea of daily journal entries so that I work in one file per day (date.org http://date.org) vs. many (proj1.org http://proj1.org, proj2.org...). Is this not the 'org-way' (is it easier to keep a file per project)? Hi John, If I understand you correctly, you edited the daily pages directly and generated the project specific ones automatically from that. The normal Org approach is to go the opposite direction: you edit your project files directly and use the agenda to view tasks (and notes, if you include an active timestamp in them or tell the agenda to show inactive timestamps) by date in daily, weekly or monthly views. --- Can I make something (a headline and the notes below it) a 'double-entry' item? In other words, if I keep the file MainProject.org and tag a bunch of headlines in my journals with MainProject, can I get those items to also appear in MainProject.org without having to add them in both places? As far as I know, org does not support this. You could create an agenda view that displays items tagged with MainProject and put a link to that agenda view into MainProject.org, but I do not know of a way to directly include something. - Are there any other suggestions for how to do something like this? I'm new and open to other better ways. I saw Carsten's presentation (not the Google Tech talk one) and am somewhat against the idea of a huge, long file. I guess if you can collapse it enough it's fine... but it just doesn't feel right. I love my current method of just keeping a journal entry per day and letting my TiddlyWiki code automatically update the project pages accordingly. Starting with a way to replicate that functionality as well as adding in the todos all in one place would hook me on org-mode for sure. I also rejected the idea of one long file until recently, when I realized that you do not have to navigate that huge file manually. Nowadays, I have two big org files: projects.org (actionable things) and reference.org (nonactionable things). In my day-to-day usage, I do some edits (changing TODO state and tags, killing an entry) directly from the agenda; for others, I press ENTER or TAB in the agenda to jump to the entry. I used to have a separate file for each project, because I liked to only see and edit one project at a time, and the agenda also displays the file name before each TODO entry. However, I learned that you can get the benefits of lots of small files with one big file, without having to come up with a file name and adding a new file to org-agenda-files for each project (and ending up with dozens of open buffers): To change the text that the agenda displays before an entry, set the CATEGORY property. To only see and the project you currently care about, use C-x n s (org-narrow-to-subtree); when you want to see the whole file again, use C-x n w (widen). Best regards, John P.S. I was not sure what to search for in order to find out if there was an implementation for this. I read under the manual about linking and did some various searches regarding 'wiki-like' behavior for org-mode (as this felt like what I'm perhaps trying to do), but nothing really seemed to apply to this; mainly, nothing about having two 'snippets' mutually update one another. The general approach in Org seems to be that every piece of information is stored in one place, then you use the agenda to slice and dice it according to your needs. I guess you could keep one chronological journal file and define an agenda view for each project, but it should be much easier to keep each project in a separate subtree (or file), because the chronological agenda view is already there. I took a look at my git repository: I have been using org-mode for about ten months now; the system in its current state is much younger. Try using org for some time, and experience the ability to customize it to your needs. It also helped me a lot to read through the whole manual at least once (without understanding everything), to get a general idea of what is possible. There is also a lot of information to be found on worg or in the archives of this mailing list, and of course in the documentation strings of all those variables. Hope this helps, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] How to turn off highlighting of headers matching tag search (Newbie)
On 13.03.2010 13:41, bar tomas wrote: Hi, I've done a search on tags appearing in my orgmode document. The relevant headers then appear highlighted in yellow in my document. How can I turn this highlighting off? Many thanks. Hi Thomas, that's yet another job for C-c C-c. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Emacs in a Term and Org
On 01.03.2010 05:29, Richard Riley wrote: More often than not I run emacsclient in rxvt under Tmux (a Screen replacement). As a result (and inconveniently) a lot of common key sequences dont work properly - generally involving shift/control/alt and arrow and function keys. Most of the time it doesn't matter as there is always a work around. [snip] Ideas and pointers very welcome. Chapter 14.6 Using Org on a tty in the manual lists, among other things, the following alternative bindings for S-left/right: `S-left' `C-c left' `S-right' `C-c right' HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Emacs in a Term and Org
On 01.03.2010 10:22, Richard Riley wrote: Not really as they still use the arrow keys. I am sorry, my brain must not have been fully functional when I posted this. C-c right is reported as undefined. Possibly someone else can confirm if it works on their setup? I tried it in urxvt and xterm. I use urxvt with screen and just tried this; S-right does not work, but C-c right does. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] tasks with days remaining?
On 25.02.2010 01:30, Brian Brooks wrote: Does a feature exist in org-mode where you can specify a deadline for a particular TODO and org-mode displays the days remaining somewhere next to the task? The feature you are looking for is deadlines; see 8.3 Deadlines and scheduling in the manual. Also, check out the variable org-deadline-warning-days, which defaults to 14. This means that as soon as the deadline is less than two weeks away, it will show up in the agenda (and org-mode will display the number of days remaining). You can change this number globally through the variable. To change it for a single deadline to, say, 70 days: DEADLINE: 2010-02-26 Fr -70d AFAIK, the number of days remaining will only be displayed in the agenda view and there is no feature that displays it in the actual org file. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] listing tasks with no TODO keyword in global TODO list
On 19.02.2010 16:44, Manish wrote: hello! i've been unable to find the variable that controls whether items/tasks with no TODO keyword should be treated like the ones with TODO so they can appear in the global TODO list. can someone please point me in the right direction? thanks Your question seems a bit confusing to me. Headlines without TODO keywords are by definition not a todo item, so they should not appear in the global todo list. You can schedule them or put a deadline on them, and they will appear in the agenda view, but not in the todo list (C-c a t). Please clarify how you distinguish an item/task with no TODO keyword from an ordinary headline used to structure the outline. Also, take a look at custom agenda views. You could define an agenda view that lists the todo list, and additionally includes the results of a search (e.g. all items with a certain tag) below that. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-protocol: non-ASCII characters
On 12.02.2010 23:23, dmg wrote: For evince, I think I have found a problem in the parsing of the link. Evince already encodes the URL, but it does not encode the '/', hence you will get a link like this: emacsclient 'org-protocol://remember://docview/tmp/00%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA.pdf::1' the filename is /tmp/00áéíóú.pdf But emacs incorrectly stops parsing the link after tmp/ I think I have found the proper way to handle this in evince. Check out the attached patch or pull from: git://github.com/jboecker/evince.git This code first retrieves the non-URI-encoded UTF-8 filename and passes that to uri_encode. Should g_file_get_path return NULL, we abort, because the URI specifies something in gnomes VFS layer that has no local path, so the link would not work, anyway. By the way, xournal now supports store-link Works as advertised, thanks! The only problem I have left now is a cosmetic one: when I store a link to, say, /tmp/test.xoj, in Org it becomes file://tmp/test.xoj instead of file:/tmp/test.xoj. (I have patched xournal and evince to generate file: instead of docview: links.) This is because org-protocol-sanitize-uri is called after decoding the string, allegedly because emacsclient compresses multiple slashes in a row to one. However, it seems that this function should be applied /before/ the string is URL-decoded. Is this a bug? From f777bca64fd23066f626bc55cee6a81d6e03dac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Sat, 13 Feb 2010 12:38:39 +0100 Subject: [PATCH 1/2] bugfix in encode_uri: cast to unsigned char to get the correct byte value --- libview/ev-view.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libview/ev-view.c b/libview/ev-view.c index c334fdc..1130d39 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5775,8 +5775,8 @@ static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri) if (k + 4 = bufsize) break; encoded_uri[k++] = '%'; - encoded_uri[k++] = hexa[uri[i] / 16]; - encoded_uri[k++] = hexa[uri[i] % 16]; + encoded_uri[k++] = hexa[(unsigned char)uri[i] / 16]; + encoded_uri[k++] = hexa[(unsigned char)uri[i] % 16]; } } encoded_uri[k] = 0; -- 1.6.6.1 From 1003e7809fbf2823e23b8dc8c7e3b46dfad0bcd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Sat, 13 Feb 2010 12:37:31 +0100 Subject: [PATCH 2/2] URI-encode the utf-8 filename instead of a partially URI-encoded gnome vfs uri --- libview/ev-view.c | 28 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/libview/ev-view.c b/libview/ev-view.c index 1130d39..4fda860 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5800,9 +5800,18 @@ ev_view_annotate (EvView *ev_view, gchar *uri, int page) EvDocumentInfo *p = ev_document_get_info(ev_view-document); + // get the real file path from evince + GFile *gfile = g_file_new_for_uri(uri); + char *filePath = g_file_get_path(gfile); + g_object_unref (gfile); + if (!filePath) { + printf(invalid file path); + return; + } + tempSel = g_malloc(ANN_MAX_BUFFER_LEN); tempFileName = g_malloc(strlen(uri) * 4); - + if (!EV_IS_SELECTION (ev_view-document)) { strcmp(tempSel, ); text = ; @@ -5811,20 +5820,13 @@ ev_view_annotate (EvView *ev_view, gchar *uri, int page) text = get_selected_text (ev_view); encode_uri(tempSel, ANN_MAX_BUFFER_LEN, text); } - /// encode filename -#define ANN_FILE_PREFIX file:// - if (strncmp(uri,ANN_FILE_PREFIX, strlen(ANN_FILE_PREFIX) ) == 0) { - // skip the prefix - encode_uri(tempFileName, - ANN_MAX_BUFFER_LEN, uri+strlen(ANN_FILE_PREFIX)); - } else { - encode_uri(tempFileName, ANN_MAX_BUFFER_LEN, uri); - } - + + encode_uri(tempFileName, ANN_MAX_BUFFER_LEN, filePath); + tempCommandLine = g_malloc(strlen(tempSel) + strlen(tempFileName) + 200); - printf(remember%s%s%s%d\n, p-title, uri, text, page); sprintf(tempCommandLine, emacsclient 'org-protocol://remember://docview:%s::%d', tempFileName, page+1); + printf(remember%s%s%s%d\n, p-title, filePath, text, page); printf(temp: [%s]\n, tempCommandLine); if (!g_spawn_command_line_async (tempCommandLine, error)) { @@ -5836,6 +5838,8 @@ ev_view_annotate (EvView *ev_view, gchar *uri, int page) g_free (tempSel); g_free (tempCommandLine); g_free (tempFileName); + g_free (filePath); + #ifdef fork -- 1.6.6.1 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list.
Re: [Orgmode] Annotations from pdf viewer in Linux ?
On 12.02.2010 18:29, Julien Fantin wrote: I've seen some instructions on seting up org-annotation-helper for adobe acrobat on worg : http://orgmode.org/worg/org-contrib/org-protocol.php#acrobat-reader-setup I'd be very interested in integrating this workflow into my linux configuration. Does anyone know of a pdf viewer that would allow to do use the setup described in the link above ? Check out Daniel M. German's work on integrating evince with Org. He made a patch that adds a Remember menu item. The thread is named patch to support remember in evince. gmane link: http://thread.gmane.org/gmane.emacs.orgmode/21814 HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] agenda display dates
On 10.02.2010 20:13, Brody, William (Buck) wrote: How can I display dates in the agenda without using the “Agenda for current day or week”. I want to use another view because I don’t want my tasks sorted or grouped by dates and I want to be able to see unscheduled tasks. Try creating a custom agenda view which lists all the items you want, then switch the agenda view to column mode with C-c C-x C-c. This displays a SCHEDULED column. I don't know if you can further customize the column view of an agenda buffer. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-protocol: non-ASCII characters
I have been looking around and I am not sure how to solve this problem. Withing Evince and Xournal I am encoding any non alphanum (as defined by the C macro) each byte that is contained in the filename individually. Does anybody know which are the characters above 0 (zero) that need to be encoded for a safe org link? AFAIK, your current approach is correct. I think I figured it out for evince: the file name you get from evince is already URI-encoded. The attached patch fixes the problem for me, but I do not know if it is the right thing to do. I assume that the forward slashes in the file name still have to be encoded so that org-protocol is not confused; the patch disables URI-encoding for percent signs, so that already URI-encoded characters pass through unharmed. - Jan diff --git a/libview/ev-view.c b/libview/ev-view.c index c8145ff..c575831 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -5752,7 +5752,7 @@ ev_view_previous_page (EvView *view) static gint is_unchanged_uri_char(char c) { - return isalnum(c); + return ((c == '%') || isalnum(c)); } static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-protocol: non-ASCII characters
On 06.02.2010 14:50, Jan Böcker wrote: AFAIK, your current approach is correct. I was wrong. The attached patch fixes a bug in the encode_uri function. That fixes the non-ASCII characters problem in xournal for me. The gchar type is just typedef'd to char, which means it is signed. To get the byte value, it must be cast to unsigned int first. - Jan diff --git a/src/xo-misc.c b/src/xo-misc.c index 6f0528c..c2582c7 100644 --- a/src/xo-misc.c +++ b/src/xo-misc.c @@ -2441,8 +2441,8 @@ void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri) if (k + 4 = bufsize) break; encoded_uri[k++] = '%'; - encoded_uri[k++] = hexa[uri[i] / 16]; - encoded_uri[k++] = hexa[uri[i] % 16]; + encoded_uri[k++] = hexa[(unsigned char)uri[i] / 16]; + encoded_uri[k++] = hexa[(unsigned char)uri[i] % 16]; } } encoded_uri[k] = 0; ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org-remember support in xournal
Hi everybody, I am sorry I have been a bit slow to finish the integration of xournal with remember mode. I think I got it working. Hi Daniel, that is great! After learning about org-protocol on worg, I got it working. There seems to be a problem with non-ASCII characters in the file names, though: an ü in the file path arrived in emacs as %0 %)). If the loaded file in xournal is a PDF, the remember link is created to the .pdf file. Otherwise it is created to the .xoj file. In both cases the protocol is docview: emacsclient 'org-protocol://remember://docview:filename::pagenumber Can you add a second menu item (Store Link), which uses 'org-protocol://store-link://docview:filename::pagenumber'? - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] patch to support remember in evince
On 31.01.2010 11:19, D M German wrote: here is a patch to support remember inside evince. http://turingmachine.org/~dmg/temp/0001-Added-support-for-xournal-but-docview-linking-needs-.patch Hi Daniel, sorry for my late reply, I have just caught up with the list again. The patch works for me, but as in your patch for xournal, there is a problem with non-ASCII characters. An ü arrives in emacs as %C3%BC, which are the two URL-encoded bytes which make up the character in UTF-8. I don't know if this one is a bug in org-protocol, though, because AFAIK unix filenames are just a bunch of bytes and evince might not be able to find out what the encoding is supposed to be. I tried to pass the text selection to remember, but it does not work (org-protocol://remember://docview:filename::pagenumber::selection). Looking at the code of org-docview.el I can see that its code does not support splitting the selection. I suspect this is a minor change required. Any suggestions on how to change it? As I already indicated in the Protocol for PDFs thread, I realized that docview: is just a syntax for specialized file: links. Take a look at the following patch I posted to the mailing list two weeks ago: http://thread.gmane.org/gmane.emacs.orgmode/21474 This allows you to define customized file: links. These are some entries from my org-file-apps variable: Extension: \.pdf\' Command: evince %s Extension: \.pdf::\([0-9]+\)\' Command: evince -p %1 $s Extension: \.xoj\' Command: /home/jan/.local/bin/xournal %s Extension: \.xoj::\([0-9]+\)\' Command: /home/jan/.local/bin/xournal -p %1 %s This allows me to link to PDFs and Xournal files using normal file: links, both with and without page numbers. You could easily define a custom regexp which captures the page number and the selection with groups, then uses them in a command as %1 and %2. You can also use the groups in custom lisp forms, like this: Extension: \.pdf::\(.*\)::\(.*\)\' Lisp form: (progn (message (concat Page Number: (match-string 1 link))) (message (concat Selection: (match-string 2 link))) (message (concat File Name: file))) HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] org file containing different local variables
On 22.01.2010 17:17, henry atting wrote: An org file (it contains an explanation on using emacs distraction free for writing) lists on some places LaTeX Local Variables, eg: %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: From then on Emacs does not open this file in org-mode but in latex-mode. Neiter setting Local Variables at the end to org (mode) does not change this behaviour nor if set at the beginning of the file. How about changing the Local Variables: line such that it looks slightly different to emacs, but means the same to LaTeX? Would changing that line to %%% Local\ Variables: solve your problem? HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: [PATCH] added a new modeline face for tasks which have overrun their effort estimate
On 20.01.2010 06:22, Richard Riley wrote: I believe I now have a repo set up that can be pulled from. Not sure if its done the correct way since I didnt clone org-mode. Rather I pushed my clone master and then the overrun branch. I *think* that should be ok. Anyway, the URL is http://repo.or.cz/w/rgr-org-mode.git and the branch with patch is called overrun. That is the URL to the web interface, which cannot be pulled from. The correct URL to clone/pull from is: git://repo.or.cz/rgr-org-mode.git Sorry about the octopus at the head of overrun - you will note that I didnt set my email properly and all hell broke loose as I tried to reset the head and The cool thing about git is that it lets you fix this :) I see that you have committed the same patch three times with a different email address and/or commit message. What you want to do is to delete two of these commits. Enter git rebase --interactive, which allows you to rewrite history. Let's do this on a new branch, because rewriting history that others have already pulled can break things for them: $ git checkout overrun $ git checkout -b overrun-fixed We want to modify HEAD and the two commits before that: $ git rebase -i HEAD~2 You are now dropped into a text editor. Each line in the file you edit represents one commit. To drop a commit, simply delete the line (or comment it out). I assume that you want to keep commit 34b13cb... with the gmail address, so you would comment out the other two lines: # pick 09f2e0e added a new modeline face for tasks which have... pick 34b13cb added new face for task modeline clock for when... # pick da65d04 added a new modeline face for tasks which have... Then save the file and exit the editor. If everything succeeded, git rebase should say: Successfully rebased and updated refs/heads/overrun-fixed. Start gitk and take a look at your new, tidy overrun-fixed branch. If something goes wrong, you can abort the rebase with: $ git rebase --abort I cannot comment on the patch itself, as I am new to elisp myself and have never done anything with faces or mode-lines. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [PATCH] org-narrow-to-subtree: prevent prepending text to the next headline while narrowed
Consider the following situation: * A Some text. * B - Place the cursor on A, press C-x n w (org-narrow-to-subtree). - Go to the very end of the buffer and insert xyz. - C-x n w (widen). You end up with: * A Some Text xyz* B The attached one-line patch fixes this by passing `nil' for the `to-heading' parameter of `org-end-of-subtree'. From 688a42315caf5840c9db5ab957670c33d1921e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6cker?= jan.boec...@jboecker.de Date: Mon, 18 Jan 2010 11:54:00 +0100 Subject: [PATCH] org-narrow-to-subtree: prevent prepending text to the next headline while narrowed --- lisp/ChangeLog |6 ++ lisp/org.el|2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b85a716..cb6ebe9 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-01-18 Jan Böcker jan.boec...@jboecker.de + + * org.el (org-narrow-to-subtree): Position the end of the narrowed + region before the line with the next heading, to prevent the user + from prepending text to the next headline. + 2010-01-18 Carsten Dominik carsten.domi...@gmail.com * org-ctags.el (org-ctags-enable): Change order of functions. diff --git a/lisp/org.el b/lisp/org.el index 626720f..a4755a2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6829,7 +6829,7 @@ If yes, remember the marker and the distance to BEG. (save-match-data (narrow-to-region (progn (org-back-to-heading t) (point)) - (progn (org-end-of-subtree t t) (point)) + (progn (org-end-of-subtree t nil) (point)) (defun org-clone-subtree-with-time-shift (n optional shift) Clone the task (subtree) at point N times. -- 1.6.6 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Removing footnotes
The F[9] above is interpreted as a Foot Note by org. Is there a way to prevent it? Take a look at section 12.2 - Export Options in the Org manual. The one you want is: #+OPTIONS: f:nil HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Repeater Options
On 17.01.2010 21:31, Nick Parker wrote: Is there a way to specify a todo item that is scheduled to repeat on the 3rd Thursday of the month? I tried to use +1m, however that does not work the same way. Any suggestions? For more complex repeaters like that, you need to use a diary sexp like this: %%(diary-float t 4 3 The 4 specifies the 4th day of the week (0 = Sunday through 6 = Saturday). The 3 specifies the first Thursday. This is adapted from an example in the Org documentation; refer to Diary-style sexp entries under 8.1 Timestamps, deadlines and scheduling. I have an entry in my Org files which has two of these, to show up on both the second and the fourth Tuesday of every month. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Repeater Options
On 17.01.2010 22:39, Jan Böcker wrote: %%(diary-float t 4 3 ^ oops, missed a paren there. This should be %%(diary-float t 4 3) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Putting in bold some letters of a word
On 18.01.2010 00:05, Sébastien Vauban wrote: I've tried the following: --8---cut here---start-8--- Es *A*\~lfonso. Es *B*\,enito. Es *C*\{\}armen. Es *C*hago. --8---cut here---end---8--- [snip] I guess it's possible to change some variable in order to let Org recognize the bold parametrization. Play around with the variable org-emphasis-regex-components. For example, try changing Allowed chars in post from - .,:!?;'\)}\\ to a-z-.,:!?;'\)}\\. If you want to know the regex Org constructs from this variable and org-emphasis-alist: M-: org-emph-re RET Is it bad doing so? I don't know, but I guess if there is a customization option, it is intended to be customizable :) If yes, I guess I can BIND the var just to do that in *that* document? There seems to be a general feature of Emacs that lets you do that: http://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [PATCH] Allow regexps in org-file-apps to capture link parameters using groups
What is this? = This patch changes the way extension regexps in `org-file-apps' are handled. Instead of against the file name, the regexps are now matched against the whole link, and you can use grouping to extract link parameters which you can then use in a command string to be executed. For example, to allow linking to PDF files using the syntax file:/doc.pdf::page number, you can add the following entry to org-file-apps: Extension: \.pdf::\([0-9]+\)\' Command: evince %s -p %1 In a command string to be executed, the parameters can be referenced using %1, %2, etc. Lisp forms can access them using (string-match n link). Where to get it? Either apply the patch by hand or git pull git://github.com/jboecker/org-mode.git org-file-apps-parameters What's next? / Feedback === - Find the bugs. Since this messes with links, a central concept of Org, I probably have missed some edge cases; so please test this and report if it works for you. I also appreciate any feedback on code quality or the design decisions made. I am learning elisp along the way, so you may be able to write some changes in a more idiomatic and/or elegant way. - Add a mechanism for org-mode modules to add default values to org-file-apps, similar to the variables org-file-apps-defaults-*. This could be used by modules to define their own extensions to the syntax of file: links. - Modify org-docview.el to use this and deprecate the docview: link syntax. What does it (intentionally) break? === This patch introduces a backwards-incompatible change. If LINE or SEARCH is given, the file is no longer guaranteed to open in emacs: if IN-EMACS is nil and an entry in org-file-apps matches, that takes precedence. A grep of the lisp/ and contrib/ directories showed that no code in the org-mode distribution was relying on this behaviour; whereever LINE or SEARCH is given, IN-EMACS is also set to t. I decided against adding an additional parameter because that would be redundant; the original link as seen by org-open-at-point can be reconstructed from PATH, LINE and SEARCH. I am not that sure if this is the right way to do this, but it seems to break as little as possible while hopefully avoiding to add too much complexity. --- lisp/ChangeLog | 10 ++ lisp/org.el| 56 +--- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3f46f3c..c4605bd 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2010-01-16 Jan Böcker jan.boec...@jboecker.de + + * org.el (org-open-file): Allow regular expressions in + org-file-apps to capture link parameters using groups. In a + command string to be executed, the parameters can be referenced + using %1, %2, etc. Lisp forms can access them using + (string-match n link). + (org-apps-regexp-alist): Adopt the created regexp, as this is now + matched against a file: link instead of the file name. + 2010-01-16 Carsten Dominik carsten.domi...@gmail.com * org.el (org-link-unescape, org-link-escape): Only use hexlify if diff --git a/lisp/org.el b/lisp/org.el index ee81c4d..2351419 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1463,7 +1463,7 @@ you can use this variable to set the application for a given file extension. The entries in this list are cons cells where the car identifies files and the cdr the corresponding command. Possible values for the file identifier are - \regex\ Regular expression matched against the file name. For backward + \regex\ Regular expression matched against the file: link. For backward compatibility, this can also be a string with only alphanumeric characters, which is then interpreted as an extension. `directory' Matches a directory @@ -1494,9 +1494,13 @@ Possible values for the command are: does define this command, but you can overrule/replace it here. stringA command to be executed by a shell; %s will be replaced - by the path to the file. + by the path to the file. If the file identifier is a regex, + %n will be replaced by the match of the nth subexpression (group). sexp A Lisp form which will be evaluated. The file path will - be available in the Lisp variable `file'. + be available in the Lisp variable `file', the link itself + in the Lisp variable `link'. If the file identifier is a regex, + the original match data will be restored, so subexpression matches + are accessible using (match-string n link). For more examples, see the system specific constants `org-file-apps-defaults-macosx' `org-file-apps-defaults-windowsnt' @@ -8935,10 +8939,12 @@ With a double C-c C-u prefix arg, Org tries
Re: [Orgmode] RFC: Syntax for page numbers in file: links?
On 06.01.2010 10:05, Carsten Dominik wrote: Would you like to work on a patch that allows interpreting page numbers for external applications? I'll definitely take a stab at it and see how far I get while learning more about elisp along the way. I will post to the mailing list if I make significant progress or give up. - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] RFC: Syntax for page numbers in file: links?
I am not sure if it makes sense to handle more that a page number, really. I have thought about this again and concluded that the approach in my first post is, indeed, over-engineered. I also believe the approach proposed in this post to be flexible enough to handle some extensions. On 05.01.2010 13:32, Carsten Dominik wrote: I have yesterday implemented modifies for file link: file+sys: now forces opening a file with the system's open command file+emacs: forces opening in Emacs. I guess it would make sense to make more of these, so that one could select a specific viewer for selected files, what do you think? The method of opening a file should not be specified in the link itself, unless it makes sense to change it for an individual link. Imagine two users exchanging org files, where one likes to open PDFs with evince and the other prefers doc-view-mode. However, this would be useful for links to file types which org-mode does not know anything about; the user would not have to tell org-mode about them by modifying org-file-apps first. Maybe this should not force the opening method, but provide the default if org-file-apps has nothing to say? - org-file-apps should allow to specify how to pass a page number to an external program. Unlike the file name, this is an optional argument, as a link may not specify a page number at all. I do not know how to do this in an elegant way, maybe let the user specify multiple entries - one for links with a page number, one for links without. This is not easy at all, but I am sure it can be done. org-file-apps already allows matching regular expressions against the file name. I propose the following changes: - match the regular expressions against the whole link - if the matching regex used grouping, in addition to replacing %s with the file name in a command string, replace %1 with the first match, %2 with the second, etc. - if the org-file-apps entry specifies a lisp form to be evaluated, make the group matches available to the lisp form being evaluated. - org-docview.el would only handle org-store-link functionality and generate links such as file:path::page. With these changes, the following sample entries in org-file-apps could then specify the method of how to open links to PDF files with and without page number specifications. Open PDFs in evince: regex: \.pdf\' command:evince %s regex: \.pdf::\(\d+\)\' command:evince %s -p %1 Open PDFs in doc-view-mode: regex: \.pdf\' visit in emacs regex: \.pdf::\(\d+\)\' lisp form: (progn (org-open-file file 1) (docview-goto-page (match-string 1 link))) The lisp form in the last entry could go into org-docview.el as a convenience function. We would also need a way for org-docview.el to supply default entries for org-file-apps, maybe a variable org-file-apps-defaults-alist or something. AFAIK, this approach would be backwards-compatible with current org-file-apps entries, which typically match an extension at the end of the string and specify a command to open the file with, which gets passed the file name via %s. If the link specifies arguments, the current entries would no longer match, but they cannot handle arguments anyway. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] protocol for PDFs?
On 02.01.2010 16:20, Darlan Cavalcante Moreira wrote: Evince also has an option (-p) to open the file in a given page and this would be enough for a link to a PDF file. Since I prefer using Evince instead of docview mode I would be very happy to test it. I have implemented an experimental version of org-docview.el which allows you to specify an external PDF viewer. Check out the docview-dev branch at http://github.com/jboecker/org-mode To test this, pull from there or apply the following patch, then: M-x customize-variable org-docview-pdf-app Set it to evince %s -p %p and docview: links to PDF files should now open in evince. There may still be bugs lurking here, and I am thinking about generalizing this to use a variable org-docview-apps which would behave like org-file-apps. This would duplicate functionality of file: links again, which bugs me, but on the other hand it would be difficult to reuse org-file-apps for this, as I suggested in my previous email -- when opening a file: link to a PDF, the %p would not get replaced and may confuse the PDF viewer application :( Also, YAGNI may apply here if nobody uses docview: links to link to non-PDF files anyway. --- new experimental variable: org-docview-pdf-app External application to open docview: links pointing to a pdf file. Possible values: 'emacs:Visit the file with emacs using doc-view-mode. string:An external PDF viewer application. %s will be replaced by the file name. %p will be replaced by the page number. Example: evince %s -p %p --- lisp/org-docview.el | 39 ++- 1 files changed, 34 insertions(+), 5 deletions(-) diff --git a/lisp/org-docview.el b/lisp/org-docview.el index 98da615..f2d0bf2 100644 --- a/lisp/org-docview.el +++ b/lisp/org-docview.el @@ -53,14 +53,43 @@ (org-add-link-type docview 'org-docview-open) (add-hook 'org-store-link-functions 'org-docview-store-link) +(defcustom org-docview-pdf-app + 'emacs + External application to open docview: links pointing to a pdf file. +Possible values: + +'emacs:Visit the file with emacs using doc-view-mode. +string:An external PDF viewer application. + %s will be replaced by the file name. + %p will be replaced by the page number. + + Example: + evince %s -p %p + :group 'org-link-follow + :type '(choice (const :tag Visit with Emacs emacs) +(string :tag Command))) + (defun org-docview-open (link) (when (string-match \\(.*\\)::\\([0-9]+\\)$ link) (let* ((path (match-string 1 link)) - (page (string-to-number (match-string 2 link - (org-open-file path 1) ;; let org-mode open the file (in-emacs = 1) - ;; to ensure org-link-frame-setup is respected - (doc-view-goto-page page) - ))) + (page-string (match-string 2 link)) + (page (string-to-number page-string))) + + (if (and (not (eq org-docview-pdf-app 'emacs)) + (string-match \.pdf$ path)) + (let ((cmd (with-temp-buffer + (insert org-docview-pdf-app) + (goto-char 1) + (replace-string %s path) + (goto-char 1) + (replace-string %p page-string) + (buffer-string + (message cmd) + (start-process-shell-command cmd nil cmd)) + + (org-open-file path 1) ;; let org-mode open the file (in-emacs = 1) + ;; to ensure org-link-frame-setup is respected + (doc-view-goto-page page) (defun org-docview-store-link () Store a link to a docview buffer -- 1.6.6 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] RFC: Syntax for page numbers in file: links?
Hello List, During the discussion in the protocol for PDFs? thread, I realized that docview: links are an almost exact copy of file: links, the only single difference being that file: takes a line number and docview: links take a page number. Up until now, (docview:) links to PDF files have been the only link type known to me which took a page number. With the upcoming integration of Xournal and Org that Daniel M. German is working on, there will already be two of those. Daniel also wants to add org-store-link functionality to evince, so he needs a link type with page numbers for PDFs, too. I could (and have in a proof-of-concept version) modify org-docview.el to open PDFs with an external viewer, but I think what really should happen is the following: - We need a syntax to specify an (optional) page number for file: links, and make the line number optional as well. This might look something like this: - file:path[:page][::line] - file:~/some-file.txt::23some-file.txt, line 23 - file:~/document.pdf:4 document.pdf, page 4 - file:~/document.odf:3::5document.odf, page 3, line 5 This is only what comes to my mind immediately about one possibility of encoding this. - org-docview-store-link should return links in the new syntax (e.g. file:~/some-doc.pdf:5 instead of docview:~/some-doc.pdf::5) - the same syntax could also be used to integrate evince and Xournal - org-file-apps should allow to specify how to pass a page number to an external program. Unlike the file name, this is an optional argument, as a link may not specify a page number at all. I do not know how to do this in an elegant way, maybe let the user specify multiple entries - one for links with a page number, one for links without. - the same should apply to line numbers - maybe someone will integrate Org with Open Office or some heretic wants to open all text files in zile, who knows? - if a link with a page number is opened, org-file-apps specifies Visit with Emacs, and emacs decides to open it in doc-view-mode, doc-view-goto-page should be called with the page number. (I imagine this would be possible using the right hooks?) - Line number and page number also seem somewhat arbitrary as the only pieces of data available to point to a specific location inside a document. There are HTML fragment identifiers, which AFAIK work in http: links but do not in file: links. One might also imagine specifying a precise position in a PDF using a line number and a percentage to indicate how far the page should be scrolled down. So if it is feasible at all, we might want an even more general syntax to specify a target location, maybe attributes such as [[file:/path/to/file][page=5,line=3][Description]] [[file:notes.txt][search=The quick brown fox][Description]] This may obviously create more problems with backward compatibility. Luckily, there has been no release featuring docview: links yet, so there still is a chance to correct this mistake without breaking too much. If there will be no special syntax for page numbers, we could also interpret the line number as a page number for PDF and Xournal files, but that number would still need to be passed to an external application and cause doc-view-goto-page to be called when visiting a PDF in emacs. I really do not want to create another file: link type with org-docview.el, which is why I ask y'all to comment! - Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Organizing a students live
I study computer science in the first semester. I have one org file dedicated to university (~/org/studium.org). In this org file, there will be one top-level heading for each semester (currently there is only one - Wintersemster 09/10 [2009-10-01 Do]--[2010-03-31 Mi]). You see that I added the beginning and end of the semester as inactive timestamps. Under the heading for the semester, I have one subtree for general information such as vacation periods (denoted as a timespan: 2009-12-21 Mo--2010-01-03 Sa), examens and links to the websites of my classes (to download the homework for the week). Following that, I have a subtree for each calendar week, which looks like this: ** Week 48 from [2009-11-23 Mo] to [2009-11-29 So] Class 1 General information about this week's curriculum sometimes goes here. ** Class 1 Lecture 2009-11-23 Mo 16:00 [Link to the slides used in this lecture] Class notes for the first lecture of the week go here. When I did not type it directly in org-mode (with the view narrowed to this subtree), there will be a link to the hand-written notes (I use Xournal on a Tablet PC), to some scanned image of paper, or at least a reference to the script to tell me where in the curriculum we left off. ** Class 1 Lecture 2009-11-25 Mi 16:00 Class notes for the second one go here. ** TODO Class 1 Homework [Link to Homework PDF] [Link to my solution of the exercises (Xournal)] When this homework has been graded the following week, (a link to) the notes I took on exercises I had made mistakes in will go here. Class 2 (repeat the same structure for the other classes) At the end of this org file, there is a subtree named Future, where the entries for the next weeks are ready to be moved to the end of the main tree. You can generate this fairly quickly if you create one template subtree and then use M-x org-clone-subtree-with-time-shift repeatedly to create a copy with all timestamps shifted one week forward. This system works very well for me so far. I have a folder structure similar to the subtree structure on disk (~/uni/semester/calendar-week/class[/homework]) where I store all the files I link to. This way, I can be sure that if I take ~/org/ and ~/uni/ with me, I have all of my most important data. I do not use repeating timestamps because having a separate subtree for each occurence of a lecture enables me to jump to the appropriate notes, etc. right from my agenda view. I have also tagged the nodes below each week by class and by type (Lecture, Exercise), so I could do queries like show me all Lecture notes for Class 1, but so far I have not needed that. However, it does not hurt to have it in the template, I might use it later. Of course, the Homework entry gets assigned a DEADLINE when I download the exercise .pdf and add the link. I hope the above text is comprehensible enough; if there are any questions, feel free to ask! I would also be interested in how other students use Org. If it were not for org-mode, my class notes would be in a messy pile of paper instead of a few keystrokes away... Greetings from Germany, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Multiple agenda buffers
Desmond Rivet wrote: Is it possible to have multiple Org Agenda buffers open say, if you want different search results side by side? For the use case of simply viewing two search results side by side, renaming an agenda buffer seems to work: - open the agenda view: C-c a a - M-x rename-buffer RET new.name RET - open a second agenda view: C-c a t The problem with this approach is that any agenda command you use in the renamed agenda buffer will be confused and probably not work. A solution to this might be to make some variables (including org-agenda-buffer-name and org-agenda-type) buffer-local to this renamed buffer, but I have no idea if this could work or what other variables would have to be included. HTH, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [PATCH] respect org-link-file-path-type when inserting docview: links
This patch is also in the docview branch at: http://github.com/jboecker/org-docview The function org-insert-link checks if it is inserting a file: link. If this is the case, the path is manipulated according to the current buffer file name and the variable 'org-link-file-path-type'. I changed the regex to also match docview: links, and added a variable to store the link type which is later re-attached to the path. I do not know if there is a more elegant way, but this works. Matthew: docview.el was missing from the Makefile because of my inexperience with Org development, but I see that Carsten has already fixed that one :) --- lisp/ChangeLog |5 + lisp/org.el|7 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f385b7c..a716042 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-12-04 Jan Böcker jan.boec...@jboecker.de + + * org.el (org-insert-link): respect org-link-file-path-type for + docview: links in addition to file: links. + 2009-12-03 Carsten Dominik carsten.domi...@gmail.com * org-exp.el (org-export-format-source-code-or-example): Avoid diff --git a/lisp/org.el b/lisp/org.el index 664bafc..4f699c9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7976,8 +7976,9 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (setq link search) ;; Check if we can/should use a relative path. If yes, simplify the link -(when (string-match ^file:\\(.*\\) link) - (let* ((path (match-string 1 link)) +(when (string-match ^\\(file:\\|docview:\\)\\(.*\\) link) + (let* ((type (match-string 1 link)) +(path (match-string 2 link)) (origpath path) (case-fold-search nil)) (cond @@ -7998,7 +7999,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (setq path (substring (expand-file-name path) (match-end 0))) (setq path (abbreviate-file-name (expand-file-name path))) - (setq link (concat file: path)) + (setq link (concat type path)) (if (equal desc origpath) (setq desc path -- 1.6.5.2 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Fast way to jump to another specific heading?
On Thu, 13 Aug 2009, Andrew Stribblehill wrote: Have you tried the org-refile interface? This looks like what I need! I didn't think of refiling when looking for a way to navigate my outline. On Thu, 13 Aug 2009, Matt Lundin wrote: Have you tried the following with org-refile and org-goto? (setq org-completion-use-ido t) I tried, failed, then noticed that org-refile refuses to use ido if org-refile-use-outline-path is in use (the function org-olpath-completing-read in org.el explicitly sets this to nil, the comment says does not work with ido). I have now set org-refile-use-outline-path to nil, and org-refile-targets to only include my active projects; that works great! Thanks a lot! Jan ___ 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] [ANN] org-docview.el - Link to PDF files from org-mode
Hello, the new doc-view-mode in emacs 23 can be used to view DVI, PDF and PostScript files. I have written a custom link type for org-mode to allow linking to those files from org-mode. This is the first thing besides .emacs customization that I have written in elisp; as such, any feedback would be much appreciated. I have only tested it with PDF files so far, but it should work with anything doc-view-mode can display. The attached file adds support for org-store-link inside doc-view-mode buffers. The link syntax is: docview:/path/to/file.pdf:page where page is the page number to visit. To use it, copy it to your load path as org-docview.el and add (require 'org-docview) to your .emacs file. I'd also like to suggest to integrate this functionality into the standard org-mode distribution, as emacs 23 includes doc-view-mode by default. I am releasing the code under the terms of the GNU General Public License, Version 3 or later. Jan Böcker;;; org-docview.el --- support for links to doc-view-mode buffers (require 'org) (org-add-link-type docview 'org-docview-open) (add-hook 'org-store-link-functions 'org-docview-store-link) (defun org-docview-open (link) (when (string-match \\(.*\\):\\([0-9]+\\)$ link) (let* ((path (match-string 1 link)) (page (string-to-number (match-string 2 link (org-open-file path 1) ;; let org-mode open the file (in-emacs = 1) ;; so that org-link-frame-setup is respected (doc-view-goto-page page) ))) (defun org-docview-store-link () Store a link to a docview buffer (when (eq major-mode 'doc-view-mode) ;; This buffer is in doc-view-mode (let* ((path buffer-file-name) (page (doc-view-current-page)) (link (concat docview: path : (number-to-string page))) (description )) (org-store-link-props :type docview :link link (provide 'org-docview) ___ 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