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

2014-10-12 Thread Uwe Ziegenhagen
Hello,

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

Thanks a lot in advance,

Uwe




Re: [O] move org line to next superior level

2014-05-29 Thread Uwe Ziegenhagen
Eric Abrahamsen eric at ericabrahamsen.net writes:

 
 Thorsten Jolitz tjolitz at gmail.com writes:
 
 
  Isn't it a feature of Org-mode that tasks can be added anywhere without
  giving a thought in the agenda files, letting the agenda itself sort
  them by date? Just changing the timestamp from monday to tuesday would
  do the job in a normal workflow, making the agenda-file structuring by
  day redundant.

The way that I currently use Org Mode is the following

On level 1 I have all the weeks, on level 2 the tasks

* 2014-05-26--2014-06-01
** TODO [#C] Python Test

I know org mode offers way more functionalities, but right now I am
exploring the basics.

Thanks for the help

Uwe




Re: [O] move org line to next superior level

2014-05-29 Thread Uwe Ziegenhagen
Thorsten Jolitz tjolitz at gmail.com writes:

 
 #+begin_src emacs-lisp
   (defun tj/move-entry-to-next-day ()
 Move entry at point to next parent and tag it.
 (unless (org-on-heading-p)
   (outline-previous-heading))
 (org-mark-subtree)
 (kill-region (region-beginning) (region-end))
 (org-up-heading-safe)
 (org-forward-heading-same-level 1)
 (forward-line)
 (yank)
 (outline-previous-heading)
 (org-mark-subtree)
 (org-change-tag-in-region 
  (region-beginning) (region-end) postponed nil))
 #+end_src
 
 This works with you example Org snippet, but is not tested otherwise. 
 

Hi Thorsten,

your code works fine, I'd like to change it a little in that way that the
original line should remain but should get the status POSTPONED

I tried by inserting a new (yank) line, this didn't work as it sometimes
moved the entry two headlines away. I am also not sure if org-todo is the
correct command:

(defun tj/move-entry-to-next-day ()
Move entry at point to next parent and tag it.
(unless (org-on-heading-p)
  (outline-previous-heading))
(org-mark-subtree)
(kill-region (region-beginning) (region-end))
(yank) ;; causes issues
(org-todo POSTPONED) ;; is this correct?
(org-up-heading-safe)
(org-forward-heading-same-level 2)
(forward-line)
(yank)
(outline-previous-heading)
(org-mark-subtree)
(org-change-tag-in-region 
 (region-beginning) (region-end) postponed nil))



Uwe




[O] move org line to next superior level

2014-05-28 Thread Uwe Ziegenhagen
Hi everyone,

is there a way to move a specific org mode item across its superior level
via shortcut?

In the following example I'd like to move the  line via shortcut below
the '' line.

* aaa
** TODO 
* bbb
** TODO 

As addon it would be cool to flag this moved line with e.g. moved on
2014-05-29

What I trying to accomplish here is to create a kind of electronic version
of 43folders. When I am not able to finish a task on say Monday, I'd like to
be able to move it (or alternatively copy it [while setting the original
entry's status to postponed]) to the next day.


Uwe




Re: [O] Color entries according to assigned priority

2014-05-07 Thread Uwe Ziegenhagen
Alexander Baier lexi.baier at gmail.com writes:

 
 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,


Yes, I did. I just ran some tests. Using only

;; 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)

in my .emacs I get

http://uweziegenhagen.de/gmane/gmane1.png

If I use the code from the posting 


;; 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)))

(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)
#

I get http://uweziegenhagen.de/gmane/gmane2.png

which is the same.

Uwe








Re: [O] Color entries according to assigned priority

2014-05-03 Thread Uwe Ziegenhagen
Sebastien Vauban sva-news@... writes:

 
 Uwe Ziegenhagen wrote:
  is it possible to color the different entries in an org file according to
  the priority assigned to them?
 
 See color header based on priority/tags rather than level on
 http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00625.html.
 
  I'd like to have #a items in black and #b, #c and non-prioritized items in
  gray tones.
 
 Best regards,
   Seb
 


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.

Uwe




[O] Color entries according to assigned priority

