Re: [O] extending automatic screenshot insertion

2011-08-26 Thread Aankhen
Hi,

On Thu, Aug 25, 2011 at 15:41, Aditya Mandayam adity...@gmail.com wrote:
 i would like to extend the auto screenshot method described here:
 http://comments.gmane.org/gmane.emacs.orgmode/33770

 first: a way in which i can be prompted to enter a filename instead of
 having a random string
 second: a timestamp be appended after i have entered the filename
 third: to specify somehow, the dimensions of the bounding box of the 
 screenshot

 how can this be done?

Starting from the revised version of the function,[1] here’s how I’d
implement the first two changes:

,
| (defun org-screenshot ()
|   Prompt for a filename, add a timestamp, take a screenshot into
that file and insert a link to this file.
|   (interactive)
|   (setq filename
| (concat (read-string Save screenshot as (timestamp and
extension will be appended):  (buffer-file-name))
| _
| (format-time-string %Y%m%d_%H%M%S)
| .png))
|   (call-process import nil nil nil filename)
|   (insert (concat [[ filename ]]))
|   (org-display-inline-images))
`

I don’t have the ‘import’ utility so I can’t help there.  It can
probably take arguments to denote the bounding box; have a look at the
documentation for both ‘import’ and ‘call-process’.

Aankhen

[1]: http://permalink.gmane.org/gmane.emacs.orgmode/40271



Re: [O] What's the license for worg.css?

2011-08-14 Thread Aankhen
Hi folks,

On Mon, Aug 15, 2011 at 05:05, suvayu ali fatkasuvayu+li...@gmail.com wrote:
 On Sun, Aug 14, 2011 at 6:16 PM, Bastien b...@altern.org wrote:
 I made sure the licensing terms at the bottom of the pages tell that
 explicitely (I'm now regenerating this footer sections.)


 The formatting seems a bit off. Some of the text overlaps and the
 actual licensing information is illegible on my system (FF 5 on Fedora
 14). I have attached a small screen shot.

Just wanted to confirm that I see this too.  The culprit is line 909
of worg.css, which sets the ‘line-height’ to 30%.  Removing that line
fixes the overlap without any apparent problems.

Aankhen



Re: [O] Wrong type argument listp on export

2011-07-21 Thread Aankhen
Hi,

On Wed, Jul 20, 2011 at 16:36, Dirk Scharff dirk.scha...@googlemail.com wrote:
 I narrowed down my problem to the following short example:

 * My Test Block
  This is a test
  #+source testblock
  #+begin_src python :var x=3 :exports both :results output
  print x*x
  #+end_src

 executing the source-bock yields the correct result. When exporting this
 file however I get the folowing error:

 Wrong type argument: listp, 3

I can confirm this using Org-mode from git (d8bd43e).  Enabling
debugging shows that the problem occurs in ‘org-babel-sha1-hash’ when
it tries to run ‘copy-seq’ on ‘(x . 3)’ at line 759.  It doesn’t seem
to be specific to Python—using ‘:var foo=bar’ seems to be what
triggers it.

Aankhen



Re: [O] DONE all subtasks recursively

2011-07-21 Thread Aankhen
Hello Marcelo,

On Wed, Jul 20, 2011 at 21:11, Marcelo de Moraes Serpa
celose...@gmail.com wrote:
 *bump*
 Hey guys, if someone could guide me a hint on where I should look to hack
 some elisp code in order to do that, I'd be grateful ;)
 Cheers,
 Marcelo.

 On Mon, Jul 18, 2011 at 1:30 PM, Marcelo de Moraes Serpa
 celose...@gmail.com wrote:

 Hey guys
 If I have a headline with children, like this:
 * Project
 ** TODO Task
 ** TODO Task
 ** SubProject
 *** TODO Task
 *** TODO Task
 Does org have any functionality that allows me to automatically close
 (Change TODO-DONE, put DONE when TODO is not available (in the case of
 Projects)) automatically and recursively for each child if I close the main
 parent headline?

You can use ‘org-map-region’ to call a function on every headline in a
region. ‘org-end-of-subtree’ will move point to… well, the end of the
current subtree.  Finally, ‘org-todo’ is what changes the todo state
of the headline containing point.

Add your custom function to either
‘org-after-todo-state-change-hook’[1] or ‘org-trigger-hook’.[2] (I’m
not sure what the difference is.)

Happy hacking!
Aankhen

[1]: http://orgmode.org/worg/org-configs/org-hooks.html#sec-1_13
[2]: http://orgmode.org/worg/org-configs/org-hooks.html#sec-1_15



Re: [O] how to change the headline starter *

2011-07-17 Thread Aankhen
Hi,

On Sat, Jul 16, 2011 at 18:29, Pieter Praet pie...@praet.org wrote:
 On Fri, 15 Jul 2011 12:21:01 +0200, Philipp Haselwarter 
 philipp.haselwar...@gmx.de wrote:
 No need to go all flaming because someone thinks the looks of the
 software matter. TBH I don't see what's wrong with that or in what way
 that's the opposite of efficiency.

 What I considered wrong about it was the OP implying -twice- that a
 frivolous feature request such as this could be marked as being a
 full-caps BUG [1,2].

 Considering all the time and effort Org-mode's selfless developers have
 sacrificed to deliver this mindblowing piece of software to us, this
 could easily be perceived as an insult in my opinion, regardless of
 whether or not it was intentional.

I agree.

 I know that this doesn't justify the tone of my impulsive reply in any
 way whatsoever, and I do apologize for disrupting the serene atmosphere
 which characterizes this list, but... I sent it, and I stand behind it 100%.

 Besides, how could someone who cares about how slick and shiny their
 software looks *possibly* end up using Emacs?

Pretty easy: you see that Emacs massively increases your productivity,
and you use it.  The genius of Emacs lies not in being ugly or being
minimalistic (now that would be something) but in being an amazingly
customizable platform.  Being nice to look at would not in any way
automatically render it useless.

 Abstracting the user interface from the logic is an important paradigm,
 especially for something like org-mode that you want to run on a wide
 range of devices – think 24 monitors vs 3 mobile devices. You don't
 want to have too much of the looks hardcoded.

 Exactly! That is, believe it or not, the whole point.

 What the OP is suggesting effectively nullifies the separation between
 model and view in that it would allow changing Org-mode's outlining
 markup at its very core, potentially leading to a wildgrowth of custom
 markup formats which could hardly be called plain text anymore, not to
 mention the avalanche of PEBCAK-related bug reports it may unleash.

I’m very confused.  Couldn’t the compatibility and standardization
problems be avoided entirely by indicating the character at the top of
the file if it differs from the norm?

And why would, say, changing the headline starter from ‘*’ to ‘+’ make
it any less of a plain text format?  Or, for that matter, changing it
to ‘→’?  These are all valid UTF-8 characters that any Unicode-aware
application is expected to understand and deal with.

 Now if you don't find that to be one of /your/ personal top priorities –
 fine, don't bother. But going all bashing because someone insists on his
 opinion that this is important? I don't see what you're trying to
 achieve here.

 Pretty much since the very beginning, Org-mode has been described as:
  Org is a mode for keeping notes, maintaining TODO lists, and doing
  project planning with a fast and effective plain-text system.

 Seeing as how this description hasn't changed ever since, one can safely
 assume that keeping the markup format sane (i.e. plain-text) and
 consistent (i.e. semi-standardized, so as not to complicate joint
 project planning) is a top priority for the entire Org-mode community.

Re: plain text and standardization, see the above two paragraphs.

 As for my personal priorities: I didn't start using Emacs solely because
 Org-mode *requires* me to, but because I care about getting my work done,
 as efficiently as possible. Mac/Windows-influenced non-features (and
 the code overhead they introduce) will undoubtedly interfere with that.

 IOW, a lack of certain features is an essential feature in and of itself.

Have you looked at Emacs recently? “Minimalistic” is the opposite of
what it is.  The fact that you use it ought to show in itself that
minimalism isn’t what you want.

 I guess what I'm trying to achieve is to keep Org-mode from slowly and
 inconspicuously devolving into something featuring transparent blinking
 3D unicorn overlays with cherries on top. That's a gross exaggeration of
 course (one would hope), but I'm sure you catch my drift.

Certainly.  I still don’t understand how this justifies all the fuss
over a request to change the headline starter.

Aankhen



Re: [O] Calendar-like view of the org-agenda

2011-07-14 Thread Aankhen
On Wed, Jul 13, 2011 at 18:14, Jason F. McBrayer jmcb...@carcosa.net wrote:
 On Wed, 13 Jul 2011 11:34:48 +0530, Aankhen wrote:

 That's odd. I'm using Emacs 24 on Windows 7 64-bit (and before this
 I've used 23 on both 7 and Vista), and my font is set to Consolas.
 Emacs happily substitutes other fonts where Consolas is missing glyphs
 (see the attached screenshot). The only snag is that it takes a while
 to find a suitable font, at times.

 I'm using a precompiled binary from emacs-for-windows.[1] Perhaps it
 has special support for font substitution or something…

 Huh. I looked at the HELLO file, and you seem to be right. It's pulling in
 fonts as needed for various South Asian, East Asian, and Middle/Near Eastern
 languages, but still failing horribly with unicode box drawing, as well as
 various symbols (like the recycle symbol, which we use abundantly on
 identi.ca). Perhaps Consolas falsely reports that it has those symbols.

Box drawing seems to work okay here, whereas the recycling symbol is
missing (it just shows a box with the hex code to indicate the missing
glyph).  It’s probably down to whether you have any monospace fonts
which contain those glyphs.

Aankhen



Re: [O] Release 7.6

2011-07-14 Thread Aankhen
Thanks for another great release!

Aankhen



Re: [O] Calendar-like view of the org-agenda

2011-07-13 Thread Aankhen
Hi,

On Tue, Jul 12, 2011 at 21:00, Jason F. McBrayer jmcb...@carcosa.net wrote:
 I /think/ that in X, emacs will select the closest font it can find to
 in order to get the characters it needs. However, in Windows, it will
 only use the default font (or whatever is explicitly specified for the
 face), even if that font is missing characters. The only workaround
 I've found for buffers that need a lot of Unicode characters is to use
 DejaVu Sans Mono. Consolas is very nice, but its Unicode coverage is
 not good.

That’s odd.  I’m using Emacs 24 on Windows 7 64-bit (and before this
I’ve used 23 on both 7 and Vista), and my font is set to Consolas.
Emacs happily substitutes other fonts where Consolas is missing glyphs
(see the attached screenshot).  The only snag is that it takes a while
to find a suitable font, at times.

I’m using a precompiled binary from emacs-for-windows.[1] Perhaps it
has special support for font substitution or something…

Aankhen

[1]: http://code.google.com/p/emacs-for-windows/
attachment: Emacs font substitution.png

Re: [O] Define capture template with dynamic id target

2011-06-11 Thread Aankhen
Hi Darlan,

On Fri, Jun 10, 2011 at 21:20, Darlan Cavalcante Moreira
darc...@gmail.com wrote:
 Thanks David,

 I tried to follow your suggestion, but I found two problems (maybe because
 I know little about lisp).

 For instance, suppose I have a test.org file with the follow content
 --8---cut here---start-8---
 * 2011
  Every headline has an ID, but I have omitted here for brevity
 *** May
 * Sub-headline
      bla bla bla
 *** June
 * Sub-headline
      bla bla bla
 --8---cut here---end---8---

 I want the capture process to add an entry to the Sub-headline of June. If
 I just use the file+headline and specify Sub-headline then it will add to
 the Sub-headline in May. That's why I tried using IDs in the first
 place. Also, every month I create a new month headline with the
 Sub-headline and the capture process should add an entry to that
 instead. That is the reason I wanted to get the ID from a function, instead
 of just writing it in the capture template.


 As far as I understand if I use the file+function target then the function
 must return the headline name, but how can I say that I want the
 Sub-headline of June and not of May? [first problem]

 I found an org-id-find function that returns something like
 (filename . characterPosition). Therefore, If there is a way to specify a
 position where org should start looking for the headline then I could use
 that to go to the correct Sub-headline.


 Also, the file+headline target will add the entry as a child of the
 specified headline, but file+function seems to add the entry as a sibling
 of the headline returned by the function. [second problem] Is this intended
 behaviour or is it a bug?
 [snip]

Looking at the code, the function doesn’t need to return anything; it
just needs to place point where you want the new headline to appear.
Therefore, you can use ‘org-find-olp’ to locate the entry:

,[ C-h f org-find-olp RET ]
| org-find-olp is a compiled Lisp function in `org.el'.
|
| (org-find-olp PATH optional THIS-BUFFER)
|
| Return a marker pointing to the entry at outline path OLP.
| If anything goes wrong, throw an error.
| You can wrap this call to catch the error like this:
|
|   (condition-case msg
|   (org-mobile-locate-entry (match-string 4))
| (error (nth 1 msg)))
|
| The return value will then be either a string with the error message,
| or a marker if everything is OK.
|
| If THIS-BUFFER is set, the outline path does not contain a file,
| only headings.
`

So the code would look something like this:

,
| (org-find-olp '(2011 May Sub-headline) t)
`

