Re: [O] agenda configurable entry-text-mode

2017-08-09 Thread Alexander Baier

On 07/29/2017 03:20 AM, Adam Porter wrote:

Alexander Baier <alexander.ba...@mailbox.org> writes:


Hi Adam,

I hadn't heard of org-quick-peek.  I found
https://github.com/alphapapa/org-quick-peek but could not find the
package on MELPA, do you know why this is the case?


Hi Alexander,

Actually I haven't submitted it to MELPA yet.  I've been hoping to get
some more feedback and testing before doing that.  I guess I should have
adjusted the readme accordingly.  I would appreciate if you could give
it a quick test and let me know any feedback you may have.  :)


This looks really nice! A few things I discovered:

1. If the peek contains a link and I click on it with the left mouse 
button, the message "No link found" is displayed.


2. If a headline in the agenda contains a link to another headline and 
point is somewhere on that headline and I call org-quick-peek-link I get 
"Lisp error: (wrong-type-argument stringp nil)".


3. If point is on a link to another headline in a normal org buffer and 
I call org-quick-peek-link I get "Lisp error: (void-variable path)". 
This is fixed applying this patch:


@@ -80,7 +80,7 @@
 (org-show-following-heading nil)
 (org-show-entry-below nil)
 (org-show-siblings nil)
-link type marker)
+link type marker path)

 ;; From org.el
 (when (and (looking-at org-complex-heading-regexp))


Regards,
--
Alex




Re: [O] agenda configurable entry-text-mode

2017-07-28 Thread Alexander Baier

Hi Adam,

I hadn't heard of org-quick-peek.  I found 
https://github.com/alphapapa/org-quick-peek but could not find the 
package on MELPA, do you know why this is the case?


Also the screenshot in the README is not present (any more), thus I am 
currently having a hard time imagining what this package does / how it 
looks.


On 25.07.2017 20:08, Adam Porter wrote:

I think it wouldn't be too hard to implement
something like that using org-quick-peek.  Let me know what you think.
I might give it a try myself.







[O] agenda configurable entry-text-mode

2017-07-25 Thread Alexander Baier

Hello!

Is it possible to alter the text shown for each headline after toggling 
entry-text-mode in the agenda?  At the moment, a certain number of lines 
of the headline's body is displayed.  Instead of the lines I would like 
to display the last note that has been recorded in a LOGBOOK drawer.


My scenario: I have an agenda that lists stuck headlines (no child 
headline is TODO and at least one is BLOCKED).  I record a note when 
transitioning to the BLOCKED state which gives a reason for the 
blocking.  I want to collect the reasons of all the blocked child 
headlines and display them under the parent headline in the agenda view 
(when in entry-text-mode).


Is this possible to do with what org-mode has to offer at the moment?

Kind regards,
--
Alexander Baier




Re: [O] Programmatically construct agenda from list of headline ids

2016-04-29 Thread Alexander Baier
On 2016-04-26 16:16 Herbert Sitz wrote:
> Alexander Baier  mailbox.org> writes:
>> As the title mentions I have a list of ids of existing org headlines and
>> want create an agenda view listing all of these headlines.
>> 
>> Is there functionality in org-agenda, that allows me to do this?
>
> Nobody else has offered help yet, so I'll take a shot.

Thanks you! :)

> What exactly are your "ids"?  Do you mean you have headlines with
> assigned CUSTOM_ID properties, and you have a list of values for which
> you want to show the headlines in agenda?

The ids I am talking about are generated by org-id.  A list of these
might look as follows:

#+BEGIN_SRC emacs-lisp
  '("55b95977-5e5b-4457-bb76-533499bc34e7"
"249d04f4-7352-488c-bf05-1b00578c414a"
"1833d6fc-46bf-4827-93a8-3f8c22310053"
"4d9c0cb1-fb10-4e28-a15b-63ae03169b39")
#+END_SRC

> If so, I think you could just assemble the list in a command that
> sticks new search conditions into one of your custom agenda views.
>
> E.g., if you currently had a custom agenda search mapped to "i" for
> two different CUSTOM_IDs, like this:
>
>   (setq org-agenda-custom-commands
>'(("i" tags "CUSTOM_ID=323|CUSTOM_ID=832")))
>
> you could reissue command to get the search done for different list of
> custom ids:
>
>   (setq org-agenda-custom-commands
>'(("i" tags "CUSTOM_ID=153|CUSTOM_ID=932|CUSTOM_ID=293")))
>
> I haven't tested this, but I expect it or something similar would
> work.  There are probably tweaks you could make, e.g, list could be
> combined into a regular expression so you don't need to repeat
> multiple 'CUSTOM_ID=' sections.

I want to avoid using custom agendas. I aim to use the agenda view as a
method of presenting a list of tasks, not as a search based view
triggered manually by the user (as it is normally used). The closest
example of what I am trying to achieve is the behaviour achieved by
org-contacts (when searching for a contact), which uses the agenda view,
without "polluting" the custom-agenda-selection.

Although this is not the way I wanted to populate my agenda view, I
settled on the same approach used by org-contacts. I define a skip
function that only keeps headlines whose ID is a member of my list of
ids. Here is the code:

#+BEGIN_SRC emacs-lisp
  (let ((org-agenda-skip-function
 (lambda ()
   (if (member (org-id-get (point)) list-of-ids)
   nil
 (outline-next-heading)
;; (org-todo-list) or similar calls
)
#+END_SRC

IIUC, this approach will scan each headline in all my agenda files only
to find those few (usually < 10) I already know how to retrieve, as I
have the relevant IDs. That is why I wanted to know whether I can just
pass those IDs to an agenda creation command which will then simply
render the corresponding headlines as an agenda view.

Kind regards,
-- 
Alexander Baier



[O] Programmatically construct agenda from list of headline ids

2016-04-24 Thread Alexander Baier
Hi!

As the title mentions I have a list of ids of existing org headlines and
want create an agenda view listing all of these headlines.

Is there functionality in org-agenda, that allows me to do this?

Best Regards,
-- 
Alexander Baier



Re: [O] org-contacts search case insensitive

2014-11-17 Thread Alexander Baier
On 2014-11-17 11:04 Martin Gross wrote:
 Dear helpers,

 I really like the idea of having an address book based on org-mode,
 but I don‘t understand why org-contacts searches case sensitive,
 because at least to me this makes it more difficult to find what I am
 looking for (I‘am searching an entry about a conference. But how did
 I write conference?).

[...]

 I‘am usung Emacs 24.3.1 Orgmode 7.9.2.

I am on Org-mode version 8.3beta and my org-contacts search is case
insensitive. I have no customization related to case sensitivity in my
configuration.

HTH,
-- 
Alexander Baier



Re: [O] org-contacts search case insensitive

2014-11-17 Thread Alexander Baier
On 2014-11-17 12:37 Karl Voit wrote:
 * Martin Gross m-gr...@gmx.net wrote:
 And recently, I discovered helm-do-grep which I enjoy using very
 much :-)

You might want to take a look at helm-org-headlines, if you only search
for names.

Regards,
-- 
Alexander Baier



Re: [O] org-contacts search case insensitive

2014-11-17 Thread Alexander Baier
On 2014-11-17 13:24 Karl Voit wrote:
 * Alexander Baier alexander.ba...@mailbox.org wrote:
 On 2014-11-17 12:37 Karl Voit wrote:
 * Martin Gross m-gr...@gmx.net wrote:
 And recently, I discovered helm-do-grep which I enjoy using very
 much :-)

 You might want to take a look at helm-org-headlines, if you only search
 for names.

 helm-org-keywords: Helm-org-keyword not supported in 24.3.1

 Will do after I switched to Emacs 24.x :-)

I am no helm expert (far from it), but are you sure you called
helm-org-headlines and not helm-org-keyword?

Regards,
-- 
Alexander Baier



Re: [O] converting to init.org

2014-11-12 Thread Alexander Baier
On 2014-11-12 20:27 Sharon Kimble wrote:
 *** Agenda config   
 #+BEGIN_SRC emacs-lisp
  '(org-agenda-include-all-todo t)
  '(org-agenda-span 21)
  '(org-agenda-include-diary t)
  '(org-agenda-insert-diary-extract-time t)
  '(org-agenda-insert-diary-strategy (quote top-level))

These are just quoted lists containing a variable and presumably a value
said variable should be set to. This lisp code does nothing when
executed, at least not setting these variables. To me this looks like
something, that belongs into a customize-set-variables call. I am not
sure how to get those into your init.org file. I just let them reside in
my init.el file, which is also responsible for 

-- 
Alexander Baier



Re: [O] converting to init.org

2014-11-12 Thread Alexander Baier
[ Accidentally hit send, ... ]

On 2014-11-12 20:27 Sharon Kimble wrote:
 *** Agenda config   
 #+BEGIN_SRC emacs-lisp
  '(org-agenda-include-all-todo t)
  '(org-agenda-span 21)
  '(org-agenda-include-diary t)
  '(org-agenda-insert-diary-extract-time t)
  '(org-agenda-insert-diary-strategy (quote top-level))

These are just quoted lists containing a variable and presumably a value
said variable should be set to. This lisp code does nothing when
executed, at least not setting these variables. To me this looks like
something, that belongs into a customize-set-variables call. I am not
sure how to get those into your init.org file. I just let them reside in
my init.el file, which is also calls org-babel to do the real
initialization via org-babel-load-file.

HTH,
-- 
Alexander Baier



[O] Function to look-up a certain property

2014-11-02 Thread Alexander Baier
Hello,

I am looking for a function that starts at point and walks up the
outline-tree searching for property P. If P is defined the function
returns P's value, otherwise nil. If The top level headline does not
have a property P, the function looks for #+P between the first headline
and bob.

Is there something in org's code base that does this?

Regards,
-- 
Alexander Baier



Re: [O] Function to look-up a certain property

2014-11-02 Thread Alexander Baier
On 2014-11-02 18:08 Nicolas Goaziou wrote:
 Hello,

 Alexander Baier alexander.ba...@mailbox.org writes:

 I am looking for a function that starts at point and walks up the
 outline-tree searching for property P. If P is defined the function
 returns P's value, otherwise nil. If The top level headline does not
 have a property P, the function looks for #+P between the first headline
 and bob.

 Is there something in org's code base that does this?

   (org-entry-get (point) P t)

 However, it will look for #+PROPERTY: P val instead, and it isn't
 limited to data before first headline.

This is perfect, thank you!

Regards,
-- 
Alexander Baier



Re: [O] How do you interact with org src blocks for your gmane.emacs.orgmode correspondence?

2014-11-01 Thread Alexander Baier
On 2014-10-31 23:51 Brady Trainor wrote:
 This seems wholly inefficient, and I'm hoping there is some obviously
 easier way to do it, no matter how much elisp is needed.

 I am not sure it is relevant, but my rather vanilla Gnus setup
 includes drafting mail in Message buffer. I didn't quickly find how to
 switch to drafting with Gnus, so I make the cursory assumption that
 this is not the trick to at least seeing highlighting of src blocks
 while drafting emails.

I use the setup described in this thread:
http://permalink.gmane.org/gmane.emacs.orgmode/86234

Regards,
-- 
Alexander Baier



Re: [O] How to extract TODOs from date-tree

2014-10-29 Thread Alexander Baier
On 2014-10-29 03:59 Nick Dokos wrote:
 If there are use cases out there, it might be worth collecting them and
 then thinking about how to support them better. If there aren't, maybe
 it should be thrown out.

I would argue that datetress lend themselves fairly well for browsing
any kind of chronologically organized data, without the need to resort
to any external tool. No agenda, no sparse-trees, no nothing. If you
have to, you can just look at the plain text/org file and browse it
pretty comfortably.

Regards,
-- 
Alexander Baier



Re: [O] Several datetrees in one file

2014-10-29 Thread Alexander Baier
On 2014-10-29 04:01 Nick Dokos wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:
 I would like to have several datetrees in one org file. I want to have
 different datetrees under different headlines. The setup I have in mind
 is an address book with chronologically ordered notes for each person.

 ...

 Is this possible?


 I don't think so (but I don't know for sure).

I dug around the source code for org-capture and org-datetree and seems
that there is only lacking support in the capture process. IIUC the
datetree functionality is affected by narrowing, which could be used to
force it to use the datetree under a certain header.

As I am not quite convinced of my approach jet, I would like to hear
what others would use in my situation described in the first post. To
rehash: An address book with one level 1 heading per person and notes
corresponding to said person in a datetree starting at level 2.

Regards,
-- 
Alexander Baier



[O] Several datetrees in one file

2014-10-28 Thread Alexander Baier
Hello,

I would like to have several datetrees in one org file. I want to have
different datetrees under different headlines. The setup I have in mind
is an address book with chronologically ordered notes for each person.

This is an example entry for one person. Each following person in that
file will have their own datetree and corresponding notes.

* John Doe
  :PROPERTIES:
  :MAIL: john@example.com
  :END:
- nice guy
** 2014
*** 2014-10 October
 2014-10-27 Monday
* meeting 1
Entered on 2014-10-27 Mon 00:00
- notes
 2014-10-28 Tuesday
* meeting 2
Entered on 2014-10-28 Tue 00:00
- more notes

Currently, there is no way to capture a new entry in a datetree for a
specific person. The current capture templates only allow for one
datetree per file.

Is it possible to extend this datetree functionality and let the user
specify the file and the headline under which the datetree resides?
Adapting the example from the manual, I would like to have something
along the lines of:

(file+headline+datetree path/to/file headline)

or

(file+olp+datetree path/to/file level 1 headline level2 ...)


Is this possible?

Regards,
-- 
Alexander Baier



Re: [O] Yank normal text as item in list

2014-10-23 Thread Alexander Baier
On 2014-10-23 12:02 Igor Sosa Mayor wrote:
 Hi,

 often I have to yank 'normal' text, that means, text which is not
 indented into a item of a list. In other words, maybe, to convert it
 into a list item.

 I have always the problem that, when the text over one line goes, it
 does not get the correct indentation.

 Is there maybe a magical function to get this?

 Many thanks in advance!

What is wrong with fill-paragraph (bound to M-q by default)?

HTH,
-- 
Alexander Baier



Re: [O] Putting a todo item to the end of this level

2014-10-12 Thread Alexander Baier
Hello Uwe,

On 2014-10-12 09:37 Uwe Ziegenhagen wrote:
 how can I move a specific TODO item to the end of the level it currently sits?

 Example

 a) before the command was executed

 * TODO Level 1
 ** TODO something to do a
 ** DONE something to do b
 ** TODO something to do c
 ** TODO something to do d
 * TODO Level 1 again

 b) after the command was executed (TODO is moved to the end of the TODO
 Level 1 items)

 * TODO Level 1
 ** TODO something to do a
 ** TODO something to do c
 ** TODO something to do d
 ** DONE something to do b
 * TODO Level 1 again