2014-05-02 Thread Uwe Ziegenhagen
Hello,

is it possible to color the different entries in an org file according to
the priority assigned to them?

I'd like to have #a items in black and #b, #c and non-prioritized items in
gray tones.

Uwe




Re: [O] Exporting to LaTeX Beamer

2014-04-25 Thread Uwe Ziegenhagen
Eric S Fraga e.fraga at ucl.ac.uk writes:

 
 On Friday, 25 Apr 2014 at 04:38, Uwe Ziegenhagen wrote:
  Hi,
 
  I am trying to export an org file to individual Beamer frames but fail as
  Org mode exports the sections, but not the frames.
 
 Use H:2 option instead of H:3 (in the #+OPTIONS line).  This setting
 tells the exporter which level of heading constitutes frames.


Hi Eric, thanks for the feedback. I switched to H:2 but get no difference in
the output:

#

#+TITLE: Writing Beamer presentations in org-mode
#+AUTHOR:Eric S Fraga
#+EMAIL: e.fr...@ucl.ac.uk
#+DATE:  2010-03-30 Tue
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:2 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME:
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+BEAMER_FRAME_LEVEL: 2
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args)
%4BEAMER_col(Col) %10BEAMER_extra(Extra)

* Introduction
** A simple slide
This slide consists of some text with a number of bullet points:

- the first, very @important@, point!
- the previous point shows the use of the special markup which
  translates to the Beamer specific /alert/ command for highlighting
  text.


The above list could be numbered or any other type of list and may
include sub-lists.


##

generates (excerpt)


\section{Introduction}
\label{sec-1}
\subsection{A simple slide}
\label{sec-1-1}
This slide consists of some text with a number of bullet points:

\begin{itemize}
\item the first, very @important@, point!
\item the previous point shows the use of the special markup which
translates to the Beamer specific \emph{alert} command for highlighting
text.
\end{itemize}
###

Here's the .emacs file I use:

;; Do not show welcome screen
(setq inhibit-startup-message t)