Aankhen



Re: [O] understanding the function outline-level

2011-06-07 Thread Aankhen
Hi Michael,

On Tue, Jun 7, 2011 at 21:53, Michael Brand michael.ch.br...@gmail.com wrote:
 I am on the way of tracking down an (Org?) buglet and now
 outline-level tries to strike me with my lack of experience with
 Match Data of Emacs search and I would like to ask for some help to
 understand.

 M-: (outline-level) returns a value that I don't understand yet. The
 number does not correspond to the amount of stars and is independent
 of at the beginning of which line the point was before. And when I
 look at the implementation of outline-level I am missing a function
 that initializes the Match Data. Where is that last search or match
 operation?

Here’s a slightly more complicated alternative method:

,
| (progn
|   (org-back-to-heading)
|   (org-reduced-level (org-current-level)))
`

This will take into account `org-odd-levels-only'.

Aankhen



Re: [O] insert picture feature request.

2011-05-16 Thread Aankhen
Sorry for the late response!  I forgot about this thread.

On Mon, May 9, 2011 at 07:35, Mark S. throa...@yahoo.com wrote:
 Note to Aankhen: To get inline images to work, you need to install the PNG 
 and JPEG libraries from http://gnuwin32.sourceforge.net/ . Then put the 
 resulting C:...gnuwin32/bin directory in your windows system path. Maybe 
 everyone here already knew this, but I had to spend a bit of time to work it 
 out.

My local copy of Emacs has all the libraries in place.  The problem
seems to be the path: the directory has spaces in it, and the final
call is:

  i_view32.exe /capture=2 /convert=Z:/Foo bar/baz.png

In other words, the entire argument is quoted rather than just the
path.  I fixed this by only passing the file name, as it runs in the
same directory.  Dunno whether there’s a way to disable quoting for
part of an argument.

Aankhen



Re: [O] [dev] footnotes improvements

2011-05-12 Thread Aankhen
Hi Christian,

On Thu, May 12, 2011 at 12:49, Christian Moe m...@christianmoe.com wrote:
 Nice! Tested only your snippet.


 * HTML: works!

 One question: As is, adjoining footnotes `2' and `3' read as `23'.
 Could/should the footnote export know to put a comma between them:`2,3'?

 For HTML purposes, I think not necessarily, the separator could be flexibly
 added with CSS like:

 : #+style: stylesup + sup .footref:before {content: , }/style

From the point of view of semantics, it’d be better to separate them
in the content itself.  For my part, I like Wikipedia’s ‘[1][2]’
style.  ‘1, 2’ sounds even better to me, if it can be done.

Aankhen



Re: [O] Problems with capture in tables

2011-05-05 Thread Aankhen
Hi,

On Wed, May 4, 2011 at 12:55, Thomas Holst thomas.ho...@de.bosch.com wrote:
 I am trying to put a line into a table via org capture.

 My org file looks like this:
 [snip]

 My capture template looks like this:
 #+begin_src emacs-lisp
 (setq org-capture-templates
      '((x Testing table-line
       (file+headline c:/temp/TestCaptTbl.org Heading 1)
           | # | %t | %^{weight} | | :table-line-pos II-1)))
 #+end_src

 When I invoke capture I get the following error (backtrace):

 [snip]

 Now if I leave `:table-line-pos II-1' out of the template it works fine
 but the line is appended at the end. That's obviously not what I want.

 [snip]

As far as I can tell, the value of ‘:table-line-pos’ is supposed to be
a string.  This seems to work for me:

,
| (setq org-capture-templates
|   '((x Testing table-line
|  (file+headline Z:/temp/TestCaptTbl.org Heading 1)
|  | # | %t | %^{weight} | | :table-line-pos II-1)))
`

Hope this helps.
Aankhen



Re: [O] bug: hovering window obscures text

2011-05-03 Thread Aankhen
(Sorry for replying to my own message.)

On Tue, May 3, 2011 at 11:26, Aankhen aank...@gmail.com wrote:
 On Tue, May 3, 2011 at 11:11, Jambunathan K kjambunat...@gmail.com wrote:
 Aankhen aank...@gmail.com writes:

 On Mon, May 2, 2011 at 22:39, Samuel Wales samolog...@gmail.com wrote:
 On this page

  http://orgmode.org/worg/org-faq.html#closing-outline-sections

 a hovering window in the upper right corner obscures text.

 This is possibly, but not necessarily, especially so when you use large 
 fonts.

 To reproduce, set the minimum font size in Firefox to the largest
 available setting.

 I wonder if a non-hovering solution is possible?  I know we discussed
 this before at one point, with several good designs.

 I’m not familiar with the prior discussions.  The current design seems
 okay to me—notwithstanding the flaw you mention—because it strikes a
 good balance between making the TOC easily accessible and minimizing
 the amount of space it takes up.  Of course, this is predicated on the
 assumption that people actually want to use the TOC, and often enough
 to justify it taking up that space.

 Considering that Samuel is making his argument from accessibility
 perspective, Accessibility is one another predicate that is missing in
 your assumption.

 I’m not sure how accessibility is hindered, given that the contents of
 the page are still perfectly accessible.  All the fixed TOC does is
 obscure a very small portion of them on occasion, which can be
 rectified by scrolling.  I would call that inconvenient, not
 inaccessible.  Unless there’s more happening here beyond what I’ve
 seen, that is.

Poking around a little shows that the current design is entirely
unusable via keyboard.  Now that does seem like a gamebreaker,
accessibility-wise.

Aankhen



Re: [O] bug: hovering window obscures text

2011-05-02 Thread Aankhen
On Mon, May 2, 2011 at 22:39, Samuel Wales samolog...@gmail.com wrote:
 On this page

  http://orgmode.org/worg/org-faq.html#closing-outline-sections

 a hovering window in the upper right corner obscures text.

 This is possibly, but not necessarily, especially so when you use large fonts.

 To reproduce, set the minimum font size in Firefox to the largest
 available setting.

 I wonder if a non-hovering solution is possible?  I know we discussed
 this before at one point, with several good designs.

I’m not familiar with the prior discussions.  The current design seems
okay to me—notwithstanding the flaw you mention—because it strikes a
good balance between making the TOC easily accessible and minimizing
the amount of space it takes up.  Of course, this is predicated on the
assumption that people actually want to use the TOC, and often enough
to justify it taking up that space.

Meanwhile, for a quick fix, try this user style:

  http://userstyles.org/styles/47418/worg-disable-fixed-toc

Aankhen



Re: [O] bug: hovering window obscures text

2011-05-02 Thread Aankhen
On Tue, May 3, 2011 at 11:11, Jambunathan K kjambunat...@gmail.com wrote:
 Aankhen aank...@gmail.com writes:

 On Mon, May 2, 2011 at 22:39, Samuel Wales samolog...@gmail.com wrote:
 On this page

  http://orgmode.org/worg/org-faq.html#closing-outline-sections

 a hovering window in the upper right corner obscures text.

 This is possibly, but not necessarily, especially so when you use large 
 fonts.

 To reproduce, set the minimum font size in Firefox to the largest
 available setting.

 I wonder if a non-hovering solution is possible?  I know we discussed
 this before at one point, with several good designs.

 I’m not familiar with the prior discussions.  The current design seems
 okay to me—notwithstanding the flaw you mention—because it strikes a
 good balance between making the TOC easily accessible and minimizing
 the amount of space it takes up.  Of course, this is predicated on the
 assumption that people actually want to use the TOC, and often enough
 to justify it taking up that space.

 Considering that Samuel is making his argument from accessibility
 perspective, Accessibility is one another predicate that is missing in
 your assumption.

I’m not sure how accessibility is hindered, given that the contents of
the page are still perfectly accessible.  All the fixed TOC does is
obscure a very small portion of them on occasion, which can be
rectified by scrolling.  I would call that inconvenient, not
inaccessible.  Unless there’s more happening here beyond what I’ve
seen, that is.

Aankhen



Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Aankhen
Hi Stinky,

On Sat, Apr 23, 2011 at 12:54, Stinky Wizzleteet wizzlet...@hotmail.com wrote:
 thanks to help on this list I found out about this variable as I need to
 omit the textcomp and fontenc packages in my exported latex header.
 My tex file won't compile otherwise on my n900.

 my init.el contains :

 (custom-set-variables

  '(org-export-latex-default-packages-alist (quote ((AUTO inputenc t) 
 (T1 fontenc nil) ( fixltx2e nil) ( graphicx t) ( longtable 
 nil) ( float nil) ( wrapfig nil) ( soul t) ( textcomp nil) 
 ( marvosym t) ( wasysym t) ( latexsym t) ( amssymb t) ( 
 hyperref nil) \\tolerance=1000)))

 )

 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

That line you pasted contains both packages.  Maybe you forgot to set
it after customising it or some such thing?

Aankhen



Re: [O] editing org-export-latex-default-packages-alist has no effect

2011-04-23 Thread Aankhen
On Sat, Apr 23, 2011 at 23:51, Stinky Wizzleteet wizzlet...@hotmail.com wrote:
 Stinky Wizzleteet wizzlet...@hotmail.com writes:

 Aankhen aank...@gmail.com writes:
 -snip-
 However, fontenc and textcomp are still in the org-generated tex file.
 bug, or feature ?

 That line you pasted contains both packages.  Maybe you forgot to set
 it after customising it or some such thing?

 I figured that textcomp nil meant that textcomp was turned off..
 I'll try to erase the entry alltogether.

 Yes, I have confirmed now that I need to erase these items from the list
 in order for them to not show up in the header.
 The customize-variable system toggled the entries from t to nil,
 which apparently was not enough.
 I think this is a bug.

From the docstring:

,[ C-h v org-export-latex-default-packages-alist RET ]
| Each cell is of the format ( options package snippet-flag).
| If SNIPPET-FLAG is t, the package also needs to be included when
| compiling LaTeX snippets into images for inclusion into HTML.
`

If you look at the Customize interface, where you toggled it, the
label is ‘Snippet’.  The ‘INS’ and ‘DEL’ buttons are for manipulating
the list.

 But now, for me, it works.

 thx.

Glad I could help.

Aankhen



Re: [O] Timesheet from clocking data

2011-04-22 Thread Aankhen
Hi Bernt,

On Fri, Apr 22, 2011 at 03:25, Bernt Hansen be...@norang.ca wrote:
 Aankhen aank...@gmail.com writes:

 Greetings,

 Given an Org file with clocking data, is there a way to generate a
 timesheet?  This would complement the clock table by focusing on the
 timings rather than the headings.

 As I haven’t come across anything like this as yet, I’ll try to give
 an example (manually-created) to show what I mean, in case someone
 more familiar with Org can tell me something about it:

 ,[ Org tree ]
 | * Foo
 |   :CLOCK:
 |   CLOCK: [2011-04-19 Tue 18:50]--[2011-04-19 Tue 20:30] =  1:40
 |   CLOCK: [2011-04-18 Mon 20:15]--[2011-04-18 Mon 21:00] =  0:45
 |   CLOCK: [2011-04-21 Thu 01:03]--[2011-04-21 Thu 02:03] =  1:00
 |   :END:
 |   CLOCK: [2011-04-19 Tue 12:30]--[2011-04-19 Tue 18:06] =  5:36
 |
 |
 | *** Bar
 |     :CLOCK:
 |     CLOCK: [2011-04-19 Tue 18:06]--[2011-04-19 Tue 18:50] =  0:44
 |     CLOCK: [2011-04-22 Fri 01:00]--[2011-04-22 Fri 01:05] =  0:05
 |     :END:
 |
 | *** Baz
 |     :CLOCK:
 |     CLOCK: [2011-04-21 Thu 03:10]--[2011-04-21 Thu 04:00] =  0:50
 |     :END:
 `

 [snip]

 Hi Aankhen,

 There is no functionality that produces the table in your timesheet
 example that I am aware of.  Personally I use the agenda view with log
 mode enabled for clock lines and limited to some interesting tags and a
 summary report with C-u R.  I then manually transfer the data to another
 system for timesheet reporting.  I just visit each day in the timesheet
 range to get the details I want.

 You can generate daily reports with something like this

 #+BEGIN: clocktable :maxlevel 2 :scope agenda :fileskip0 t :step day :block 
 thisweek
 #+END:

 which gives a separate table per day but it doesn't include the time
 details.

I see, thank you for the answer.  I might end up using a second system
for this too, this time.  Maybe I’ll try writing something to produce
these tables in a few days, by hacking together bits from the clock
table.

Aankhen



Re: [O] Inline Images Showing as Link

2011-04-21 Thread Aankhen
Hi Andy,

On Thu, Apr 21, 2011 at 05:16, Andy Jewell ajew...@adaptu.com wrote:
 Hi. . . I'm having trouble getting an image URL to render as an inline image
 in the html export.  It always renders it as a link.

 I have an image saved on Google but Google doesn't preserve the extension
 which I think confuses org-mode since it doesn't look like an image.  Here's
 the markup:

 * See the image below:

 [[https://docs.google.com/leaf?id=0B-swGEqSDpxyMjgwNjE0MzEtMTA4OC00NTdmLWE3MjktMDJmOGE5ZWM2YjY0hl=en]]
 * See the image above

 I've tried adding a caption thinking that would provide a hint to render as
 an image but no success there.

 Can someone advise if there an option I'm missing?

The exporter uses the extension to figure out whether the location
being linked to is an image.  There is no extension here, so it
assumes you’re linking to a normal page.  Here are a few of the
relevant bits:

,[ C-h v org-export-html-inline-image-extensions RET ]
| org-export-html-inline-image-extensions is a variable defined in
`org-html.el'.
| Its value is (png jpeg jpg gif svg)
|
|
| Documentation:
| Extensions of image files that can be inlined into HTML.
|
| You can customize this variable.
`

,[ C-h f org-file-image-p RET ]
| org-file-image-p is a compiled Lisp function in `org.el'.
|
| (org-file-image-p FILE optional EXTENSIONS)
|
| Return non-nil if FILE is an image.
`

I think you’d need to majorly rejigger them to make Org recognize your
link as an image.

Aankhen



[O] Timesheet from clocking data

2011-04-21 Thread Aankhen
Greetings,

Given an Org file with clocking data, is there a way to generate a
timesheet?  This would complement the clock table by focusing on the
timings rather than the headings.

As I haven’t come across anything like this as yet, I’ll try to give
an example (manually-created) to show what I mean, in case someone
more familiar with Org can tell me something about it:

,[ Org tree ]
| * Foo
|   :CLOCK:
|   CLOCK: [2011-04-19 Tue 18:50]--[2011-04-19 Tue 20:30] =  1:40
|   CLOCK: [2011-04-18 Mon 20:15]--[2011-04-18 Mon 21:00] =  0:45
|   CLOCK: [2011-04-21 Thu 01:03]--[2011-04-21 Thu 02:03] =  1:00
|   :END:
|   CLOCK: [2011-04-19 Tue 12:30]--[2011-04-19 Tue 18:06] =  5:36
|
|
| *** Bar
| :CLOCK:
| CLOCK: [2011-04-19 Tue 18:06]--[2011-04-19 Tue 18:50] =  0:44
| CLOCK: [2011-04-22 Fri 01:00]--[2011-04-22 Fri 01:05] =  0:05
| :END:
|
| *** Baz
| :CLOCK:
| CLOCK: [2011-04-21 Thu 03:10]--[2011-04-21 Thu 04:00] =  0:50
| :END:
`

(Please ignore the very strange timings.  I just threw together
whatever I could for the sake of the example. :-)

The table:

#+BEGIN: timesheet :group day :scope subtree :block thisweek

Timesheet
| Entry| Time|   |
|--+-+---|
| *2011-40-18 Mon* | *00:45* |   |
|  20:15–21:00 | | 00:45 |
| *2011-04-19 Tue* | *08:00* |   |
|  12:30–20:30 | | 08:00 |
| *2011-04-21 Thu* | *01:50* |   |
|  01:03–02:03 | | 01:00 |
|  03:10–04:00 | | 00:50 |
| *2011-04-22 Fri* | *01:00* |   |
|  01:00–01:05 | | 01:05 |
|--+-+---|
| Total| 11:35   |   |

#+END:

As you can see, each day with any time clocked gets one entry in the
table.  Underneath that entry are all the non-contiguous blocks of
time clocked in during that day.  Clocked times from subtrees are
summed up and subsumed by their parents, so in the example given,
there is one single contiguous block from 12:30 to 20:30 on Tuesday,
whereas there are two entries for the non-contiguous blocks on
Thursday.

I really have no idea where to begin in order to obtain this sort of
report, if it is even possible.  Any pointers would be most
appreciated!

Thanks,
Aankhen



Re: [O] [PATCH] * org-html.el (org-html-handle-links): add an alternate for inline images

2011-04-20 Thread Aankhen
On Wed, Apr 20, 2011 at 13:39, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:
 Aankhen aank...@gmail.com writes:

 This might not be the best solution.  The purpose of the ‘alt’
 attribute is to provide a textual alternative, which the file name
 really isn’t.  It would be better to provide an empty value:

 [snip]

 I knew it was not the best solution: all i wanted was to validate. But
 an empty alt or maybe just image is fine by me too.

Fair enough. :-) ‘image’ would be about the same as the file name in
terms of useful alt text.

 I took a look at ‘org-html.el’ and changed the relevant line, but it
 doesn’t seem to have any effect.

 I've tested my patch only on [[big_image.png][small_image.png]] kind of
 link (maybe that's why).

Possibly—while I was hacking on it, I couldn’t quite pin down when it
had an effect and when it didn’t.

 [snip]

 Ok, those 2 last hunk should complete my patch I guess. But what I'd
 really like is a way to set a alt as a user. Maybe something like this:

   [[big_image.png][small_image.png|my picture is cool]]

 What you guys think? I'll look what i can do and try to make it work for
 anykind of img tag that can be generated.

Well, there /is/ a way to do that already, it’s just verbose:

,[ Org ]
| * Foo
| #+ATTR_HTML: alt=The elusive foo in its native habitat.
| [[file:foo.png]]
`

,[ HTML ]
| div id=outline-container-1 class=outline-2
| h2 id=sec-1span class=section-number-21/span Foo /h2
| div class=outline-text-2 id=text-1
|
| pimg src=foo.png alt=The elusive foo in its native habitat. /
| /p/div
| /div
`

I’d suggest using the description part of the link as the alt text,
but then there’d be no way to provide the actual link text (or image,
as the case may be), so that’s a non-starter.

Aankhen



Re: [O] Feature request: modify italic regexp list to include non-breaking space and other characters

2011-04-20 Thread Aankhen
On Wed, Apr 20, 2011 at 20:34,  amscopub-m...@yahoo.com wrote:
 Sample code:
  Using /a/’s and /b/’s, write add /x/ + 2.
           ^         ^                ^ ^
       Right single quotation mark    Non-breaking space

 Expected HTML export:
  Using ia/i’s and ib/i’s, write ix/i + 2.

 Actual HTML export:
  Using /a/’s and /b/’s, write add /x/ + 2.

Interestingly, the development version treats this differently, as it
considers all the text from the first slash to the last part of the
emphasis:

,
| pUsing ia/’s and /b/’s, write add /x/i + 2.
| /p
`

(This behaviour occurs in the original Org buffer as well, in case
anyone’s wondering.  The exported HTML was just the easiest way to
show it.)

 If it's not clear, the sample code uses the unicode character right single 
 character instead of an apostrophe and non-breaking space instead of 
 regular white space.

 It makes sense to use these characters this way, however, orgmode neither 
 displays the italic expressions correctly nor exports them correctly.

 I believe older versions of orgmode worked in the expected way.

 How can I modify the regexp list? Bold characters are also affected.

These two variables are used to configure the regexp:

,[ C-h v org-emphasis-alist RET ]
| org-emphasis-alist is a variable defined in `org.el'.
| Its value is ((* bold b /b)
|  (/ italic i /i)
|  (_ underline span style=\text-decoration:underline;\ /span)
|  (= org-code code /code verbatim)
|  (~ org-verbatim code /code verbatim)
|  (+
|   (:strike-through t)
|   del /del))
|
|
| Documentation:
| Special syntax for emphasized text.
| Text starting and ending with a special character will be emphasized, for
| example *bold*, _underlined_ and /italic/.  This variable sets the marker
| characters, the face to be used by font-lock for highlighting in Org-mode
| Emacs buffers, and the HTML tags to be used for this.
| For LaTeX export, see the variable `org-export-latex-emphasis-alist'.
| For DocBook export, see the variable `org-export-docbook-emphasis-alist'.
| Use customize to modify this, or restart Emacs after changing it.
|
| You can customize this variable.
`

,[ C-h v org-emphasis-regexp-components RET ]
| org-emphasis-regexp-components is a variable defined in `org.el'.
| Its value is (   ('\{ -   .,:!?;'\)}\\ 
\n,\' . 1)
|
|
| Documentation:
| Components used to build the regular expression for emphasis.
| This is a list with five entries.  Terminology:  In an emphasis string
| like  *strong word* , we call the initial space PREMATCH, the final
| space POSTMATCH, the stars MARKERS, s and d are BORDER characters
| and trong wor is the body.  The different components in this variable
| specify what is allowed/forbidden in each part:
|
| pre  Chars allowed as prematch.  Beginning of line will be
allowed too.
| post Chars allowed as postmatch.  End of line will be allowed too.
| border   The chars *forbidden* as border characters.
| body-regexp  A regexp like . to match a body character.  Don't use
|  non-shy groups here, and don't allow newline here.
| newline  The maximum number of newlines allowed in an emphasis exp.
|
| Use customize to modify this, or restart Emacs after changing it.
|
| You can customize this variable.
|
| [back]
`

I’d say that ‘pre’/‘post’ should really contain [[:space:]], but then
Org’s syntax table seems to treat the non-breaking space as
punctuation, so that wouldn’t help.  You could try adding the
character itself to both of those categories for a fix.  You’ll need
to restart Emacs afterwards (unless you used the Customize interface)
so that ‘org-emph-re’ is updated accordingly.

 Using 7.4.

This little problem aside, you might want to upgrade (if not to the
development version, at least to 7.5).

Aankhen



Re: [O] NEW auto dimension tables doesn't work in orgtbl Text mode

2011-04-20 Thread Aankhen
On Thu, Apr 21, 2011 at 00:53, Sebastian Szwarc seba_szw...@tlen.pl wrote:
 Ok here it is:
 Aquamacs version: newest :)
 Snow Leopard 10.6.7

 Set - unicode UTF-8
 Font  for text mode - Lucida Grande 13pt

 And this is how it looks

 http://img861.imageshack.us/i/zrzutekranu20110420godz.png/

Samuel Wales was on the money: Lucida Grande is a variable-width font.
Org-mode expects fixed-width (monospaced) fonts, i.e. fonts where
every character has the same width, such as Courier or Consolas.  With
a fixed-width font, tables can be aligned by simply making sure each
cell contains the same number of characters through padding smaller
values with spaces and truncating larger values.  With a
variable-width font, on the other hand, it’s much more complicated (if
it’s possible at all—I think you’d have to do weird things with
images).

Try a different font, e.g. Lucida Console, and you will see things
lining up correctly.

Aankhen



Re: [O] [PATCH] * org-html.el (org-html-handle-links): add an alternate for inline images

2011-04-19 Thread Aankhen
Hi,

On Tue, Apr 19, 2011 at 14:52, Bastien b...@altern.org wrote:
 Applied, thanks.

 Manuel Giraud manuel.gir...@univ-nantes.fr writes:

 ---
  lisp/org-html.el |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/lisp/org-html.el b/lisp/org-html.el
 index 5d53478..7a4564d 100644
 --- a/lisp/org-html.el
 +++ b/lisp/org-html.el
 @@ -888,7 +888,8 @@ OPT-PLIST is the export options list.
         (if (string-match ^file: desc)
             (setq desc (substring desc (match-end 0)
       (setq desc (org-add-props
 -                    (concat img src=\ desc \/)
 +                    (concat img src=\ desc \ alt=\
 +                            (file-name-nondirectory desc) \/)
                      '(org-protected t
        (cond
         ((equal type internal)

This might not be the best solution.  The purpose of the ‘alt’
attribute is to provide a textual alternative, which the file name
really isn’t.  It would be better to provide an empty value:

,
| img src=foo.png alt=/
`

I took a look at ‘org-html.el’ and changed the relevant line, but it
doesn’t seem to have any effect.  I think it’s being overriden by
‘org-export-html-format-image’, so I changed that as well.  Here’s the
resultant patch:

--8---cut here---start-8---
diff --git a/lisp/org-html.el b/lisp/org-html.el
index 7a4564d..570d7d6 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -888,8 +888,7 @@ OPT-PLIST is the export options list.
  (if (string-match ^file: desc)
  (setq desc (substring desc (match-end 0)
(setq desc (org-add-props
-  (concat img src=\ desc \ alt=\
-  (file-name-nondirectory desc) \/)
+  (concat img src=\ desc \ alt=\\/)
   '(org-protected t
   (cond
((equal type internal)
@@ -1839,8 +1838,8 @@ lang=\%s\ xml:lang=\%s\
   Create image tag with source and attributes.
   (save-match-data
 (if (string-match ^ltxpng/ src)
-   (format img src=\%s\ alt=\%s\/
-src (org-find-text-property-in-string 'org-latex-src src))
+   (format img src=\%s\ alt=\\/
+src)
   (let* ((caption (org-find-text-property-in-string 'org-caption src))
 (attr (org-find-text-property-in-string 'org-attributes src))
 (label (org-find-text-property-in-string 'org-label src)))
@@ -1855,7 +1854,7 @@ lang=\%s\ xml:lang=\%s\
src
(if (string-match \\alt= (or attr ))
(concat   attr )
- (concat   attr  alt=\ src \)))
+ (concat   attr  alt=\\)))
(if caption
(format /p%s
 /div%s
--8---cut here---end---8---

Aankhen



Re: [O] [BUG] HTML Export/Broken coderef links?

2011-04-13 Thread Aankhen
On Tue, Apr 12, 2011 at 17:31, Jambunathan K kjambunat...@gmail.com wrote:

 On HTML export, I am unable to follow references to lines within the
 code examples.

 Firefox complains with the following message:

 Firefox doesn't know how to open this address; because the
 protocol(coderef) isn't associated with any program.

 [snip]

Try the attached patch for a quick fix.  Works here.

Aankhen


fix-coderefs-in-html.patch
Description: Binary data


Re: [O] [BUG] HTML Export/Broken coderef links?

2011-04-13 Thread Aankhen
Oops, looks like I’m rather late.  Scratch that. :-)

Aankhen



Re: [O] Re: export options toc:t depends on num:t

2011-04-06 Thread Aankhen
On Wed, Apr 6, 2011 at 10:18, Jambunathan K kjambunat...@gmail.com wrote:
 John Hendy jw.he...@gmail.com writes:
 [snip]
 Maybe this is obvious to most, but I was puzzled by it. It seems that
 ,---
 | #+options: toc:t
 `---

 will not function when paired with:
 ,---
 | #+options: toc:t num:nil
 `---
 [snip]

 Is this a LaTeX specific behaviour? I don't see anything odd with HTML
 export.

It likely is specific to LaTeX.  The starred versions of the
sectioning commands suppress the entry in the TOC as well.  It’s
possible to manually add the entry regardless, so maybe that needs to
be special-cased in the exporter.  It’d look like this:

,
| \phantomsection % to make PDF bookmarks work properly
| \section*{Introduction}
| \addcontentsline{toc}{section}{Introduction}
`

Alternatively, use the regular sectioning commands but add this before
\begin{document}:

,
| \setcounter{secnumdepth}{0}
`

Aankhen



Re: [O] Re: unnumbered subsections in latex export

2011-04-05 Thread Aankhen
Hi Sébastien,

2011/4/5 Sébastien Vauban wxhgmqzgw...@spammotel.com:
 Aankhen wrote:
 [snip]
 Acronyms are natively supported in HTML. That is all.

 Thanks for reporting this. Wasn't aware of it. Though, that does not alter the
 need (at least, what I consider so) for acronyms handling in/from Org.

 Let's clarify what I'm talking about -- I know, I should have done it earlier.

 I want to be able to say, in my Org file, that DNS is an acronym, for example.
 I'm thinking -- brainstorming! -- at a solution _such as_ adding accolades
 around the acronyms:

 --8---cut here---start-8---
 This paper talks about {DNS} clients and {DNS} servers...
 --8---cut here---end---8---

 In LaTeX, this should have to be translated to:

 --8---cut here---start-8---
 This paper talks about \acro{DNS} clients and \acro{DNS} servers...
 --8---cut here---end---8---

 And the effects would be that:

 1. the first occurrence of the acronym would be expanded in the PDF, while
   others not -- this is customizable!

 2. every occurrence would be a link to the list of acronyms, at the end of the
   document.

 In HTML, I would expect internal links to a list of acronyms at the end of the
 document.

 I was thinking at preprocessing, because some smart things need to be done:

 - expanding the first occurrence of the acronym (if wished) with its
  definition, not the following;

 - in the list, at the end of the document, only list acronym definitions for
  the acronyms that have been used in the document.

Thank you for the clarifications.  I’m going to talk a bit more about
HTML as that’s where I have the most experience.  I am in agreement
with you when you say that builtin support for acronyms would be
useful (although I feel it would be good to generalize it to
abbreviations, if that can also be supported in other backends).  When
you have the following markup:

,
| acronym title=Hypertext Markup LanguageHTML/acronym is a
| language for marking up documents.  The most current version
| of acronym title=Hypertext Markup LanguageHTML/acronym is 4.01.
| The successor to acronym title=Hypertext Markup
| LanguageHTML/acronym, HTML5, is currently under development.
`

The expansion is invisible by default; it shows up in a tooltip when
you hover over the text.  You can try a live example to see for
yourself.[1] In this way, the expansion is always there when you need
it (and you can distinguish between multiple terms sharing the same
acronym, should the need ever arise), but it takes up no space if you
don’t.

I would suggest that, were Org to gain support for acronyms and/or
abbreviations, they be exported in HTML using ‘abbr’ (‘acronym’ is
deprecated thanks to HTML5) with the ‘title’ defined for each
occurrence, and with CSS to ensure consistent rendering, along these
lines:

,
| abbr { font-variant: small-caps; border-bottom: 1px dashed; cursor: help; }
`

I can see the argument for having a list at the end and linking each
definition instead.  I feel that’s less convenient, however, as (a) it
means temporarily losing your place in the document and (b) bunched-up
anchors at the end of a document are a pain.  Of course,
alternatively, each acronym/abbreviation could be marked up only at
the first occurrence; that seems like it would be easy to implement as
a configuration option.

 For the readability of the Org buffer, and for the behavior that we could
 expect, maybe a new link type would make it?

The only thing is, links can’t be nested, can they?  I’m thinking of a
situation like ‘read the HTML 4.01 specification online’, where the
entire text is a link and ‘HTML’ is an abbreviation.  I suppose this
might not be a particularly important use case.

 I would expect a similar treatment for the bibliography: having some built-in
 representation for that in Org, and have the exporters make it to both LaTeX
 and HTML (and ...).

I have no experience or opinions when it comes to bibliographies, so
I’ll abstain from commenting beyond saying that it seems logical to
have a centralized database at least within an Org file. :-)

Aankhen

[1]: https://developer.mozilla.org/en/HTML/Element/acronym



Re: [O] Re: unnumbered subsections in latex export

2011-04-05 Thread Aankhen
On Wed, Apr 6, 2011 at 00:57, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 Aankhen aank...@gmail.com writes:

 [...]

 Thank you for the clarifications.  I’m going to talk a bit more about
 HTML as that’s where I have the most experience.  I am in agreement
 with you when you say that builtin support for acronyms would be
 useful (although I feel it would be good to generalize it to
 abbreviations, if that can also be supported in other backends).  When
 you have the following markup:

 ,
 | acronym title=Hypertext Markup LanguageHTML/acronym is a
 | language for marking up documents.  The most current version
 | of acronym title=Hypertext Markup LanguageHTML/acronym is 4.01.
 | The successor to acronym title=Hypertext Markup
 | LanguageHTML/acronym, HTML5, is currently under development.
 `

 The expansion is invisible by default; it shows up in a tooltip when
 you hover over the text.  You can try a live example to see for
 yourself.[1] In this way, the expansion is always there when you need
 it (and you can distinguish between multiple terms sharing the same
 acronym, should the need ever arise), but it takes up no space if you
 don’t.

 There are those of us that, for one reason or another, do *not* use a
 mouse or any other graphical pointer.  Tooltips do not appear ever in
 those cases.  I would like a solution that does not rely on any
 particular graphical interface paradigm, basically!

 Of course, I know that I am in the minority here... but accessibility is
 always an important factor and one that should not be ignored, IMO.

Yes, I absolutely understand the concern, and I must confess I had
overlooked it.  I’m not certain how text-based browsers deal with
‘title’ attributes in general.  I see that Lynx, for one, can make use
of them on links.[1] Unfortunately, I can’t find any material on other
text mode browsers.  Everything I read points at them mostly ignoring
‘title’.  Ideally, text mode browsers would provide a way to get at
it, as there is nothing tying the attribute to a graphical interface;
in practice, it would seem that they took the easy way out.
Understandable, given the rampant abuse of the tag.


 I would suggest that, were Org to gain support for acronyms and/or
 abbreviations, they be exported in HTML using ‘abbr’ (‘acronym’ is
 deprecated thanks to HTML5) with the ‘title’ defined for each
 occurrence, and with CSS to ensure consistent rendering, along these
 lines:

 ,
 | abbr { font-variant: small-caps; border-bottom: 1px dashed; cursor: help; }
 `

 Does this still rely on tooltips?

Yes.  This CSS is only meant to standardize the presentation across
graphical browsers.  It is entirely possible to use CSS to display the
expansion, I’m just not sure of the utility (and it relies on the
browser not throwing away CSS):

,
| abbr[title]:after, acronym[title]:after { content:  [ attr(title) ]; }
`

It defeats the purpose of the exercise in any case.

 I can see the argument for having a list at the end and linking each
 definition instead.  I feel that’s less convenient, however, as (a) it
 means temporarily losing your place in the document and (b) bunched-up
 anchors at the end of a document are a pain.  Of course,
 alternatively, each acronym/abbreviation could be marked up only at
 the first occurrence; that seems like it would be easy to implement as
 a configuration option.

 I would like a combination of both, whenever possible: fully expanded
 def'n in the text at the first occurrence and links to the list of
 abbreviations/acronyms at the end for subsequent occurrences (modulo the
 problems with double-links etc, for which I cannot propose a solution
 unfortunately).

Taking into consideration the fact that text-based browsers seem to
ignore ‘title’, I can only agree with you.  How about something like
this:

,
| pI’m going to introduce a new abbrTLA/abbr (Three-Letter
| Acronym).  This a href=#abbr-TLATLA/a is a very
| special a href=#abbr-TLATLA/a as it comes straight from my
| heart.
| ⋮
| h2Acronyms amp; abbreviations/h2
| dl
|   dt id=abbr-TLATLA
|   ddThree-Letter Acronym
|   dt id=abbr-YAAAYAAA
|   ddYet Another Alliterative Acronym
|   dt id=abbr-DrDr.
|   ddDoctor
| /dl
`

In case of a nested link, maybe a break in the outer link could solve it:

,
| Let us read a href=http://www.w3.org/TR/html401/;the
| HTML/asupa href=#abbr-HTML[def]/a/supa
href=http://www.w3.org/TR/html401/;
| specification/a together.
`

Not particularly pretty, but it seems to get the job done.  Just one option.

At any rate, thanks for pointing this out.

Aankhen

[1]: http://diveintoaccessibility.org/day_14_adding_titles_to_links.html



Re: [O] Re: unnumbered subsections in latex export

2011-04-04 Thread Aankhen
Hullo,

2011/4/4 Sébastien Vauban wxhgmqzgw...@spammotel.com:
 [snip]

 When discussing exporters and features, two things that come up to my mind as
 missing as a general Org feature:

 - bibliography :: works for LaTeX[1], not for HTML export.
 - acronyms :: idem.

 Maybe those should be made available for general Org usage by making them
 somehow part of the preprocessing?

FWIW, acronyms wouldn’t need any preprocessing for HTML export.  Or
maybe they would: HTML has both ‘acronym’ and ‘abbr’ (abbreviation)
elements, the distinction between them being a little hard to make.
Could go the other way and provide both in Org and combine them where
there’s no distinction, I suppose.

Uhm, anyway.  Acronyms are natively supported in HTML.  That is all.

Aankhen



Re: [O] org-attach link proposal

2011-04-01 Thread Aankhen
Hi Juraj,

On Fri, Apr 1, 2011 at 16:32, Juraj Kubelka juraj.kube...@gmail.com wrote:
 I played a bit with org-attach. It is great package! Thanks for it! :)
 I have one proposal. So at first why:
 I would like to do something like this:
 * Project documents
   :PROPERTIES:
   :Attachments: first.doc second.doc third.doc
   :ID:       37773ace-b471-4003-a8d1-448e7c48f77b
   :END:
   + the first document about something1 [[att:first.doc]]
   + the second document  [[att:second.doc]]
   + the third document [[att:third.doc]]
 in order to easily access it just by click on related link.
 So I defined method:
 (defun org-attach-open-link (file optional in-emacs)
   (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
 and link:
 #+LINK: att elisp:(org-attach-open-link %s)
 and it works. but always asks if I want to execute elisp code.
 Would it be possible to integrate it directly to org-mode like http: and
 others? I am not sure how to do it.

I believe this should be possible using a bit of Elisp:

,
| (org-add-link-type att 'org-attach-open-link)
|
| (defun org-attach-open-link (file optional in-emacs)
|   (org-open-file (expand-file-name file (org-attach-dir t)) in-emacs))
`

Put that in your init file, or wherever you place your customizations.
 You can read more about adding new hyperlink types in the manual.[1]
By the way, the function is only passed a single argument (the text of
the link); ‘in-emacs’ will always be ‘nil’, unless you’re also calling
it programmatically elsewhere.

Aankhen

[1]: http://orgmode.org/org.html#Adding-hyperlink-types



[O] Enforcing drawer setup

2011-04-01 Thread Aankhen
Hi,

Is there any command I can run to put into effect my
‘org-log-into-drawer’ setting?  I recently changed it to ‘t’, but I
have a fair number of existing entries where it was ‘nil’, meaning
that the files as a whole look rather haphazardly organized.

Thanks,
Aankhen



[O] Re: Enforcing drawer setup

2011-04-01 Thread Aankhen
Hi Bernt,

On Fri, Apr 1, 2011 at 22:31, Bernt Hansen be...@norang.ca wrote:
 Aankhen aank...@gmail.com writes:
 Is there any command I can run to put into effect my
 ‘org-log-into-drawer’ setting?  I recently changed it to ‘t’, but I
 have a fair number of existing entries where it was ‘nil’, meaning
 that the files as a whole look rather haphazardly organized.

 Thanks,
 Aankhen

 Hi Aankhen,

 There's not built-in function to accomplish this that I am aware of.

 This is a bit of a hack but it will probably get you the result you
 want.  If you set org-clock-into-drawer to the drawer than you want and
 set org-clock-out-remove-zero-time-clocks then you can visit each
 heading using some elisp code, clock in and immediately clock out the
 headline and it should create a drawer and wrap your existing data.

 I haven't actually done this... so YMMV.

Yes, that was my first thought when I enabled logging into a drawer,
as I thought I’d read about it working that way, but unfortunately it
doesn’t seem to. :-( I appreciate the suggestion though.

Aankhen



Re: [O] Re: Continuation of main section text after subsections ?

2011-03-31 Thread Aankhen
On Fri, Apr 1, 2011 at 01:34, Matt Lundin m...@imapmail.org wrote:
 Samuel Wales samolog...@gmail.com writes:

 IIUC, OP wants to move stuff around more easily and not have improper
 body text folded.  Improper in this case means belonging to the
 grandparent but after parents.  He doesn't need improper outline
 exporting.

 Correct?

 Agreed. That's how I read it. The issue has to do with visibility and
 folding while editing, not with exporting (since html and latex can't
 render such a nested structure).

Just to clarify, HTML can, while LaTeX and DocBook can’t.  No idea
about the remaining export formats.

Aankhen



Re: [O] Re: Continuation of main section text after subsections ?

2011-03-30 Thread Aankhen
On Wed, Mar 30, 2011 at 00:29, Matt Lundin m...@imapmail.org wrote:
 William Gardella gardell...@gmail.com writes:

 I think org-mode should aim to be flexible enough to accomodate all
 writers, writing tasks, and writing styles.  Maybe for this particular
 issue it would be enough to give org-mode an explicit way to close a
 heading--an Org-wide equivalent to \end{section} in LaTeX, say.

 Is there an \end{section} in LaTeX?

No, hence my question earlier in the thread: how would one return to
an enclosing context in LaTeX or DocBook?  After all, it wouldn’t make
sense to allow it in org-mode and then have the text end up as part of
the last subsection when exported.

Aankhen



Re: [O] Re: Test framework needed

2011-03-30 Thread Aankhen
On Wed, Mar 30, 2011 at 20:43, Manuel Giraud
manuel.gir...@univ-nantes.fr wrote:
 Rainer M Krug r.m.k...@gmail.com writes:
 [snip]

 Please correct me if I am missing something.

 This suite should actually be updated with effectively each patch which
 introduces new features and run after each patch.

 Which renders this framework far less automatic. I think that having a
 set of org files against which one could try any export and *see* that
 the results are almost correct would be enough.

I think the “automated” part refers to running the tests.  What you
suggest—having a set of files that you could manually export to verify
the results—wouldn’t be of much help, IMHO.  First, it’d require a lot
more time than executing a single command and checking the summary at
the end.  Second, it’d be very error-prone.

A comprehensive automated test suite gives people writing patches an
easier way to perform regression testing and catch any unintended
consequences.  On the other hand, it /does/ take a lot of effort to
keep it in sync with the codebase… maybe we need a Test Fairy. ;-)

Aankhen



Re: [O] latex export settings in init files

2011-03-28 Thread Aankhen
Hi Chris,

On Mon, Mar 28, 2011 at 17:25, Chris Beard wcbear...@wabash.edu wrote:
 Hello,
 I've tried to modify some default latex export settings based on info from 
 here
 http://www.mail-archive.com/emacs-orgmode@gnu.org/msg07645.html

 I basically add to the org-mode-hook to do:

 [snip]

 This works if I evaluate it after I've been exporting to latex, but I
 get an error whenever I start up emacs:

 setq: Symbol's value as variable is void: org-export-latex-classes

 I'm guessing there's some org-mode latex-export thing that I need to
 load first, but I'm not very familiar with how to do this. Any advice?

An alternative to flat out ‘require’-ing everything is
‘eval-after-load’.  For example:

,
| (eval-after-load 'org-export-latex
|   '(progn
|  (add-to-list org-export-latex-classes '(myarticle . ...))
|
|  (setq org-export-latex-date-format %Y %B %d
|org-export-latex-custom-lang-environments '((python listings)
`

I use this approach  autoloads almost universally in my init file,
following some advice I read.[1] It’s a trade-off between failing
early if you have errors and speeding up Emacs’s initialization.  It
can also be less than straightforward to understand…

Aankhen

[1]: http://a-nickels-worth.blogspot.com/2007/11/effective-emacs.html



Re: [O] Re: Continuation of main section text after subsections ?

2011-03-27 Thread Aankhen
Hullo,

On Sun, Mar 27, 2011 at 22:32, William Gardella gardell...@gmail.com wrote:
 Marcel van der Boom mar...@hsdev.com writes:

 On zo 27-mrt-2011 16:52
 Cian cian.ocon...@gmail.com wrote:

 You can't do that, as it would be akin to trying to have in a book

 Section 1
 Stuff
 Section 1.1.1
 More stuff

 Now this goes under Section 1

 Not really an idiom that makes sense (I find its best to think of
 org-mode's headings as chapter headers

 Agreed, for paper books that would not make much sense (depending on
 how you do it) and that fact kept me from asking the question for a
 while.
 For electronic texts however, especially in the drafting stage where
 (sub-)sections get shuffled around, promoted, demoted, split etc. it
 does make sense, to me at least.

 When writing I tend to think about org headings as 'handles' to a
 logical block of information, including its child blocks. Apparently my
 analogy clashes with what org-mode wants. I had my hopes on a
 customization option.

 Is there a strong reason this could not work as an option in org-mode?

 marcel

 Marcel,

 I think this is not yet easily possible in org-mode due to the
 limitations of org's rather simple concept of markup.  Because org tries
 to stay out of the way of the user's choice of indentation flow, for
 example, whitespace can't be used to indicate that your text has
 returned to the top level after entering a subheading.  And unlike in,
 e.g., HTML or LaTeX, there's no way of closing the subheading
 environment explicitly.

 As Cian suggests, some alternatives you can use are to employ drawers or
 environments such as #+BEGIN_NOTE.

 I also use Org as a drafting tool, mostly for documents that will end up
 as papers or legal documents rendered with LaTeX.  There are a few
 ambiguities in the markup that are hard to resolve without going the
 additional step of exporting to HTML or LaTeX and editing that output.
 You've just stumbled into one of them...

Out of curiosity, how would you return to an enclosing context in
LaTeX or DocBook?  In HTML, of course, you can nest ‘div’ elements (or
proper ‘section’ elements in HTML5) and alternate subsections and text
to your heart’s content.  As far as I know, there is no equivalent in
the other two formats: you need to use other containers within the
section, such as lists or tables.

Aankhen



Re: [O] org-remember and lists

2011-03-25 Thread Aankhen
Hullo,

On Fri, Mar 25, 2011 at 02:07, Radosław Grzanka radosl...@gmail.com wrote:
  I'm trying to tweak remember templates to follow my needs but I
 fail. I want to do template for my shopping list entries like this:

 (setq org-remember-templates (list
                               (list shopping ?s - [ ] %?\n (concat 
 org-directory
 notes.org) Shopping List)
 ))

 However after saving, there is header prepended to this like:

 ** Thu Mar 24 21:32:49 2011 (- [ ] apples)
   - [ ] apples

 I don't want this - I already have heading with all the info I need *
 Shopping List. ;) I don't know how to accomplish that.

 Any help?

I’m not sure what the problem is here, but ‘org-capture’ is preferred
over remember these days; maybe that would work better for you:

,
| (require 'org-capture)
| (global-set-key (kbd C-M-z) 'org-capture) ; use any key you like
| (setq org-capture-templates `((s Shopping checkitem
|(file+headline ,(concat org-directory
notes.org)
|   Shopping List
`

Take a look at the manual for more.[1] You may need to update your Org
installation and add the ‘contrib’ directory to ‘load-path’ in order
to use ‘org-capture’.

Hope this helps,
Aankhen

[1]: http://orgmode.org/org.html#Capture



Re: [O] Re: Completing with anything

2011-03-22 Thread Aankhen
On Mon, Mar 21, 2011 at 22:34, Julien Danjou jul...@danjou.info wrote:
 On Mon, Mar 21 2011, Stefan Monnier wrote:

 As Tassilo mentions, maybe we could have a post-completion step that can
 perform some kind of expansion/replacement/cleanup once a valid
 completion is selected.  I'm not sure what that would look like in terms
 of code and API, but if someone wants to try it out a propose a patch to
 start a discussion, maybe we could add such a thing.

 Or maybe an upper layer mixing abbrev and completion? Trying one at
 first, the other one after. This could be useful for message-mode for
 example, since you probably wants to use both.

Isn’t this what hippie-expand does?



Re: [O] Re: Merging .org files

2011-03-19 Thread Aankhen
On Sat, Mar 19, 2011 at 02:08, Matt Lundin m...@imapmail.org wrote:
 Pere Quintana Seguí pquint...@obsebre.es writes:

 Now I have to learn to better navigate within my much longer org files.
 Before, I used ido-mode to jump from buffer to buffer, now I guess I
 have to practise more sparse trees to jump from headline to headline.

 I use this function to jump quickly (via ido) to a first level headline
 in my org files:

 [snip]

Do you normally have ‘org-completion-use-ido’ turned off or something?
(Just wondering why you couldn’t use ‘org-refile’ directly.)

Aankhen



[O] Re: Merging .org files

2011-03-19 Thread Aankhen
On Sat, Mar 19, 2011 at 18:23, Matt Lundin m...@imapmail.org wrote:
 Aankhen aank...@gmail.com writes:
 [snip]

 Do you normally have ‘org-completion-use-ido’ turned off or something?
 (Just wondering why you couldn’t use ‘org-refile’ directly.)

 Yes, that is correct. I normally have org-completion-use-ido turned off.

 You could easily call org-refile with a prefix argument directly from
 within an org-buffer. However, I find it more convenient to bind
 (org-refile t) to one of the function keys than to type C-u C-c C-w.
 The latter works only on org buffers, while the former is global.
 Moreover, when navigating org files in this way, I only want to see
 first level headlines, whereas my default refile binding uses deeper
 levels.

A’right, makes sense.  I appreciate the detailed explanation.

Aankhen



Re: [O] Re: [Bug] MCE for HTML test of export

2011-03-19 Thread Aankhen
On Sat, Mar 19, 2011 at 22:55, Nicolas n.goaz...@gmail.com wrote:
 [snip]

 Also, you may have a look at default templates, as your HTML variant is
 slightly wrong (wrt br tag).

 I'm not sure to understand what's wrong. You mean the fact I added manually
 a br tag after the title?

 I just meant that you could replace br by br /. I think both are
 valid HTML-wise, but Emacs doesn't report an error with the latter.

br is valid HTML, br / is valid XHTML.  Browsers will treat both
the same way in almost every case since it’s all tag soup to them.[1]
Org uses XHTML as far as I can tell, so br / is the correct choice
here.

Aankhen

[1]: Unless you’re serving it up as real XHTML, which I highly doubt. ;-)



[O] Re: Automatically clocking into parent items

2011-03-14 Thread Aankhen
On Sun, Mar 13, 2011 at 01:30, Aankhen aank...@gmail.com wrote:
 I’ve been working on getting org-mode to automatically clock into an
 item’s ancestor when clocking out of that item.  The way I have it set
 up now, it walks up the tree looking for an item that has a particular
 property set.  If that property is non-nil, it clocks in; if it’s nil,
 it doesn’t.  Either way, it stops looking at that point.  Here’s what
 I have so far:

 [snip]

 So given this structure:

 [snip]

 When I clock out of ‘Frob’, I’m automatically clocked into ‘Quux’, and
 when I clock out of ‘Quux’, I’m automatically clocked into ‘Bar’.
 This works pretty well, except for one problem: it happens *every
 time* I clock out, meaning that if I’m clocked into ‘Quux’ and I then
 hit C-c C-x C-i on ‘Frob’, I end up being clocked into both ‘Bar’ and
 ‘Frob’, because I’m automatically clocked out of ‘Quux’; my code is
 run, clocking me into ‘Bar’; and then the normal clocking mechanism
 clocks me into ‘Frob’ (at least, I *think* the hook runs first).

 I guess what I’m wondering is, what’s a good way to avoid this
 double-clocking?  And while I’m asking for help, can anyone think of
 some less obnoxious names for the functions, variables and property?
 :-)

I think I managed to answer the first question myself.  As
‘org-clock-in’ sets ‘org-clock-clocking-in’ before calling
‘org-clock-out’, checking the value of that variable before clocking
into the parent item seems to have done the trick.

Aankhen



Re: [O] [BUG] Unmatched #+end-src

2011-03-12 Thread Aankhen
Hi,

On Sat, Mar 12, 2011 at 22:26, Martyn Jago martyn.j...@btinternet.com wrote:
 --8---cut here---start-8---
 * Unmatched #+end-src bug

 #+end_src
 --8---cut here---end---8---

 With the above simple org file, placing the cursor at the end of
 #+end_src and hitting return causes emacs to hang.

 The bug can be replicated with the following simple test which also
 causes emacs to hang...

 [snip]

 It appears to be related to the following in 'org-in-item-p
 (org-list.el)...

 --8---cut here---start-8---
               ((looking-at ^[ \t]*#\\+end_)
                (re-search-backward ^[ \t]*#\\+begin_ nil t))
 --8---cut here---end---8---

 I've tried to pin down the bug but its left me perplexed, so I'm going
 to defer to more experienced org lispers!

The =cond= is part of a =while= loop; it just keeps looping, entering
that branch and doing nothing (rather than moving point and picking up
again from there).  Going by the other branches, I think the correct
thing to do is just exit the loop:

--8---cut here---start-8---
diff --git a/lisp/org-list.el b/lisp/org-list.el
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -450,17 +450,19 @@ This checks `org-list-ending-method'.
   ;; At upper bound of search or looking at the end of a
   ;; previous list: search is over.
   ((= (point) lim-up) (throw 'exit nil))
   ((and (not (eq org-list-ending-method 'indent))
 (looking-at org-list-end-re))
(throw 'exit nil))
   ;; Skip blocks, drawers, inline-tasks, blank lines
   ((looking-at ^[ \t]*#\\+end_)
-   (re-search-backward ^[ \t]*#\\+begin_ nil t))
+   (condition-case nil
+   (re-search-backward ^[ \t]*#\\+begin_ nil)
+ (search-failed (throw 'exit nil
   ((looking-at ^[ \t]*:END:)
(re-search-backward org-drawer-regexp nil t)
(beginning-of-line))
   ((and inlinetask-re (looking-at inlinetask-re))
(org-inlinetask-goto-beginning)
(forward-line -1))
   ((looking-at ^[ \t]*$) (forward-line -1))
   ;; Text at column 0 cannot belong to a list: stop.
--8---cut here---end---8---

Hope this helps,
Aankhen



[O] Automatically clocking into parent items

2011-03-12 Thread Aankhen
Hi,

I’ve been working on getting org-mode to automatically clock into an
item’s ancestor when clocking out of that item.  The way I have it set
up now, it walks up the tree looking for an item that has a particular
property set.  If that property is non-nil, it clocks in; if it’s nil,
it doesn’t.  Either way, it stops looking at that point.  Here’s what
I have so far:

,[ Conditionally resuming parent clocks ]
| (defconst +aankh/org-resume-parent-clock-property+ AUTO_RESUME_CLOCK
|   The name of the property that indicates whether a task's clock
|   should be restarted upon clocking out of its subtasks.  When
|   this is not `nil' according to `org-not-nil', the task's clock
|   will be restarted.)
|
| (defun aankh/maybe-resume-parent-clock ()
|   (save-excursion
| (loop
|  until (= (org-current-level) 1)
|  do (org-up-heading-all 1)
|  when (member +aankh/org-resume-parent-clock-property+
|   (mapcar 'car (org-entry-properties)))
|  do (let ((resume
|(org-entry-get
| nil
| +aankh/org-resume-parent-clock-property+)))
|   (when (org-not-nil resume)
| (org-clock-in))
|   (return resume)
|
| (setq aankh/org-resume-parent-clock-enable t)
|
| (defun aankh/read-resume-parent-clock-property (rest rest)
|   (declare (ignore rest))
|   (org-icompleting-read
|Automatically restart this task's clock when clocking out of a subtask? 
|'(t nil)))
|
| (when aankh/org-resume-parent-clock-enable
|   (add-hook 'org-clock-out-hook 'aankh/maybe-resume-parent-clock)
|   (add-to-list 'org-default-properties
|+aankh/org-resume-parent-clock-property+)
|   (add-to-list 'org-property-set-functions-alist
|`(,+aankh/org-resume-parent-clock-property+
|  . aankh/read-resume-parent-clock-property)))
`

So given this structure:

,[ example.org ]
| * Foo
|
| * Bar
|   :PROPERTIES:
|   :AUTO_RESUME_CLOCK: t
|   :END:
|
| *** Quux
| :PROPERTIES:
| :AUTO_RESUME_CLOCK: t
| :END:
|
| * Frob
|
| * Baz
`

When I clock out of ‘Frob’, I’m automatically clocked into ‘Quux’, and
when I clock out of ‘Quux’, I’m automatically clocked into ‘Bar’.
This works pretty well, except for one problem: it happens *every
time* I clock out, meaning that if I’m clocked into ‘Quux’ and I then
hit C-c C-x C-i on ‘Frob’, I end up being clocked into both ‘Bar’ and
‘Frob’, because I’m automatically clocked out of ‘Quux’; my code is
run, clocking me into ‘Bar’; and then the normal clocking mechanism
clocks me into ‘Frob’ (at least, I *think* the hook runs first).

I guess what I’m wondering is, what’s a good way to avoid this
double-clocking?  And while I’m asking for help, can anyone think of
some less obnoxious names for the functions, variables and property?
:-)

I hope all this makes sense.  Thanks for your time.

Aankhen



[O] Re: [BUG] Unmatched #+end-src

2011-03-12 Thread Aankhen
Hi,

On Sun, Mar 13, 2011 at 01:37, Nicolas n.goaz...@gmail.com wrote:
 Aankhen aank...@gmail.com writes:

 --8---cut here---start-8---
 * Unmatched #+end-src bug

 #+end_src
 --8---cut here---end---8---

 With the above simple org file, placing the cursor at the end of
 #+end_src and hitting return causes emacs to hang.

 The =cond= is part of a =while= loop; it just keeps looping, entering
 that branch and doing nothing (rather than moving point and picking up
 again from there).  Going by the other branches, I think the correct
 thing to do is just exit the loop:

 I don't think exiting the loop that way is the right thing to do, as it
 always return nil, even though the #+end_ might be in the list.

 [snip]

You’re right, I lost the context.  My apologies for the ill-conceived patch.

Aankhen



Re: [O] Re: [REGRESSION] org-html.el (targets)

2011-03-09 Thread Aankhen
Hi Bastien,

On Wed, Mar 9, 2011 at 16:06, Bastien b...@altern.org wrote:
 Aankhen aank...@gmail.com writes:

 This one seemed easy to fix, so I thought I’d butt in. :-) Hope the
 format of the patch is right (I’m using hg-git).

 The patch was caught by patchwork, but wrongly wrapped.

 Thanks for it anyway!

Glad I could help. :-) I guess I messed up the line endings, going by
what Manuel and you said.  Not sure how that happened.  I’ll see if I
can figure out how to prevent it in future.

Aankhen



Re: [O] How to change column view background color ?

2011-03-09 Thread Aankhen
Hi,

On Wed, Mar 9, 2011 at 19:52, sakesun roykiattisak sake...@gmail.com wrote:
 hi, I'm using color-theme-charcoal-black with org-mode on ntemacs-23.2.1.
 When I turn on column-view the view display in white background.
 Which make it very difficult to read.
 http://26.media.tumblr.com/tumblr_lhsnjosKkt1qhjuqco1_400.png
 How can I change the background color of column view ?

I believe you should be able to do this by changing the ‘org-column’
face.  Try ‘M-x customize-face RET org-column’.

Aankhen



Re: [O] latex fragments, dvipng and mathjax

2011-03-08 Thread Aankhen
On Wed, Mar 9, 2011 at 07:43, Nick Dokos nicholas.do...@hp.com wrote:
 Erik Iverson er...@ccbr.umn.edu wrote:
 On 03/08/2011 02:16 PM, Nick Dokos wrote:
  [snip]
  That forces HTML-CSS output and from what I can see on the mathjax site,
  that should improve things - but it doesn't for me, so I'm still not out
  of the woods. Maybe MathJax doesn't know where to get the TeX fonts?

 Do the examples on mathjax.org look nice to you? And which browser
 do you happen to be using for viewing?

 Yes - the Cauchy integral formula (as well as the Gauss divergence
 theorem further down) on

    http://www.mathjax.org/demos/mathml-samples/

 looks fine when HTML-CSS rendering is chosen. When MathML
 rendering is chosen, the integral sign is too small. That's
 what motivated the mathml:nil effort above, but it didn't pan
 out. But even in MathML rendering, the integral sign, even though
 small, looks better than the one I posted.

 I'm using firefox 3.6.14 on Ubuntu 10.10.

FWIW, same here.  Firefox 3.6.15 on Windows 7.  Given that both pages
specify the MathJax_Math font yet only mathjax.org actually looks like
it uses it, you’re probably right about MathJax having trouble finding
the fonts on yours.

I tried a couple other browsers.  IE8 aborts the script after an error
on “Line 1, char 6” (I think that’s because of the nest of CDATA, HTML
comments and JS comments), while Chrome seems to be using the right
font.  So I guess this is a Firefox thing.  The FAQ mentions Firefox’s
same-origin policy in the context of image fonts being used instead of
web fonts.[1] Seems unlikely to be the culprit in this case though.
*shrugs*

Hope this helps narrow it down a little.

Aankhen

[1]: http://www.mathjax.org/resources/faqs/#image-fonts



Re: [O] Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export

2011-03-07 Thread Aankhen
On Mon, Mar 7, 2011 at 21:54, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 Aankhen aank...@gmail.com writes:
 On Mon, Mar 7, 2011 at 04:37, Jakub Szypulka cubib...@googlemail.com wrote:
 I'm trying to hide section numbers in the HTML export, while keeping
 the sections in the LaTeX export.

 Adding (setq org-export-with-section-numbers nil) successfully removes
 the HTML section numbering, but for a mysterious reason also removes
 headlines when doing a LaTeX export.

 Could you give a sample of the input and output?  Using Org-mode from
 git, I can’t reproduce this problem:
 [snip]

 Actually, you *have* reproduced the problem: a =section*= does not
 include section numbers which I believe Jakub wanted (in the latex but
 not the HTML).

Hmm, I understood the problem to be that setting
=org-export-with-section-numbers= to =nil= resulted in a
=section=-less LaTeX document, which I couldn’t reproduce.  Maybe I
misunderstood the message.

Aankhen



Re: [O] Re: [REGRESSION] org-html.el (targets)

2011-03-07 Thread Aankhen
On Tue, Mar 8, 2011 at 02:07, Bernt Hansen be...@norang.ca wrote:
 Thanks for the patch.  I still see validation errors after applying this
 patch.  I've posted the original test file at
 http://www.norang.ca/tmp/foo.html and you can click on the validation
 link at the bottom to see the remaining errors.

This one seemed easy to fix, so I thought I’d butt in. :-) Hope the
format of the patch is right (I’m using hg-git).

--8---cut here---start-8---
# HG changeset patch
# User Aankhen
# Date 1299568135 -19800
# Node ID 23e761c8a103c521aef0a85ee3650bc850d0193d
# Parent  56fa585a0f995bc97006ce6d6c2baab9c48c
Fix anchors in HTML export.

diff --git a/lisp/org-html.el b/lisp/org-html.el
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1996,8 +1996,8 @@
   ;; DocBook document, we want to always include the caption to make
   ;; DocBook XML file valid.
   (push (format caption%s/caption (or caption )) html)
-  (when label (push (format a name=\%s\ id=\%s\/a
(org-solidify-link-text label) (org-solidify-link-text label))
-   html))
+  (when label
+ (setq html-table-tag (org-export-splice-attributes
html-table-tag (format id=\%s\ (org-solidify-link-text label)
   (push html-table-tag html))
 (setq html (mapcar
(lambda (x)
--8---cut here---end---8---

Aankhen



[O] Re: [Orgmode] Bug: Missing prompt label in capture template expansion

2011-03-06 Thread Aankhen
On Sun, Mar 6, 2011 at 23:48, David Maus dm...@ictsoc.de wrote:
 At Fri, 25 Feb 2011 12:41:34 +0530,
 Aankhen wrote:

 STEPS TO REPRODUCE:
 1. Add this to the list of capture templates:
     (t Test entry (file z:/Temp/t.org)
      *** TODO %^{Foo} [[bar:%^{Bar}][Bar]])
 2. Run org-capture.
 3. Fill in a value for “Foo” when prompted and press Enter.

 EXPECTED RESULTS:
 Prompted for second value, with label “Bar”.

 ACTUAL RESULTS:
 Prompted for second value, with label “ ” (single space).

 NOTES:

 I think this should be fixed now by aa946f224da7522728cc1703bca75e4af7636fc9

Confirmed, I can no longer reproduce it either.

Aankhen



Re: [O] Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export

2011-03-06 Thread Aankhen
Hi,

On Mon, Mar 7, 2011 at 04:37, Jakub Szypulka cubib...@googlemail.com wrote:
 I'm trying to hide section numbers in the HTML export, while keeping
 the sections in the LaTeX export.

 Adding (setq org-export-with-section-numbers nil) successfully removes
 the HTML section numbering, but for a mysterious reason also removes
 headlines when doing a LaTeX export.

Could you give a sample of the input and output?  Using Org-mode from
git, I can’t reproduce this problem:

,[ foo.org ]
| * Foo
|
| * Bar
|
| ** Quux
|
| * Baz
`

Becomes:

,[ Exported LaTeX ]
| \usepackage{amssymb}
| \usepackage{hyperref}
| \tolerance=1000
| \providecommand{\alert}[1]{\textbf{#1}}
|
| \title{No Title}
| \author{}
| \date{07 March 2011}
|
| \begin{document}
|
| \maketitle
|
| \section*{Foo}
| \label{sec-1}
| \section*{Bar}
| \label{sec-2}
| \subsection*{Quux}
| \label{sec-2_1}
| \section*{Baz}
| \label{sec-3}
|
| \end{document}
`

Which seems about right when converted to a PDF.

Aankhen



Re: [O] scheduling items question

2011-03-03 Thread Aankhen
Hi stuart,

On Fri, Mar 4, 2011 at 05:07, stuart smclean0...@gmail.com wrote:
 What is the best solution for the following (assuming there is one). I
 have a class that takes place three times per week (Monday, Wednesday,
 Friday, for example). I would like to schedule this as a habit. What is
 the best and particularly, most concise was of doing this?

 Right now, I have three headings that are scheduled every week as
 follows:

 [snip]

The Worg FAQ lists a couple of methods.[1]  You can’t really get away
from using multiple headings, though, unless you write a diary
function of your own.

Aankhen

[1] http://orgmode.org/worg/org-faq.html#org-diary-class



Re: [O] [OT] Custom inline reply quotes

2011-03-03 Thread Aankhen
Hi Jeff,

On Fri, Mar 4, 2011 at 11:50, Jeff Horn jrhorn...@gmail.com wrote:
 What MUA/package/magic are you using to get custom inline replies with
 the sender's initials?

One possibility is Supercite, which lets you specify your own citation
format.[1]

Aankhen

[1] http://emacs-es.manticore.es/manuales/sc-en/Citations.html#Citations



Re: [Orgmode] adding a style to individual images

2011-02-27 Thread Aankhen
Hi soichi,

On Mon, Feb 28, 2011 at 06:26, ishi soichi soichi...@gmail.com wrote:
 So I tried putting
 #+ATTR_HTML: alt=... width=100px
 [[imageURL]]
 But it does not do anything.
 Changing
 Could anyone help me out?

With Org from git (2–3 days old) on Emacs 24, given this text in my Org file:

 ,
 | #+ATTR_HTML: alt=Gogola! width=100
 | [[./Gogola.gif]]
 `

I get this in the exported version:

 ,
 | img src=./Gogola.gif alt=Gogola! width=100 /
 `

Which versions of Emacs  Org are you using?  Could you give an
example of the text in your Org file and the resultant HTML?

Aankhen

___
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] adding a style to individual images

2011-02-27 Thread Aankhen
On Mon, Feb 28, 2011 at 12:00, ishi soichi soichi...@gmail.com wrote:
 My org is 7.01 and Emacs23.2
 #+ATTR_HTML: alt=apples image title=How many? align=right
 width=100px
 [[images/apples6.jpeg]]
 produced this.
 a href=#sec-1_1alt=apples image title=How many? align=right
 width=100pximg src=images/apples6.jpeg//a

Try changing that to ‘[[./images/apples6.jpeg]]’ (add ./ to the
beginning).  Not sure what else it might be—my Org experience is still
in a nascent stage.

By the way, the ‘width’ attribute already uses pixels for its units,
so ‘width=100’ would be enough.

Aankhen

___
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] adding a style to individual images

2011-02-27 Thread Aankhen
On Mon, Feb 28, 2011 at 12:00, ishi soichi soichi...@gmail.com wrote:
 My org is 7.01 and Emacs23.2

You might also want to try a newer version.  If you don’t want to use
the development version, you should probably at least upgrade to 7.4
(the most recent release).  See http://orgmode.org/index.html#sec-3
for more.

Aankhen

___
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: [PATCH] Missing prompt label in capture template expansion

2011-02-25 Thread Aankhen
Hi Puneeth,

On Fri, Feb 25, 2011 at 15:11, Puneeth Chaganti puncha...@gmail.com wrote:
 Bar has the properties of a LINK associated with it and hence is not
 being displayed in the mini-buffer.  Here is a possible fix, but I'm
 not sure if it's the best fix.

Whether or not it’s the best fix, it seems to be working, so thank you
for that. :-)

Aankhen

___
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: Missing prompt label in capture template expansion

2011-02-24 Thread Aankhen
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


STEPS TO REPRODUCE:
1. Add this to the list of capture templates:
(t Test entry (file z:/Temp/t.org)
 *** TODO %^{Foo} [[bar:%^{Bar}][Bar]])
2. Run org-capture.
3. Fill in a value for “Foo” when prompted and press Enter.

EXPECTED RESULTS:
Prompted for second value, with label “Bar”.

ACTUAL RESULTS:
Prompted for second value, with label “ ” (single space).

NOTES:
I tried this using org-mode from git (commit id:
b23d35de06c229db84472d893c8645c63896a6cd) after starting Emacs with
‘emacs -Q’ to ensure there was no interference.  A couple of
variations on the template above work fine, correctly showing the
label when prompting for a value:

* No prompts before the one in the link: (t Test entry (file
z:/Temp/t.org) *** TODO [[bar:%^{Bar}][Bar]])
* No link description: (t Test entry (file z:/Temp/t.org) ***
TODO [[bar:%^{Bar}][Bar]])

Config follows…

Emacs  : GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601)
 of 2010-11-10 on SHAN-PC
Package: Org-mode version 7.4

current state:
==
(setq
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook
  org-babel-speed-command-hook)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '((t Test entry (file z:/Temp/t.org Media)
  *** TODO %^{Foo} [[bar:%^{Bar}][Bar]])
 )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-tab-first-hook '(org-hide-block-toggle-maybe
  org-src-native-tab-command-maybe
  org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
 org-src-mode-configure-edit-buffer)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-mode-hook '(#[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook org-show-block-all
append local]
   5]
 #[nil \300\301\302\303\304$\207
   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
  org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners)
  (src org-babel-exp-inline-src-blocks))
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
   org-beamer-auto-fragile-frames
   org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-block nil)
 (comment org-export-blocks-format-comment t)
 (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 )

___
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