Re: [O] how to group together fields

2014-02-03 Thread Bastien
Hi Stefan,

(Hint: use `S W' from Gnus to reply to this email.)

Stefan Huchler stefan.huch...@mail.de writes:

 If Bastien could look over it, it would be nice.

The thread is a bit difficult to read -- can you make a summary
of what is the bug report or the feature request?

Thanks!

-- 
 Bastien



Re: [O] [RFC] Emphasis regexp

2014-02-03 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 Can I change =org-emphasis-regexp-components= in the Org repository
 accordingly to allow single and double quotes for border or would
 that break too many use cases?

I'm not against it, but I won't take this decision myself, IMHO we
have to ping Carsten for this.

PS: Also remember that the multine fontification code needs to be
rewritten.  Maybe the rewrite is the best time for discussing the
whole implementation and the detailed use-cases.

-- 
 Bastien



Re: [O] Emphasis and double space

2014-02-03 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 *Unless you turn off Emacs's double space at end of sentence
 feature, this sentence gets filled incorrectly.*  But if you
 add * to the second group in the variable sentence-end, it
 fills correctly.

I don't observe this.  What is incorrect here?

-- 
 Bastien



Re: [O] A small hack to document programs externally

2014-02-03 Thread Bastien
Hi Alan,

Alan Schmitt alan.schm...@polytechnique.org writes:

 I finally found the time to do it:
 http://orgmode.org/worg/org-hacks.html#sec-1-10-4

 Any criticism is highly welcome!

Here is slightly rewritten version :

(defun fetchlines (file-path search-string optional end before)
  Searches for the SEARCH-STRING in FILE-PATH and returns the matching line.
If the optional argument END is provided as a number, then this
number of lines is printed.  If END is a string, then it is a
regular expression indicating the end of the expression to print.
If END is omitted, then 10 lines are printed.  If BEFORE is set,
then one fewer line is printed (this is useful when END is a
string matching the first line that should not be printed).
  (with-temp-buffer
(insert-file-contents file-path nil nil nil t)
(goto-char (point-min))
(let ((result
   (if (search-forward search-string nil t)
   (buffer-substring
(line-beginning-position)
(if end
(cond
 ((integerp end)
  (line-end-position (if before (- end 1) end)))
 ((stringp end)
  (let ((point (re-search-forward end nil t)))
(if before (line-end-position 0) point)))
 (t (line-end-position 10)))
  (line-end-position 10))
  (or result 

  (fetchlines (concat coqfiles f .v) s e b)

The most common error it catches is (goto-char 1) which should be
(goto-char (point-min)) -- This way narrowing and other commands that
change (point-min) will not interfere.  Otherwise this is just using
`with-temp-buffer', which fits best here IMO.

Thanks for taking the time to add this,

-- 
 Bastien



Re: [O] mis-alignment in org-tables with Tibetan characters

2014-02-03 Thread Bastien
Hi Steffan,

thanks for reporting this.

Steffan Iverson steffan.iver...@gmail.com writes:

 Any way to solve this problem?

This is a recurring problem, and Eric is the one who tried
to solve it.

Eric, I don't remember why we didn't follow-up on your patch
here:

http://lists.gnu.org/archive/html/emacs-orgmode/2013-02/msg00664.html

Would that help in this situation?

Thanks,

-- 
 Bastien



Re: [O] Links sorting and exporting.

2014-02-03 Thread Bastien
Hi Matthew,

Matthew Sauer improv.philoso...@gmail.com writes:

 Thoughts on this?

I didn't get the idea.  Can you restate it with a few words?

Thanks!

-- 
 Bastien



Re: [O] showing children in agenda

2014-02-03 Thread Bastien
Hi Ken,

Ken Mankoff mank...@gmail.com writes:

 If I have a task with children, and the parent is SCHEDULED today so
 it is showing up in the agenda, is there a way to make children
 automagically show up?

Nope, sorry.  But this is a not-so-rare request, but I'll put this
somewhere on my EXPLORE* list.

* The core idea would be to let `org-use-property-inheritance' handle
  the SCHEDULED property (along with other planning data)... but
  this, in turn, calls for a partial rewrite of the agenda engine.

-- 
 Bastien



Re: [O] Org agenda and recent files list....

2014-02-03 Thread mohamed
Robert Goldman rpgoldman at sift.info writes:

 
 On 8/10/12 Aug 10 -2:21 AM, Bastien wrote:
  Robert Goldman rpgoldman at sift.info writes:
  
 
;;;---
  ;;; Agenda files shouldn't get entries in the recentf-list
 
;;;---
  
  Knowing about `recentf-exclude' will certainly help many users, 
  not only for excluding Org files.
  
  Thanks,
  
 
 For what it's worth, a more fine-grained alternative would be to get
 inside org-get-agenda-file-buffer and inhibit the recentf caching while
 calling find-file inside there.
 
 That would allow you to have an agenda file appear in the recent files
 list IF it was opened through a manual use of find-file, but NOT if it
 was opened as a side effect of loading an agenda.
 
 This more fine-grained approach was a little more work than I wanted to
 do, and didn't necessarily provide me a lot more value, so I didn't
 bother with it.  But someone else might find it worth coding up.  Chacun
 à son org configuration!
 
 Cheers,
 r
 
 

It seems that absolute paths are needed in the definition of org files.
If org-agenda-files is defined using ~/org/.. this may not work since
recentf uses absolute paths.

Cheers,
Mohamed   







Re: [O] [RFC] Emphasis regexp

2014-02-03 Thread Michael Brand
Hi all

On Sat, Feb 1, 2014 at 4:02 PM, Florian Beck f...@miszellen.de wrote:
 And *this* kind of quote is something I need from time to time.

Yes, many thanks to Florian for pointing this out. It means that I
withdraw the variant #+NAME: change_pre_and_post_and_border as my
suggestion to make work my last two examples =c='z'= and =d=t=. I
would change them to ~c='z'~ and ~d=t~ to make them work in case the
milder variant #+NAME: change_border is acceptable before the works
mentioned in Bastien's message.

Michael



[O] Preventing Tramp from executing on agenda command?

2014-02-03 Thread 'Mash
Morning,

I have an agenda file which contains a URL with port
(https://example.example.com:2000) which unfortunately Tramp attempts
to connect to when I pull the agenda, causing Emacs to hang.

Any idea why this is happening by default?

Thanks,

'Mash



Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Nicolas Goaziou
Hello,

Bastien b...@gnu.org writes:

 Nicolas Goaziou n.goaz...@gmail.com writes:

 What happens if the region contains both a fixed-width area and
 regular lines ?

 The same than when there is no fixed-width area: we convert the region
 into fixed-width.  Then converting back to a regular area will be easy
 enough, and users are more likely to want this IMHO.

So, to be clear, assuming the region encompasses everything,

  : text
  : text

  * Headline

  paragraph
  paragraph

becomes

  : : text
  : : text
  :
  : * Headline
  :
  : paragraph
  : paragraph

and 

  paragraph
  paragraph

  : text
  : text

becomes

  : paragraph
  : paragraph
  :
  : : text
  : : text

Is that correct?


Regards,

-- 
Nicolas Goaziou



Re: [O] Preventing Tramp from executing on agenda command?

2014-02-03 Thread Michael Albinus
'Mash subscr...@toshine.net writes:

 Morning,

Hi,

 I have an agenda file which contains a URL with port
 (https://example.example.com:2000) which unfortunately Tramp attempts
 to connect to when I pull the agenda, causing Emacs to hang.

 Any idea why this is happening by default?

That's not a Tramp file, Tramp shouldn't feel responsible. Could you try
to find out, which host Tramp is attempting to connect? You might see it
in the respective Tramp buffer name.

 Thanks,

 'Mash

Best regards, Michael.



Re: [O] A small hack to document programs externally

2014-02-03 Thread Alan Schmitt
Hi Bastion,

Bastien b...@gnu.org writes:

 The most common error it catches is (goto-char 1) which should be
 (goto-char (point-min)) -- This way narrowing and other commands that
 change (point-min) will not interfere.  Otherwise this is just using
 `with-temp-buffer', which fits best here IMO.

Thanks a lot! I'm still reading the giraffe book so there is much yet to
learn. I pushed this updated version on worg.

Alan



Re: [O] Timestamps - anything goes?

2014-02-03 Thread Sebastien Vauban
Thorsten Jolitz wrote:
 Bastien b...@gnu.org writes:
 Thorsten Jolitz tjol...@gmail.com writes:

  3. can deadline and closed have repeaters?

 No.

Not true for the first item: deadlines _can_ have repeaters:

--8---cut here---start-8---
** TODO Test
   DEADLINE: 2014-02-04 Tue +1d
   :LOGBOOK:
   - State TODO-  DONE   [2014-02-03 Mon 13:35]
   :END:
   :PROPERTIES:
   :LAST_REPEAT: [2014-02-03 Mon 13:35]
   :END:
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Stop clock on closing emacs

2014-02-03 Thread Sebastien Vauban
Igor Sosa Mayor wrote:
 Am Sat, Feb 01, 2014 at 01:03:07PM +0100, Florian Beck wrote:
 Use `kill-emacs-hook':
 
 (defun org-clock-out-maybe ()
   Stop a currently running clock.
   (org-clock-out nil t))
 
 (add-hook 'kill-emacs-hook 'org-clock-out-maybe)

 Thanks a lot. This is much better. But: are you really using this idea?

A variation:

--8---cut here---start-8---
;; ask the user if they wish to clock out before killing Emacs
(defun my/org-query-clock-out ()
  Ask the user before clocking out.
This is a useful function for adding to `kill-emacs-query-functions'.
  (if (and (featurep 'org-clock)
   (funcall 'org-clocking-p)
   (y-or-n-p You are currently clocking time, clock out? ))
  (org-clock-out)
t)) ; only fails on keyboard quit or error

(add-hook 'kill-emacs-query-functions 'my/org-query-clock-out)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Timestamps - anything goes?

2014-02-03 Thread Thorsten Jolitz
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Thorsten Jolitz wrote:
 Bastien b...@gnu.org writes:
 Thorsten Jolitz tjol...@gmail.com
 writes:

  3. can deadline and closed have repeaters?

 No.

 Not true for the first item: deadlines _can_ have repeaters:

 --8---cut here---start-8---
 ** TODO Test
DEADLINE: 2014-02-04 Tue +1d
:LOGBOOK:
- State TODO-  DONE   [2014-02-03 Mon 13:35]
:END:
:PROPERTIES:
:LAST_REPEAT: [2014-02-03 Mon 13:35]
:END:
 --8---cut here---end---8---

ok, makes sense

-- 
cheers,
Thorsten




Re: [O] Org not preserving Python indent levels on LaTex export due to tabs

2014-02-03 Thread Sebastien Vauban
Nicolas Goaziou wrote:
 James Ryland Miller james.ryland.mil...@gmail.com writes:

 I'm having trouble with getting python source=code blocks to export to
 LaTeX properly. I've figured out what's going wrong: the exporter is
 inserting tab characters on lines with 2 or more indentation levels in
 python. If I use org to export to .tex first, and then untabify the
 .tex files, the indent levels are preserved (assuming the tabs
 correctly lined up with the corresponding python in the first place,
 which many times they don't).

 Try to set `org-src-preserve-indentation' to a non-nil value (on a very
 recent Org) or add a -i flag to you source block:

   #+BEGIN_SRC python -n -i
   ...
   #+END_SRC

 This should prevent Org from touching indentation within the block.

Again (as for `org-src-fontify-natively'), shouldn't this be true by
default?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] patch for ob-sql and postgresql for supporting :colnames

2014-02-03 Thread Joost Helberg
Eric,

it's not in org-plus-contrib-20140203. Was it lost somehow (also my fix
for stopping on error is not in)?

regards,

Joost

 schulte == schulte eric schulte.e...@gmail.com writes:
  From: schulte.e...@gmail.com
  To: jo...@snow.nl
  Cc: emacs-orgmode@gnu.org
  Subject: Re: [O] patch for ob-sql and postgresql for supporting
  Date: 08-Jan-14 17:58

  Applied, thanks.

  Joost Helberg jo...@snow.nl writes:

  hi,
  
  the :colnames header argument is not honoured for postgresql. Hence the
  following patch for ob-sql.el. The command-line tool psql supports the
  option -t for not displaying column-names. The default behavious is not
  changed with this patch.
  
  126,127c126
   psql --set=\ON_ERROR_STOP=1\ %s -A -P 
  footer=off -F \\t\  -f %s -o %s %s
 (if colnames-p  -t)
  ---
  psql --set=\ON_ERROR_STOP=1\ -A -P footer=off -F \\t\  -f %s -o %s %s
  
  Can anyone suggest to me why this should not be in ob-sql.el? It is
  already implemented for the mysql engine (via -N).
  
  regards,
  
  Joost

  -- 
  Eric Schulte
  https://cs.unm.edu/~eschulte
  PGP: 0x614CA05D


-- 
Snow B.V.




Re: [O] Links sorting and exporting.

2014-02-03 Thread Matthew Sauer
Bastien,

What I am thinking is of a way to save a web bookmark in a file or two and
then based on meta-tag have them exported into a html file.  In other
words, if I have a file with bookmarks that has tags: apple, fruit, orange,
dog, horse, pet, animal, etc then it would create a html page named for the
tag and any bookmark that has that tag would be present in it.   The last
piece would be to generate a front page that would have a relative link to
those pages.  This would be a way of publishing links for others in my
group to use.


On Mon, Feb 3, 2014 at 3:22 AM, Bastien b...@gnu.org wrote:

 Hi Matthew,

 Matthew Sauer improv.philoso...@gmail.com writes:

  Thoughts on this?

 I didn't get the idea.  Can you restate it with a few words?

 Thanks!

 --
  Bastien



[O] Closing a subheadline

2014-02-03 Thread Davide Mazzi
Hello, I have a situation like this:

#+BEGIN_SRC org-mode

* A
  blahbla

** B
   blahblah

*** Brief digression on B
  blahblah
  $$ some math $$

   Here I want to continue with B
   blahblha

#+END_SRC

So, that when exporting (to html or pdf/tex) the digression would appear
more indented, ore maybe even boxed. And below it the Subheading would
continue as normal.
I guess this is not the right way to do it, and shouldn't use a
subsubheading for a digression like that. So how do I do it?
Thank you
Daniele Parisi


Re: [O] Closing a subheadline

2014-02-03 Thread Bastien
Hi Davide,

Davide Mazzi mist...@gmail.com writes:

 So, that when exporting (to html or pdf/tex) the digression would
 appear more indented, ore maybe even boxed. And below it the
 Subheading would continue as normal.
 I guess this is not the right way to do it, and shouldn't use a
 subsubheading for a digression like that. So how do I do it?

Not sure it really fits your needs, but it sounds like you are looking
for inline tasks.

(require 'org-inlinetask)

then `C-c C-x t' in an Org document.

HTH,

-- 
 Bastien



Re: [O] patch for ob-sql and postgresql for supporting :colnames

2014-02-03 Thread Bastien
Hi Joost,

Joost Helberg jo...@snow.nl writes:

 it's not in org-plus-contrib-20140203. Was it lost somehow (also my fix
 for stopping on error is not in)?

The change you suggested is in the master branch, not in the maint
branch, which is for bugfixes only.  IMO the change is more a feature
enhancement than a bugfix, hence the fact it's in master.  Also, we
are more strict with bugfixes right now because all our fixes
will go into Emacs 24.4, which is in feature freeze right now.

-- 
 Bastien



Re: [O] Timestamps - anything goes?

2014-02-03 Thread Bastien


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Not true for the first item: deadlines _can_ have repeaters:

Of course, yes, I stand corrected.   Thanks Sébastien!

-- 
 Bastien




Re: [O] Org not preserving Python indent levels on LaTex export due to tabs

2014-02-03 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Again (as for `org-src-fontify-natively'), shouldn't this be true by
 default?

I don't know for other people, but the default value is good for me.

-- 
 Bastien




Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Bastien
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 So, to be clear, assuming the region encompasses everything,

   : text
   : text

   * Headline

   paragraph
   paragraph

 becomes

   : : text
   : : text
   :
   : * Headline
   :
   : paragraph
   : paragraph

 and 

   paragraph
   paragraph

   : text
   : text

 becomes

   : paragraph
   : paragraph
   :
   : : text
   : : text

 Is that correct?

No -- sorry.  My suggestion is that this region

  Some text
  : and some fixed line

becomes

  : Some text
  : and some fixed line

If people want the behavior you describe, then using `C-x r t'
will do.  Otherwise, they will want the whole region to be converted
into a fixed-width region.

What do you think?

-- 
 Bastien



Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Nicolas Goaziou
Bastien b...@gnu.org writes:

 No -- sorry.  My suggestion is that this region

   Some text
   : and some fixed line

 becomes

   : Some text
   : and some fixed line

 If people want the behavior you describe, then using `C-x r t'
 will do.  Otherwise, they will want the whole region to be converted
 into a fixed-width region.

 What do you think?

Specifications for regions are still not clear.

Will

  : and some fixed line
  Some text

also become

  : and some fixed line
  : Some text

?

And what about headlines, e.g.

  : and some fixed line

  * Headline

  Some text

or,

  Some text

  * Headline

  : and some fixed line


Same question for verbatim blocks. What happens in the following region?

  Some text

  #+begin_example
  contents
  #+end_example

  : and some fixed line



Regards,

-- 
Nicolas Goaziou



Re: [O] how to customize date export

2014-02-03 Thread Mirko Vukovic
Eric S Fraga e.fraga at ucl.ac.uk writes:

 
 Mirko Vukovic mirko.vukovic at gmail.com writes:
 
  Hello,
 
  I could not figure out how to customize org's export of dates into latex.
 
  I found org-export-date-timestamp-format, but that works only for the DATE
  keyword.  
 
  What can work on all date-stamps in the document?
 
 Have a look at
 
 ,[ C-h v org-latex-active-timestamp-format RET ]
 | org-latex-active-timestamp-format is a variable defined in `ox-latex.el'.
 | Its value is \\textit{%s}
snip
 
 and 
 
 ,[ C-h v org-latex-inactive-timestamp-format RET ]
 | org-latex-inactive-timestamp-format is a variable defined in `ox-latex.el'.
 | Its value is \\textit{%s}
snip
 but these are quite different in intent when compared with
 org-export-date-timestamp-format so they may not be what you want.
 

Hi Eric,

Thanks for the note.  As it stands now, I cannot
customize these two variables to do what I want, as they accept the
whole time-steamp as argument.  I will enter the dates manually
in the org file for now.

Maybe they ought to be re-cast in manner similar to which
org-export-date-timestamp-format is handled?  A nice weekend project :-)

Mirko




Re: [O] Links sorting and exporting.

2014-02-03 Thread Bastien
Hi Matthew,

Matthew Sauer improv.philoso...@gmail.com writes:

 What I am thinking is of a way to save a web bookmark in a file or
 two and then based on meta-tag have them exported into a html file.
  In other words, if I have a file with bookmarks that has tags:
 apple, fruit, orange, dog, horse, pet, animal, etc then it would
 create a html page named for the tag and any bookmark that has that
 tag would be present in it.   The last piece would be to generate a
 front page that would have a relative link to those pages.  This
 would be a way of publishing links for others in my group to use.

I think most of the pieces are already in place for this:

- you can use org-protocol.el to capture a URL from a web browser as
  a subtree in an Org file ;

- you can tag the capture at will (or define several capture keys)
  triggered by the button in your browser

- you can define a view for all subtrees tagged :bmk: -- and filter
  this view for other tags -- e.g. for a subtree with :bmk:apple:, you
  first list all :bmk: subtrees, then hit '/' to list :apple:
  subtrees.

- from the agenda view, C-x C-w mybookmarkfile.org RET will store all
  listed subtrees in a new Org file.

So maybe this is just a matter of refining this workflow.

HTH,
  
-- 
 Bastien



Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Bastien
Nicolas Goaziou n.goaz...@gmail.com writes:

 Will

   : and some fixed line
   Some text

 also become

   : and some fixed line
   : Some text

 ?

Yes, if beg and end of the region are in each of those two lines.

 And what about headlines, e.g.

   : and some fixed line

   * Headline

   Some text

becomes

: and some fixed line
:
: * Headline
:
: Some text

 or,

   Some text

   * Headline

   : and some fixed line

becomes

: Some text
:
: * Headline
:
: and some fixed line

 Same question for verbatim blocks. What happens in the following region?

   Some text

   #+begin_example
   contents
   #+end_example

   : and some fixed line

becomes

: Some text
:
: #+begin_example
: contents
: #+end_example
:
: and some fixed line

The baseline is this:

- always consider regions made of whole lines

- when all lines are fixed-width in the region, C-c : converts them to
  regular text

- when zero or more (but not all) lines are fixed-width, converts all
  lines to fixed-width lines, ignoring lines that are already fixed-width

Does that make more sense?

-- 
 Bastien



[O] Need extra text in ODT export of headers

2014-02-03 Thread Dan Griswold
Hi all,

I have to do something particular in org-mode, and I'm stumped.

The manuscript I will need to submit to my publisher is to be very sparse
on formatting in MS-Word. So for headings I need to mark them A for first
level headings, B for second level, C for third level.

So, with an org file that looks somewhat like this:

* Here's a top Heading

** Here's a subheading

* Here's another top Heading

I would get in an ODT export:

A Here's a top Heading

B Here's a subheading

A Here's another top Heading



Do any of you have suggestions for how I could accomplish this, short of
manually supplying that text for every single heading (67) in the several
org files that comprise the manuscript?

Perhaps there's a way to do this using LO styles. But I can't figure that
out, either.

Thanks,

Dan Griswold
Rochester, NY


Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Nicolas Goaziou
Bastien b...@altern.org writes:

 The baseline is this:

 - always consider regions made of whole lines

 - when all lines are fixed-width in the region, C-c : converts them to
   regular text

 - when zero or more (but not all) lines are fixed-width, converts all
   lines to fixed-width lines, ignoring lines that are already fixed-width

 Does that make more sense?

It is clearer now, thank you. I'll send a patch later on the ML.


Regards,

-- 
Nicolas Goaziou



Re: [O] Need extra text in ODT export of headers

2014-02-03 Thread Dan Griswold
That might do the trick. The added text appears as expected in a file saved
as text only. The only downside right now seems to be that I have to do the
outline numbering for each file in the manuscript. But there are only 9 of
them.

I hope that I can soon ask an editor with the publishing company whether
this is acceptable. But for now, it seems to work. So thank you!

Dan



On Mon, Feb 3, 2014 at 11:04 AM, Christian Moe m...@christianmoe.comwrote:


 Hi,

 Here's one way to do it in LibreOffice:

 Go to Tools  Outline Numbering

 For each heading level,

 under Separator  After,

 add the markup they want (A for first level, etc.).

 This should work for your printed manuscript. However, you'd need to
 test if it's still there when you've converted to MS Word (don't have it
 at hand).

 Yours,
 Christian

 Dan Griswold writes:

  Hi all,
 
  I have to do something particular in org-mode, and I'm stumped.
 
  The manuscript I will need to submit to my publisher is to be very sparse
  on formatting in MS-Word. So for headings I need to mark them A for
 first
  level headings, B for second level, C for third level.
 
  So, with an org file that looks somewhat like this:
 
  * Here's a top Heading
 
  ** Here's a subheading
 
  * Here's another top Heading
 
  I would get in an ODT export:
 
  A Here's a top Heading
 
  B Here's a subheading
 
  A Here's another top Heading
 
 
 
  Do any of you have suggestions for how I could accomplish this, short of
  manually supplying that text for every single heading (67) in the several
  org files that comprise the manuscript?
 
  Perhaps there's a way to do this using LO styles. But I can't figure that
  out, either.
 
  Thanks,
 
  Dan Griswold
  Rochester, NY




Re: [O] how to customize date export

2014-02-03 Thread Eric S Fraga
Mirko Vukovic mirko.vuko...@gmail.com writes:

[...]

 Hi Eric,

 Thanks for the note.  As it stands now, I cannot
 customize these two variables to do what I want, as they accept the
 whole time-steamp as argument.  I will enter the dates manually
 in the org file for now.

I thought as much.  

Looking through the code, some of the functions for outputting the time
stamps make use of org-translate-time which does allow some
customisation of how the dates and times are written out, along the
lines of what you were looking at for DATE entries.  Check the
documentation for that function.  But it could be I've misunderstood the
code...


-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] how to customize date export

2014-02-03 Thread Nick Dokos
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Mirko Vukovic mirko.vuko...@gmail.com writes:

 [...]

 Hi Eric,

 Thanks for the note.  As it stands now, I cannot
 customize these two variables to do what I want, as they accept the
 whole time-steamp as argument.  I will enter the dates manually
 in the org file for now.

 I thought as much.  

 Looking through the code, some of the functions for outputting the time
 stamps make use of org-translate-time which does allow some
 customisation of how the dates and times are written out, along the
 lines of what you were looking at for DATE entries.  Check the
 documentation for that function.  But it could be I've misunderstood the
 code...

Based on Eric's hint, I followed org-translate-time's docstring (and
references therein) and I came up with this which seems to work (in the
sense that the dates look like 2014/02/03 Monday when exported,
which agrees with the specified format):

--8---cut here---start-8---
#+STARTUP: customtime

* foo
2014-02-03 Mon

# Local Variables:
# org-time-stamp-custom-formats: (%Y/%m/%d %A . %Y/%m/%d %A %H:%M)
# End:
--8---cut here---end---8---

However, the angle brackets seem to be required.

Nick




Re: [O] how to group together fields

2014-02-03 Thread Stefan Huchler
Hi Bastien,

I want to extract Information with ColumnView from a org-tree, that
works like group-by in a select statement.

so if I have a tree like that:


* Tea Database
   :PROPERTIES:
   :COLUMNS:  %Shop(Shop) %rating(Rating){mean}
   :END:

** Tea Shop 1
   :PROPERTIES:
   :Shop: Tea Shop 1
   :END:
*** Order 1
:PROPERTIES:
:END:
 Tee 1
:PROPERTIES:
:blend:Pussimbing
:rating: 1
:END:
*** Order 2
:PROPERTIES:
:END:
 Tea 1
:PROPERTIES:
:blend:Pussimbing
:rating: 5
:END:
 Tea 2
:PROPERTIES:
:blend:Steinthal
:rating: 7
:END:

** Tea Shop 2
   :PROPERTIES:
   :Shop: Tea Shop 2
   :END:
*** Tea 1
:PROPERTIES:
:blend:Pussimbing
:rating: 6
:END:
*** Tea 2
:PROPERTIES:
:blend:Steinthal
:rating: 8
:END:

that works so far, I can see a list of shops and there mean ratings.

I want now as another table a second columns line what I would
comment out with the current :COLUMNS: line  that would look like that:

   :COLUMNS:  %blend(Blend){groupby blend} %rating(Rating){mean}

I get with the 1. COLUMNS line something like that:

Tea Shop 1 |  5.0   | ...
Tea Shop 2 |  7.0   | ...

I want another output that looks like that:

Blend 1|  6.0   | ...
Blend 2|  3.0   | ...


btw blend is the wrong word, in this case it would be the origin tea
garden, but thats only a context detail ;)

The idea is that I give in data and a score for the tea, and I can look
than which tea blends I liked most and which shop gave me best quality.

hope its clear now ;)


Bastien b...@gnu.org writes:

 Hi Stefan,

 (Hint: use `S W' from Gnus to reply to this email.)

 Stefan Huchler stefan.huch...@mail.de writes:

 If Bastien could look over it, it would be nice.

 The thread is a bit difficult to read -- can you make a summary
 of what is the bug report or the feature request?

 Thanks!



[O] Agenda view shows no todo items when agenda files are gpg-encrypted

2014-02-03 Thread Matt Mello
Hello, all.

I have a single file that is an org mode file.

I have it encrypted with GPG, which works great.  I am able to type in
my password when I open the file and to edit with no issues.

However, even with this in my init file, I get no todo items in my agenda view:

  (setq org-agenda-files (list ~/bin/computing.gpg))


I also get no errors.  Here is my complete agenda view, with C-c a t:

  Global list of TODO items of type: ALL
  Available with `N r': (0)[ALL] (1)TODO (2)DONE

Any ideas?  Is anyone else able to use agenda views with GPG-encrypted files?

Thanks!

-- Matt
Emacs:

This is GNU Emacs, a part of the GNU operating system.
GNU Emacs 24.3.1 (x86_64-apple-darwin12.4.0)
of 2013-07-06 on 



[O] Bug: dragging a line in agenda moves following hidden lines

2014-02-03 Thread Thomas Morgan
Hi, Org mode hackers,

There seems to be a bug whereby dragging a line pulls along adjacent
hidden lines.

I'm using Org-mode version 8.2.5g (`release_8.2.5g-663-g24a213' @
`/src/org-mode/lisp/') and GNU Emacs 24.3.1 (`x86_64-unknown-linux-gnu',
X toolkit, Xaw3d scroll bars) of 2013-09-24.

I started Emacs with `emacs -Q -l setup.el' (file attached).
This opened a day agenda view.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I typed `/ TAB errands RET' to restrict it to items with the tag
`errands'.  The restricted view looked like this:

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I moved point to the line containing Pick up package and typed
`M-down' to drag the line forward.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
`

Then I typed `/ /' to remove the tag filter.

I expected that the hidden line, Clean stovetop, would remain
in its position above Buy water at store, like this:

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
`

But in fact Clean stovetop had been dragged under Buy water at store
along with Pick up package.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Clean stovetop
`

I think it would be more useful and intuitive for hidden lines not to be
affected by dragging.

Thanks,
Thomas



Re: [O] (no subject)

2014-02-03 Thread Marcin Borkowski
Dnia 2014-01-31, o godz. 02:11:21
Nick Dokos ndo...@gmail.com napisał(a):

 John Hendy jw.he...@gmail.com writes:
 
  I'm having a tough time finding info on LaTeX with what makes a
  table left or right aligned (not the columns, but the table
  itself). Most of the hits are on how to *center* the table, which
  seems to suggest they will be left aligned by default.
 
 
 Does something like this help?

What about simply putting your tabular into \begin{flushright} ...
\end{flushright} (or -left, or center)?  You don't need floats for
that.  And if you /do/ need floats, just say \centering or \raggedright
or \raggedleft before your tabular.

Left aligned by default is connected with the boxes-and-glue model of
TeX page, and the way paragraph and page formatters work.  It is
described in detail in The TeXbook (in case you are curious).

HTH,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] [RFC] Make QUOTE an export keyword instead of an element type

2014-02-03 Thread Nicolas Goaziou
Nicolas Goaziou n.goaz...@gmail.com writes:

 It is clearer now, thank you. I'll send a patch later on the ML.

Here is the function. If it is good enough, I'll add tests and wrap it
up in a patch.

#+begin_src emacs-lisp
(defun org-toggle-fixed-width ()
  Toggle fixed-width markup.

Add or remove fixed-width markup on current line, whenever it
makes sense. Return an error otherwise.

If a region is active and if it contains only fixed-width areas
or blank lines, remove all fixed-width markup in it. If the
region contains anything else, convert all non-fixed-width lines
to fixed-width ones.
  (interactive)
  (if (not (org-region-active-p))
  (if (org-at-heading-p)
  (user-error Cannot insert a fixed-width line here)
(beginning-of-line)
(let* ((element (org-element-at-point))
   (type (org-element-type element)))
  (cond
   ((and (eq type 'fixed-width)
 (looking-at [ \t]*\\(:\\(?: \\|$\\)\\)))
(replace-match
  nil nil nil (if (= (line-end-position) (match-end 0)) 0 1)))
   ((and (eq type 'paragraph)
 (= (org-element-property :post-affiliated element) (point)))
(skip-chars-forward  \t)
(insert : ))
   ((and (org-looking-at-p [ \t]*$)
 (or (memq type '(headline inlinetask))
 (save-excursion
   (skip-chars-forward  \r\t\n)
   (= (org-element-property :end element) (point)
(delete-region (point) (line-end-position))
(org-indent-line)
(insert : ))
   (t (user-error Cannot insert a fixed-width line here)
(let* ((begin (save-excursion
(goto-char (region-beginning))
(line-beginning-position)))
   (end (copy-marker
 (save-excursion
   (goto-char (region-end))
   (unless (eolp) (beginning-of-line))
   (if (save-excursion (re-search-backward \\S- begin t))
   (progn (skip-chars-backward  \r\t\n) (point))
 (point)
   (all-fixed-width-p
(catch 'not-all-p
  (save-excursion
(goto-char begin)
(skip-chars-forward  \r\t\n)
(when (eobp) (throw 'not-all-p nil))
(while ( (point) end)
  (let ((element (org-element-at-point)))
(if (eq (org-element-type element) 'fixed-width)
(goto-char (org-element-property :end element))
  (throw 'not-all-p nil
t
  (if all-fixed-width-p
  (save-excursion
(goto-char begin)
(while ( (point) end)
  (when (looking-at [ \t]*\\(:\\(?: \\|$\\)\\))
(replace-match
  nil nil nil
 (if (= (line-end-position) (match-end 0)) 0 1)))
  (forward-line)))
(let ((min-ind (point-max)))
  ;; Find minimum indentation across all lines.
  (save-excursion
(goto-char begin)
(if (not (save-excursion (re-search-forward \\S- end t)))
(setq min-ind 0)
  (catch 'zerop
(while ( (point) end)
  (unless (org-looking-at-p [ \t]*$)
(let ((ind (org-get-indentation)))
  (setq min-ind (min min-ind ind))
  (when (zerop ind) (throw 'zerop t
  (forward-line)
  ;; Loop over all lines and add fixed-width markup everywhere
  ;; but in fixed-width lines.
  (save-excursion
(goto-char begin)
(while ( (point) end)
  (cond
   ((org-at-heading-p)
(insert : )
(forward-line)
(while (and ( (point) end) (org-looking-at-p [ \t]*$))
  (insert :)
  (forward-line)))
   ((org-looking-at-p [ \t]*:\\( \\|$\\))
(let* ((element (org-element-at-point))
   (element-end (org-element-property :end element)))
  (if (eq (org-element-type element) 'fixed-width)
  (progn (goto-char element-end)
 (skip-chars-backward  \r\t\n)
 (forward-line))
(let ((limit (min end element-end)))
  (while ( (point) limit)
(let ((buffer-invisibility-spec nil))
  (org-move-to-column min-ind t))
(insert : )
(forward-line))
   (t
(let ((buffer-invisibility-spec nil))
  (org-move-to-column min-ind t))
(insert : )
(forward-line)))
  (set-marker end nil

Re: [O] [PATCH] Change to org-src-preserve-indentation documentation

2014-02-03 Thread John Hendy
On Sun, Feb 2, 2014 at 3:35 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:
 Hello,

 John Hendy jw.he...@gmail.com writes:

 Per some other discussions on the mentioned variable, I added a bit
 more information to org.texi to help other users find it's
 documentation in the manual.

 Thank you for the patch. It is certainly better than what we have
 actually.

 Some comments follow.

 -This variable is especially useful for tangling languages such as
 +By default, the value is @code{nil}, which means that whitespace characters 
 will be
 +collapsed upon exporting/tangling, according to the value of

 I think exporting or tangling is better than exporting/tangling, but
 I'm no native speaker.

No problem, and as a native speaker, I'd say yours is more formal/clearer.


 Also, I'm not sure if collapsed is very clear. During export, when the
 source block is evaluated, it is removed from the buffer and, maybe,
 inserted back. At this point, if `org-src-preserve-indentation' is nil,
 every line is indented back to the same column as it was before.  Tabs
 can appear in the process.

 If `org-src-preserve-indentation' is nil, global indentation is lost,
 but the local one is preserved. Since no indentation happens, tabs
 cannot appear in the process.


Thanks for the explanation. This was my attempt to describe what
usually happens, but I wasn't sure. I know from reading some other
documentation, it mentioned the variable
org-src-edit-content-indentation, which seemed like it would
collapse a bunch of whitespace down to a set value, but maybe that's
only if one uses the C-c ' shortcut to edit? Anyway, I'll just remove
that bit.

 +@code{org-edit-src-content-indentation}. If set to @code{t}, code

 In Texinfo, sentences have to end with two spaces. Also, the variable
 doesn't need to be set to the symbol t, as any value but nil will
 achieve the same result. So the sentence could start with something
 like :

   When non-nil, code blocks...


Good to know about two spaces! I had no idea. Out of curiosity is that
file generated from a .org file? Or is that the main documentation
everyone edits/writes in?

Good to know regarding the value of =t= as well. Does a numeric value
do anything, or is it simply a binary variable (non-nil vs. anything
else). For my personal preference, I don't understand the idea of a
variable that acts binary yet takes any number of values :)

 +blocks will be exported/tangled with whitespace preserved, exactly as they

 exported or tangled, maybe


Yup.

 +appear in the org buffer. This variable is especially useful for
 tangling languages such as

 It should be Org, not org. And two spaces are required.


Got it. I thought the same thing, but swear I just ran into that
(org vs. Org) recently and followed the convention. Grepping files
in org.git and worg.git revealed only a handful of instances where
lower case org is used, so I must have been imagining or recalling
something from the mailing list vs. official docs.


Thanks for the feedback,
John


 Regards,

 --
 Nicolas Goaziou



Re: [O] Need extra text in ODT export of headers

2014-02-03 Thread Jambunathan K
Dan Griswold kc5...@gmail.com writes:

 The only downside right now seems to be that I have to do the outline
 numbering for each file in the manuscript. But there are only 9 of
 them.

You just need to create a opendocument template file and have all the
org file use it.

See

   (info (org) Applying custom styles)

1. Export ONE document.
2. Fix outline numbering
3. Save the file as say custom-style.ott (Note: It is OTT and not ODT)
4. Add a directive to ALL THE OTHER org file as below.

   M-x org-export-insert-default-template odt

   and modify the ODT_STYLES_FILE directive as below.

  #+ODT_STYLES_FILE: ~/a/b/custom-style.ott

5. Now if I export the org files with (4), you will get the outline
   numbering that you desire.




[O] Accessing #+EMAIL in LaTeX Export

2014-02-03 Thread R. Michael Weylandt
HI,

I'm writing a latex export class which has an \email macro.

Is it possible to autofill this macro using the #+EMAIL: property?
Looking at ox-latex.el, it seems that email is hardcoded to be placed
in \thanks{} but there might be a hook I'm missing.

I thought that using a {{{ email }}} macro might work, but I keep
winding up with
\email{ {{{email}}} } in the produced LaTeX.

Thanks for any help,
Michael



Re: [O] Accessing #+EMAIL in LaTeX Export

2014-02-03 Thread Nick Dokos
R. Michael Weylandt michael.weyla...@gmail.com writes:

 HI,

 I'm writing a latex export class which has an \email macro.

 Is it possible to autofill this macro using the #+EMAIL: property?
 Looking at ox-latex.el, it seems that email is hardcoded to be placed
 in \thanks{} but there might be a hook I'm missing.

 I thought that using a {{{ email }}} macro might work, but I keep
 winding up with
 \email{ {{{email}}} } in the produced LaTeX.


Not sure what your \email macro is supposed to look like or what
it is supposed to do, but the {{{email}}} works for me, e.g. the
following produces my italicized email in the output:

--8---cut here---start-8---
#+EMAIL: ndo...@gmail.com

* foo

This is my email: \emph{ {{{email}}} }.
--8---cut here---end---8---

-- 
Nick