;; Load Emacs Org-Mode
(add-to-list 'load-path C:/emacs-24.3/MyLisp/org-8.2.6/lisp/)

;; load the latex extension
(require 'ox-html)
(require 'ox-latex)
(require 'ox-ascii)
(require 'ox-beamer)


;; Load Recentfile code, see entry in  menu
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key \C-x\ \C-r 'recentf-open-files)

;; show no startup-screen
(setq inhibit-startup-screen t)

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







Re: [O] Exporting to LaTeX Beamer

2014-04-25 Thread Uwe Ziegenhagen

 
 How exactly are you trying to export?  Your output looks like a plain
 latex export (M-x org-export-dispatch RET l p), not beamer (... l P)?
 Note difference in case (p versus P) and similar for export to latex
 code alone (l or b) and for opening the PDF automatically (o versus O).
 

Got it! My assumption was that the LaTeX export is controlled by the beamer
startup option and just user the lowercase exports.

Now it's working, thanks for the help!

Uwe




[O] Exporting to LaTeX Beamer

2014-04-24 Thread Uwe Ziegenhagen
Hi,

I am trying to export an org file to individual Beamer frames but fail as
Org mode exports the sections, but not the frames.

I use the following example org file (as given by
http://orgmode.org/worg/exporters/beamer/tutorial.html)

##

#+TITLE: Writing Beamer presentations in org-mode
#+AUTHOR:Eric S Fraga
#+EMAIL: e.fr...@ucl.ac.uk
#+DATE:  2010-03-30 Tue
#+DESCRIPTION: 
#+KEYWORDS: 
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t :t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:   
#+LINK_HOME:
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+BEAMER_FRAME_LEVEL: 2
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args)
%4BEAMER_col(Col) %10BEAMER_extra(Extra)

* Introduction
** A simple slide
This slide consists of some text with a number of bullet points:

- the first, very @important@, point!
- the previous point shows the use of the special markup which
  translates to the Beamer specific /alert/ command for highlighting
  text.


The above list could be numbered or any other type of list and may
include sub-lists.




and get the following result, where ** is translated into subsection.




% Created 2014-04-25 Fr 06:36
\documentclass[bigger]{beamer}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\author{Eric S Fraga}
\date{2010-03-30 Tue}
\title{Writing Beamer presentations in org-mode}
\hypersetup{
  pdfkeywords={},
  pdfsubject={},
  pdfcreator={Emacs 24.3.1 (Org mode 8.2.6)}}
\begin{document}

\maketitle
\tableofcontents


\section{Introduction}
\label{sec-1}
\subsection{A simple slide}
\label{sec-1-1}
This slide consists of some text with a number of bullet points:

\begin{itemize}
\item the first, very @important@, point!
\item the previous point shows the use of the special markup which
translates to the Beamer specific \emph{alert} command for highlighting
text.
\end{itemize}


The above list could be numbered or any other type of list and may
include sub-lists.
% Emacs 24.3.1 (Org mode 8.2.6)
\end{document}


##


What is needed to fix this?


Uwe





[O] Finer control over LaTeX export

2013-12-31 Thread Uwe Ziegenhagen
Hi everyone,

I have short parts of Python code in my org file:

#+begin_src python :results value
def foo(x):
  if x0:
return x+1

  else:
return x-1

return foo(590)
#+end_src

#+RESULTS:
: 591

#+begin_src python :results value
return 1+1
#+end_src

#+RESULTS:
: 2

#+begin_src python :results output
print(1+2)
#+end_src

#+RESULTS:
: 3

These get exported to 

\#+begin$_{\text{src}}$ python :results output
print(1+2+3+4+5+6+7+8+9+11)
\#+end$_{\text{src}}$ python

\begin{verbatim}
56
\end{verbatim}
\section{{\bfseries\sffamily TODO} Emacs Artikel zur Code-Evaluation}
\label{sec-18}
\begin{verbatim}
def foo(x):
  if x0:
return x+1

  else:
return x-1

return foo(590)
\end{verbatim}

\begin{verbatim}
return 1+1
\end{verbatim}

\begin{verbatim}
print(1+2)
\end{verbatim}

How can I define how Org Mode is exporting these snippets?

The whole verbatim stuff is okay, I'd like to replace that with the
listings package, but the 



\#+begin$_{\text{src}}$ python :results output
print(1+2+3+4+5+6+7+8+9+11)
\#+end$_{\text{src}}$ python


requires amsmath just for the \text command, so this is also something I
want to change. Can anyone point me to the correct way of changing it.

Uwe






[O] Getting custom LaTeX exports to work

2013-12-25 Thread Uwe Ziegenhagen
Hi everyone,

I am trying to get custom LaTeX exports to work. I installed the latest
version of Emacs (for Windows) and org mode today and have the following in
my .emacs:

(require 'ox-html)
(require 'ox-latex)
(require 'ox-ascii)

;; now let's add a few custom class export templates
(add-to-list 'org-latex-classes
  '(koma-artikel
 \\documentclass{scrartcl}
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))

(add-to-list 'org-latex-classes
'(scrlttr
 \\documentclass[11pt]{scrlttr2}\n
  \\usepackage[utf8]{inputenc}\n
  \\usepackage[T1]{fontenc}\n
  \\usepackage{xcolor}
 
 (\\section{%s} . \\section*{%s})
 (\\subsection{%s} . \\subsection*{%s})
 (\\subsubsection{%s} . \\subsubsection*{%s})
 (\\paragraph{%s} . \\paragraph*{%s})
 (\\subparagraph{%s} . \\subparagraph*{%s})))

In my simple org-file I have the following in the first line:

#+LaTeX_CLASS: koma-article

Unfortunately I still get Unknown LaTeX Class `koma-article` when
executing Ctrl-c-e l L





Re: [O] Getting custom LaTeX exports to work

2013-12-25 Thread Uwe Ziegenhagen
Thomas S. Dye tsd at tsdye.com writes:

 
 Hi Uwe,
 
 Uwe Ziegenhagen ziegenhagen at gmail.com writes:

 
 You've named it `koma-artikel', not `koma-article'.
 
 hth,
 Tom
 

OMG, that did the trick!

Thanks, 

Uwe