If you always want to move DONE headlines to the end you might want to
consider org-sort. It is usually bound to `C-c ^' so with point on the
first headline, doing `C-c ^ o' would produce the example b).

HTH,
-- 
Alexander Baier



Re: [O] Filter by tags

2014-10-05 Thread Alexander Baier
On 2014-10-05 06:42 Chris Henderson wrote:
 I have 4 * items (* Tasks, * Projects, * Someday/ maybe and * Read and
 Review) - how do I select tags (e.g. @internet, @home, @work etc.) only
 from * Tasks and * Projects?

I am not completely sure if I understand what you want to do, but maybe
tag groups will help you out:

http://orgmode.org/org.html#Tag-groups

HTH,
-- 
Alexander Baier



Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-12 Thread Alexander Baier
On 2014-07-12 10:18 Thorsten Jolitz wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:
 Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
 type a lot of these escaped parens, you might want to try
 smartparens-mode for auto insertion of the closing _escaped_ paren.

 I always wondered how this C-c a s search should work. I can only enter
 one word, just like the OP.

I forgot to mention that I did not use C-c a s, but created an agenda
and pressed = to start a regexp-match.

Regards,
-- 
Alexander Baier



Re: [O] How to filter agenda for Word1 OR Word2?

2014-07-11 Thread Alexander Baier
On 2014-07-11 13:26 Martin Beck wrote:
 I have a search result (created by a search agenda C-C a s) and I
 want to narrow it down further with additional criteria.
 I tried to use the = key for Narrow to entries matching regexp,
 but I did not find out how to combine several terms in here.
  
 As long as I only enter one word, it works. But if I want to filter
 for criteria like
  
 Word1 OR Word2
 or (Word1 OR Word2) AND Word3
 or (Word1 OR Word2) AND NOT (Word3 OR Word4)
  
 I get no results just by entering
 e.g. Word1|Word2
 or Word1Word2
  
 I'm sure this is trivial, but I'm not an expert in regular
 expressions and currently don't see how to solve that.
 :-(

Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
type a lot of these escaped parens, you might want to try
smartparens-mode for auto insertion of the closing _escaped_ paren.

As an example, if you type \(, smartparens will automatically insert
\) after point. You can even navigate over these groups via sexps
commands.

HTH,
-- 
Alexander Baier



Re: [O] Indentation messed up after example block

2014-07-07 Thread Alexander Baier
On 2014-07-06 20:03 York Zhao wrote:
 Hi list,

 I just noticed a problem that org-mode indentation gets messed up after
 example block. Here is ECM:

 #+STARTUP: indent

 * Level one
 ** Level two
 Indentation is right.

 #+BEGIN_EXAMPLE
 * Example at level one
 #+END_EXAMPLE

 Indentation is wrong.

The asterisk followed by a space followed by text in your example block
is recognized by org as a headline. So org thinks everything under that
headline is the body of the headline.

You can fix this by not letting * Example at level one start at the
beginning of the line, but instead indent it by one or more spaces or
prefix it with some other character(s).

HTH,
-- 
Alexander Baier



Re: [O] org-mode date stamp with just month?

2014-07-07 Thread Alexander Baier
On 2014-07-07 16:40 Grant Rettke wrote:
 That property then is something that we may set as a buffer local
 variable set in the file itself for cases where want only months in
 the entire file?

File local variables?

HTH,
-- 
Alexander Baier



Re: [O] How do I review a day

2014-07-05 Thread Alexander Baier
On 2014-07-05 17:00 Sharon Kimble wrote:
 Ramon Diaz-Uriarte rdia...@gmail.com writes:

 Dear Robert,

 If you go to the *Org Agenda* buffer and type v and then c (without the
 quotes), does that give you what you want?

 Best,

 R.

 I tried this, just to see what happened, and not a lot, but then I'm
 not doing any logging. But how do I get my original display back,
 because I'm now stuck in this mode! Help please!

 Sharon.

My guess would be one of r,g,q,x?

HTH,
-- 
Alexander Baier



Re: [O] minor problem on major version number

2014-06-26 Thread Alexander Baier
On 2014-06-26 18:14 Nick Dokos wrote:
 I have some backward-compat code that does this:

 (setq major-version (string-to-number (nth 0 (split-string
 (org-version) [.]

It does not work in this situation, because beta_8.3 is not a valid
version string, but version might be interesting for you.

HTH,
-- 
Alexander Baier



[O] [Latex] Don't push code blocks to end of document (was: Source blocks with captions)

2014-06-25 Thread Alexander Baier
On 2014-06-24 14:31 Alexander Baier wrote:

[...]

 With this code:

  * Test

  #+CAPTION: Test
  #+BEGIN_SRC java
 // some code
  #+END_SRC

 I get a figure with a caption when exporting to LaTeX:

  \section{Test}
  \label{sec-1}

  \begin{figure}[H]
  \begin{verbatim}
  // some code
  \end{verbatim}\caption{Test}

  \end{figure}

 You don't need to name the source code block, although it is typically a
 good idea to do so.

 I always only looked at the generated PDF to see if there was a caption
 added.  When opening the generated .tex file I found the same code you
 are seeing.  It seems the document class I am using just drops the
 caption.

 The class in question is LLNCS, does anyone know why this could happen?

In fact, the document class does not drop those captions, it just moves
the listings to the end of the document, where I did not see them.

How do I prevent this from happening? It is not much use to me if _all_
my listings are pushed to the very end of my document. I would like
latex to place them in the vicinity of where I defined my code block in
org.

This is the test file showing the behaviour described above:


#+LANGUAGE: de
#+OPTIONS: tasks:nil num:3 toc:nil ':t :t
#+LATEX_CLASS: llncs
#+TITLE: Test

* A headline
Some words before the source code block.
For good measure, here is a link to listing [[src:foo]].

#+NAME: src:foo
#+CAPTION: test caption.
#+BEGIN_SRC java
  interface Foo {
  void bar();
  }
#+END_SRC

And some words after the block.



Thanks,
-- 
Alexander Baier



Re: [O] [Latex] Don't push code blocks to end of document

2014-06-25 Thread Alexander Baier
Hello again,

this is another follow up, I am sorry for so much noise.

On 2014-06-25 13:20 Alexander Baier wrote:
 On 2014-06-24 14:31 Alexander Baier wrote:

 [...]

 With this code:

  * Test

  #+CAPTION: Test
  #+BEGIN_SRC java
 // some code
  #+END_SRC

 I get a figure with a caption when exporting to LaTeX:

  \section{Test}
  \label{sec-1}

  \begin{figure}[H]
  \begin{verbatim}
  // some code
  \end{verbatim}\caption{Test}

  \end{figure}

 You don't need to name the source code block, although it is typically a
 good idea to do so.

 I always only looked at the generated PDF to see if there was a caption
 added.  When opening the generated .tex file I found the same code you
 are seeing.  It seems the document class I am using just drops the
 caption.

 The class in question is LLNCS, does anyone know why this could happen?

 In fact, the document class does not drop those captions, it just moves
 the listings to the end of the document, where I did not see them.

 How do I prevent this from happening? It is not much use to me if _all_
 my listings are pushed to the very end of my document. I would like
 latex to place them in the vicinity of where I defined my code block in
 org.

I fixed this by using the listings package. I set org-latex-listings
to true and followed the instructions in the doc string of said
variable. Now, my code blocks are placed where I want them and are even
syntax highlighted!

[...]

Regards,
-- 
Alexander Baier



Re: [O] Source blocks with captions

2014-06-24 Thread Alexander Baier
On 2014-06-23 21:23 Thomas S. Dye wrote:
 Aloha Alexander,

 Alexander Baier alexander.ba...@mailbox.org writes:

 On 2014-06-23 17:43 Thorsten Jolitz wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 Hello org-moders!

 I just tried to put a caption under/on/above (or anywhere for that
 matter) my source code block.  When exporting to latex, I didn't see any
 caption belonging to my code block.  Other backends have not been
 tried.  How can I achieve this?

 For reference, I run Org-mode version 8.2.6 (release_8.2.6 @
 /home/delexi/.emacs.d/ext/org-mode/lisp/) and this is the org file:

 * Test
 #+CAPTION: Test
 #BEGIN_SRC java
   // some code
 #END_SRC

 shouldn't that be 

 ,
 | #+NAME: Test
 `

 instead of 

 ,
 | #+CAPTION: Test
 `

 ?

 This does not work for me - I still see no caption or a similar thing in
 the vicinity of my code block.  Does #+NAME work for you?

 Regards,

 There are two errors in your Org mode file on the BEGIN_SRC and END_SRC
 lines.

You are of course right! This was just a mistake I made whilst putting
together this short example.  In my normal setup the source code
blocks have the right form.

 With this code:

  * Test

  #+CAPTION: Test
  #+BEGIN_SRC java
 // some code
  #+END_SRC

 I get a figure with a caption when exporting to LaTeX:

  \section{Test}
  \label{sec-1}

  \begin{figure}[H]
  \begin{verbatim}
  // some code
  \end{verbatim}\caption{Test}

  \end{figure}

 You don't need to name the source code block, although it is typically a
 good idea to do so.

I always only looked at the generated PDF to see if there was a caption
added.  When opening the generated .tex file I found the same code you
are seeing.  It seems the document class I am using just drops the
caption.

The class in question is LLNCS, does anyone know why this could happen?

Regards,
-- 
Alexander Baier



[O] Source blocks with captions

2014-06-23 Thread Alexander Baier
Hello org-moders!

I just tried to put a caption under/on/above (or anywhere for that
matter) my source code block.  When exporting to latex, I didn't see any
caption belonging to my code block.  Other backends have not been
tried.  How can I achieve this?

For reference, I run Org-mode version 8.2.6 (release_8.2.6 @
/home/delexi/.emacs.d/ext/org-mode/lisp/) and this is the org file:

* Test
#+CAPTION: Test
#BEGIN_SRC java
  // some code
#END_SRC

Thanks in advance,
-- 
Alexander Baier



Re: [O] Source blocks with captions

2014-06-23 Thread Alexander Baier
On 2014-06-23 17:43 Thorsten Jolitz wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 Hello org-moders!

 I just tried to put a caption under/on/above (or anywhere for that
 matter) my source code block.  When exporting to latex, I didn't see any
 caption belonging to my code block.  Other backends have not been
 tried.  How can I achieve this?

 For reference, I run Org-mode version 8.2.6 (release_8.2.6 @
 /home/delexi/.emacs.d/ext/org-mode/lisp/) and this is the org file:

 * Test
 #+CAPTION: Test
 #BEGIN_SRC java
   // some code
 #END_SRC

 shouldn't that be 

 ,
 | #+NAME: Test
 `

 instead of 

 ,
 | #+CAPTION: Test
 `

 ?

This does not work for me - I still see no caption or a similar thing in
the vicinity of my code block.  Does #+NAME work for you?

Regards,
-- 
Alexander Baier



Re: [O] Do not export single newlines to latex

2014-06-09 Thread Alexander Baier
On 2014-06-09 09:42 James Harkins wrote:
 Alexander Baier alexander.baier at mailbox.org writes:

 I am writing a document for which my main export target is latex.  To
 obtain reasonable diffs wrt version control systems, I use one line
 per sentence in addition to =visual-line-mode= as was mentioned in this
 post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.
 
 The problem with this is that these newlines get translated to newlines
 in latex aka \\newline.

 I use the LaTeX exporter routinely, and I have never seen this behavior. For
 instance,

 ~~~ org input file
 * Headline
 The first sentence.
 The second sentence.
 ~~~

 ~~~ LaTeX export (minus preamble)
 \begin{document}

 \maketitle
 \tableofcontents

 \section{Headline}
 \label{sec-1}
 The first sentence.
 The second sentence.
 % Emacs 23.3.1 (Org mode 8.2.5f)
 \end{document}
 ~~~

 I also checked the customization variables in the org-export-latex group,
 and I didn't see anything immediately relevant to newline translation.

 So I can think of a couple of possibilities:

 - You might have some strange configuration lying around somewhere.
 (Additional evidence that you're seeing nonstandard behavior is that none of
 the .el files in the org distribution contain the string 'newline', let
 alone 'newline'.)

 - Or you might be using a newer org than I'm using, in which case you might
 be seeing a regression bug. (As far as I know, a single line break in the
 input should definitely not translate into \\newline!!)

 I want the export back end to ignore those
 single newlines and only insert \\newline into the latex document
 upon encountering two consecutive newlines in my org-mode file.

 Two consecutive line breaks in the input should be copied over directly into
 the .tex file. It's then up to LaTeX to interpret this -- per its own
 standards -- as a paragraph break. Again, \\newline would be quite
 exceptional.

You misunderstood me, maybe I didn't explain this very well. The
document doesn't literally contain \\newline.  For me your
example results in the following output.

#+BEGIN_SRC latex
  \begin{document}

  \maketitle
  
  \section{Head
  \label{sec-1}
  The first sentence. \\
  The second sentence.
  % Emacs 24.3.1 (Org mode 8.2.6)
  \end{document}
#+END_SRC

Note the \\ after The first sentence.  That is what I want to get
rid of.

-

While producing said output I glanced at the org file's header and saw
the following line:

#+OPTIONS: \n:t

After removing that line, everything works as expected.  I cannot
remember putting this option there and thus did not think of looking for
a cause in the header of my org file.

Thank you anyway for you response!

Kind regards,
-- 
Alexander Baier



Re: [O] org-drill: remove duplicates

2014-06-09 Thread Alexander Baier
On 2014-06-09 13:28 Dennis Yurichev wrote:
 Hi.

 I just started using org-drill, which is seems pretty good.
 One thing I noticed at first: are there a way to remove duplicates which 
 will inevitably be added into the file?

 And/or: it's possible to sort all entries in org-file by, let's say,
 ** English heading?

 I've something like...

 ==
 * Word
 ** English
 english word 2
 ** Russian
 russian word 2

 * Word
 ** English
 english word 1
 ** Russian
 russian word 1
 ==

 It's possible to sort file so that's entry with english word 1 
 will be at top?

I do not know of any build-in sorting strategy that does what you want.
But you can always write your own function and pass it along with
`C-c ^ f'.  Such a function takes no arguments and returns the sorting
key.  I put together a small function, but it does not work correctly
yet.  Maybe someone can point out why.  Or maybe this will help you as a
point to start and investigate further.

This function is called with point at the beginning of the top level
headline.  Note: I called `C-c ^ f' with an active region over the whole
file.
#+BEGIN_SRC emacs-lisp
  (defun my-sort ()
(forward-line 2)
(message %s (thing-at-point 'line))
(thing-at-point 'line))
#+END_SRC

Using this function with org-sort results in some weird behaviour where
only the English but not the Russian headlines are sorted.


I hope this helps a bit,
-- 
Alexander Baier



Re: [O] org version check on start

2014-06-09 Thread Alexander Baier
On 2014-06-09 02:38 Grant Rettke wrote:

[...]

 (when (not (string-equal (org-version) 8.2.6))

  (when (not (version= (org-version) 8.2.6))

   (display-warning
'org-mode
(concat
 Insufficient requirements. Expected 8.2.6. Found  (org-version))
:emergency))

Maybe using version= instead of string-equal to compare version string
might save you some additional headaches ;-).

HTH,
-- 
Alexander Baier



[O] Do not export single newlines to latex

2014-06-07 Thread Alexander Baier
Hello org-moders!

I am writing a document for which my main export target is latex.  To
obtain reasonable diffs wrt version control systems, I use one line
per sentence in addition to =visual-line-mode= as was mentioned in this
post last November http://thread.gmane.org/gmane.emacs.orgmode/78332.

The problem with this is that these newlines get translated to newlines
in latex aka \\newline.  I want the export back end to ignore those
single newlines and only insert \\newline into the latex document
upon encountering two consecutive newlines in my org-mode file.

Do I have to write a filter for this, or is this configurable by some
variable?

Regards,
-- 
Alexander Baier



Re: [O] Automatic ordered lists with intelligent decimalization?

2014-06-07 Thread Alexander Baier
On 2014-06-07 20:34 Lawrence Bottorff wrote:
 Besides the stackoverflow idea, my kludge is

 #+STARTUP: hidestars

 * 1
 ** 1.1
 ** 1.2
 ** 1.3
 *** 1.3.1
 *** 1.3.2
  1.3.2.1
 * 1.3.2.1.1
 * 1.3.2.1.2

 Does anyone know where this sort of thing resides? Emacs outline?

What do you mean by resides?  Do you want to know which entity defines
the syntax of org documents?  AFAIK that would be org-element.el, which
parses an org-mode structured file into a syntax tree.

HTH,
-- 
Alexander Baier



Re: [O] Autoopen TODOs AND checkboxes?

2014-05-28 Thread Alexander Baier
On 2014-05-27 12:25 Sharon Kimble wrote:
 In my organiser page I have a mixed bag of TODO lists and also
 checkbox lists. If I have at the top of the page #+STARTUP: content
 it opens just showing all of the TODO lists and none of the checkbox
 lists. But if I have #+STARTUP: showall it shows everything,
 including all the hidden dates on the TODOs.

 How can I get it to just show all the TODOs and all of the
 checkboxes please?

I do not think this is possible by merely defining the STARTUP
directive.  You will probably need some custom elisp to accomplish
this.  Take a look at org-map-entries to iterate over every headline in
the file and reveal the stuff you want to see. That custom elisp can be
put into org-mode-hook, maybe checking if you are in the right file.

Note: I am just brainstorming here, there might be a solution that is a
lot easier.

Regards,
-- 
Alexander Baier



Re: [O] org-contact Documentation

2014-05-24 Thread Alexander Baier
On 2014-05-23 15:17 Esben Stien wrote:
 I find it very interesting to distribute contacts all over my files,
 instead of having a single file for them. They end up somehow where they
 are supposed to be;).

This should not be a problem.  You define what makes a headline a
contact for you by specifying `org-contacts-matcher'.  And
`org-contacts-files' is a list of file names you want org-contacts to
consider whilst looking for contacts.

[...]

 A way of using groups?

I never used BBDB, so I am not sure what you mean by groups.
Org-contacs has a notion of groups in a sense that you can tag your
contact headlines and every headline with the same tag is considered to
be in the same group.  This can be used when you are composing a mail to
many people, as you can do this by simply stating the relevant tag name.

HTH,
-- 
Alexander Baier



Re: [O] org-contacts development

2014-05-24 Thread Alexander Baier
On 2014-05-24 12:15 Alexis wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 About the spec, might it make sense to use a standard already in
 existence as a starting point or even a major inspiration?  Something
 like vCard for example?

 Yeah, i like the idea of building on top of vCard, given how widely it's
 used and supported, and that it doesn't seem to be a horrible format
  Those who feel otherwise are going to need to speak up soon or
 forever hold their peace. :-)


 Alexis.

For what it's worth, I would love to help out in any way I can.  I use
org-contacts myself and know elisp well enough to also do some
implementing.  But I wouldn't mind writing some documentation, either.
I, however, don't know much about Android programming or the syncing
aspect of this task.

Regards,
-- 
Alexander Baier



Re: [O] org-contacts development

2014-05-23 Thread Alexander Baier
Hello Alexis,

On 2014-05-23 06:07 Alexis wrote:

[...]

 What would be useful would be an 'official', fleshed-out spec for
 org-contacts data, which handles a greater range of contact-related
 info. At the moment, for example, my org-contacts file makes use of the
 properties:

 #+PROPERTY: LANDLINE
 #+PROPERTY: MOBILE
 #+PROPERTY: POST
 #+PROPERTY: RESIDENCE


[...]

 Fleshing out an extended spec for org-contacts data could be part of the
 process of making org-contacts a first-class citizen of org-mode, and
 provide a more solid foundation on which people can build (and share)
 the org-contacts functionality they're after. And in my own particular
 case, it would greatly facilitate my work in org-contacts / Android
 Contacts integration. :-)

 What do people think?

I, for one, would love to see org-contacts being improved in any way.
Integrating this with MobileOrg would be an extremely helpful and
something I have wanted since the day I started using org-contacts.

About the spec, might it make sense to use a standard already in
existence as a starting point or even a major inspiration?  Something
like vCard for example?

Regards,
-- 
Alexander Baier



[O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
Hello,

consider the following code block with point at X:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
X
  (defun another-test () nil)
#+END_SRC

Calling org-babel-demarcate-block (C-c C-v C-d normally) will produce
the following:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
#+end_src
X
#+begin_src emacs-lisp
  (defun another-test () nil)
#+END_SRC

I, however, would expect to see this:

#+BEGIN_SRC emacs-lisp
  (defun test () nil)
#+END_SRC
X
#+BEGIN_SRC emacs-lisp
  (defun another-test () nil)
#+END_SRC

Thus preserving the case of BEGIN/END_SRC. Is there any reason this is
always in lower case?

Org-mode version 8.2.6 (release_8.2.6 @
/home/delexi/.emacs.d/ext/org-mode/lisp/)

Regards,
-- 
Alexander Baier



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
On 2014-05-20 17:40 Bastien wrote:
 Hi Alexander,

 Alexander Baier alexander.ba...@mailbox.org writes:

 Thus preserving the case of BEGIN/END_SRC. Is there any reason this is
 always in lower case?

 No.  From master, C-c C-v C-d now preserves the case, thanks for
 reporting this.

Thanks! Do you know when this change will be released?

Regards,
-- 
Alexander Baier



Re: [O] org-babel-demarcate-block should preserve case of block declaration

2014-05-20 Thread Alexander Baier
On 2014-05-20 18:01 Bastien wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 Thanks! Do you know when this change will be released?

 Yes and no -- it will be release with Org 8.3, which is not far from a
 near future, but quite close to a semi-distant future.  IOW: we don't
 have a date for 8.3, but you can use git to enjoy the fix :)

As this is something I don't use that often and can be worked around by
C-p M-4 M-u, I will wait for that release.  Org 8.3 is also the version
to be included into Emacs 24.4, isn't it?

Regards,
-- 
Alexander Baier



Re: [O] org-edit-src-code outside of org

2014-05-17 Thread Alexander Baier
On 2014-05-17 08:33 Jorge A. Alfaro-Murillo wrote:
 I figure it out, I am updating the variable that causes problems and it
 is working very well so in case you want to use org-edit-src-code in
 Message mode all is needed is:

 #+BEGIN_SRC emacs-lisp
   (eval-after-load message
 '(progn
(define-key message-mode-map (kbd tab)
  (lambda ()
(interactive)
(if (not (org-try-structure-completion))
(message-tab
(define-key message-mode-map (kbd C-c ')
  (lambda ()
(interactive)
(org-edit-src-code)
(setq-local org-edit-src-from-org-mode t)
 #+END_SRC

 I just used it right now =)

This has been bugging me for quite some time now, thank you very much
for this, it works like it's supposed to! :)

Regards,
-- 
Alexander Baier



Re: [O] html export doctype?

2014-05-17 Thread Alexander Baier
On 2014-05-17 14:12 Dave Pawson wrote:
 http://orgmode.org/manual/HTML-doctypes.html#HTML-doctypes

 intimates that setting variable org-html-doctype
 is usable here.

 Version 8.2.6  does not show this variable?

I am running 8.2.6 here and for me org-html-doctype is defined. Maybe
you need to (require 'ox-html) ?

HTH,
-- 
Alexander Baier



Re: [O] [Latex Export] Influence placement of \maketitle command

2014-05-16 Thread Alexander Baier
On 2014-05-16 06:19 Nick Dokos wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 On 2014-05-15 21:57 Eric S Fraga wrote:
 I put it under its own heading with an :ignoreheading: tag and use the
 filter that was posted on this list (today in fact):

 I can't find the filter you are referring to. I guess it is in the
 org-ref thread?  I did not follow that thread as org-ref seems to be
 a somewhat full-fledged solution including a lot of things I do not
 need.  I looked through the thread but wasn't lucky to find said
 filter.  Could you kindly post a link? (if that's not to much to ask)


 I don't have a link, but I have the following in an example file (which
 afaik still works fine):

This works like charm, thanks!

 Suvayu's filter to get rid of :ignoreheading: tagged headlines - used
 in bib.org
 #+BEGIN_SRC emacs-lisp :results silent
 (defun sa-ignore-headline (contents backend info)
   Ignore headlines with tag `ignoreheading'.
   (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii)
   (string-match \\`.*ignoreheading.*\n
 (downcase contents)))
 (replace-match  nil nil contents)))

 (add-to-list 'org-export-filter-headline-functions 'sa-ignore-headline)
 #+END_SRC

And thanks to Suvayu for providing this filter in the first place!

 Using #+include also largely resolves your original concern I think

This is also a good idea. But for now my document is small enough to
maintain it in a single org file.

Regards,
-- 
Alexander Baier



Re: [O] [Latex Export] Influence placement of \maketitle command

2014-05-16 Thread Alexander Baier
On 2014-05-16 09:15 Eric S Fraga wrote:
 On Thursday, 15 May 2014 at 22:41, Alexander Baier wrote:
 On 2014-05-15 21:57 Eric S Fraga wrote:
 I put it under its own heading with an :ignoreheading: tag and use the
 filter that was posted on this list (today in fact):

 I can't find the filter you are referring to. I guess it is in the
 org-ref thread?  I did not follow that thread as org-ref seems to be
 a somewhat full-fledged solution including a lot of things I do not
 need.  I looked through the thread but wasn't lucky to find said
 filter.  Could you kindly post a link? (if that's not to much to ask)

 Thanks,

 It was not in that thread and the email was tangentially about ignored
 headlines.  I think it had to with beamer columns and generating
 articles.  I'm offline currently so cannot check.

Ah, well, neither did I follow that one.

 In any case, this is what I use:

   (defun esf/remove-lines-with-ignore-heading-tag (backend)
 (message Deleting lines with ignore heading tag)
 (while (search-forward-regexp ^\\*+.*[ 
 \t]+[a-ZA-Z0-9:]*:ignoreheading:[a-ZA-Z0-9:]*$ (point-max) t)
   (cond
((eq backend 'latex) (replace-match #+latex: % \\ ))
((eq backend 'html) (replace-match #+html: !-- \\ -- ))
(t (replace-match )
   (add-hook 'org-export-before-processing-hook 
 'esf/remove-lines-with-ignore-heading-tag)

 HTH,
 eric

Thank you for digging this up!  I, however, already applied Suvayu's
solution suggested by Nick that uses a headline filter.  I see that
your filter inserts the original headline in comments into the source
document, which might be very helpful, in case you are using this for
more than just two latex commands.

Regards,
-- 
Alexander Baier



Re: [O] FILE special property?

2014-05-16 Thread Alexander Baier
On 2014-05-16 22:12 Boyan Penkov wrote:
 (setq org-stuck-projects
   ‘(“+FILE=~/todos/myTodos.org+LEVEL=1 (NEXT TODO) nil ”))

I have never used this feature, but this first element look odd to
me. I would try this: “+FILE=\~/todos/myTodos.org\+LEVEL=1.

HTH,
-- 
Alexander Baier



Re: [O] [Latex Export] Influence placement of \maketitle command

2014-05-15 Thread Alexander Baier
On 2014-05-14 21:01 Nick Dokos wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

[...]

 Is there a way for me to influence the placement of =\maketitle= and
 thus be able to order those commands the right way?

 If \institute can be placed in the preamble, then using #+LATEX_HEADER
 instead of #+LATEX is probably the way to go.

 If it has to be in the document body, one way to do it is to redefine
 the variable org-latex-title-command in a file-local-variable section
 added to the end of your file:

 # Local Variables:
 # org-latex-title-command: \\institute{Foo}\\maketitle
 # End:

 See

(info (emacs) File variables)

While we are on the topic of placing stuff: I also need to insert
citations for which I use bibtex. I use #+LATEX:
\bibliographystyle{plain} and #+LATEX: \bibliography{literatur} under my
last header for the bibliography to be placed at the very end.

I find this to be a somewhat lacking solution as moving my last subtree
would move my bibliography, too.

Is there a way to make it make it appear at the bottom of my document no
matter what?

Regards,
-- 
Alexander Baier



Re: [O] [Latex Export] Influence placement of \maketitle command

2014-05-15 Thread Alexander Baier
On 2014-05-15 21:57 Eric S Fraga wrote:
 I put it under its own heading with an :ignoreheading: tag and use the
 filter that was posted on this list (today in fact):

I can't find the filter you are referring to. I guess it is in the
org-ref thread?  I did not follow that thread as org-ref seems to be
a somewhat full-fledged solution including a lot of things I do not
need.  I looked through the thread but wasn't lucky to find said
filter.  Could you kindly post a link? (if that's not to much to ask)

Thanks,
-- 
Alexander Baier



[O] [Latex Export] Influence placement of \maketitle command

2014-05-14 Thread Alexander Baier
Hello,

I am writing a paper using llncs as the document class. I use the
=\institute= command which has to be placed _above_ the =\maketitle=
command to be considered. But exporting my document always yields a
latex file where =\maketitle= appears above =\institute=. I use
simple #+LATEX: directives to insert =\institute=.

Is there a way for me to influence the placement of =\maketitle= and
thus be able to order those commands the right way?

TIA for any pointers,
-- 
Alexander Baier



Re: [O] [Latex Export] Influence placement of \maketitle command

2014-05-14 Thread Alexander Baier
On 2014-05-14 21:01 Nick Dokos wrote:
 Alexander Baier alexander.ba...@mailbox.org writes:

 Hello,

 I am writing a paper using llncs as the document class. I use the
 =\institute= command which has to be placed _above_ the =\maketitle=
 command to be considered. But exporting my document always yields a
 latex file where =\maketitle= appears above =\institute=. I use
 simple #+LATEX: directives to insert =\institute=.

 Is there a way for me to influence the placement of =\maketitle= and
 thus be able to order those commands the right way?

 TIA for any pointers,

 If \institute can be placed in the preamble, then using #+LATEX_HEADER
 instead of #+LATEX is probably the way to go.

Of course! Somehow I totally forgot about the LATEX_HEADER
directive. With this, everything works fine!

 If it has to be in the document body, one way to do it is to redefine
 the variable org-latex-title-command in a file-local-variable section
 added to the end of your file:

 # Local Variables:
 # org-latex-title-command: \\institute{Foo}\\maketitle
 # End:

Oh, the title-command is a variable, that is nice.

Thank you very much,
-- 
Alexander Baier



Re: [O] tab completion for org-contacts not working for me in emacs 24

2014-05-11 Thread Alexander Baier
Hello Andreas,

On 2014-05-11 13:07 Andreas Reuleaux wrote:
  (setq load-path (cons ~/cfg/emacs/el/org load-path))
 (require 'org-contacts)
 (setq org-contact-files (list

~/work/org/contacts.org
))

For me this is org-contacts-files, maybe that is the problem?

HTH,
-- 
Alexander Baier



Re: [O] Export all headlines when some are set with :export:

2014-05-10 Thread Alexander Baier
On 2014-05-10 05:11 John Hendy wrote:
 In creating a packing/buy list for an upcoming camping trip, I wanted
 two exports:
 - one for things to buy
 - one for everything on the list for packing

If these two lists are disjoint you could put each of them under its own
subtree and export these subtrees seperately.  Just press C-s in the
export dispatcher.

HTH,
--
Alexander Baier




Re: [O] Set tags in region

2014-05-10 Thread Alexander Baier
Hello John,

On 2014-05-10 04:53 John Hendy wrote:
 Just curious of there's a way to set the tags in a region all at once?

You could also takle this with keyboard macros, see
(info (Emacs) Keyboard Macros). [Evaluate that expression in emacs to
see the relevant manual entry.]

Define a macro that tags one specific headline and then execute it on
the current region with `C-x C-k r'.

HTH,
-- 
Alexander Baier




Re: [O] Export all headlines when some are set with :export:

2014-05-10 Thread Alexander Baier
On 2014-05-10 05:11 John Hendy wrote:
 Hello,


 In creating a packing/buy list for an upcoming camping trip, I wanted
 two exports:
 - one for things to buy
 - one for everything on the list for packing

If those two lists are disjoint, you can put each of them under its own
subtree and export only the respective subtree.

With point on the subtree to export press C-c C-e C-s toggeling the
subtree export.

HTH,
-- 
Alexander Baier



Re: [O] Set tags in region

2014-05-10 Thread Alexander Baier
On 2014-05-10 16:14 John Hendy wrote:
 On May 9, 2014 11:21 PM, Nick Dokos ndo...@gmail.com wrote:

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

  Hello,
 
 
  Just curious of there's a way to set the tags in a region all at once?

 (org-map-entries (function org-set-tags) nil 'region)

 or

 (org-map-entries (lambda () (org-set-tags-to '(foo))) nil 'region)

 or some variation thereof.


 I did see that function, but it didn't DUI what I expected with M-x. Would
 u need to run it as above or could I use M-x with it somehow?

 A above I take it I'd put that in the buffer and then eval-region?

If you want to call this interactively, i.e. via M-x or a key-binding,
you will have to wrap this code in a defun with an interactive
from and thus turn it into a command. Like this:

#+BEGIN_SRC emacs-lisp
  (defun my-set-tag-in-region ()
(interactive)
(org-map-entries (function org-set-tags) nil 'region))
#+END_SRC

HTH,
-- 
Alexander Baier



Re: [O] Set tags in region

2014-05-10 Thread Alexander Baier
Hello John,

On 2014-05-10 04:53 John Hendy wrote:
 Just curious of there's a way to set the tags in a region all at once?
 I see there's a way to do it via agenda, but I was curious if there
 was also a way to do it on a group of headlines from the buffer
 itself. In various google strategies, it looked like the answer was
 no.

 This is just a random file (making a camping packing/shopping list),
 so to do it via the way that seemed apparent was:

I often use (info (Emacs) Keyboard Macros) for situations like
this. Define the macro with point at the beginning of a headline and
then use `C-x C-k r' to execute it on every line in a region.

[The (info ...) form above when evaluated takes you to the relevant page
in the emacs manual.]

HTH,
-- 
Alexander Baier



Re: [O] [BUG] Symbol's function definition is void: function-put

2014-05-09 Thread Alexander Baier
On 2014-05-09 07:10 Sharon Kimble wrote:
 I've just tried to start emacs 24.3.90.1 without success, and it
 showed
 Warning (initialization): An error occurred while loading 
 `/home/boudiccas/.emacs':

 Symbol's function definition is void: function-put

 I eventually tracked it down to lines 2248 and 2284 of org-loaddefs.el
 this is line 2248
 ╭
 │(function-put 'org-export-to-buffer 'lisp-indent-function '2)
 ╰
 and this is line 2284
 ╭
 │(function-put 'org-export-to-file 'lisp-indent-function '2)
 ╰

 It always shows up in 24.3.90.1 and stops it from fully loading,
 whereas in 24.4.50.x there is no problem.

I am not sure about this, but I recently saw a post on the emacs devel
mailing list mentioning that function-put was newly introduced, if I am
not mistaken. Take a look at this:
http://permalink.gmane.org/gmane.emacs.devel/171782

HTH,
-- 
Alexander Baier



Re: [O] org-mode variables

2014-05-09 Thread Alexander Baier
On 2014-05-08 13:07 Igor Sosa Mayor wrote:
 Dave Pawson dave.paw...@gmail.com writes:

 Searching http://orgmode.org/org.html
 I failed to find how to modify org-mode variables,
 where they are stored, etc.

 They are listed, but no mention of setting them?

 Are they standard emacs vars, if so , perhaps
 this could be made clear in the manual please?

 yes, they are standard emacs variables, you can normally set with

 (setq variable value)

Or, if you want to use the customize interface:
  M-x customize-group org RET

HTH,
-- 
Alexander Baier



Re: [O] words pre-lexed for use as keywords in an agenda view

2014-05-09 Thread Alexander Baier
Hello Haroldo,

On 2014-05-08 20:31 Haroldo Stenger wrote:
 is there alredy a word lexer connected somehow to org-mode, that uses the
 most frequent words in the org-agenda-files , and offers them to you to
 look for the lines in which they occur in an agenda view ?

I am not really sure I know what you are asking. What do you mean by
keywords? I think a little example or a more elaborate explanation might
help me and others understand what it is you are asking for.

Regards,
-- 
Alexander Baier



Re: [O] Color entries according to assigned priority

2014-05-09 Thread Alexander Baier
On 2014-05-08 06:36 Uwe Ziegenhagen wrote:
 
 ;; Do not show welcome screen at startup
 (setq inhibit-startup-message t)

 ;; just answer Emacs' question with 'y' or 'n' instead of 'yes'or 'no'
 (defalias 'yes-or-no-p 'y-or-n-p)

 ;; Load org mode
 (add-to-list 'load-path G:/Programme/emacs-24.3/myLisp/org-8.2.4/lisp)

 (font-lock-add-keywords 'org-mode
   '((^.*:write:.*$ . font-lock-keyword-face)))

 (setq org-agenda-face-for-tagged-lines
'((write . bold)))

None of the tags in the screenshots is :write:. I do not understand,
what you expect to happen here.

 (defun org-agenda-fontify-tagged-line ()
   Use `org-agenda-face-for-tagged-lines' to fontify lines with certain tags.
   (goto-char (point-min))
   (let (tags)
 (while (progn (forward-line 1) (not (eobp)))
   (if (setq tags (get-text-property (point) 'tags))
   (mapcar
(lambda (pair)
  (if (member (car pair) tags)
  (add-text-properties (point-at-bol) (point-at-eol)
 `(face,(cdr pair)
org-agenda-face-for-tagged-lines)

 (add-hook 'org-agenda-finalize-hook 'org-agenda-fontify-tagged-line)

To me this looks like something that applies to the agenda only.

Tagging a headline with the :write: tag and generating an agenda view
(e.g. C-c a t) should make those headlines bold.

HTH,
-- 
Alexander Baier



Re: [O] words pre-lexed for use as keywords in an agenda view

2014-05-09 Thread Alexander Baier
On 2014-05-09 20:00 Haroldo Stenger wrote:
 Hello Alexander

 I'd like a sort of pareto (the top fifth of the whole set of words
 sorted by usage/frequency) index of words which are in the .org
 documents .  Then, in some of the agenda views that look for the
 string that you type,

Do you mean agenda views like the one generated by pressing `C-c a /' ?

 you'd be offered word expansion on those frequent word set, just like
 you're offered word expansion on TODO/DONE and the like. Let's say
 that somehow it's a starting point for a self learning helper.

Regards,
-- 
Alexander Baier



Re: [O] Color entries according to assigned priority

2014-05-03 Thread Alexander Baier
On 2014-05-03 22:07 Uwe Ziegenhagen wrote:
 I copied and pasted the given code, however I do not see any change. I'll
 try my luck again tomorrow and will get back to you.

Just to be sure, did you eval the pasted code? And restarting org-mode
(M-x fundamental-mode M-x org-mode) could be necessary, too?

HTH,
-- 
Alexander Baier



Re: [O] Contacts/Resources/People

2014-05-01 Thread Alexander Baier
Hello Shin,

On 2014-04-30 20:17 Shin Sungmin wrote:
 But, how does it make it easier to assign a person to a task in my
 todo.org? Is there any type of auto complete functionality?

You have the function org-contacts which helps you search through your
contacts. From there you can quickly jump to the contact you want to
link, store a link to that heading `org-store-link' and insert that link
in your todo.org with `C-c C-l' and then `M-p'.

 Do I have to make a manual link to the people.org file instance to be
 able to easily access that persons contact information?

In essence this is just a plain old manual org link to the right
headline in person.org. The procedure described above is not very
automatic.

You may want to take a look at helm. Its a completion and narrowing
framework, something a bit like ido, but way more powerful. There is a
plugin for helm that lets you search/complete/narrow over the headline
of an org-file. It might even offer to execute certain actions on said
headlines such as creating and inserting a link to them.

I just heard of said plugin, but never used it. If it does indeed have
described functionality it would make linking to a contact as simple as
pressing a key binding (launching helm on people.org) typing a few
characters to narrow to the contact you want to insert and press enter
to insert said link.

HTH,
--
Alexander Baier



Re: [O] loading all agenda files at startup

2014-04-30 Thread Alexander Baier
On 2014-04-30 10:44 Eric Abrahamsen wrote:
 Daimrod daim...@gmail.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Hi Eric,

 I've got a few top-level user commands, related to org, that load at
 startup. Specifically org-agenda and org-ido-switchb are bound to keys
 that are available after emacs starts up. Before Org loads properly,
 however, things like the agenda file list and the list of valid tags and
 TODO keywords are unavailable. That makes it hard to boot emacs and go
 directly into a call to `org-todo-list': the TODO keywords aren't loaded
 yet.

 I've looked into this before but couldn't find a single function that
 would boot my local data. `org-agenda-files' reads the file list, but
 it doesn't actually parse the files and do all the setup routines.

 Is there a single-function entry point that I could put in my init
 files, that would get me where I want to be? ie, in a state as though
 `org-agenda' had already been called, though it hasn't yet?

 I call `org-agenda-list' in my `after-init-hook' but it is not silent,
 that is, it displays the agenda list.

 Best,

 Right, just calling the agenda directly will certainly solve the issue,
 and I suppose as a member of the Org faithful I should be booting to the
 agenda! But it would be nice to get the same effect, but be left in
 *scratch*...

Maybe hacking around it with something like the following in
'org-agenda-after-show-hook' or some similar hook?

#+begin_src emacs-lisp
(defun my-switch-to-sratch ()
  (switch-to-buffer *scratch*)
  (delete-other-windows))
#+end_src

HTH,
-- 
Alexander Baier



Re: [O] loading all agenda files at startup

2014-04-30 Thread Alexander Baier
On 2014-04-30 10:58 Alexander Baier wrote:
 #+begin_src emacs-lisp
 (defun my-switch-to-sratch ()
   (switch-to-buffer *scratch*)
   (delete-other-windows)
(remove-hook 'org-agenda-after-show-hook 'my-switch-to-scratch)
 )
 #+end_src

I forgot to remove this function again, so it is only run the first time
the agenda is shown.

-- 
Alexander Baier



Re: [O] Contacts/Resources/People

2014-04-30 Thread Alexander Baier
On 2014-04-30 18:28 Sungmin wrote:
 Julien Danjou have made contacts.el, might to be a better fit.

If you are referring to org-contacts than this might just be your
solution. Or at least the best way possible to integrate your contacts
with other org-related things.

With org-contacts your address book is just a plain old org-mode
formatted file, where headlines with a certain property (the default is
EMAIL I think) are treated as contacts. For example:

#+begin_src org
* Person A
  :PROPERTIES:
  :EMAIL: a...@example.com
  :END:
** Notes Meeting
- foo
- bar...

* Person B
  :PROPERTIES:
  :EMAIL: b...@example.com
  :END:
#+end_src

As you can see, notes are easily added as you are just editing your
plain old org-file. Adding people to a certain event may just be as
simple as linking to the headline corresponding to the person. About
tracking time, there should be functionality for this built in - I am no
expert there.

HTH,
-- 
Alexander Baier



Re: [O] auto-roll-over of org-todo's?

2014-04-24 Thread Alexander Baier
On 2014-04-24 05:47 Sharon Kimble wrote:
 In my agenda I have several items I call my weeklies because they repeat
 weekly, this is one of them -
 Desert island discs - radio 2 @ 1100
 SCHEDULED: 2014-04-27 Sun +7d

 Is there any way in which it can be auto-rolled-over every Sunday without
 intervention from myself please?

What do you mean by auto-rolled-over?

-- 
 Alexander Baier



Re: [O] (OT) How to follow a mailing list with very high activity (like this one here)?

2014-04-16 Thread Alexander Baier
Hello Martin,

you might want to have a look at gnus - an news/email client for
emacs. It has something called scoring (I believe this is a concept from
usenet/nntp). It allowes to do exactly what you want to do and even
more. You can tell gnus to hide a particular thread, so you do not have
to see it again. You may even define certain rules that match headers
(subject lines, authors, ...) to tell gnus what you want and do not want
to read.

You can read more about it in (info (Gnus) Scoring) [in case you do
not know what to do with this, copy it to your emacs and eval it ;-)].

As to storing mails, have you heard of gmane.org? This is a service that
lets you read mailing lists as if they were a newsgroup. I personally do
not save anything from this list locally, as I know I can always get it
from gmane.

In summary, gnus is a great thing, but also very complex and a bit
daunting to setup. I like to think of it as another emacs inside emacs
(which by the way also applies to org-mode) in terms of complexity.

HTH,
--
 Alexander Baier

On 2014-04-16 21:28 M wrote:
 This is off-topic, but I hope that someone can give me some good advice:

 During the last years, I'be become a real org-mode fan and I want to stay
 current and be active in the great org-mode community.
 I've subscribed to the orgmode mailinglist about 1,5 years ago and so I have
17.500 mails in my inbox.

 You really have to be organized very well to deal with so much information!
 Is there a tutorial somewhere for good approaches, how to participate in
 such a list (without doing it as a full time job)?

 IMHO, there must be some process like:
 Review each new topic
  - if interesting/relevant mark it to follow what happens,
  - else if not interesting/relevant, then ignore the following posts.
 The interesting stuff should also be stored to be available later for
 reference...

 How do you handle that?
 Are there tools which make such a process easier?

 Up to now I just used my old mail client Microsoft Entourage 2004 on OS X
 for storing those mails.

 Kind regards

 Martin 








Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )

2014-04-15 Thread Alexander Baier
On 2014-04-15 06:12 Xebar Saram wrote:
 thx alot  Alexander!

 this worked. any idea how to bind this to a key?
 ie have  C-c / m   +TODO=TODO+TYPE=main bound to F1-c   etc..

You create an interactive function that simply calls
`org-match-sparse-tree' with the right match string:

#+begin_src emacs-lisp
  (defun my-cooking-sparse-tree-main ()
(interactive)
(org-match-sparse-tree t +TODO=\TODO\+TYPE=\main\))
#+end_src

And now you can simply bind this command (thats what an interactive
function is called) to whatever you like:

#+begin_src emacs-lisp
  (define-key org-mode-map (kbd f1 c) 'my-cooking-sparse-tree-main)
#+end_src

HTH,
-- 
 Alexander Baier



Re: [O] [ANN] Firefox extension for org-protocol and org-capture

2014-04-14 Thread Alexander Baier
On 2014-02-21 15:06 Olivier Schwander wrote:
 Dear list,

 I would like to announce the first version of an extension to
 call org-capture through org-protocol from Firefox:
  - http://chadok.info/firefox-org-capture/

 It just does the same thing as the Javascript bookmarklet but without
 the need to register the scheme org-protocol:// in Firefox/Gnome/KDE/XDG
 (or whatever we are supposed to do this week to manage handler for
 protocols). I hope this solution to be easier and more reliable, at
 least for Firefox users.

 It is not on https://addons.mozilla.org for now, but I will submit it
 for review in a few days.

 Olivier




This sounds like a very useful thing, thank you!

I cannot, however, get this to work. I am not sure what to put into the
Template field on the preference page of the org-capture plugin. Can
anyone give me some advice here?

Regards,
-- 
 Alexander Baier



Re: [O] org-agenda-custom-command for property AND TODO state (for a cooking guide :) )

2014-04-14 Thread Alexander Baier
On 2014-03-28 14:45 Xebar Saram wrote:
 Hi all i was wondering if anyone knew how to set
 a org-agenda-custom-command for property AND TODO state? that is create a
 custom view that is similar to this sparse tree command:

 C-c /  M   type=main/COOK

 where it would match on type=main and have a COOK todo keyword

 best

 Z

 P.S in case anyone wonders wth im using it for :) im trying to auto
 generate a list of things to cook (todo word COOK) by type of meal so id
 generate a list for main dishes, breakfast etc :)

Does this work for you?

C-c / m   +TODO=TODO+TYPE=main

HTH,
-- 
 Alexander Baier



Re: [O] Text emphasize with fill-paragraph ?

2014-02-25 Thread Alexander Baier
I remember a post from some time ago, where someone reported that this
kind of formatting only worked for filled paragraphs under 3 lines
long. Sadly I cannot find said post now. Is this the same for you?

I don't know if this a bug or not.

On 2014-02-21 16:31 Martin Leduc wrote:
 Hi all,

   I don't know whether it is a bug, an unimplemented feature or simply
 that I use it wrongly, but I can't emphasize text (with // ** or _ _)
 within a filled paragraph. Moreover, sometime I get it to work but I'm
 not sure how to reproduce.

 Thanks,
 Martin
 

Regards,
-- 
 Alexander Baier



Re: [O] how to group together fields

2014-02-01 Thread Alexander Baier
Hello Stefan,

please keep the mailing list cc'd so everyone can read your response.

On 2014-02-01 03:10 Stefan Huchler wrote:
 thx for looking over it.

 My idea was that I have 2 :COLUMNS: rows, comment out one or the other.

 I dont need one table that shows me both, thats impossible yes, but
 one table for the one information and another for the other.

You would have to maintain two seperate and differently structured trees
of your data to achieve this.  I do not know if this is the way you want
to go, as it would require you to keep both trees in sync by hand.

Regards,
--
Alexander Baier



Re: [O] how to group together fields

2014-02-01 Thread Alexander Baier
Hello Stefan,

again, please sent your mail also to the org mailing list. Just do a
follow-up in your mail client, instead of a reply, that should do the
right thing I guess.

On 2014-02-01 12:25 Stefan Huchler wrote:
 Hello Alex,

 thats exactly what don´t want ^^. I tried something similar a while ago
 with TBLFM function but it did not work.

 I dont care to much about how I can do it, how exactly I manage the data
 (in lists in attributes in tables) I just don´t want redundancy.

 It should be no rocket science, so I can reproduce it, if nothing else
 maybe you could generate org-trees from this or so.

This can surely be done by using the mapping api I referenced in the
first post. You need to know some elisp for this thought. But I would be
willing to post something along those lines, if you wanted to go down
that way.

Putting the collected data into an org-tree or presenting it in another
way should be doable, too.

 Its sad all data is there but because org-mode dont know something like
 group by, its not working.

 it would be very powerful, I thought thats what org-mode/emacs is all
 about.

Well, the question is, if you want to implement a whole database upon
the org-format.



Re: [O] how to group together fields

2014-02-01 Thread Alexander Baier
Hello Stefan,

I say it again: _Please_ Cc the org-mode mailing list, when replying, so
everyone can read our correspondence.


On 2014-02-01 12:46 Stefan Huchler wrote:
 sry I maybe miss readed you. I have no problem in a different
 structure. If you could join 2 different org trees by linking in the
 data or something, like a tee table and a vendor table but have no
 redundant data, I would be ok. clearly my way would be even better but
 I would be ok with a other structure.

Linking to another org-header is possible, but you cannot use this to
feed information to the aggregate functions of Column View. Regarding
normal tables, I have no idea.

 This tree is not fixed, its only a demonstration what I want to do. I
 want to manage data somehow that is not redundant where I can type in
 data once and get this 2 tables when I need them generated.

 And if possible it should not be that I every time I want to use
 something similar I have to write a big special function for it.

One could try write it general enough to be applicable to similar
situations I think.

 I am not shure If I do always the most obious only good way (as a
 pythoneer would say ^^) to reach my goal.

 But in general in my oppinion emacs is not only a editor not only a operation 
 system
 (package manager...) but also a office suite ( authoring, spreadsheet )
 so why not have a somewhat full personal database system.

 The alternative would be for me to use for such small things sqlite and
 write some code for representation and sql statements.

 so the effort to do this and the big problems with backups with real
 databases would be enorm.

 Sorry hope that sounds not like whinig, but I saw 2 days ago a
 presentation (video) from one of or the author from org-mode, and he
 said that some people use it as database. So a database should be able
 to do such basic operation like group by in my oppinion. And you can
 express the logik like I did, its only a question if the org-columns
 function can use it.

I think a lot of people either use it as a more or less flat listing
(with the structure beeing strongly influenced by the aggregate
functions they want to run over it) or they write a bunch of elisp to
help them extract information.

 maybe I have to hack it myself even if I wrote 10 lines of lisp in my
 live ;)

Maybe Bastien (author of Column View I think) can say something to this,
with regard to supplying custom elisp as an aggregate function.

Regards,
--
Alexander Baier



Re: [O] how to group together fields

2014-01-31 Thread Alexander Baier
On 2014-01-30 16:45 Stefan Huchler wrote:
 What do I want as result:

 2. give me a list of scores for each brand [TODO]

 is there a way to group together Tea brands to give each Brand a Score
 (how I liked it)?

I do not think that this is possible with column view. You could maybe
get sum of the scores for each brand (btw, for the non-german people:
brand ~ Sorte and score ~ Bewertung) by using the org mapping API:
http://orgmode.org/manual/Using-the-mapping-API.html. But I do not know
if it is possible to integrate this into column view.

Thinking about this a bit more I come to the conclusion that what you
want (2.) does not fit into the structure of your database at
all. Looking at how a CV of your structure would be displayed, there
simply is no right place to display this information. If I missed
something, please tell me which column(s) you want to see displaying
this information.

If you just want the result to be thrown into a buffer, this would be
totally possible.

HTH,
--
Alexander Baier



Re: [O] how to set a block of description to set as done...

2014-01-24 Thread Alexander Baier
On 2014-01-24 12:14 Renato Pontefice wrote:
 Thank you Bastien,
 So, I have to organize in a different way my notes...Any sudgestion?

Why exactly do you want to set the headline and its _description_ as
DONE? Marking a headline as done, also indicates (at least to me) the
body text after this as done.

What is the advantage of this:

* DONE Headline
  DONE describing the headline
  DONE describing the headline
  DONE describing the headline

over this:

* DONE Headline
  describing the headline
  describing the headline
  describing the headline

?

Regards,
-- 
 Alexander Baier



Re: [O] How not to show repetitive tasks in the TODO items of agenda view

2014-01-23 Thread Alexander Baier
On 2014-01-23 12:03 Chaitanya Krishna wrote:
 * Birthdays
 TODO Abc Abc
 DEADLINE: 2014-01-26 Sun +1y

 Is it possible to make these items show up only in the agenda view (C-c a
 a) and not in the TODO items list (C-c a t)

You could just take a normal active timestamp instead of a DEADLINE for
the birthdays. Something like this:

* Birthdays
TODO Abc Abc
2014-01-26 Sun +1y

HTH,
-- 
 Alexander Baier



Re: [O] Italicise block of text

2014-01-15 Thread Alexander Baier
Hello Roger,

when answering a mail/post from the list, please Cc the list in your
response, so other members of the list can see your mail to.

On 2014-01-15 14:30 Roger Mason wrote:
 But this does not:

 /Perhaps, but [...] to replacement./

 I just get a block of text bounded by / and / in the resulting pdf.

Maybe the markup gets escaped somehow by special characters in the text.
I do not know enough about the markup of org to help you here.  I think
Nicolas can give you a more satisfying answer.

Regards,
--
 Alexander Baier



Re: [O] working on cloud

2014-01-14 Thread Alexander Baier
On 2014-01-14 13:24 Nick Dokos wrote:

 b) asking your questions on the emacs IRC channel (somebody else will
 have to provide a reference to that though - I don't know what it is
 off the top of my head.)

#emacs on freenode.

HTH,
-- 
 Alexander Baier



Re: [O] Italicise block of text

2014-01-14 Thread Alexander Baier
On 2014-01-14 19:45 Roger Mason wrote:
 Hello,

 Is there a way to italicise a block of text rather that just single
 words? (org-mode 8.0.3).

 Thanks,
 Roger

Does this work?

/This is a block of text./
/This is a block of text./
/This is a block of text./

HTH,
-- 
 Alexander Baier



Re: [O] do I have to set .emacs for each file to work with agenda? II

2014-01-11 Thread Alexander Baier
On 2014-01-11 20:05 Renato wrote:
 Sorry, I correct a little the previous email :-(

 Hi,
 I' ve started to work with this feature. I'm wondering if to work with
 the agenda feature, I need to write the namne of the file on ont the
 .emacs to be able to have agenda features.

 I mean: they could be many file. Isn't it?

 TIA

 Renato


Yes, there could be many files. But this should not be a problem, I
guess.

You can set `org-agenda-files' to a list (which you have already done,
although it is a list with only one element). You can even specify
directories and org will include all files in those directories.

For further info, consult the documentation:
  C-h v org-agenda-files RET

HTH,
-- 
 Alexander Baier



Re: [O] using Agenda org-agenda-files variable

2014-01-10 Thread Alexander Baier
On 2014-01-10 12:21 Renato Pontefice wrote:

[...]

 (setq org-agenda-files (list ~/org/work.org
  ~/org/school.org
  ~/org/home.org))

[...]

 I have on my 1.org the following line:
 *** configure
SCHEDULED: 2014-01-08 mer

 So, I'm expecting, that i could find at least this TODO line on the Agenda.
 But nothing...

[...]

I did not take a look at the tutorial you mentioned, but I would guess
that the file list (~/org/work.org ~/org/school.org ...) was only
given as an example.

If you want entries from your 1.org file to show up in the agenda, you
have to add that file to `org-agenda-files'. Org mode will go through
all the files in that list and buid the agenda from the entries it finds
in those.

So your setq should look like this:

#+begin_src elisp
  (setq org-agenda-files (list ~/org/1.org))
#+end_src

This assumes, that your 1.org is located under ~/org.

HTH,
-- 
 Alexander Baier



Re: [O] [poll] Fontify code in code blocks

2014-01-09 Thread Alexander Baier


On 2014-01-09 13:22 Sebastien Vauban wrote:
 WDYT if we turn it on by default?

+1. I turned this on the minute I found out about this feature. This was
one of the many wow-moments while discovering Org-mode.

Regards,
-- 
 Alexander Baier




Re: [O] can I make listbox within org-mode table?

2014-01-08 Thread Alexander Baier
Hello David,

On 2014-01-08 11:35 David Belohrad wrote:
 Dear All,

 for one of my documents I'd like to have tables, where in a single
 column i can only choose from predefined sets of values (e.g. names). Is
 that possible?

 | Name  | Description | Price |
 |---+-+---|
 | David | foeiu   |   287 |
 | Mika  | ofi |   287 |
 | David | froeiw  |   238 |
 |   | |   |


 ^^ that column i'd like to fill with only specified items

 many thanks

 david



AFAIK this is not possible. At least not with facilities built into
org-mode. You might have luck writing a source for auto-complete, but
this might be more effort than it is worth.

If you are not planning to export your document, but merely want to
manage some data in a tableish fashion inside your Emacs/Org setup, you
may find (info (Org) Column View) of some help. You can define a
NAME_ALL property which lists the specific items.

HTH,
-- 
 Alexander Baier



Re: [O] GIT fot publishing .org

2014-01-07 Thread Alexander Baier
On 2014-01-06 18:55 Renato wrote:
 Hi,
 I'm looking for a GIT, that I can use, to save .org file.

 CAn someone sudgest me one?

 TIA

 Renaro



As I do not quite get what you are trying to do and can only guess, this
is a stab in the dark: Have you had a look at github pages? As far as I
know, that might be something to publish an org file to.

HTH,
-- 
 Alexander Baier



Re: [O] different achiving mode

2014-01-05 Thread Alexander Baier
On 2014-01-04 23:39 David Belohrad wrote:
 Hi Bastien,

 learning recently new things about org mode i think i have requested a
 bullshit. Basically the idea was to somehow 'retain' the project tree,
 or at least be able to restore its form from archive when needed. Seeing
 complexity of this, it does not look like something easy to implement...

 .d.
[...]

If you do not mind having archived subtrees in your org file, you could
just use C-c C-x a, which only tags the tree at point with :ARCHIVE: and
excludes those from beeing cycled with TAB.  This way you would keep your
original structure.

HTH,
-- 
 Alexander Baier



Re: [O] migration difficulties latex org

2013-12-29 Thread Alexander Baier
On 2013-12-29 07:46 Joseph Vidal-Rosset wrote:
 Hello everyone,

[...]

 But I wonder if there is a key binding to get first the void
 block in one command line :

 #+begin_src latex :exports results :results latex


 #+end_src

 in order to use after CD-Latex inside this org-mode block


What exactly do you want to do?  Do you want to insert above mentioned
source block into your buffer?  Something like a snippet?

This is already included in org-mode and is known as Easy
Templates. Take a look at the manual (info (Org) Easy Templates).  If
you need help with configuring this, let us know.

HTH,
-- 
 Alexander Baier



Re: [O] auto-backing up your .emacs

2013-12-21 Thread Alexander Baier
You could look into the backup utilities that emacs provides out of the
box.  See the manual for further explanation: (info (Emacs) Backup).

On 2013-12-21 15:23 Sharon Kimble wrote:
 Can somebody help me please, I want to put this line into my .emacs -
 'cp ~/.emacs ~/.emacs.d/.emacs-$(date +%Y%m%d-%R)' but it works as part
 of a bash script, but I don’t know elisp to get it working in my .emacs.
 What it does is save a dated and timed copy of your .emacs in your
 ~/.emacs.d so that when you're trying things out and learning how to
 use .emacs you'll always have a backup copy. A case in point, last
 night I had org2blog working, today, after fiddling its stopped
 working, but if I'd had this operational I could just revert to a known
 and working .emacs. So, can you help please?

 Thanks
 Sharon.

HTH,
--
 Alexander Baier



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-07 Thread Alexander Baier
Hello Johann,

I can't quite follow you. I was under the impression that your issue has
been resolved.

If that is not the case, you might want to share the relevant code in
your init file here.

On 2013-12-06 15:41 Johann Spies wrote:
 Hello Alexander,

 Thanks for your attention.  The message I sent earlier was of my experience
 on my work computer.

 I have now tried the same on my home computer.  The files on both edited
 was in /home/js/Dropbox/orgmode.

 I have also edited ~/.emacs and saved it.

 that is strange.  I cannot remember doing something else besides putting
 the mentioned code into my init file.  I can only think of these
 trivial reason why this does not work for you:

 - Did you evaluate the code or restarted your emacs?


 I have killed and restarted emacs.  How do I evaluate (reload) .emacs when
 emacs is running?


 - Are the files you are editing somewhere under /home/js/?
 - Did you really edit and save a file since adding the code to your init
   file?
 - In case you are editing files under version control: Did you turn on
   vc-make-backup-files?

 HTH,
 --
  Alexander Baier

 On 13-12-03 09:33 Johann Spies wrote:
  Thanks for sharing this. However, after adding this to my ~/.emacs I do
 not
  see anything appearing in my .emacs.d/backup directory.
 
  #+begin_src emacs-lisp
(setq make-backup-files t)
(setq backup-directory-alist '((/home/js/* .
 /home/js/.emacs.d/backup)))
(setq backup-by-copying t  ; don't use symlinks
  delete-old-versions t; don't ask me about deleting backups
  kept-new-versions 20
  kept-old-versions 5
  version-control t)   ; use versioned backups
  #+end_src
 
 
 
  Regards
  Johann
 
 
  On 2 December 2013 17:37, Alexander Baier lexi.ba...@gmail.com wrote:
 
  On 13-12-02 12:21 Rainer Stengele wrote:
   All,
  
   last week I played around with org-indent-mode in my biggest (37.000
  lines) org file.
   3 days later I detected that most of the file was corrupted.
   WHy so late? Using the agenda I only saw the todos and did not
 recognise
  the corrupted structures.
   Most * items had been placed at the beginning of the line and
  therefore now became headlines.
   I do not know how this happened. I am not sure if I myself was the
  reason somehow.
   Anyway I had to spend a fair amount of work to get the old file format
  from
   subversion and insert the changes since the corruption.
  
   This is just a warning to have backups at hand before changing to
  org-indent mode.
   Then immediately and check often the contents of the file until you
 are
  sure all is running well.
  
   Maybe someone has an idea.
  
   I will try to convert again later but then be much more careful.
  
   Rainer
  
  
 
  FWIW, I have the following snippet in my init file, that uses emacs'
  build-in backup machanism to save me from such things.  As emacs stuffs
  them all in one central location, I do not have to worry about polluting
  my filesystem.
 
  #+begin_src emacs-lisp
(setq make-backup-files t)
(setq backup-directory-alist '((/home/delexi/* .
  /home/delexi/.emacs.d/backup)))
(setq backup-by-copying t  ; don't use symlinks
  delete-old-versions t; don't ask me about deleting backups
  kept-new-versions 20
  kept-old-versions 5
  version-control t)   ; use versioned backups
  #+end_src
 
  If you want to make backups from files under version control, you also
  have to set the following:
 
  #+begin_src emacs-lisp
(setq vc-make-backup-files t)
  #+end_src
 
  This already saved me a couple of times.
 
  Regards,
  --
   Alexander Baier
 
 



Regards,
-- 
 Alexander Baier



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-04 Thread Alexander Baier
On 13-12-03 19:30 Nick Dokos wrote:
 Alexander Baier lexi.ba...@gmail.com writes:


 I used to set up backup-directory-alist the same way you have, but
 changed it, when I noticed emacs putting backups of files I edited as
 root into that directory.  That was something I did not want to do.


 OK - I haven't lived with this setup long enough to know better.

 On another subject:

   (setq backup-directory-alist 
 '((/home/delexi/* . /home/delexi/.emacs.d/backup)))

 the docstring says that the car of each dotted pair in the alist is a
 regexp: I presume an emacs regexp, not a shell glob pattern. So the
 setting should be

 (setq backup-directory-alist '((/home/delexi/.* . /some/dir)))

 - no?

 Nick

Yes, you are right.  Although /home/delexi/* is a valid regexp, it
sure is not what I meant to express.  As you said, /home/delexi/.* is
the way I wanted to go.

Thanks,
-- 
 Alexander Baier



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-03 Thread Alexander Baier
Hello Johann,

that is strange.  I cannot remember doing something else besides putting
the mentioned code into my init file.  I can only think of these
trivial reason why this does not work for you:

- Did you evaluate the code or restarted your emacs?
- Are the files you are editing somewhere under /home/js/?
- Did you really edit and save a file since adding the code to your init
  file?
- In case you are editing files under version control: Did you turn on
  vc-make-backup-files?
  
HTH,
-- 
 Alexander Baier

On 13-12-03 09:33 Johann Spies wrote:
 Thanks for sharing this. However, after adding this to my ~/.emacs I do not
 see anything appearing in my .emacs.d/backup directory.

 #+begin_src emacs-lisp
   (setq make-backup-files t)
   (setq backup-directory-alist '((/home/js/* . /home/js/.emacs.d/backup)))
   (setq backup-by-copying t  ; don't use symlinks
 delete-old-versions t; don't ask me about deleting backups
 kept-new-versions 20
 kept-old-versions 5
 version-control t)   ; use versioned backups
 #+end_src



 Regards
 Johann


 On 2 December 2013 17:37, Alexander Baier lexi.ba...@gmail.com wrote:

 On 13-12-02 12:21 Rainer Stengele wrote:
  All,
 
  last week I played around with org-indent-mode in my biggest (37.000
 lines) org file.
  3 days later I detected that most of the file was corrupted.
  WHy so late? Using the agenda I only saw the todos and did not recognise
 the corrupted structures.
  Most * items had been placed at the beginning of the line and
 therefore now became headlines.
  I do not know how this happened. I am not sure if I myself was the
 reason somehow.
  Anyway I had to spend a fair amount of work to get the old file format
 from
  subversion and insert the changes since the corruption.
 
  This is just a warning to have backups at hand before changing to
 org-indent mode.
  Then immediately and check often the contents of the file until you are
 sure all is running well.
 
  Maybe someone has an idea.
 
  I will try to convert again later but then be much more careful.
 
  Rainer
 
 

 FWIW, I have the following snippet in my init file, that uses emacs'
 build-in backup machanism to save me from such things.  As emacs stuffs
 them all in one central location, I do not have to worry about polluting
 my filesystem.

 #+begin_src emacs-lisp
   (setq make-backup-files t)
   (setq backup-directory-alist '((/home/delexi/* .
 /home/delexi/.emacs.d/backup)))
   (setq backup-by-copying t  ; don't use symlinks
 delete-old-versions t; don't ask me about deleting backups
 kept-new-versions 20
 kept-old-versions 5
 version-control t)   ; use versioned backups
 #+end_src

 If you want to make backups from files under version control, you also
 have to set the following:

 #+begin_src emacs-lisp
   (setq vc-make-backup-files t)
 #+end_src

 This already saved me a couple of times.

 Regards,
 --
  Alexander Baier






Re: [O] org-indent-mode corrupted most of a big org file

2013-12-03 Thread Alexander Baier
Hello Johann,

On 13-12-03 18:23 Johann Spies wrote:
 Hello Alexander,

 Thanks for your attention.

 that is strange.  I cannot remember doing something else besides putting
 the mentioned code into my init file.  I can only think of these
 trivial reason why this does not work for you:

 - Did you evaluate the code or restarted your emacs?

 Yes, I killed emacs (daemon) and restarted it.  How do you evaluate
 (reload) ~/.emacs from emacs running?


There are several ways of doing this.  You can open your ~/.emacs and
simply do M-x eval-buffer RET.  But it would also be sufficient to just
evaluate the newly added sexp, e.g. by marking them and calling M-x
eval-region.


[...]

 I have done this on two computers - at work (the earlier message) and home.

Than I am out of ideas.  You could take a look at the manual yourself
and see, if we missed something: (info (Emacs) Backup).

(In case you do not know how to open the manual based on the expression
above: Place your curser after the ')' closing the info expression and
press `C-x C-e'.)

Regards,
-- 
 Alexander Baier



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-03 Thread Alexander Baier
Hello Nick,

On 13-12-03 18:43 Nick Dokos wrote:
[...]

 The docstring for backup-directory-alist says

 ,
 | For the common case of all backups going into one directory, the alist
 | should contain a single element pairing . with the appropriate
 | directory name.
 `

 FWIW, I tried

  (setq backup-directory-alist '((. . /home/nick/.emacs.d/backup-dir)))

 and it seems to work. I don't remember if I had to create the backup-dir
 beforehand.

 Nick


I used to set up backup-directory-alist the same way you have, but
changed it, when I noticed emacs putting backups of files I edited as
root into that directory.  That was something I did not want to do.

Regards,
-- 
 Alexander Baier



Re: [O] org-indent-mode corrupted most of a big org file

2013-12-02 Thread Alexander Baier
On 13-12-02 12:21 Rainer Stengele wrote:
 All,

 last week I played around with org-indent-mode in my biggest (37.000 lines) 
 org file.
 3 days later I detected that most of the file was corrupted.
 WHy so late? Using the agenda I only saw the todos and did not recognise the 
 corrupted structures.
 Most * items had been placed at the beginning of the line and therefore now 
 became headlines.
 I do not know how this happened. I am not sure if I myself was the reason 
 somehow.
 Anyway I had to spend a fair amount of work to get the old file format from
 subversion and insert the changes since the corruption.

 This is just a warning to have backups at hand before changing to org-indent 
 mode.
 Then immediately and check often the contents of the file until you are sure 
 all is running well.

 Maybe someone has an idea.

 I will try to convert again later but then be much more careful.

 Rainer



FWIW, I have the following snippet in my init file, that uses emacs'
build-in backup machanism to save me from such things.  As emacs stuffs
them all in one central location, I do not have to worry about polluting
my filesystem.

#+begin_src emacs-lisp
  (setq make-backup-files t)
  (setq backup-directory-alist '((/home/delexi/* . 
/home/delexi/.emacs.d/backup)))
  (setq backup-by-copying t  ; don't use symlinks
delete-old-versions t; don't ask me about deleting backups
kept-new-versions 20
kept-old-versions 5
version-control t)   ; use versioned backups
#+end_src

If you want to make backups from files under version control, you also
have to set the following:

#+begin_src emacs-lisp
  (setq vc-make-backup-files t)
#+end_src

This already saved me a couple of times.

Regards,
-- 
 Alexander Baier



Re: [O] auto-creating checkbox list items

2013-11-29 Thread Alexander Baier
On 13-11-29 08:46 Ken Mankoff wrote:
 I think an older version of org-mode had the behavior where if I am making
 a  list like this:

 * Some list
 + [ ] and I then make a new item by pressing ESC+RET
 + [ ] the + and [] are auto-magically created.

 The current version only populates the +, not the [ ].

 Does anyone else recall this feature? Is there a preference to set it, or
 was it removed for some reason?

 Thanks,

-k.

They might have just changed the key-binding.  For me pressing M-S-RET
creates the + and the [ ].

Regards,
-- 
 Alexander Baier



[O] Split source block at point

2013-11-26 Thread Alexander Baier
Hello together,

is therer a command or a function that lets me split a source block at a
given position?  I think what I mean is best demonstrated by looking at
an example:

Given this buffer:

begin_src emacs-lisp
  (defun foo ()
(bar))

  (baz (foo))
end_src


With point somewhere at the free line I want to invoke the split
function and get this:

begin_src emacs-lisp
  (defun foo ()
(bar))
end_src

begin_src emacs-lisp
  (baz (foo))
end_src

This is similar to what M-RET does in message-mode.

Do we already have something like this in org? And if not, do you think
this is useful? Personally I find myself quite frequently splitting up
soure blocks manually.

Best regards,
--
 Alexander Baier



Re: [O] Split source block at point

2013-11-26 Thread Alexander Baier
On 13-11-27 08:17 Jambunathan K wrote:
 C-h K C-c C-v C-d


 Alexander Baier lexi.ba...@gmail.com writes:

 Hello together,

 is therer a command or a function that lets me split a source block at a
 given position?  I think what I mean is best demonstrated by looking at
 an example:

 Given this buffer:
 
 begin_src emacs-lisp
   (defun foo ()
 (bar))

   (baz (foo))
 end_src
 

 With point somewhere at the free line I want to invoke the split
 function and get this:
 
 begin_src emacs-lisp
   (defun foo ()
 (bar))
 end_src

 begin_src emacs-lisp
   (baz (foo))
 end_src
 
 This is similar to what M-RET does in message-mode.

 Do we already have something like this in org? And if not, do you think
 this is useful? Personally I find myself quite frequently splitting up
 soure blocks manually.

 Best regards,
 --
  Alexander Baier

This works like a charm, thank you!

Best regards,
--
 Alexander Baier



Re: [O] Agenda: open in other frame

2013-11-24 Thread Alexander Baier
[...]

Fredrik fred...@jumans.net writes:

 When I open an agenda and push enter on a text it opens the file
 related to the text in the same frame. Is there any way to make it
 open it in another frame so I keep my agenda in front?

 Regards,

 Fredrik

[...]

Well, I do not know of opening a heading in the other window, but maybe
the follow-mode is something for you? In Agenda view you can turn it on
by pressing `f`.

Regards,
  Alex



  1   2   >