[O] Improve visibility for bad links
From 1ee99dc8bfe790f691d159048f90d741daa7d231 Mon Sep 17 00:00:00 2001 From: Sebastien Vauban s...@mygooglest.com Date: Wed, 16 May 2012 09:57:03 +0200 Subject: [PATCH] Improve visibility for bad links * org-latex.el (org-export-latex-links): Improve visibility for bad links. Use black text on red background instead of texttt. TINYCHANGE --- lisp/org-latex.el |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 9f58456..fecad5a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -2329,7 +2329,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER. (save-match-data (funcall fnc (org-link-unescape raw-path) desc 'latex -(t (insert \\texttt{ desc }))) +;; bad link +(t (insert \\colorbox{red}{ desc }))) (defun org-export-latex-format-image (path caption label attr optional shortn) -- 1.7.9 Best regards, Seb -- Sebastien Vauban
Re: [O] Minimal overhead Org-mode blogging system
I don't know enough lisp to implement this indexing system. On Tue, 15 May 2012, Neil Smithline wrote: I like your indexing idea. I use a less-complex system involving symbolic links for my agenda files. Yours sounds better. This is what I use for my agendas: (setq org-agenda-files (list (expand-file-name ~/Documents/+OrgAgendas))) (defun org-add-agenda-file () (interactive) (make-symbolic-link (buffer-file-name) ~/Documents/+OrgAgendas)) It is just a quick-and-dirty solution. If I remove or move a file, I get errors. Also, if I stop using a file for agenda items I must manually unlink the symlink. Have you implemented your indexing system Jude or just designed it? I'd love to see it if you have something working. I imagine it could be used for todos, cross-referencing tags, properties, etc... And to prevent Carsten from yelling at me :-D, I would insist that, by default, Emacs would not create the cross-referencing database. You'd have to explicitly enable it. Neil On Mon May 14 22:24:08 2012, Jude DaShiell wrote: Understand, I use update here in the sense of some file modification that subsequently gets saved. If files to be modified get archived into org-mode's revision control system, the blog tag and associated done tag could be searched for within the save process and an org database could build with file name and then tripplets of date stamp, line number for blog tag, line number for done tag and each tripplet would hold another blog entry in that unique file which is the first field in the data base. So you want to find a blog entry? Search the org-generated data base for a date stamp and you come up with the file and the range of line numbers holding that blog entry. Search one file and go to specific location in second file. That if it's done or gets done will keep file searching to a nice minimum permanently. On Sun, 13 May 2012, Neil Smithline wrote: Karl Voit devnull at Karl-Voit.at writes: Therefore I sat down and thought about a workflow that should be enough for writing simple weblog entries: - create an Org-mode heading (anywhere!) - make sure that there is an (uniq) :ID: property - add the tag :blog: to heading - write content, subheadings, ... - change state of top-heading to DONE - this enables blog entries ?in the queue? - (manually) invoke generation-script This enables me quick blogging with a list of advantages: - a blog entry can be located anywhere in all of my Orgmode files - no extra formatting steps - very small (almost non-existent) overhead to create a blog entry - no duplicate information - updates only in Orgmode, not HTML or any in-between format - static (fast) pages - self-hosting without any fancy services behind like RDBS Karl, I'm wondering if you've played around with this at all? I happen to really like the idea but I wonder about its performance. Unless I'm mistaken, and I very likely may be, won't you have to scan all of your .org files to look for the special tags/properties/todo states/whatever? If not, I'd love to have a pointer to how you can accomplish this without scanning every .org file. That would be cool. Jude jdashiel-at-shellworld-dot-net http://www.shellworld.net/~jdashiel/nj.html Jude jdashiel-at-shellworld-dot-net http://www.shellworld.net/~jdashiel/nj.html
Re: [O] org-goto-local-search-headings usage?
On Tue, 15 May 2012 17:44:29 -0400, Nick Dokos said: Nick Dokos wrote: Myles English wrote: On Tue, 15 May 2012 11:48:55 -0400, Nick Dokos said: Myles English wrote: Hi, Can anyone see what I am doing wrong here? I just want to open a file ~/tmp/gtd.org and goto the heading * My workflow. So, starting like this: emacs -Q -l ~/tmp/gtd with ~/tmp/gtd: (add-to-list 'load-path ~/.emacs.d/plugins/org-mode/lisp) (require 'org-install) ;; to use the emacs-org-mode rather than the one ;; installed with emacs (defun gtd() (interactive) (find-file ~/tmp/gtd.org) (goto-char (point-min)) (setq wf My workflow) (org-goto-local-search-headings wf nil nil) ) and ~/tmp/gtd.org: * My workflow then I do: M-x gtd and get the message: byte-code: Search failed: My workflow Works for me: the cursor is placed at the end of the headline. I tried both with just the one headline and also with half a dozen. Thanks for taking a look Nick. My real usage also uses a much bigger file and sometimes it works when the .emacs file is open or if I have been working in the gtd.org file but I haven't been able to track down when it works or doesn't. Hence this MWE. Maybe M-x toggle-debug-on-error and try again to get a backtrace? Or add (setq debug-on-error t) to your initialization file. Adding (setq debug-on-error t) to the top of the file gtd then proceeding as before gives me the *Backtrace*: org-goto-local-search-headings(My workflow nil nil) gtd() call-interactively(gtd t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) which doesn't even really look like an error, does it? No, but there are missing stack frames: it fails on the search-backward that org-goto-local-search-headings does. In the best let's cure the symptom, not the disease manner, try changing the point-min to point-max in the definition of gtd. I meant to comment on the use of isearch-forward inside org-goto-local-search-headings. I'm not sure how it changes value (but it does), and I really don't understand why org-glsh uses it at all. The point is however that depending on the value of isearch-forward and where you start in the buffer (min or max), you will get the error if the variable is the wrong direction for your starting point. IOW, you probably don't want to use the org-glsh function: define your own that always goes in one direction (forward) and start at min. Usual disclaimers apply, Nick Thanks for the advice, I ended up using bit of org-element.el instead of org-goto-local-search-headings and doing this: #+BEGIN_SRC elisp (defun gotoWF(hl) (let ((title (car (org-element-property :title hl (if (and (stringp title) (string= title My workflow)) (progn (goto-char (org-element-property :begin hl)) (org-show-entry) (org-show-subtree)) nil))) (require 'org-element) (defun gtd() (interactive) (org-element-map (org-element-parse-buffer) 'headline 'gotoWF nil t) (org-agenda-list)) #+END_SRC -- `--[ Myles ]
Re: [O] org-goto-local-search-headings usage?
Hello, Myles English mylesengl...@gmail.com writes: Thanks for the advice, I ended up using bit of org-element.el instead of org-goto-local-search-headings and doing this: #+BEGIN_SRC elisp (defun gotoWF(hl) (let ((title (car (org-element-property :title hl (if (and (stringp title) (string= title My workflow)) (progn (goto-char (org-element-property :begin hl)) (org-show-entry) (org-show-subtree)) nil))) (require 'org-element) (defun gtd() (interactive) (org-element-map (org-element-parse-buffer) 'headline 'gotoWF nil t) (org-agenda-list)) #+END_SRC I highly suggest to use (org-element-parse-buffer 'headline) instead of plain (org-element-parse-buffer), since you really don't need to spend time parsing the buffer down to the smallest object. Also, you should check :raw-value property instead of :title, since the latter is a secondary string (a list containing strings and objects) which, as such, will never match a string. :raw-value, on the other hand, is always a string and doesn't require the (stringp title) test. Regards, -- Nicolas Goaziou
[O] Tables in Plain Lists
I was making notes today as follows: == * List of important items [0%] - [ ] Item 1 - This is an important item. - Remember to do the hokey-pokey. |---|---| | A | B | | C | D | - [ ] Item 2 - This is not as important. == Of course, the plain list terminates when the table starts, so TAB on Item 1 only collapses it to where the table starts. Also, the table can't be indented as part of the list. In the end, I moved the table elsewhere, but for future reference, is there a preferred way to do this?
Re: [O] Tables in Plain Lists
Hello, SW sabrewo...@gmail.com writes: I was making notes today as follows: == * List of important items [0%] - [ ] Item 1 - This is an important item. - Remember to do the hokey-pokey. |---|---| | A | B | | C | D | - [ ] Item 2 - This is not as important. == Of course, the plain list terminates when the table starts, so TAB on Item 1 only collapses it to where the table starts. Also, the table can't be indented as part of the list. It can: just move it in manually. Then it will stay there. In the end, I moved the table elsewhere, but for future reference, is there a preferred way to do this? Yes: --8---cut here---start-8--- * List of important items [0%] - [ ] Item 1 - This is an important item. - Remember to do the hokey-pokey. |---+---| | A | B | | C | D | - [ ] Item 2 - This is not as important --8---cut here---end---8--- Note that it will be easier if you don't start your table with a rule, since expanding a fresh |- will create the table at column 0. Regards, -- Nicolas Goaziou
Re: [O] Tables in Plain Lists
SW sabrewo...@gmail.com writes: I was making notes today as follows: == * List of important items [0%] - [ ] Item 1 - This is an important item. - Remember to do the hokey-pokey. |---|---| | A | B | | C | D | - [ ] Item 2 - This is not as important. == Of course, the plain list terminates when the table starts, so TAB on Item 1 only collapses it to where the table starts. Also, the table can't be indented as part of the list. In the end, I moved the table elsewhere, but for future reference, is there a preferred way to do this? TAB won't indent it but you can use the rectable C-x r o to shift it right so it is part of the list. -Bernt
Re: [O] Tables in Plain Lists
On Wed, May 16, 2012 at 12:14:45PM -0400, Bernt Hansen wrote: SW sabrewo...@gmail.com writes: I was making notes today as follows: == * List of important items [0%] - [ ] Item 1 - This is an important item. - Remember to do the hokey-pokey. |---|---| | A | B | | C | D | - [ ] Item 2 - This is not as important. == Of course, the plain list terminates when the table starts, so TAB on Item 1 only collapses it to where the table starts. Also, the table can't be indented as part of the list. In the end, I moved the table elsewhere, but for future reference, is there a preferred way to do this? TAB won't indent it but you can use the rectable C-x r o to shift it right so it is part of the list. actually, IME, if you select the table and then hit tab, it does indent. -- Dr. Joost Kremers Georg-August-Universität Seminar für Deutsche Philologie Käte-Hamburger-Weg 3 D-37073 Göttingen
Re: [O] Tables in Plain Lists
Bernt Hansen bernt at norang.ca writes: TAB won't indent it but you can use the rectable C-x r o to shift it right so it is part of the list. Thanks. That's awesome :)
Re: [O] Tables in Plain Lists
Nicolas Goaziou n.goaziou at gmail.com writes: Also, the table can't be indented as part of the list. It can: just move it in manually. Then it will stay there. Thanks. I thought any indentation should be avoided, but I think this is a good solution.
Re: [O] Tables in Plain Lists
Joost Kremers joostkremers at fastmail.fm writes: TAB won't indent it but you can use the rectable C-x r o to shift it right so it is part of the list. actually, IME, if you select the table and then hit tab, it does indent. Not for me. The rectable solution is a good one though.
Re: [O] Tables in Plain Lists
SW sabrewo...@gmail.com wrote: Joost Kremers joostkremers at fastmail.fm writes: TAB won't indent it but you can use the rectable C-x r o to shift it right so it is part of the list. actually, IME, if you select the table and then hit tab, it does indent. Not for me. The rectable solution is a good one though. Are you sure? As Joost says, you have to select the table (C-space at one end and move to the other end; and I think transient-mark-mode must be in effect - which is on by default in emacs24, but maybe not in emacs23? - so you should see the table highlighted). Pressing TAB after that indents the table AFAICS. Nick
[O] org-babel-parse-src-block-match params parse bug
Hi, Seems like the org-babel-parse-src-block-match function does something wrong when parsing the block parameters. In my case I am trying to use the :file param with plantuml but it does not get down to the execute function. To me it seems like the (string-match -i\\ switches) call messes up the (match-string 4) call further down. Attaching a patch Best regards, Karl Berg org-babel.patch Description: Binary data
[O] emacs org mode publish to latex failed with strings like __aaa_cc__
Hi all: If I write some string like __aaa_cc__ in org file,then publish it to pdf using latex, it will failed and the output is wrong. even I can use ~__aaa_cc__~, it's not a good way do it. Can you fix it or I am wrong? ___ With Best Regards. jingtao.
Re: [O] Improve visibility for bad links
Hello, Sebastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: From 1ee99dc8bfe790f691d159048f90d741daa7d231 Mon Sep 17 00:00:00 2001 From: Sebastien Vauban sva-D0wtAvR13HarG/idocf...@public.gmane.org Date: Wed, 16 May 2012 09:57:03 +0200 Subject: [PATCH] Improve visibility for bad links * org-latex.el (org-export-latex-links): Improve visibility for bad links. Use black text on red background instead of texttt. I'd rather introduce a variable to customize this. In my opinion, color in LaTeX output doesn't sound right as a default value. Regards, -- Nicolas Goaziou
Re: [O] Tables in Plain Lists
Nick Dokos nicholas.dokos at hp.com writes: Are you sure? As Joost says, you have to select the table (C-space at one end and move to the other end; and I think transient-mark-mode must be in effect - which is on by default in emacs24, but maybe not in emacs23? - so you should see the table highlighted). Pressing TAB after that indents the table AFAICS. Emacs 23.2.1 with org 7.8.06. Tested with transient-mark-mode enabled and disabled. I selected the table and hit TAB. Point moved by one tab (if I selected from the top to the bottom of the table) or moved into the table (if I selected the other way round) and, in the one instance, the highlight on the region disappeared. But the table remained obstinately unindented.
Re: [O] org-babel-parse-src-block-match params parse bug
Karl Berg kalle...@hotmail.com writes: Hi, Seems like the org-babel-parse-src-block-match function does something wrong when parsing the block parameters. In my case I am trying to use the :file param with plantuml but it does not get down to the execute function. To me it seems like the (string-match -i\\ switches) call messes up the (match-string 4) call further down. Attaching a patch Best regards, Karl Berg Please ignore my previous request. I've just pushed up a fix for this issue. Please let me know if the problem persists, and thanks for pointing this out. Best, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Tables in Plain Lists
On Wed, May 16, 2012 at 07:13:36PM +, SW wrote: Emacs 23.2.1 with org 7.8.06. Tested with transient-mark-mode enabled and disabled. I selected the table and hit TAB. Point moved by one tab (if I selected from the top to the bottom of the table) or moved into the table (if I selected the other way round) and, in the one instance, the highlight on the region disappeared. But the table remained obstinately unindented. the trick is to move point to the line *below* the table. TAB will then do whatever it does on that line and if it happens to be an empty line or a line with ordinary text, it indents, taking the entire region (including the table) with it. in essence, TAB will do whatever TAB does, regardless of whether the region is active. so if point is still within the table, TAB moves to the next cell, possibly creating a new one. if the line after the table contains a headline and you move point to it, it (un)folds the headline. so you need to make sure TAB is on a line that it indents. -- Dr. Joost Kremers Georg-August-Universität Seminar für Deutsche Philologie Käte-Hamburger-Weg 3 D-37073 Göttingen
[O] org-mode make hangs
Please note that org-release 7.8.10-Make hangs at: Compiling /home/enoch/org-mode/lisp/ob-exp.el... I am using Emacs 23.3.1 on the latest 64 bit opensuse. Can I help you with any further info? Thanks, Enoch.
Re: [O] org-goto-local-search-headings usage?
On Wed, 16 May 2012 16:56:45 +0200, Nicolas Goaziou said: I highly suggest to use (org-element-parse-buffer 'headline) instead of plain (org-element-parse-buffer), since you really don't need to spend time parsing the buffer down to the smallest object. Also, you should check :raw-value property instead of :title, since the latter is a secondary string (a list containing strings and objects) which, as such, will never match a string. :raw-value, on the other hand, is always a string and doesn't require the (stringp title) test. Thanks for your advice, and thanks too for org-element! I can't believe that no one else needs a function to goto a heading, and I am sure to need it again myself so did this: (require 'org-element) (defun my-goto-heading(file heading-text) Visit file `file' and goto headline `heading-text' (find-file file) (org-element-map (org-element-parse-buffer 'headline) 'headline (lambda (x) (if (string= (org-element-property :raw-value x) heading-text) (goto-char (org-element-property :begin x)) nil)) nil t)) ;; stop at first find and use it like this, so that whenever I need to remind myself of what to do and how to do it I press (M-x gtd) : (defun gtd() (interactive) (my-goto-heading ~/org/org/gtd.org My workflow) (reposition-window) (org-show-entry) (org-show-subtree) (org-agenda-list)) Regards, -- Nicolas Goaziou -- `--[ Myles ]
Re: [O] org-mode make hangs
Hi Enoch, Enoch H Wexler emc.consulta...@gmail.com writes: Please note that org-release 7.8.10-Make hangs at: Compiling /home/enoch/org-mode/lisp/ob-exp.el... I am using Emacs 23.3.1 on the latest 64 bit opensuse. Can I help you with any further info? Thanks for reporting -- this should be fixed now. Best, -- Bastien
[O] Org-mode release 7.8.10
Hi folks, I released Org 7.8.10, a bugfix-only release. http://orgmode.org/org-7.8.10.zip http://orgmode.org/org-7.8.10.tar.gz http://orgmode.org/org-mode-download.html This release will be the one in Emacs 24.1. (Mh.. Does it sound like I'm repeating myself?) As usual, enjoy! -- Bastien
[O] org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation)
Richard Lawrence richard.lawre...@berkeley.edu writes: Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com wrote: In case you are interested, I'm attaching some relevant bits. It has examples on how to put in tables (with short and long captions), figures, latex snippets and finally how I included a bibliography and appendices. Hope this will help. Thanks! This is definitely helpful. The ignoreheading tag is a nice hack -- fixes one of those niggling issues I've had with LaTeX export. Best, Richard This is probably more for Nicolas... and apologies for hijacking the thread slightly! I was intrigued by the comment above regarding the ignoreheading tag. Sounded just like what I needed. However, it doesn't do anything with org /out-of-the-box/. A little searching led to Suvayu's posting in stackoverflow [1] and that does the job nicely, but only for the standard (read: old) export engine. The question is: is there an equivalent hook for the new exporter? Thanks, eric Footnotes: [1] http://stackoverflow.com/questions/10295177/is-there-an-equivalent-of-org-modes-b-ignoreheading-for-non-beamer-documents -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1 : using Org release_7.8.09-544-g505cc7
[O] exporting to limited HTML
Is there a way to export to the HTML accepted by Blogger comments? These allow emphasis and links, but not most other tags, including p and hr. I think they preserve newlines, so we'd have to unfill. Thanks. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com
[O] Strange Custom Agenda Problem
In the past few days one of my custom agenda commands stopped working as it used to. I haven't (yet) bisected my Org-Mode configuration (*) and org-mode to find the exact cause, but was wondering if anyone had any ideas. I have the following (amount other things) in my org-agenda-custom-commands: (setq org-agenda-custom-commands '((x test tags-todo +Outcome+LEVEL=4))) When I custom-command select “x”, I get no results. If I select the default, built-in lower case “m” agenda command and type +Outcome+LEVEL=4 I get a long list of results (as expected). Did something change recently in the agenda construction related to tags-todo? Mike (*) Which has not changed much
Re: [O] emacs org mode publish to latex failed with strings like __aaa_cc__
Xu Jingtao jingta...@gmail.com wrote: Hi all: If I write some string like __aaa_cc__ in org file,then publish it to pdf using latex, it will failed and the output is wrong. even I can use ~__aaa_cc__~, it's not a good way do it. Can you fix it or I am wrong? By default, underscores indicate subscripts (a tradition that comes from LaTeX syntax - similarly, carets indicate superscripts). If you don't want that, you can add #+OPTIONS: ^:nil at the top of the file: this option disables superscripts and subscripts. See (info (org) Export options) Nick
Re: [O] Strange Custom Agenda Problem
Hi Mike, Mike McLean mike.mcl...@pobox.com writes: I have the following (amount other things) in my org-agenda-custom-commands: (setq org-agenda-custom-commands '((x test tags-todo +Outcome+LEVEL=4))) When I custom-command select “x”, I get no results. I tested with your `org-agenda-custom-commands' value and this * Test ** Test1 *** Test2 TODO Do I see this? :Outcome: I correctly get :Outcome:. This is with both the maint and master branches of the git repo. If I select the default, built-in lower case “m” agenda command and type +Outcome+LEVEL=4 I get a long list of results (as expected). The m agenda command is for `tags', not `tags-todo'. Did something change recently in the agenda construction related to tags-todo? This: http://orgmode.org/w/?p=org-mode.git;a=commit;h=c50f0c Please help us reproduce the problem, perhaps by sharing some of the impacted entries. Thanks, -- Bastien