[SOLVED] (was: BUG? Frequency table does not work any more.)

2021-05-16 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

> Hi 
> I am currently running 9.4.5, well actually a version compiled from git
> master, that I upgraded a couple of weeks ago. 
> Commit is e641d3736036732e7642807146a97b0876cb8b83 

My bad, I deleted an important information in the table, everything
works as expected.


smime.p7s
Description: S/MIME cryptographic signature


BUG? Frequency table does not work any more.

2021-05-16 Thread Uwe Brauer



Hi 
I am currently running 9.4.5, well actually a version compiled from git
master, that I upgraded a couple of weeks ago. 
Commit is e641d3736036732e7642807146a97b0876cb8b83 



However in the version I used two month ago the following worked nicely 

#+TBLNAME: raw-data
| Stud |  Mark |
|--+---|
|  | 0 |
|  | 0 |
|  | 0 |
|  | 0 |
|  | 0 |
|  | 0 |
|  | 1 |
|  |  1.25 |
|  |  1.25 |
|  | 2 |
|  | 2 |
|  |   2.5 |
|  |   2.5 |
|  | 3 |
|  | 3 |
|  |  3.25 |
|  | 4 |
|  | 4 |
|  |  4.25 |
|  |   4.5 |
|  |   4.5 |
|  |   4.5 |
|  |   5.5 |
|  |   5.5 |
|  |  5.75 |
|  | 6 |
|  |   6.5 |
|  | 7 |
|  |   7.5 |
|  | 9 |
|--+---|
| Mean | 3.342 |
#+TBLFM: $1=@#-1::@32$2=vmean(@I$2..@II$2)

That still works

However 

#+BEGIN_SRC emacs-lisp
  (defun in-interval (bounds el)
(and (>= el (car bounds)) (<= el (cadr bounds
#+END_SRC
#+RESULTS:
: in-interval


| lower bound | upper bound | frequency |
|-+-+---|
|   1 |   5 |16 |
|   5 | | 0 |
#+TBLFM: $3='(length (org-lookup-all '($1 $2) '(remote(raw-data,@2$2..@>$2)) 
nil 'in-interval));N


That does not work any more. When I put my cursor on TBLFM and run C-c
C-c then a cryptic message 

Cells in the region copied, use M-x org-table-paste-rectangle to paste them in 
a table. [2 times]

But I don't want to copy the cells in the region, I want to execute the
function.
That is a important matter since I rely on the functionality quite a
bit.

What shall can I do

Regards


Uwe Brauer 




Re: when executing a src block with latex construct, display problem because of +

2021-05-16 Thread Uwe Brauer
>>> "BC" == Berry, Charles  writes:
Chuck


> Uwe,
> You used `:exports code :eval never-export' (from an earlier posting). 

> I think you want `:exports both :eval never-export' to keep babel from 
> removing the results.

Thanks very much, that was the essential bit of code. Solved!


smime.p7s
Description: S/MIME cryptographic signature


Re: when executing a src block with latex construct, display problem because of +

2021-05-15 Thread Uwe Brauer
Chuck, 
   > Uwe,
   > [snip]


   > [screenshot deleted]

   > Oh, I misunderstood.

   > The result looks like latex. So why not use `:results output latex' ?

I tried that also, then however the result is 
#+RESULTS:
#+begin_export latex
\begin{align*}
P(\text{Covid19}|\text{+})&=\frac{P(\text{+}|\text{Covid19})P(\text{Covid19})}{P(\text{+}|\text{Covid19})P(\text{Covid19})+P(\text{+}|\text{No-Covid19})P(\text{No-Covid19})}\\
P(\text{No-Covid19}) &= 1- P(\text{Covid19}) = 1-0.1=0.9\\ 
P(\text{+}|\text{No-Covid19}) &= 1-P(\text{-}|\text{No-Covid19}) = 
1-0.95=0.05 \\ 
&=\frac{0.95 \cdot 0.1}{0.95\cdot0.1 + (1-0.95)\cdot 0.9}\\ 
P(\text{Covid19}|-)&=0.608696 \\ 
P(\text{No-Covid19}|+)&=1-P(\text{Covid19}|+)=0.391304 \\ 
\end{align*}
#+end_export

That is ok for displaying, but if I now want also to export this org
file to latex, the align construct is not exported, sigh. 

As the great philosopher M. Jagger said:

«You Can't Always Get What You Want»


smime.p7s
Description: S/MIME cryptographic signature


when executing a src block with latex construct, display problem because of +

2021-05-15 Thread Uwe Brauer


Hi 

I have the following src block

#+begin_src matlab :results output raw :exports code  :eval never-export
addpath /home/oub/ALLES/HGs/Matlab-init/Statistic
sens=0.7;
spec=0.95;
aspec=1-spec;
prob=0.1;
sal=1-prob;
[bp,bpinv,bn,bninv]=mibayes(sens,spec,prob);
disp('\begin{align*}')
disp('P(\text{Covid19}|\text{+})&=\frac{P(\text{+}|\text{Covid19})P(\text{Covid19})}{P(\text{+}|\text{Covid19})P(\text{Covid19})+P(\text{+}|\text{No-Covid19})P(\text{No-Covid19})}\\')
fprintf('P(\\text{No-Covid19}) &= 1- P(\\text{Covid19}) = 1-%g=%g 
\n',prob,sal)
fprintf('P(\\text{+}|\\text{No-Covid19}) &= 1-
P(\\text{-}|\\text{No-Covid19}) = 1-%g=%g  \n',spec,aspec)
fprintf('&=\\frac{%g \\cdot %g}{%g\\cdot%g + (1-%g)\\cdot %g} 
\n',spec,prob,spec,prob,spec,sal)
fprintf('P(\\text{Covid19}|-)&=%g  \n', bp);
fprintf('P(\\text{No-Covid19}|+)&=1-P(\\text{Covid19}|+)=%g  \n', bpinv);
disp('\end{align*}')
#+end_src

That is exported to 
#+RESULTS:
\begin{align*}
P(\text{Covid19}|\text{+})&=\frac{P(\text{+}|\text{Covid19})P(\text{Covid19})}{P(\text{+}|\text{Covid19})P(\text{Covid19})+P(\text{+}|\text{No-Covid19})P(\text{No-Covid19})}\\
P(\text{No-Covid19}) &= 1- P(\text{Covid19}) = 1-0.1=0.9\\ 
P(\text{+}|\text{No-Covid19}) &= 1-P(\text{-}|\text{No-Covid19}) = 
1-0.95=0.05 \\ 
&=\frac{0.95 \cdot 0.1}{0.95\cdot0.1 + (1-0.95)\cdot 0.9}\\ 
P(\text{Covid19}|-)&=0.000139982 \\ 
P(\text{No-Covid19}|+)&=1-P(\text{Covid19}|+)=0.99986 \\ 
\end{align*}

Now in my org mode file, the lines between the +

\text{+})&=\frac{P(\text{+}|\text{Covid19})P(\text{Covid19})}{P(\text{+}|\text{Covid19})P(\text{Covid19})+P(\text{+}|\text{No-Covid19})P(\text{No-Covid19})}\\
 

Get a overstrike.

How can I avoid that?

Thanks and regards

Uwe Brauer 




Re: Bug: org-caputure fails, sometimes [9.3.7 (release_9.3.7-705-gea9463 @ /home/oub/emacs/site-lisp/packages/org/)]

2021-04-25 Thread Uwe Brauer

   > Uwe Brauer writes:

   > With this backtrace alone (which involves org-capture catching the
   > internal error), I think it's going to be hard for anyone to guess
   > what's going on here.  It sounds like once you encounter this error,
   > subsequent calls reliably trigger it.  Next time you run into it, I'd
   > suggest re-evaluating org-capture to something like below to hopefully
   > see a more informative backtrace.

   > diff --git a/lisp/org-capture.el b/lisp/org-capture.el
   > index 831c3e1f4..b20124ced 100644
   > --- a/lisp/org-capture.el
   > +++ b/lisp/org-capture.el
   > @@ -693,9 +693,7 @@ (defun org-capture ( goto keys)
   >  (string-prefix-p "CAPTURE-" (buffer-name)))
   > (kill-buffer (current-buffer)))
   >   (set-window-configuration (org-capture-get :return-to-wconf))
   > - (error "Capture template `%s': %s"
   > -(org-capture-get :key)
   > -(error-message-string error
   > + (signal (car error) (cdr error
   >(when (and (derived-mode-p 'org-mode) (org-capture-get :clock-in))
   >  (condition-case nil
   >  (progn



I debugged the function, the error appears in that line
 (signal (car error) (cdr error

Which is not useful. 

The funny thing is that the capture is saved correctly in the file 
here is the template

("mu" "Stat+Num:Exercises English"
 table-line (file+headline 
"~/ALLES/HGs/tex/vorlesungen/HGQuim-Num-Estad/Lista-Alumnos/2021/GroupE/exercises-groupE-21.org"
 "Exercise Group-E")
 "| %:fromname|%:fromaddress  |%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  
%a|%:date | "  :prepend t 
 )


smime.p7s
Description: S/MIME cryptographic signature


Re: Bug: org-caputure fails, sometimes [9.3.7 (release_9.3.7-705-gea9463 @ /home/oub/emacs/site-lisp/packages/org/)]

2021-04-25 Thread Uwe Brauer

   > Uwe Brauer writes:

   > With this backtrace alone (which involves org-capture catching the
   > internal error), I think it's going to be hard for anyone to guess
   > what's going on here.  It sounds like once you encounter this error,
   > subsequent calls reliably trigger it.  Next time you run into it, I'd
   > suggest re-evaluating org-capture to something like below to hopefully
   > see a more informative backtrace.

   > diff --git a/lisp/org-capture.el b/lisp/org-capture.el
   > index 831c3e1f4..b20124ced 100644
   > --- a/lisp/org-capture.el
   > +++ b/lisp/org-capture.el
   > @@ -693,9 +693,7 @@ (defun org-capture ( goto keys)
   >  (string-prefix-p "CAPTURE-" (buffer-name)))
   > (kill-buffer (current-buffer)))
   >   (set-window-configuration (org-capture-get :return-to-wconf))
   > - (error "Capture template `%s': %s"
   > -(org-capture-get :key)
   > -(error-message-string error
   > + (signal (car error) (cdr error
   >(when (and (derived-mode-p 'org-mode) (org-capture-get :clock-in))
   >  (condition-case nil
   >  (progn

Even with your applied patch I don't obtain any more useful backtrace I
will try to debug the function now.



smime.p7s
Description: S/MIME cryptographic signature


Re: Bug: org-caputure fails, sometimes [9.3.7 (release_9.3.7-705-gea9463 @ /home/oub/emacs/site-lisp/packages/org/)]

2021-04-24 Thread Uwe Brauer

> Uwe Brauer writes:


Hi


> With this backtrace alone (which involves org-capture catching the
> internal error), I think it's going to be hard for anyone to guess
> what's going on here.  It sounds like once you encounter this error,
> subsequent calls reliably trigger it.  Next time you run into it, I'd
> suggest re-evaluating org-capture to something like below to hopefully
> see a more informative backtrace.

> diff --git a/lisp/org-capture.el b/lisp/org-capture.el
> index 831c3e1f4..b20124ced 100644
> --- a/lisp/org-capture.el
> +++ b/lisp/org-capture.el
> @@ -693,9 +693,7 @@ (defun org-capture ( goto keys)
> (string-prefix-p "CAPTURE-" (buffer-name)))
>(kill-buffer (current-buffer)))
>  (set-window-configuration (org-capture-get :return-to-wconf))
> -(error "Capture template `%s': %s"
> -   (org-capture-get :key)
> -   (error-message-string error
> +(signal (car error) (cdr error
>   (when (and (derived-mode-p 'org-mode) (org-capture-get :clock-in))
> (condition-case nil
> (progn

Thanks, I pulled applied your patch and compiled, let us see what comes
out of it.

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


how to select interactively the time in org-time-stamp

2021-04-08 Thread Uwe Brauer


Hi 

The documentation states, and I quote 


,
| (org-time-stamp ARG  INACTIVE)
| 
| Prompt for a date/time and insert a time stamp.
| 
| If the user specifies a time like HH:MM or if this command is
| called with at least one prefix argument, the time stamp contains
| the date and the time.  Otherwise, only the date is included.
`

So I run 
C-u C-c .

And org proposes me the date and time of that moment, I can change the
date, since the calendar pops up, but how I can change *interactively*
time time?

Thanks

Uwe Brauer 




Re: how to export (latex) a image without using figure

2021-04-04 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

Hi Juan,


> Hi Uwe,
> Try:

> #+ATTR_LaTeX: :float nil

> #+CAPTION: La función  La función  $x^2  e^{-\alpha x} = \frac{1}{\alpha}$, 
> $\alpha=-\ln(1-p)$  con $p=0.01$  con $p=0.3$
> [[./images/dfp_03.png]]

Muchas gracias, I mean thank you very much.

Uwe


smime.p7s
Description: S/MIME cryptographic signature


how to export (latex) a image without using figure

2021-04-04 Thread Uwe Brauer


Hi 

Currently 

#+CAPTION: La función  La función  $x^2  e^{-\alpha x} = \frac{1}{\alpha}$, 
$\alpha=-\ln(1-p)$  con $p=0.01$  con $p=0.3$
#+NAME:   fig:plotcalor23
[[./images/dfp_03.png]]

Gets translated to 

\begin{figure}[htbp]
\centering
\includegraphics[width=.9\linewidth]{./images/dfp_03.png}
\caption{\label{fig:plotcalor23}La función  La función  \(x^2  e^{-\alpha x} = 
\frac{1}{\alpha}\), \(\alpha=-\ln(1-p)\)  con \(p=0.01\)  con \(p=0.3\)}
\end{figure}

For reasons that needs a longer explanation I would need.



\includegraphics[width=.9\linewidth]{./images/dfp_03.png}
\captionof{figure}{\label{fig:plotcalor23}La función  La función  \(x^2  
e^{-\alpha x} = \frac{1}{\alpha}\), \(\alpha=-\ln(1-p)\)  con \(p=0.01\)  con 
\(p=0.3\)}


How can this be achieved?

Thanks 

Uwe Brauer 

 




spreadsheet, calc descriptive statistics, the mode??

2021-03-29 Thread Uwe Brauer
Hi 

As far as I can see 
#+begin_src 

|   | Marks |   |
|---+---+---|
|   | 1 |   |
|   | 1 |   |
|   | 4 |   |
|   | 5 |   |
|   | 6 |   |
|---+---+---|
| 4 |   3.4 | vmod([1, 1, 4, 5, 6]) |
,#+TBLFM: 
@7$1=vmedian(@I$2..@II$2)::@7$2=vmean(@I$2..@II$2)::@7$3=vmod(@I$2..@II$2)
#+end_src


The mode as in explained for example in 
https://en.wikipedia.org/wiki/Mode_(statistics)

Is not included in calc. Am I correct. I tried to search in the info but
cannot find anything

Regards

Uwe Brauer 




Re: MacOS (emacsformacosx) c-spc, does not run set-mark-command

2021-03-25 Thread Uwe Brauer
>>> "TC" == Tim Cross  writes:

> Diego Zamboni  writes:

>> I have seen differences in this behavior depending on the Emacs
>> build. The emacs-mac port
>> (https://github.com/railwaycat/homebrew-emacsmacport)
>> seems to intercept certain Mac-specific keybindings such as C-space
>> and C-M-space and gives them their "Mac meaning", e.g. to bring up
>> Spotlight or the
>> symbol chooser. I could never figure out how to disable this behavior.
>> 
>> Now I use emacs-plus (https://github.com/d12frosted/homebrew-emacs-plus) and 
>> this no longer happens.
>> 

> Normally, you need to disable those 'shortcuts' at the OS level i.e.
> under the keyboard shortucts item in macOS preferences panel. Problem is
> any macOS shortcut will grab the keys before Emacs sees them. Not sure
> how the emacs-plus version gets around this. 

Right, it seems and issue of the OS shortcuts as C-space is for
switching keyboards (US->spanish>etc etc).[1]

Do you know how to change or disable them?

Uwe 



Footnotes:
[1]  the same happens on Linux/KDE



smime.p7s
Description: S/MIME cryptographic signature


MacOS (emacsformacosx) c-spc, does not run set-mark-command

2021-03-24 Thread Uwe Brauer



Hi

Does anybody know how to achieve the traditional binding of 
C-space to set-mark-command on MacOS (for emacsformacos)?

Shift arrow down works, but will not work for a lot of features in org
mode.

Thanks 

Uwe Brauer 




org-capture-template with changing heading (including a TIMESTAMP)

2021-03-19 Thread Uwe Brauer


Hi

For an org-capture-template I have a setting of the form

("mg" "Exercicios Annu21: asignados"
table-line (file+headline "~/somefile.org" "Exercicios Annu21: asignados")

However in that file I also want a header of the form 

* Exercicios Annu21: asignados <2021-03-19 vie 09:48>

That is a changing timestamp in the heading. How can I achieve that for
my template?

Thanks

Uwe Brauer 




Re: export org table to html, exclude certain rows

2021-03-18 Thread Uwe Brauer
>>> "MN" == Maxim Nikulin  writes:

> On 18/03/2021 20:34, Uwe Brauer wrote:
>> Does there exist a similar feature for rows?

> Have you tried "/"?
> https://orgmode.org/manual/Advanced-features.html

You are right of course, sorry




smime.p7s
Description: S/MIME cryptographic signature


copy org-org-output? Based on copy-tex-output

2021-03-18 Thread Uwe Brauer


Hi 

The following function, courtesy by Al Haji-Ali, allows me to copy latex
output (basically pdf) to a directory of my choice.

(defun copy-tex-output ()
   (interactive)
   (let* ((default (expand-file-name (TeX-active-master nil)))
  (default-dir (file-name-directory default))
  (default-file (concat (file-name-nondirectory default) "." 
(TeX-output-extension)))
  (outputfile (expand-file-name (TeX-active-master 
(TeX-output-extension
  (filename (read-file-name "Save as:" default-dir
 default-file nil default-file)))
 (copy-file outputfile filename t)))

In order to use that for org-export, I need to know whether there is
something like TeX-output-extension for orgmode

Any idea?

regards

Uwe Brauer 




export org table to html, exclude certain rows

2021-03-18 Thread Uwe Brauer


Hi 

I know how to exclude certain columns in org table for being exported to
HTML o Latex.

Does there exist a similar feature for rows?

Regards

Uwe Brauer 




Re: org-capture-template: table lines including newline of sorts

2021-03-18 Thread Uwe Brauer

   > On 3/16/21 3:34 AM, Uwe Brauer wrote:
   > I'm running org 9.4.4 and emacs 28.0.50, (both from source) on Debian
   > testing. According to my notes in my init file I created the template
   > in early July 2011, modified it slightly two years later. I do not
   > recall any problems with it.

   > Just to  make sure that there is no problem with the timeslips
   > template, at least on my system, I commented out all of the capture
   > templates before and after the timeslips template and reloaded my init
   > file. I ran org-capture (bound to C-cm). The timeslips came up in the
   > dispatcher and it ran OK.

   > I notice that I was off by a key and typed periods and not semicolons
   > in the two lines "some capture templates," and, "some more capture
   > templates."




I commented out all my templates

So the only entry is 

("s" "timeslip" table-line
 (file "/home/oub/timeslips.org")
   ;;   (file "d:/ActiveFiles/timeslips.org")
  "\| %(org-read-date)\| %^{FileName} %i\|
  %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i"

Timeslips.org is empty.

I mark a line in my org-init file and fire up org-capture using your
template, I insert as file name org-init, 
narrative I insert blabla 
time I insert 10:00
Expense I insert 10

And I obtain 

| Bad template 

What do I miss here?

Thanks 

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-template: table lines including newline of sorts

2021-03-16 Thread Uwe Brauer

   > On 3/15/21 5:00 PM, Uwe Brauer wrote:
   > My bad; I did not pay attention to a four line comment, so here it is
   > again, with the comment and final line for the template, etc.

   > (setq org-capture-template '(

   > . . . some capture templates

   > ("s" "timeslip" table-line
   > (file "/mnt/Data/ActiveFiles/timeslips.org")
   >;;  (file "d:/ActiveFiles/timeslips.org")
   >  "\| %(org-read-date)\| %^{FileName} %i\|
   >  %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i"

   > ;; Note that there is no escape and pipe after the final content input
   >expansion
   > ;; if there were a \| then an empty column is added
   > ;; (org-read-date) added 2013-07-12; see Sacha Chua's use of same as in
   > ;; the ledger templates below.
   >  :empty-lines 1)

   > , , , some more capture templates

   > ))


I still obtain 

| Bad template 


Even copying your code without any modifications! I am running org
9.3.7


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-template: table lines including newline of sorts

2021-03-15 Thread Uwe Brauer
>>> "CM" == Charles Millar  writes:

   > On 3/15/21 10:13 AM, Uwe Brauer wrote:
   >> 
   >>> Hi,
   >>> On 3/14/21 1:00 PM, TRS-80 wrote:
   >>> You may have to escape the pipes. I did that in a similar capture 
template.
   >> Can you give me an example, please?
   >> 

   > HTH

   > ("s" "timeslip" table-line
   > (file "/mnt/Data/ActiveFiles/timeslips.org")
   >  "\| %(org-read-date)\| %^{FileName} %i\|
   >  %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i"

There is a ) missing, no?

I tried 

("s" "timeslip" table-line
(file "/home/oub/timeslips.org")
  "\| \| %fromname\|
  :%subject\| %a \| %:date")

But I obtain bad template when executing the code


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-template: table lines including newline of sorts

2021-03-15 Thread Uwe Brauer

   > Uwe Brauer  writes:

   > Break up the line however you wish into quoted substrings and concat
   > them together..?

No entirely sure that you mean by quoted substrings, can you give me an
example, please?


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-template: table lines including newline of sorts

2021-03-15 Thread Uwe Brauer

> Hi,
> On 3/14/21 1:00 PM, TRS-80 wrote:
> You may have to escape the pipes. I did that in a similar capture template.

Can you give me an example, please?


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-template: table lines including newline of sorts

2021-03-14 Thread Uwe Brauer

> On 2021-03-13 02:24, Uwe Brauer wrote:

> Do you need to add more pipes to keep the table structure on the line
> after the newline?


I don't think so.


smime.p7s
Description: S/MIME cryptographic signature


org-capture-template: table lines including newline of sorts

2021-03-12 Thread Uwe Brauer


Hi 

Currently I have the following setting for one org-capture-template:


("mu" "Stat+Num:Exercises English"
table-line (file+headline "~/Somefile.org" "Exercise Group-E")
"| %:fromname|%:fromaddress | 
%(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  %a|%:date | "  
:prepend t
)

That line is too long, I'd like something like this 
("mu" "Stat+Num:Exercises English"
table-line (file+headline "~/Somefile.org" "Exercise Group-E")
"| %:fromname|%:fromaddress\n 
%(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  %a|%:date | "  
:prepend t
)

Or 

("mu" "Stat+Num:Exercises English"
table-line (file+headline "~/Somefile.org" "Exercise Group-E")
"| %:fromname|%:fromaddress\n 
%(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  %a|%:date | "  
:prepend t
"|   | %(my-extract-cc) |   |   |   |   |   |   ||  |   |   ||| 
"  :prepend t 
)


But nothing worked, any ideas?

Thanks and regards

Uwe Brauer 




Re: org-capture gnus also extract from the cc field.

2021-03-12 Thread Uwe Brauer
>>> "KM" == Kyle Meyer  writes:

> Uwe Brauer writes:
>> Hi
>> 
>> This would be very useful for my workflow, actually I have 
>> 
>> ("mu" "Stat+Num: English"
>> table-line (file+headline "/somefile.org" "Exercise Group-E")
>> "| %:fromname|%:fromaddress|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  
>> %a|%:date "  :prepend t)
>> 
>> So a %:ccname %:ccaddress would be very very useful
>> 
>> Any idea how to achieve that?

> At the minimum, it looks like you'd have to adjust two places:

>   * org-gnus-store-link to extract the cc field and call
> org-link-store-props with it

>   * org-link-store-props to process it

Thanks, I found a simpler solution 

(defun my-extract-cc ()
  (interactive)
  (gnus-fetch-original-field "cc"))


("mu" "Stat+Num:Exercises English"
 table-line (file+headline "~/somefile.org" "Exercise Group-E")
 "| %:fromname|%:fromaddress | 
%(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  %a|%:date | "  
:prepend t)


No ideal but will do for the moment.


smime.p7s
Description: S/MIME cryptographic signature


org-capture gnus also extract from the cc field.

2021-03-12 Thread Uwe Brauer

Hi



actually I have 

("mu" "Stat+Num: English"
 table-line (file+headline "/somefile.org" "Exercise Group-E")
 "| %:fromname|%:fromaddress|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  
%a|%:date "  :prepend t)


For  my workflow,  it would be very useful to have 
a %:ccname %:ccaddress 

Any idea how to achieve that?

Thanks 


Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


org-capture gnus also extract from the cc field.

2021-03-12 Thread Uwe Brauer



Hi

This would be very useful for my workflow, actually I have 

("mu" "Stat+Num: English"
 table-line (file+headline "/somefile.org" "Exercise Group-E")
 "| %:fromname|%:fromaddress|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} |  
%a|%:date "  :prepend t)

So a %:ccname %:ccaddress would be very very useful

Any idea how to achieve that?

Thanks 


Uwe Brauer 




Re: org-capture-templates: %date is too long

2021-03-12 Thread Uwe Brauer
>>> "RP" == Robert Pluim  writes:

>>>>>> On Thu, 04 Mar 2021 21:24:03 +0100, Uwe Brauer  said:
Uwe> I am not acquainted with let-bound (only with let)

> 'let-bound' is a shorthand for saying 'binding a value using let'

Uwe> So are you saying I should may use defadvice to modify org-capture?

> Well, you have control over how org-capture is invoked, so you could
> do:

> (defun my-org-capture ()
>(let ((org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a>")))
> (org-capture)))

> although you could do it with advice if you wanted. Untested, of course :-)


Well, in order to run it I added an interactive call, but then 
%:date reminded unimpressed by this setting


the result was 

| user | u...@ucm.es | 3 |3 | [] | Fri, 12 Mar 2021 16:14:35 +0100 |

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-templates: %date is too long

2021-03-04 Thread Uwe Brauer

> Uwe Brauer  writes:

Uwe> Sorry, you misunderstood me, this time string, inserts the time string,
Uwe> when I execute the capture, but I want to extract the time string, when
Uwe> the message was received. This is why I used
Uwe> %:date
Uwe> in my first attempt, that works but inserts
Uwe> Tue, 2 Mar 2021 19:35:03 +0100
Uwe> Which I find way too long.
Uwe> Just
Uwe> Tue, 2 Mar 2021
Uwe> Would be fine or 02.03.2021
Uwe> But not the hour, seconds etc

> Capture templates allow inclusion of an arbitrary elisp expression with
> %(EXP). You could try defining an elisp function which accepts %:date as
> an argument (i.e. a string arg) and formats it using normal elisp date/time 
> functions and
> returns the result as a string and then call that function within your
> template?

Ah, ok now I see I will give it a try at the weekend.


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-templates: %date is too long

2021-03-04 Thread Uwe Brauer
>>> "RP" == Robert Pluim  writes:

   >>>>>> On Thu, 04 Mar 2021 15:22:21 +0100, Uwe Brauer  said:
   Uwe> Sorry, you misunderstood me, this time string, inserts the time string,
   Uwe> when I execute the capture, but I want to extract the time string, when
   Uwe> the message was received. This is why I used 
   Uwe> %:date
   Uwe> in my first attempt, that works but inserts 
   Uwe> Tue, 2 Mar 2021 19:35:03 +0100  

   Uwe> Which I find way too long.

   Uwe> Just 
   Uwe> Tue, 2 Mar 2021 

   Uwe> Would be fine or 02.03.2021

   Uwe> But not the hour, seconds etc

   > It looks like the %:date handling respects the
   > 'org-time-stamp-formats' variable, so if you can arrange for that to
   > be let-bound appropriately during the capture process, it might do the
   > right thing.

Hm that variable is set to 

Its value is ("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M>")

So if I call with a prefix it inserts 
<2021-03-04 jue 21:19>

But nothing like +0100  

I am not acquainted with let-bound (only with let)

So are you saying I should may use defadvice to modify org-capture?


smime.p7s
Description: S/MIME cryptographic signature


Re: org-capture-templates: %date is too long

2021-03-04 Thread Uwe Brauer
>>> "AA" == Alberto AP  writes:

Hi


> Hi
> What I use is the result of format-time-string (as explained in the Org
> Capture Templates help; check also the help for the format-time-string
> function).

> The string I use is:
> %<%Y%m%d-T%H%M%S>
> It gives me, for example, 20210304-T095526.

> If you don't want the hour just remove "-T%H%M%S"

Sorry, you misunderstood me, this time string, inserts the time string,
when I execute the capture, but I want to extract the time string, when
the message was received. This is why I used 
%:date
in my first attempt, that works but inserts 
Tue, 2 Mar 2021 19:35:03 +0100  

Which I find way too long.

Just 
Tue, 2 Mar 2021 

Would be fine or 02.03.2021

But not the hour, seconds etc

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


org-capture-templates: %date is too long

2021-03-04 Thread Uwe Brauer



Hi

I try to add a new entry to my org-capture-templates
for mails what I read via gnus. I'd like to have a timestamp that
reflects when the message was received, not when the entry was created
(for that I would to have to use %t)

Now I have set 

 "| | %:fromname|%:fromaddress|%^{Sheet|1|2|3|4|5|6|7|8|9} | %:date |[ 
] | | %a " :prepend t)

Using the description of the org-capture-template

+--
gnus|  %:from %:fromname %:fromaddress
|  %:to   %:toname   %:toaddress
|  %:fromto (either "to NAME" or "from NAME")
|  %:date %:date-timestamp (as active timestamp)
|  %:date-timestamp-inactive (as inactive timestamp)
gnus|  %:group, for messages also all email fields

The problem is this results in 

| Number | name | email | sheet | date  
 | status |
|| John Doe | foot...@gmail.com | 2 | Tue, 2 Mar 2021 19:35:03 
+0100 | [ ]|

I don't need the hour, and for sure I don't need +0100

Any idea how to shorten that?

regards

Uwe Brauer 




Re: http links translated to html : target "_blank"

2021-02-04 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

> Uwe Brauer  writes:
>> That is odd (maybe my org version is a bit rusty (master june 2020)

> It's strange...

> It should work fine for you (as long as you set
> `org-export-allow-bind-keywords' as non-nil)

Aha, indeed it was nil! I was not even aware of this variable, after
switching to t, your code worked. Thanks because it save me the hassle
to add manually 
#+attr_latex

On the other hand it is good to know that booth solution exits.

Thanks

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

   > Hi Uwe,
   > Uwe Brauer  writes:

   >> Thanks that works, but not for link in a list. The only solution 
   >> seems to be this one

   > Doesn't it work for you in a list? I think it should work also in a
   > list. If I export this:

   > #+begin_src org
   >   ,#+BIND: org-export-filter-final-output-functions (correct-target-blank)
   >   ,#+begin_src emacs-lisp :exports results :results none
   > (defun correct-target-blank (text backend info)
   >  (when (org-export-derived-backend-p backend 'html)
   >(replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
target=\"_blank\"" text)))
   >   ,#+end_src

   > + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]

   > + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]
   > #+end_src


   > I get this:

That is odd (maybe my org version is a bit rusty (master june 2020)
I obtain this:



https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1%20target=%22_blank%22;>Book
 A4

https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1%20target=%22_blank%22;>Book
 A4



smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "T" == TEC   writes:

> Uwe Brauer  writes:

>> Aha, thanks, it works, sometimes:
>> 
>> The first two work, the last two not. Not sure what to think about it

> Mmm, you need to have #+attr_html immediately followed by the link on
> the next line.

> It would be nice if there was a way to set these attributes inline with
> the link, but AFAIK that's not currently possible.

Right so this works


#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook


 + Book A4
   #+attr_html: :target _blank
   
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]

 a. Book A4
#+attr_html: :target _blank

[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

Hola Juan

> I think the problem is how the exporter understands the url string.
> Note that this:

> @@html:https://www.mpic.de/4747361/risk-calculator; 
> target="_blank">Simulador de riesgo con más detalle@@

> [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
> riesgo con más detalle]]

> is exported like this:

> 
> https://www.mpic.de/4747361/risk-calculator; 
> target="_blank">Simulador de riesgo con más detalle
> 

> 
>  href="https://www.mpic.de/4747361/risk-calculator%20target=%22_blank%22;>Simulador
>  de riesgo con más detalle
> 

> The second link is wrong formatted. A dirty solution could be:

> #+BIND: org-export-filter-final-output-functions (correct-target-blank)
> #+begin_src emacs-lisp :exports results :results none

>   (defun correct-target-blank (text backend info)
> (when (org-export-derived-backend-p backend 'html)
>   (replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
> target=\"_blank\"" text)))
> #+end_src

> Best regards,

Thanks that works, but not for link in a list. The only solution 
seems to be this one



#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook


 + Book A4
   #+attr_html: :target _blank
   
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]

 a. Book A4
#+attr_html: :target _blank

[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "T" == TEC   writes:

> Uwe Brauer  writes:

>> I need to produce a html file, with links opening new tabs (pages) as in 
>> 
>> https://apps.apple.com/es/app/radar-covid/id1520443509; 
>> target="_blank">Descarga Directa
>> 
>> However 
>> 
>> [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
>> riesgo con más detalle]]
>> 
>> Did not work
>> 
>> Any ideas?

> Have you tried:
> #+attr_html: :target _blank

Aha, thanks, it works, sometimes:

The first two work, the last two not. Not sure what to think about it

#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook

#+attr_html: :target _blank
 + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]


#+attr_html: :target _blank
 a. 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer


Hi 

I need to produce a html file, with links opening new tabs (pages) as in 

https://apps.apple.com/es/app/radar-covid/id1520443509; 
target="_blank">Descarga Directa

However 

 [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
riesgo con más detalle]]

Did not work

Any ideas?

Thanks and regards

Uwe Brauer 




table: unwrap org-table-wrap-region

2021-01-30 Thread Uwe Brauer



Hi

I use org-table-wrap-region a lot, however when I export to odt or docx
this is not the best solution. So I would sometimes unwrap, join or
merge cells, is this possible?

Thanks and regards

Uwe Brauer 




columnview, match and status include all open status

2021-01-08 Thread Uwe Brauer


Hi 

I have the following problem:

#+begin_src 
,* Sheet1 
  :PROPERTIES:
  :COLUMNS:  %10Sheet(Sheet Nr) %10Ej(Exercise Nr)  %17Date(Date) 
%7STATUS(Status){X/}
  :END:

,** Group1 :in:G1:
   :PROPERTIES:
   :ID:   G1
   :Grp1: 1
   :Gr:   Group-1
   :STATUS:   [X]
   :Sheet:H1
   :Ej:   E1
   :END:

,** Group1 :in:G1:
   :PROPERTIES:
   :ID:   G1
   :Grp1: 1
   :Gr:   Group-1
   :STATUS:   [X]
   :Sheet:H1
   :Ej:   E4
   :END:


,** Group2   :out:
   :PROPERTIES:
   :ID:   G2
   :Grp1: 2
   :Gr:   Group-2
   :STATUS:   [X]
   :Sheet: H1
   :Ej:   E2
   :END:

,** Group3   :out:
   :PROPERTIES:
   :ID:   G3
   :Grp1: 3
   :Gr:   Group-3
   :STATUS:   [X]
   :Sheet: H1
   :Ej:   E3
   :END:


,** List of all group members


,#+TBLNAME: Sheet1
,#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :format 
"%5Sheet(Sheet) %5Grp1(Group)  %5Ej(Exercise) %7STATUS(Status){X/}"
| Sheet | Group | Exercise | Status |
|---+---+--+|
|   |   |  | [4/4]  |
|---+---+--+|
| H1| 1 | E1   | [X]|
|---+---+--+|
| H1| 1 | E4   | [X]|
|---+---+--+|
| H1| 2 | E2   | [X]|
|---+---+--+|
| H1| 3 | E3   | [X]|
,#+END

Now I only want a table with the tag G1

,#+TBLNAME: Group1
,#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :match "G1" 
:format "%5Sheet(Sheet) %5Grp1(Group)  %5Ej(Exercise) %7STATUS(Status){X/}"
| Sheet | Group | Exercise | Status |
|---+---+--+|
| H1| 1 | E1   | [X]|
|---+---+--+|
| H1| 1 | E4   | [X]|
,#+END


But I would like to have 

,#+TBLNAME: Sheet1
,#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :format 
"%5Sheet(Sheet) %5Grp1(Group)  %5Ej(Exercise) %7STATUS(Status){X/}"
| Sheet | Group | Exercise | Status |
|---+---+--+|
|   |   |  | [2/2]  |
|---+---+--+|
| H1| 1 | E1   | [X]|
|---+---+--+|
| H1| 1 | E4   | [X]|
,#+END


That seems impossible?

regards

Uwe Brauer 
#+end_src




columnview: match vs exclude tags

2021-01-07 Thread Uwe Brauer
Hi 

While I understand the option match as a tag, to include certain
entries, I don't understand the option exclude-tags


#+begin_src 

,* Exclude (match)
:PROPERTIES:
:COLUMNS:  
:ID: 
:END:

,** Group1:in:
   :PROPERTIES:
   :ID:   G1
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Antonio
   :Usuario2: Isabel
   :Usuario3: Paula
   :Usuario4: Filipe
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

,** Group2   :out:
   :PROPERTIES:
   :ID:   G2
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Juan
   :Usuario2: Eva
   :Usuario3: Paula
   :Usuario4: Albert
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

,** Group3   :out:
   :PROPERTIES:
   :ID:   G2
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Juan
   :Usuario2: Eva
   :Usuario3: Paula
   :Usuario4: Albert
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:


,** List of all group members


,#+TBLNAME: mitglieder2
,#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :match "in"  
:format "%5ITEM(Groups) %5Usuario1(Memember) %5Usuario2(Memember) 
%5Usuario3(Memember) %5Usuario4(Memember)"
| Groups | Memember | Memember | Memember | Memember |
|+--+--+--+--|
| Group1 | Antonio  | Isabel   | Paula| Filipe   |
,#+END


,* Exclude (exclude tags)
:PROPERTIES:
:COLUMNS:  
:ID: 
:END:

,** Group1:in:
   :PROPERTIES:
   :ID:   G1
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Antonio
   :Usuario2: Isabel
   :Usuario3: Paula
   :Usuario4: Filipe
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

,** Group2   :out:
   :PROPERTIES:
   :ID:   G2
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Juan
   :Usuario2: Eva
   :Usuario3: Paula
   :Usuario4: Albert
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

,** Group3   :out:
   :PROPERTIES:
   :ID:   G2
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Juan
   :Usuario2: Eva
   :Usuario3: Paula
   :Usuario4: Albert
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:


,** List of all group members


,#+TBLNAME: mitglieder2
,#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :exclude-tags  
"out"  :format "%5ITEM(Groups) %5Usuario1(Memember) %5Usuario2(Memember) 
%5Usuario3(Memember) %5Usuario4(Memember)"

,#+END
#+end_src









how to exclude in columnview certain subheaders (subsection)

2021-01-07 Thread Uwe Brauer



Hi 

The following example puzzles me.

* Exclude certain ID
:PROPERTIES:
:COLUMNS:  
:ID: 
:END:




** Group2
   :PROPERTIES:
   :ID:   G1
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Antonio
   :Usuario2: Isabel
   :Usuario3: Paula
   :Usuario4: Filipe
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

** Group2
   :PROPERTIES:
   :ID:   G2
   :Grp1: 1
   :Gr:   Group-1
   :Usuario1: Juan
   :Usuario2: Eva
   :Usuario3: Paula
   :Usuario4: Albert
   :Start:<2020-07-26 Sun>
   :End:  <2020-11-22 dom>
   :STATUS:   [X]
   :ST1:  [X]
   :Hoja: H1
   :Ej:   E1
   :END:

** List of all group members


#+TBLNAME: mitglieder2
#+BEGIN: columnview   :hlines 2 :skip-empty-rows t :indent nil  :ID  "G1"  
:format "%5ITEM(Groups) %5Usuario1(Memember) %5Usuario2(Memember) 
%5Usuario3(Memember) %5Usuario4(Memember)"
| Groups | Memember | Memember | Memember | Memember |
|+--+--+--+--|
| Group2 | Antonio  | Isabel   | Paula| Filipe   |
|+--+--+--+--|
| Group2 | Juan | Eva  | Paula| Albert   |
 #+END


I don't understand why Group 2 is included the ID says "G1" and Group2
has ID "G2"

What do I miss?

Thanks and regards

Uwe Brauer 




columnview how to break lines if cell is to width

2021-01-07 Thread Uwe Brauer
Hello 

Please consider the following example:
#+begin_src 

,* Group 1
  :PROPERTIES:
  :COLUMNS:  
  :Usuario1: Antonio Gonzales
  :Email1:   go...@ucm.es
  :Usuario2: Isabel Diaz
  :Email2:   isa...@ucm.es
  :Usuario3: Paula Rodríguez
  :Email3:   pa...@ucm.es
  :Usuario4: Filipe Rio
  :Email4:   fil...@ucm.es
  :END:


,#+TBLNAME: members
,#+BEGIN: columnview :hlines 2 :indent nil :format "%50ITEM  %5Usuario1(Member) 
%5Email1(Email) %5Usuario2(Member) %5Email2(Email) %5Usuario3(Member) 
%5Email3(Email) %5Usuario4(Member) %5Email4(Email)"
| ITEM| Member   | Email| Member  | Email | 
Member  | Email| Member | Email |
|-+--+--+-+---+-+--++---|
| Group 1 | Antonio Gonzales | go...@ucm.es | Isabel Diaz | isa...@ucm.es | 
Paula Rodríguez | pa...@ucm.es | Filipe Rio | fil...@ucm.es |
,#+END
#+end_src

The resulting table has a bit too much width, I could use 

#+begin_src 
,* Group 1
  :PROPERTIES:
  :COLUMNS:  
  :Usuario1: Antonio Gonzales (email go...@ucm.es)
  :Usuario2: Isabel Diaz (email: isa...@ucm.es)
  :Usuario3: Paula Rodríguez (email:   pa...@ucm.es)
  :Usuario4: Filipe Rio (email: fil...@ucm.es)
  :END:


,#+TBLNAME: members
,#+BEGIN: columnview :hlines 2 :indent nil :format "%50ITEM  %5Usuario1(Member) 
 %5Usuario2(Member)  %5Usuario3(Member)  %5Usuario4(Member)"
| ITEM| Member| Member  
   | Member  | Member   
 |
|-+---++-+---|
| Group 1 | Antonio Gonzales (email go...@ucm.es) | Isabel Diaz (email: 
isa...@ucm.es) | Paula Rodríguez (email:   pa...@ucm.es) | Filipe Rio (email: 
fil...@ucm.es) |
,#+END
#+end_src

But then I would like to have a newline before (email ...) Is this
possible.


Another possibility would be to obtain a vertical table like this one


| ITEM   | Group 1  |
| Member | Antonio Gonzales |
| Email  | go...@ucm.es |
| Member | Isabel Diaz  |
| Email  | isa...@ucm.es|
| Member | Paula Rodríguez  |
| Email  | pa...@ucm.es |
| Member | Filipe Rio   |
| Email  | fil...@ucm.es|

How can this be achieved?

regards

Uwe Brauer 




Re: Include org-pretty-table by Matus Goljer (Fuco1) in org-mode

2021-01-06 Thread Uwe Brauer
>>> "AM" == Arthur Miller  writes:

> Hi guys,
> Can we get org-pretty-table into org-mode?

> https://github.com/Fuco1/org-pretty-table

> It replaces ascii chars with unicode box-drawing characters.

That is indeed very nice. Why can't he start to put it in MELPA? Would
also make things easier.

Regards

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


Re: [A solution of sorts]

2021-01-06 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

   > On Tuesday,  5 Jan 2021 at 17:02, Uwe Brauer wrote:
   >> Well 10 years ago Eric Schulte posted this 
   >> https://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00502.html

   > Yes, this is what I meant about post-processing (in this case using
   > elisp).

   >> It is not precisely what I want, but not bad either. If somebody can
   >> come up with a better solution...

   > Maybe append this to the ledger src block begin line:

   >   :cmdline bal --flat

Thanks but then the output does not have any indent, and I find
indentation helpful.


smime.p7s
Description: S/MIME cryptographic signature


[A solution of sorts] (was: accounting)

2021-01-05 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

>> On Monday,  4 Jan 2021 at 21:01, Uwe Brauer wrote:

>> Yes.

>> Sorry I was brief: I cut and pasted something from one of my files while
>> in a rush!

>> Basically, you could do:

>> #+begin_src ledger :cmdline -V --format "%-20A %14T\n" bal --flat assets 
>> 2010/01/01 * Starting balance
>> assets:bank:savings  1300.00
>> income:starting balances
>> 2010/07/22 * Got paid
>> assets:bank:chequing  1000.00
>> income:salary
>> #+end_src

>> and you would get, as output,


> But I rather prefer to have

> |  340 | expenses | |   |
> |  170 |  | BigBrother  |   |
> |  150 |  | | Jacket|
> |   20 |  | | Shoes |
> |  170 |  | Brother |   |
> |  130 |  | | BigBrother|
> |   40 |  | | ChristmasTree |
> | -340 | income   | |   |
> | -170 |  | BigBrother:Card |   |
> | -170 |  | Brother:Card|   |
> |  |  | |   |
> |--+--+-+---|
> |0 |  | |   |


> Any idea how to achieve this?

Well 10 years ago Eric Schulte posted this 
https://lists.gnu.org/archive/html/emacs-orgmode/2010-08/msg00502.html

#+name: test
#+begin_src ledger 
2010/01/01 * Starting balance
  assets:bank:savings  0
  income:starting balances
2010/07/23 ChristmasTree
  expenses:Brother:ChristmasTree  40.00
  income:Brother:Card
2010/07/24 Jacket
  expenses:BigBrother:Jacket  150.00
  income:BigBrother:Card
2010/07/24 Schuhe
  expenses:BigBrother:Shoes  20
  income:BigBrother:Card
2010/07/23 BigBrother 
  expenses:Brother:BigBrother  130
  income:Brother:Card
#+end_src

#+begin_src emacs-lisp :var ledger=test
  (with-temp-buffer
(insert ledger)
(message ledger)
(org-table-convert-region (point-min) (point-max) 2)
(org-table-to-lisp))
#+end_src

#+RESULTS:
|  340 | expenses|
|  170 | BigBrother  |
|  150 | Jacket  |
|   20 | Shoes   |
|  170 | Brother |
|  130 | BigBrother  |
|   40 | ChristmasTree   |
| -340 | income  |
| -170 | BigBrother:Card |
| -170 | Brother:Card|
|  | |
|0 | |


It is not precisely what I want, but not bad either. If somebody can
come up with a better solution...




Re: accounting

2021-01-05 Thread Uwe Brauer
>>> "CM" == Charles Millar  writes:

> On 1/4/21 3:54 AM, Uwe Brauer wrote:
>> Hi
>> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html
>> Points out how to use ledger within org mode.
>> Is there any simpler solution?
>> Regards
>> Uwe Brauer
>> 
> If "simpler" means just making entries into your ledger.dat file using
> orgmode you may wish to refer to Sacha Chua's capture template for
> that very purpose. She posted it a few years ago.

> https://sachachua.com/blog/2010/11/emacs-recording-ledger-entries-with-org-capture-templates/

Thanks, that looks nice, but I finally think that the example in 
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html

Is fine. The only think I am missing is the output in an org table form


smime.p7s
Description: S/MIME cryptographic signature


Re: accounting

2021-01-05 Thread Uwe Brauer

> On Monday,  4 Jan 2021 at 21:01, Uwe Brauer wrote:

> Yes.

> Sorry I was brief: I cut and pasted something from one of my files while
> in a rush!

> Basically, you could do:

> #+begin_src ledger :cmdline -V --format "%-20A %14T\n" bal --flat assets 
> 2010/01/01 * Starting balance
>   assets:bank:savings  1300.00
>   income:starting balances
> 2010/07/22 * Got paid
>   assets:bank:chequing  1000.00
>   income:salary
> #+end_src

> and you would get, as output,

> #+results:
> : assets:bank:chequing   1000
> : assets:bank:savings1300
> :2300


Thanks. I figured out that I have to read a bit accounting again (I
don't want to  use gnucash again, I prefer an org solution). I think
ledger is a reasonable solution (I cannot install currently beancount)


> I'm not saying that this is much prettier than the default but simply
> that you have total control over the formatting of the output so you may
> be able to achieve what you wish.


Yeah, your solution does not work for the example I had in mind
but I realize now what I miss: the output should be an org table


#+name: test
#+begin_src ledger 
2010/01/01 * Starting balance
  assets:bank:savings  0
  income:starting balances
2010/07/23 ChristmasTree
  expenses:Brother:ChristmasTree  40.00
  income:Brother:Card
2010/07/24 Jacket
  expenses:BigBrother:Jacket  150.00
  income:BigBrother:Card
2010/07/24 Schuhe
  expenses:BigBrother:Shoes  20
  income:BigBrother:Card
2010/07/23 BigBrother 
  expenses:Brother:BigBrother  130
  income:Brother:Card
#+end_src

#+RESULTS: test
#+begin_example
 340  expenses
 170BigBrother
 150  Jacket
  20  Shoes
 170Brother
 130  BigBrother
  40  ChristmasTree
-340  income
-170BigBrother:Card
-170Brother:Card

   0
#+end_example


But I rather prefer to have

|  340 | expenses | |   |
|  170 |  | BigBrother  |   |
|  150 |  | | Jacket|
|   20 |  | | Shoes |
|  170 |  | Brother |   |
|  130 |  | | BigBrother|
|   40 |  | | ChristmasTree |
| -340 | income   | |   |
| -170 |  | BigBrother:Card |   |
| -170 |  | Brother:Card|   |
|  |  | |   |
|--+--+-+---|
|0 |  | |   |


Any idea how to achieve this?


smime.p7s
Description: S/MIME cryptographic signature


Re: accounting

2021-01-04 Thread Uwe Brauer

> On 04/01/2021 21:04, Uwe Brauer wrote:

> https://beancount.github.io/

> is the project home page. You can find the documentation here:

> https://beancount.github.io/docs/

> I haven't submitted beancount-mode to any Emacs package repository yet,
> there is still some work I would like to do before doing it. You can
> find it here:

> https://github.com/beancount/beancount-mode

> with some minimal documentation.

> Beancount is distributed as a Python package, thus it should be easily
> installable on any system providing Python 3.6 or later.

Thanks, I am still on Ubuntu 16.04 running 3.5 and call install
beancount, I once tried upgrading python and it caused a lot of other
problems, most likely I have to upgrade Ubuntu, sigh


smime.p7s
Description: S/MIME cryptographic signature


Re: Accounting WAS Emacs-orgmode Digest, Vol 179, Issue 4

2021-01-04 Thread Uwe Brauer
> Also, in practical terms for day to day, rather than input things manually,
> I highly recommend downloading csvs (or similar formats) from your bank and
> using the ruby gem `reckon` which is a bayesian predictor that will learn
> from your ledger on how to expense your bank account entries and then write
> out the ledger file for you. Super handy.

> Overly long blog post here:
> https://daryl.wakatara.com/tracking-your-finances-with-reckon-and-ledger/
> to get you goin if it's not just a formatting thing.

Thanks I will have a look!!!


smime.p7s
Description: S/MIME cryptographic signature


Re: accounting

2021-01-04 Thread Uwe Brauer
>>> "DN" == Daniele Nicolodi  writes:

   > On 04/01/2021 09:54, Uwe Brauer wrote:
   >> Hi 
   >> 
   >> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html
   >> 
   >> Points out how to use ledger within org mode.
   >> 
   >> Is there any simpler solution?

   > As other pointed out, you are not describing what you want to
   > accomplish, thus is impossible to suggest anything concrete. However, I
   > would like to suggest to look at Beancount and beancount-mode as
   > alternatives to Ledger as plain text accounting tools.

Thanks, it seems that beancount is not in Ubuntu, and beancount-mode is
not available as a emacs package.

Do you have any pointers?

Thanks 


smime.p7s
Description: S/MIME cryptographic signature


Re: accounting

2021-01-04 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

   > On Monday,  4 Jan 2021 at 13:43, Uwe Brauer wrote:
   >> The example in this link is ok, also the output (the result of the
   >> ledger operation) is not very nicely formatted.

   > ledger does allow you to control, in detail, how the output should be
   > formatted.  The default output is suitable for a console display but you
   > can modify this through appropriate arguments to the ledger command line
   > via babel.  For instance, I have this line in my org file for generating
   > a balance of my assets:

   > ,#+call: year2020[:cmdline -V --format "%-20A %14T\n" bal --flat assets ]()


I am not sure I understand this (I admit I never used ledger, I used for
some time gnucash)

Do you mean this?

#+call: allinone[:cmdline -V --format "%-20A %14T\n" bal --flat assets ]()
#+name: allinone
#+begin_src ledger
2010/01/01 * Starting balance
  assets:bank:savings  1300.00
  income:starting balances
2010/07/22 * Got paid
  assets:bank:chequing  1000.00
  income:salary
2010/07/23 Rent
  expenses:rent  250.00
  assets:bank:chequing
2010/07/24 Food
  expenses:food  150.00
  assets:bank:chequing
2010/07/31 * Interest on bank savings
  assets:bank:savings  3.53
  income:interest
2010/07/31 * Transfer savings
  assets:bank:savings  250.00
  assets:bank:chequing
2010/08/01 got paid again
  assets:bank:chequing  1000.00
  income:salary
#+end_src




smime.p7s
Description: S/MIME cryptographic signature


Re: accounting

2021-01-04 Thread Uwe Brauer
>>> "AB" == Arne Babenhauserheide  writes:

   > Uwe Brauer  writes:

   >> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html
   >> 
   >> Points out how to use ledger within org mode.
   >> 
   >> Is there any simpler solution?

   > Do you mean simpler accounting in org-mode, 


This is what I meant. 

   > or do you mean simpler ledger-integration?

The example in this link is ok, also the output (the result of the
ledger operation) is not very nicely formatted.

   > You can always tangle your ledger-data and use a ledger commandline
   > client. Also Emacs has direct support for ledger. Here’s a setup via
   > use-package:

   > (use-package ledger-mode :ensure t :defer 20
   >   :config
   >   (org-babel-do-load-languages
   >'org-babel-load-languages
   >'((ledger . t

   > Best wishes,
   > Arne


smime.p7s
Description: S/MIME cryptographic signature


accounting

2021-01-04 Thread Uwe Brauer


Hi 

https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html

Points out how to use ledger within org mode.

Is there any simpler solution?

Regards

Uwe Brauer 




Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-29 Thread Uwe Brauer

> * Uwe Brauer  [2020-12-29 00:07]:

> Directory of businesses with their names and addresses in CSV
> format. It is not the only file that would have those problems. One
> way to go could be not to use Org mode, but to use org-table-importa
> as that is then much faster, and then to turn on org mode again.

> I have just said my user experience, I am not using org-table-import
> as I find it hackish function low on the scale of usability.

> When importing CSV documents I usually import it into database by
> using the built in PostgreSQL features or Emacs Lisp parsing of
> CSV.

> Org tables I used mostly for transactions but not any more as it does
> not scale up with many people, it becomes hell and it would be tedious
> or impossible to teach any staff on distance on how to use it. There
> is no collaboration.

> PostgreSQL offers collaboration feature with its server model right
> out of the box and staff member on distance can enter their
> transactions straight. So I replaced Org mode tables with database
> backed. Right tool for right purpose.


Interesting. I only import and export xls(x) files, with say 300 column
and say 4 columns containing marks of students. For this purpose the
export and import functions via csv work fine and I have the benefit of
using the power of Emacs to edit the list. The spreadsheet functionality
offered by org (via calc) is enough for me.



smime.p7s
Description: S/MIME cryptographic signature


Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Uwe Brauer
>>> "JL" == Jean Louis  writes:

> * Daniel Martín  [2020-12-28 19:22]:
>> Hongyi Zhao  writes:
>> 
>> > Is it possible for me to edit Microsoft Excel spreadsheet directly
>> > from within emacs, especially utilizing the powerful capabilities of
>> > orgmode?
>> 
>> Not directly, but you could first save the Excel spreadsheet as CSV and
>> then import it into Org-Mode using M-x org-table-import.  I haven't
>> checked how this works in practice, so YMMV.

> It performs poorly and takes very long time. It is limited unless
> limits are raised. And its usability on the scale from 0 to 10 is 1.


Not for me. What sort of files were you converting?


smime.p7s
Description: S/MIME cryptographic signature


Re: Microsoft Excel spreadsheet editing directly from within emacs.

2020-12-28 Thread Uwe Brauer
>>> "HZ" == Hongyi Zhao  writes:

> Is it possible for me to edit Microsoft Excel spreadsheet directly
> from within emacs, especially utilizing the powerful capabilities of
> orgmode?


You can export and import them to org files, without the excel formula
of course

(defun org-table-import-xlsx-to-csv-org () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer
 (xlsx-file (concat source-file ".xlsx"))
 (csv-file (concat source-file ".csv")))
(org-odt-convert xlsx-file "csv")
(org-table-import csv-file  nil)))

(defun org-table-export-to-xlsx () 
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name 
(current-buffer
 (csv-file (concat source-file ".csv")))
(save-excursion
  (org-table-export csv-file "orgtbl-to-csv")
  (org-odt-convert csv-file "xlsx"


> Regards


smime.p7s
Description: S/MIME cryptographic signature


Re: org-mime: markdown not html

2020-12-20 Thread Uwe Brauer
>>> "JL" == Jean Louis  writes:

> * Uwe Brauer  [2020-12-19 23:28]:
>> 
>> Hi
>> 
>> Does anybody know a package which would allow, using say gnus, to 
>> markdown-ise an email, that would be useful for sending email to github
>> issues.

> just try using markdown markup. *Nothing* prevents you doing so, does
> it?

Github does, I just tried to add say, **problem** to my text, it is not
recognised, the text send my email is just  plain text.

So sorry for the noise



smime.p7s
Description: S/MIME cryptographic signature


Re: org-mime: markdown not html

2020-12-20 Thread Uwe Brauer
>>> "JL" == Jean Louis  writes:

> * Uwe Brauer  [2020-12-19 23:28]:
>> 
>> Hi
>> 
>> Does anybody know a package which would allow, using say gnus, to 
>> markdown-ise an email, that would be useful for sending email to github
>> issues.

> just try using markdown markup. *Nothing* prevents you doing so, does
> it?

That is what I started to do, I reply to a message, via gnus, when the
reply window pops up I use the indirect-buffer command to switch to
markdown, do my formatting and go back to message mode. 
I hope for a more automated process, there is outorg-edit-as-org that
allows you to edit messages as if they were org file, I hoped to find
something similar for markdown.



smime.p7s
Description: S/MIME cryptographic signature


Re: org-mime: markdown not html

2020-12-20 Thread Uwe Brauer
>>> "DN" == Daniele Nicolodi  writes:

> On 19/12/2020 21:27, Uwe Brauer wrote:
>> 
>> Hi
>> 
>> Does anybody know a package which would allow, using say gnus, to 
>> markdown-ise an email, that would be useful for sending email to github
>> issues.

> As far as I know, GitHub does not interpret Mardown in comments added to
> issues via the email interface. Are you suggesting that Github has
> special handling for emails that contain text/markdown MIME parts? I
> haven't seen this documented anywhere.

That was my hope, but from the comments I see, this seems not to be the case.


smime.p7s
Description: S/MIME cryptographic signature


org-mime: markdown not html

2020-12-19 Thread Uwe Brauer


Hi

Does anybody know a package which would allow, using say gnus, to 
markdown-ise an email, that would be useful for sending email to github
issues.

Thanks

Regards

Uwe Brauer 




Re: [Institute field]

2020-12-15 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Monday, 14 Dec 2020 at 20:51, Uwe Brauer wrote:
>> I just realised  that beamer allows 
>> 
>> \institute{\texttt{email:o...@mat.ucm.es}}
>> 
>> But this does not get translated when I add to the org file 
>> 
>> #+institute: : o...@mat.ucm.es
>> 
>> Any ideas?

> Just put it in directly, as in
> #+latex_header: \institute{...}

Thanks!


smime.p7s
Description: S/MIME cryptographic signature


[Institute field] (was: export to beamer: author and dynamic effects are not exported.)

2020-12-14 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

   > On Monday, 14 Dec 2020 at 17:24, Uwe Brauer wrote:
   >> Sigh, this is so obvious that it did not occur to me. Thanks 

   > Sometimes the easiest solution is actually the last one
   > considered... happens to me constantly with org mode.

I just realised  that beamer allows 

\institute{\texttt{email:o...@mat.ucm.es}}

But this does not get translated when I add to the org file 

#+institute: : o...@mat.ucm.es

Any ideas?


smime.p7s
Description: S/MIME cryptographic signature


insert file, relative or absolute path when using

2020-12-14 Thread Uwe Brauer


Hi

I use tempo template and writing 



Re: export to beamer: author and dynamic effects are not exported.

2020-12-14 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Monday, 14 Dec 2020 at 14:08, Uwe Brauer wrote:
>> Documentation:
>> Non-nil means insert author name into the exported file.
>> This option can also be set with the OPTIONS keyword,
>> e.g. "author:nil".
>> 
>> But it is not clear how to set this 

> #+options: author:nil

Ok thanks
> The other thing that works is to simply have an empty author:

> #+author:

Sigh, this is so obvious that it did not occur to me. Thanks 


smime.p7s
Description: S/MIME cryptographic signature


Re: export to beamer: author and dynamic effects are not exported.

2020-12-14 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Monday, 14 Dec 2020 at 10:19, Uwe Brauer wrote:
>> Consider please the following example 

> [...]

>> It should be exported as
>> 
>> \author{Uwe Brauer}

> It does for me.

Ok I had set 
org-export-with-author to nil
now I set it to t and the export works, 

*however* set to t it *always* exports, setting to nil it *never*
 exports.

I would like that it only exports if the field 
#+AUTHOR is present.

This seems to be impossible the documentation states

Documentation:
Non-nil means insert author name into the exported file.
This option can also be set with the OPTIONS keyword,
e.g. "author:nil".

But it is not clear how to set this 

I tried 
#+TITLE: This title
#+AUTHOR:
:PROPERTIES:
:AUTHOR:nil
:END:

But this did not work as expected.

>> and the dynamic effect as 

> Use BEAMER_act instead of BEAMER_opt and specify the property as [<+->],
> i.e. with square brackets.

Thanks, this was helpful


smime.p7s
Description: S/MIME cryptographic signature


export to beamer: author and dynamic effects are not exported.

2020-12-14 Thread Uwe Brauer


Hi 

Consider please the following example 

#+TITLE: This title
#+AUTHOR: Uwe Brauer

* This is an example
:PROPERTIES:
:BEAMER_opt: <+->
:END:

Now

1. This

2. That 

It should be exported as

\author{Uwe Brauer}
and the dynamic effect as 

\begin{frame}[<+->][label={sec:orge797871}]{This is an example}

But it is not, instead 

\begin{frame}[label={sec:orgb41a8d4},<+->]{This is an example}

Which does not compile correctly

Moreover the author is ignored (there is pdfauthor however which
does not get compiled) and 



I attach the org file the resulting tex file and the corrected tex file

Regards

Uwe Brauer 


% Created 2020-12-14 lun 10:15
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage[numbered,framed]{matlab-prettifier}
\usetheme{default}
\date{\today}
\title{This title}
\hypersetup{
 pdfauthor={Uwe Brauer},
 pdftitle={This title},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.0.50 (Org mode 9.3.7)}, 
 pdflang={English}}
\begin{document}

\maketitle

\begin{frame}[label={sec:orgb41a8d4},<+->]{This is an example}
Now

\begin{enumerate}
\item This

\item That
\end{enumerate}
\end{frame}
\end{document}#+TITLE: This title
#+AUTHOR: Uwe Brauer

* This is an example
:PROPERTIES:
:BEAMER_opt: <+->
:END:

Now

1. This

2. That 
% Created 2020-12-14 lun 10:13
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage[numbered,framed]{matlab-prettifier}
\usetheme{default}
\date{\today}
\title{This title}
\author{Uwe Brauer }
\hypersetup{
 pdfauthor={Uwe Brauer},
 pdftitle={This title},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.0.50 (Org mode 9.3.7)}, 
 pdflang={English}}
\begin{document}

\maketitle

\begin{frame}[<+->][label={sec:orge797871}]{This is an example}
Now

\begin{enumerate}
\item This

\item That
\end{enumerate}
\end{frame}
\end{document}

Re: from dired to an org file with list of files with links

2020-12-11 Thread Uwe Brauer

> Dear Uwe,
> * Uwe Brauer  [2020-12-10 22:45]:

> (require 'dired-x)

> (defun dired-to-org-links ()
>   "Generates Org links for Dired files and stores in memory. Yank
> it in other buffer"
>   (interactive)
>   (let* ((files (dired-get-marked-files)))
> (when files
>   (kill-new
>(with-temp-buffer
>(dolist (file files)
>  (let* ((base (file-name-nondirectory file))
> (link (format "[[file:%s][%s]]\n" file base)))
>(insert link)))
>(buffer-string))

Thanks, that is very nice. 
I played a bit around with org-fstree, that is also useful.


smime.p7s
Description: S/MIME cryptographic signature


[one pkf found] (was: from dired to an org file with list of files with links)

2020-12-10 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

> Hi 

> Suppose via dired I see

>   -rw-rw-r--   1 oub oub 1003 dic 10 18:17 auto-org-md-autoloads.el
>   -rw-rw-r--   1 oub oub 2,0K dic 10 18:17 auto-org-md.el
>   -rw-rw-r--   1 oub oub 2,3K dic 10 18:17 auto-org-md.elc
>   -rw-rw-r--   1 oub oub  486 dic 10 18:17 auto-org-md-pkg.el

> I'd like to create a org file
> with lists these files and there links to it

> Like this


> [[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md-autoloads.el][outo-org-md-autoloads.el]]
> [[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.el][outo-org-md.el]]
> [[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.el][outo-org-md.el]]
> [[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.elc][outo-org-md.elc]]
> [[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md-pkg.elc][outo-org-md-pkg.elc]]

> Anybody know whether such a functionality/package exist?
It seems that 
https://github.com/JayDugger/.emacs.d/blob/master/el-get/org-fstree/org-fstree.el

Does what I want. That pkg is 8 years old maybe there is a more recent
pkg with a similar feature?

Regards

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


from dired to an org file with list of files with links

2020-12-10 Thread Uwe Brauer


Hi 

Suppose via dired I see

  -rw-rw-r--   1 oub oub 1003 dic 10 18:17 auto-org-md-autoloads.el
  -rw-rw-r--   1 oub oub 2,0K dic 10 18:17 auto-org-md.el
  -rw-rw-r--   1 oub oub 2,3K dic 10 18:17 auto-org-md.elc
  -rw-rw-r--   1 oub oub  486 dic 10 18:17 auto-org-md-pkg.el

I'd like to create a org file
with lists these files and there links to it

Like this


[[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md-autoloads.el][outo-org-md-autoloads.el]]
[[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.el][outo-org-md.el]]
[[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.el][outo-org-md.el]]
[[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md.elc][outo-org-md.elc]]
[[file:.emacs.d/elpa/auto-org-md-20180213.2343/auto-org-md-pkg.elc][outo-org-md-pkg.elc]]

Anybody know whether such a functionality/package exist?

Thanks 

Uwe Brauer 




columnview: could «id» be a list of values?

2020-11-25 Thread Uwe Brauer


Hi

I have the following structure in a document. I will include the
document at the end of the message for better readability.

The structure is as follows

* Sheet 1
** G1/S1/E1 (id G1-S1-E1)
** G2/S1/E2 (id G2-S1-E2)
** Table generated via coumnview containing the tree

* Sheet 2
** G1/S2/E1 (id G1-S2-E1)
** G2/S2/E2 (id G2-S2-E1)
** Table generated via coumnview containing the tree

But I would also have tables which are generated by a reordering of the
file such as

* Group1
** G1/S1/E1
** G1/S2/E1
** Table generated via coumnview containing the tree

* Group 2
** G2/S1/E2
** G2/S2/E2
** Table generated via coumnview containing the tree

Now it is a hassle to reorder the file in this way. 
Each subheader has a different id

So the best would be if I could do the following 

#+BEGIN: columnview  :hlines 1 :indent nil :format 
"%50id[G1-S1-E1,G1-S2-E2](Sheet) %7Status(Status){X/}"
| Sheet| Status |
|--+|
| Sheet1   | [2/2]  |
| G1-S1-E1 | [X]|
| G2-S1-E2 | [X]|
|  ||
#+END

But this seems not to be possible.

Does anybody has an idea how to achieve my goal, producing tables via
columnview form sub-header that posses a distinct id?

Thanks and regards

Uwe Brauer

File:

* Sheet 1
   :PROPERTIES:
   :COLUMNS:  %10Sheet(Sheet Nr) %10Ub(Exercise Nr)  %7STATUS(Status){X/} 
   :ID:   Sheet1
   :END:
** G1/S1/E1
   :PROPERTIES:
   :ID: G1-S1-E1
   :STATUS:   [X]
   :END:

** G2/S1/E2
   :PROPERTIES:
   :Id: G2-S1-E2
   :STATUS:   [X]
   :END:

** DONE

#+BEGIN: columnview  :hlines 1 :indent nil :format "%50id(Sheet) 
%7Status(Status){X/}"
| Sheet| Status |
|--+|
| Sheet1   | [2/2]  |
| G1-S1-E1 | [X]|
| G2-S1-E2 | [X]|
|  ||
#+END
* Sheet 2
   :PROPERTIES:
   :COLUMNS:  %10Sheet(Sheet Nr) %10Ub(Exercise Nr)  %7STATUS(Status){X/} 
   :ID:   Sheet2
   :END:
** G1/S2/E1
   :PROPERTIES:
   :ID: G1-S2-E1
   :STATUS:   [X]
   :END:

** G2/S2/E2
   :PROPERTIES:
   :Id: G2-S2-E2
   :STATUS:   [X]
   :END:

** DONE

#+BEGIN: columnview  :hlines 1 :indent nil :format "%50id(Sheet) 
%7Status(Status){X/}"
| Sheet| Status |
|--+|
| Sheet2   | [2/2]  |
| G1-S2-E1 | [X]|
| G2-S2-E2 | [X]|
|  ||
#+END



* Group 1
   :PROPERTIES:
   :COLUMNS:  %10Group(Sheet Nr) %10Ub(Exercise Nr)  %7STATUS(Status){X/} 
   :ID:   Group1
   :END:
** G1/S1/E1
   :PROPERTIES:
   :ID: G1-S1-E1
   :STATUS:   [X]
   :END:
** G1/S2/E1
   :PROPERTIES:
   :ID: G1-S2-E1
   :STATUS:   [X]
   :END:
** DONE

#+BEGIN: columnview  :hlines 1 :indent nil :format "%50id(Group) 
%7Status(Status){X/}"
| Group| Status |
|--+|
| Group1   | [2/2]  |
| G1-S1-E1 | [X]|
| G1-S2-E1 | [X]|
|  ||
#+END
* Group 2
   :PROPERTIES:
   :COLUMNS:  %10Group(Sheet Nr) %10Ub(Exercise Nr)  %7STATUS(Status){X/} 
   :ID:   Group2
   :END:

** G2/S1/E2
   :PROPERTIES:
   :Id: G2-S1-E2
   :STATUS:   [X]
   :END:
** G2/S2/E2
   :PROPERTIES:
   :Id: G2-S2-E2
   :STATUS:   [X]
   :END:
** DONE

#+BEGIN: columnview  :hlines 1 :indent nil :format "%50id(Group) 
%7Status(Status){X/}"
| Group| Status |
|--+|
| Group2   | [2/2]  |
| G2-S1-E2 | [X]|
| G2-S2-E2 | [X]|
|  ||
#+END




Re: export and import github issues

2020-11-16 Thread Uwe Brauer
>>> "TC" == Toon Claes  writes:

> On Mon, Nov 16 2020, Uwe Brauer wrote:
>> Hi
>> 
>> Lately I have deal  a lot in github issues, so I thought it would be
>> nice to use org for this however the only package I could find seems
>> org-sync which is from 2012 but does not allow me to connect.
>> 
>> Anybody knows about a working package?

> It's not for GitHub, but for GitLab, I've written org-gitlab [1] to fill
> me own needs. It's build to fit my workflow, but it might help you to
> build something for GitHub that works for you.

> At the moment it only does one-way syncing (from GitLab to org).

Thanks I will have a look


smime.p7s
Description: S/MIME cryptographic signature


Re: Changed list indentation behavior: how to revert?

2020-11-16 Thread Uwe Brauer

> PS: I started to donate to org-mode a few weeks ago when I realized just
> how central it is to my workflows. If it’s the same for you, please
> join up: https://liberapay.com/bzg
> Creating reliable funding for development of essential Free Software
> tools is one of the critical tasks for spreading Free Software.

Done. You are right!


smime.p7s
Description: S/MIME cryptographic signature


export and import github issues

2020-11-16 Thread Uwe Brauer


Hi

Lately I have deal  a lot in github issues, so I thought it would be
nice to use org for this however the only package I could find seems
org-sync which is from 2012 but does not allow me to connect.

Anybody knows about a working package?

Regards

Uwe Brauer 




Re: export +A+ to latex, xout and not sout

2020-11-08 Thread Uwe Brauer
>>> "T" == TEC   writes:


Hi Timothy
> Hi Uwe,

> Uwe Brauer  writes:

>> I'd rather prefer to have \xout{A} instead of \sout{A}
>> How can I achieve that?

> How about this:
> (setcdr (assoc 'strike-through org-latex-text-markup-alist)
>"\\xout{%s}")

A pure lisp solution, I see, I thought one could add something in the
export options, but never mind.

> Hope that helps,

It does so very much, thanks.


smime.p7s
Description: S/MIME cryptographic signature


export +A+ to latex, xout and not sout

2020-11-08 Thread Uwe Brauer



Hi

When I export an org file that contains constructs such as +A+ to a
Latex files, it gets converted to \sout{A}.

I'd rather prefer to have \xout{A} instead of \sout{A}

How can I achieve that?

Thanks and regards

Uwe Brauer 




Re: export to babel, sometimes a block environment is inserted.

2020-10-17 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Friday, 16 Oct 2020 at 18:06, Uwe Brauer wrote:
>> I think I have to learn more about that.

> A good starting point to learn what is possible in org for beamer export
> is to turn on beamer mode:

> #+startup: beamer

> This provides, in particular, one key binding (C-c C-b) which allows you
> to change the interpretation of a subheading.  It pops up a menu of
> options.

Thanks! Org mode still surprises me. 


smime.p7s
Description: S/MIME cryptographic signature


database approach: extract from headers with properties different tables.

2020-10-16 Thread Uwe Brauer


Hi 

I have the following example

* Group1
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) 
%17Date(Date) %7STATUS(Status){X/} 
   :ID:   Issues
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:1
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H1
   :EJ:   E1
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:2
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H2
   :EJ:   E1
   :END:


That resuls in 

#+TBLNAME: grupo1
#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format 
"%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date 
%7Status(Status){X/}"
| Group  | Sheet | Exercise | TODO | Course | Date | Status |
|+---+--+--++--+|
| Group1 |   |  |  ||  | [2/2]  |
|| H1| E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|| H2| E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
#+END

* Group2
   :PROPERTIES:
   :COLUMNS:  %10Is(Sheet Nr) %10Ej(Exercise Nr) %7TODO(Status) %26TAGS(Which) 
%17Date(Date) %7STATUS(Status){X/} 
   :ID:   Issues
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   Issue:1
   :Date: <2020-07-26 Sun>
   :STATUS:   [X]
   :IS:   H1
   :EJ:   E2
   :END:

** WAIT:Annu2021:
   :PROPERTIES:
   :ID:   18c81241-5ccc-4e88-8f9e-ebe24ffbdf36
   :Date: <2020-08-05 Wed>
   :Status:   [X]
   :IS:   H2
   :EJ:   E2
   :END:

Results in 



#+BEGIN: columnview :hlines 1 :indent nil :match "/-DONE"  :format 
"%50ITEM(Group) %5Is(Sheet) %5Ej(Exercise) %12TODO %8TAGS(Course) %12Date 
%7Status(Status){X/}"
#+TBLNAME: grupo2
| Group  | Sheet | Exercise | TODO | Course | Date | Status |
|+---+--+--++--+|
| Group2 |   |  |  ||  | [2/2]  |
|| H1| E2   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|| H2| E2   | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]|
#+END



Question: can I somehow extract a table only for sheet1 which contains
both groups?

Like 


| Sheet | Group  | Exercise | TODO | Course | Date | Status |
|---++--+--++--+|
| H1||  |  ||  ||
|   | Group1 | E1   | WAIT | :Annu2021: | <2020-07-26 Sun> | [X]|
|   | Group2 | E2   | WAIT | :Annu2021: | <2020-08-05 Wed> | [X]|





Re: export to babel, sometimes a block environment is inserted.

2020-10-16 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Thursday, 15 Oct 2020 at 19:44, Uwe Brauer wrote:
>> How can I avoid this annoying block environment?

> I know you have sort of solved this (by promoting the headline to a
> higher level) but the question I would have asked is: what did you want
> the export engine to do with a subheading?

Well because this is how I would have written it starting directly in Latex.
Subsections help me to organize the documents, so I thought subheadings
would be converted to subsections, without interfering with blocks. So I
have learned something I did not know before.


> In beamer, org assumes that a subheading starts some kind of block and
> the default is just a basic block. 

Ok I did not know that. I have to admit I use org mode, either because
of its excellent table editor, or if I want to export text+some code to LaTeX


> You can change this to other types or have org ignore the actual
> headline. I use the latter to provide some structure to the org file
> without affecting the output.

I think I have to learn more about that.


smime.p7s
Description: S/MIME cryptographic signature


from headers to tables, wrap long lines automatically

2020-10-16 Thread Uwe Brauer


Hi

Please look at this the resulting table has a very long entry. How could
I force a line break? Of course I can go to the table and wrap the line,
but this is not what I want.

Thanks 

Uwe Brauer 

#+begin_src 
*   University Göttingen
   :PROPERTIES:
   :COLUMNS:  %10IP(IP) %10TIT(Title) %17Date(Date) 
   :ID:   Issues
   :END:

** Grant 123456
   :PROPERTIES:
   :IP:   Bernhard Riemann
   :TIT:  The final and most convincing proof the the Riemann Hypothesis by 
very very elementary methods. 
   :DATE: January 1859-Today
   :END:


#+TBLNAME: ucm
#+BEGIN: columnview :hlines 1 :indent nil :format "%50ITEM(Project) %5IP(IP) 
%12Date %5TIT(Titule)"
| Project  | IP   | Date   | Titule 

 |
|--+--++-|
| University Göttingen |  ||

 |
| Grant 123456 | Bernhard Riemann | January 1859-Today | The final and 
most convincing proof the the Riemann Hypothesis by very very elementary 
methods. |
#+END
#+end_src






Re: export to babel, sometimes a block environment is inserted.

2020-10-15 Thread Uwe Brauer
>>> "CB" == Colin Baxter  writes:

>>>>>> Uwe Brauer  writes:
>> Hello I have a org file that I want to export either to

>> 1. Regular latex or

>> 2. To beamer.


>> So I just use the corresponding export engines.

>> However the following minimal example puzzles me:

>> #+begin_src

>> # -*- org-confirm-babel-evaluate: nil -*- #+LATEX_HEADER_EXTRA:
>> \usepackage{booktabs}

>> * The algorithm applied to the Lane-Emden equation :PROPERTIES:
>> :BEAMER_env: frame :BEAMER_opt: allowframebreaks :END:

>> ** The original Lane-Emden equation

>> #+begin_src latex :results latex replace :exports results :eval t
>> \begin{equation*} \begin{cases} y''(x)+\frac{2}{x}y'(x)+y^{n}
>> &=0\\ y(0) &= 1\\ y'(0) &=0 \end{cases} \end{equation*} where
>> $n\in[0,5]$ is the polytropic index.  #+end_src


>> #+end_src


>> Because it exports to

>> #+begin_src \begin{frame}[allowframebreaks]{The SLM algorithm
>> applied to the Lane-Emden equation} \begin{block}{The original
>> Lane-Emden equation} \begin{equation*}
>> y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\ y(0) &= 1\\ y'(0) &=0
>> \end{equation*} where $n\in[0,5]$ is the polytropic index.
>> \end{block} \end{frame}

>> #+end_src

>> How can I avoid this annoying block environment?

>> Regards

>> Uwe Brauer


> Try \[ in place of \begin{equation*}; \] in place of \end{equation*}

Thanks I also found out that the 
* The ... algorithm applied to the Lane-Emden equation
:PROPERTIES:
:BEAMER_env: frame
:BEAMER_opt: allowframebreaks
:END:

* The original Lane-Emden equation

 #+begin_src latex :results latex replace :exports results :eval t
\begin{equation*}
  \begin{cases}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
  \end{cases}
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
 #+end_src


Works fine, that is changing ** to *



smime.p7s
Description: S/MIME cryptographic signature


export to babel, sometimes a block environment is inserted.

2020-10-15 Thread Uwe Brauer
Hello

I have a org file that I want to export either to 

1. Regular latex or

2. To beamer. 


So I just use the corresponding export engines.

However the following minimal example puzzles me:

#+begin_src 

# -*- org-confirm-babel-evaluate: nil -*-
#+LATEX_HEADER_EXTRA:  \usepackage{booktabs}

* The  algorithm applied to the Lane-Emden equation
:PROPERTIES:
:BEAMER_env: frame
:BEAMER_opt: allowframebreaks
:END:

** The original Lane-Emden equation

#+begin_src latex :results latex replace :exports results :eval t
\begin{equation*}
  \begin{cases}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
  \end{cases}
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
#+end_src

#+end_src


Because it exports to 

#+begin_src 
\begin{frame}[allowframebreaks]{The SLM algorithm applied to the Lane-Emden 
equation}
\begin{block}{The original Lane-Emden equation}
\begin{equation*}
y''(x)+\frac{2}{x}y'(x)+y^{n} &=0\\
y(0) &= 1\\
y'(0) &=0
\end{equation*}
where $n\in[0,5]$ is the polytropic index.
\end{block}
\end{frame}

#+end_src

How can I avoid this annoying block environment?

Regards

Uwe Brauer 




Re: [matlab src is always exported to latex!!]

2020-10-13 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Tuesday, 13 Oct 2020 at 14:56, Uwe Brauer wrote:
>>>>> "DZ" == Diego Zamboni  writes:
>>> #+begin_src octave :exports results :results output raw
>> 
>> That's it. That solves it, thanks so my function is not necessary. Good
>> to know

> The problem with =raw= is that you may find you have to manually delete
> the previous results if you change and re-execute the src block.  Use
> =latex= instead.

Ok, thanks


smime.p7s
Description: S/MIME cryptographic signature


Re: [matlab src is always exported to latex!!]

2020-10-13 Thread Uwe Brauer
>>> "DZ" == Diego Zamboni  writes:

Hi Diego


> Uwe,
> In my testing (using octave since I don't have matlab, but I hope it's
> similar), using = :exports none :results output raw= seems to produce the
> desired output:

> #+begin_src octave :exports results :results output raw

That's it. That solves it, thanks so my function is not necessary. Good
to know


smime.p7s
Description: S/MIME cryptographic signature


Re: [matlab src is always exported to latex!!]

2020-10-13 Thread Uwe Brauer
>>> "AB" == Arne Babenhauserheide  writes:

> Uwe Brauer  writes:

>> That did not work: I tried
>> #+begin_src matlab  :results output 
>> 
>> But when I exported the org file to latex, the matlab code was also
>> exported. Strange 

> Do you use :exports results?

> :results output switches to show what is printed to stdout

See my answer to Eric

It does not do want I want
#+begin_src matlab :exports results
close all
N = 3; % number of chebyshev nodes
n = 1; % polytropic index
iters = 1; % iterations
j=[0 1 2 3];
z=cos((pi*j)/3);
y=1-(0.5*(z+1)).^2;
a=n*(8);
a2=eye(3+1)*a;
disp('\begin{align*}')
disp('A_{1,k-1}&=')
disp('\begin{pmatrix}')
fprintf('%g &%g &%g &%g\n',a2')
disp('\end{pmatrix}=OK\\')
disp('\end{align*}')
#+end_src

Leads to 

\begin{verbatim}
\begin{align*}
A_{1,k-1}&=
\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\
0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=OK\\
\end{align*}
\end{verbatim}

So at the moment the only solution I can think of is to use the code I
posted 

(defun my-latex-filter-src-blocks (text backend info)
  "Remove source blocks from latex export."
  (when (org-export-derived-backend-p backend 'latex)
"%% [removed source block]\n"))

(add-to-list 'org-export-filter-src-block-functions
 'my-latex-filter-src-blocks)


smime.p7s
Description: S/MIME cryptographic signature


Re: [matlab src is always exported to latex!!]

2020-10-13 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Tuesday, 13 Oct 2020 at 09:26, Uwe Brauer wrote:
>> That did not work: I tried
>> #+begin_src matlab  :results output 
>> But when I exported the org file to latex, the matlab code was also
>> exported. Strange 

> If you want the output only, you also need to add ":exports results".
Hm not really

#+begin_src matlab :exports results
close all
N = 3; % number of chebyshev nodes
n = 1; % polytropic index
iters = 1; % iterations
j=[0 1 2 3];
z=cos((pi*j)/3);
y=1-(0.5*(z+1)).^2;
a=n*(8);
a2=eye(3+1)*a;
disp('\begin{align*}')
disp('A_{1,k-1}&=')
disp('\begin{pmatrix}')
fprintf('%g &%g &%g &%g\n',a2')
disp('\end{pmatrix}=OK\\')
disp('\end{align*}')
#+end_src
when I export this to latex I obtain 

\begin{verbatim}
\begin{align*}
A_{1,k-1}&=
\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\
0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=OK\\
\end{align*}
\end{verbatim}

Which is not what I want. I don't want a verbatim environment


smime.p7s
Description: S/MIME cryptographic signature


[solution of sorts] (was: [matlab src is always exported to latex!!])

2020-10-13 Thread Uwe Brauer




> That did not work: I tried
> #+begin_src matlab  :results output 

> But when I exported the org file to latex, the matlab code was also
> exported. Strange 

The only solution I am aware is to have something like this 



(defun my-latex-filter-src-blocks (text backend info)
  "Remove source blocks from latex export."
  (when (org-export-derived-backend-p backend 'latex)
"%% [removed source block]\n"))

(defun my-html-filter-src-blocks (text backend info)
  "Remove source blocks from latex export."
  (when (org-export-derived-backend-p backend 'html)
"%% [removed source block]\n"))

(add-to-list 'org-export-filter-src-block-functions
 'my-latex-filter-src-blocks)

(add-to-list 'org-export-filter-src-block-functions
 'my-html-filter-src-blocks)




smime.p7s
Description: S/MIME cryptographic signature


[matlab src is always exported to latex!!] (was: org mode with babel source: execute all source blocks, don't export them to latex)

2020-10-13 Thread Uwe Brauer

Hi Diego

Thanks for the quick answer
> Hi Uwe,
> 1. Is there any equivalent to org-update-all-dblocks for the source

> I think you want org-babel-execute-buffer:

Right, thanks!!!


> Documentation
> Call org-babel-execute-src-block on every source block in

> the current buffer.

>  2. I want to export the org file to latex, in the current setting

> Normally, =:results output= should be enough, but there might be some
> peculiarities with matlab blocks that change this behavior.


That did not work: I tried
#+begin_src matlab  :results output 

But when I exported the org file to latex, the matlab code was also
exported. Strange 

Anybody has an idea?


smime.p7s
Description: S/MIME cryptographic signature


org mode with babel source: execute all source blocks, don't export them to latex

2020-10-13 Thread Uwe Brauer



Hi 

I have a org file with has a lot source blocks of the form 

#+begin_src matlab  :results output raw :exports code  :eval never-export
close all
N = 3; % number of chebyshev nodes
n = 1; % polytropic index
iters = 1; % iterations
j=[0 1 2 3];
z=cos((pi*j)/3);
y=1-(0.5*(z+1)).^2;
a=n*(8);
a2=eye(3+1)*a;
disp('\begin{align*}')
disp('A_{1,k-1}&=')
disp('\begin{pmatrix}')
fprintf('%g &%g &%g &%g\n',a2')
disp('\end{pmatrix}=OK\\')
disp('\end{align*}')
#+end_src

#+RESULTS:
\begin{align*}
A_{1,k-1}&=
\begin{pmatrix}
8 &0 &0 &0\\
0 &8 &0 &0\\
0 &0 &8 &0\\
0 &0 &0 &8\\
\end{pmatrix}=OK\\
\end{align*}

Two questions. 

1. Is there any equivalent to org-update-all-dblocks for the source blocks?

2. I want to export the org file to latex, in the current setting
   the source blocks are also exported. I tried
   #+begin_src matlab  :results output raw   :eval never-export
   but it did not help. 

Thanks 

Uwe Brauer 




Re: org-->latex add local variables after \end{document}

2020-10-06 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Monday,  5 Oct 2020 at 10:11, Uwe Brauer wrote:
>> Right this is correct and this is what I tried, however I hoped for a
>> more, hm, elegant solution. But on the other hand, what the heck...

> This is pretty much my view: elegance is a bonus but anything that works
> is enough!  But if somebody does know an elegant solution, please chime
> in. :-)

On problem of this approach is now: if I open this org file emacs uses
LaTeX mode not org mode :-(


smime.p7s
Description: S/MIME cryptographic signature


Re: org-->latex add local variables after \end{document}

2020-10-05 Thread Uwe Brauer
>>> "ESF" == Eric S Fraga  writes:

> On Monday,  5 Oct 2020 at 09:27, Uwe Brauer wrote:
>> I have a org file that I want to export to latex but would like to add 

> [...]

>> It is added before \end{document}
>> 
>> Any idea how to do that?

> You could always add the '\end{document}' line as the first line of your
> LaTeX src block?  Untested but LaTeX should stop processing anything
> after it encounters that line.  It shouldn't matter that you have
> another such line inserted by org after.

Right this is correct and this is what I tried, however I hoped for a
more, hm, elegant solution. But on the other hand, what the heck...


smime.p7s
Description: S/MIME cryptographic signature


org-->latex add local variables after \end{document}

2020-10-05 Thread Uwe Brauer



Hi

I have a org file that I want to export to latex but would like to add 

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-output-dir: "/home/oub/ALLES/HGs/TFG-2020/build"
%%% End:


*after* \end{document}

If I do 
#+begin_src latex :results latex replace :exports results :eval t
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-output-dir: "/home/oub/ALLES/HGs/TFG-2020/build"
%%% End:
#+end_src

It is added before \end{document}

Any idea how to do that?

Thanks




Re: opening a 0.5 MB org file is slow

2020-10-01 Thread Uwe Brauer
>>> "JJ" == Jeremie Juste  writes:

> Hello Uwe,
> Very well, it seems that we are on the right track. So you might gain
> some speed by preventing some minor modes to load at the beginning and
> load only when you need them.

> Like Ihor Radchenko mentioned in his previous a great way to diagnose
> the issu would be the following:

> 1. M-x profiler-start cpu
> 2. open your file
> 3. M-x profiler-report 

> It will let you see which functions are slowing you down.

Thanks! I did it. But I am a bit puzzled about the outcome:

+ redisplay_internal (C function)1724  82%
+ command-execute 215  10%
+ ... 117   5%
+ timer-event-handler  22   1%
  global-orglink-mode-check-buffers 1   0%

Not sure what to do with stuff on the C level.

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: opening a 0.5 MB org file is slow

2020-09-30 Thread Uwe Brauer
>>> "T" == TEC   writes:

> Samuel Wales  writes:

>> a long time ago i discovered that drawers were the bottleneck. i
>> removed a lot of them and got much faster loading speeds.  idk if
>> that
>> is still true.

> There's a thread about improving this, see:
> https://orgmode.org/list/87h7x9e5jo.fsf@localhost/

Thanks I tried it out. Did not really help :-(


smime.p7s
Description: S/MIME cryptographic signature


Re: opening a 0.5 MB org file is slow

2020-09-30 Thread Uwe Brauer
>>> "JJ" == Jeremie Juste  writes:

Hi Jeremie


> Hello Uwe,
> Can you test with emacs -Q ?


I did and then it is much much faster, so the question is which of my
dozens of org files slow it down.


smime.p7s
Description: S/MIME cryptographic signature


opening a 0.5 MB org file is slow

2020-09-29 Thread Uwe Brauer



Hi 

maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
0.5MB org file takes around 15 sec.

Any change to speed this up?

Thanks and regards

Uwe Brauer 




Re: strange bug after a fresh install

2020-09-17 Thread Uwe Brauer
>>> "NS" == Nicholas Savage  writes:

> Are you using ob-ipython? Your trace makes it seem like that might be
> loaded maybe in your init files. This issue seems to cover the problem
> you are having, since it says that it's modifying `org-mode-hook'.

> https://github.com/gregsexton/ob-ipython/issues/161

Thanks for the link


> Maybe since you have a clean install you're missing jupyter while you
> weren't before?

Right, I will check


smime.p7s
Description: S/MIME cryptographic signature


Re: strange bug after a fresh install

2020-09-17 Thread Uwe Brauer
>>> "JJ" == Jeremie Juste  writes:

> Hello Uwe,

> if seems that the problem lies with ob-ipython.
> I would suggest to remove ob-ipython to check and then perform a fresh
> install of ob-ipython.

thanks


smime.p7s
Description: S/MIME cryptographic signature


strange bug after a fresh install

2020-09-16 Thread Uwe Brauer
Hi

I freshly installed Ubuntu 20.04 and used the pre compiled Emacs 26, I
copies also all my init files.

When I open an org file I obtain an error message I don't understand and
attach any help is appreciated

Regards

Uwe Brauer 

Debugger entered--Lisp error: (json-readtable-error 47)
  signal(json-readtable-error (47))
  json-read()
  json-read-from-string("/home/oub/.login: No such file or directory.\njupyter: 
Command not found.\n")
  ob-ipython--get-kernels()
  ob-ipython-auto-configure-kernels()
  run-hooks(change-major-mode-after-body-hook text-mode-hook outline-mode-hook 
org-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook 
outline-mode-hook org-mode-hook))
  run-mode-hooks(org-mode-hook)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(# 
"~/kde3-trinity/INSTALL-Trusty.org" nil nil "~/kde3-trinity/INSTALL-Trusty.org" 
(17304181 66309))
  find-file-noselect("/home/mjpons/kde3-trinity/INSTALL-Trusty.org" nil nil nil)
  #f(compiled-function (filename  wildcards) "Edit file 
FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if none 
already exists.\nInteractively, the default if you just type RET is the current 
directory,\nbut the visited file name is available through the minibuffer 
history:\ntype \\[next-history-element] to pull it into the minibuffer.\n\nThe 
first time \\[next-history-element] is used after Emacs prompts for\nthe file 
name, the result is affected by `file-name-at-point-functions',\nwhich by 
default try to guess the file name by looking at point in the\ncurrent buffer.  
Customize the value of `file-name-at-point-functions'\nor set it to nil, if you 
want only the visited file name and the\ncurrent directory to be available on 
first \\[next-history-element]\nrequest.\n\nYou can visit files on remote 
machines by specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the 
file name.  You can\nalso visit local files as a different user by 
specifying\n/sudo::FILE for the file name.\nSee the Info node `(tramp)File name 
Syntax' in the Tramp Info\nmanual, for more about this.\n\nInteractively, or if 
WILDCARDS is non-nil in a call from Lisp,\nexpand wildcards (if any) and visit 
multiple files.  You can\nsuppress wildcard expansion by setting 
`find-file-wildcards' to nil.\n\nTo visit a file without any kind of conversion 
and without\nautomatically choosing a major mode, use \\[find-file-literally]." 
(interactive #f(compiled-function () #)) #)("/home/mjpons/kde3-trinity/INSTALL-Trusty.org" nil)
  ad-Advice-find-file(#f(compiled-function (filename  wildcards) "Edit 
file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one if 
none already exists.\nInteractively, the default if you just type RET is the 
current directory,\nbut the visited file name is available through the 
minibuffer history:\ntype \\[next-history-element] to pull it into the 
minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs 
prompts for\nthe file name, the result is affected by 
`file-name-at-point-functions',\nwhich by default try to guess the file name by 
looking at point in the\ncurrent buffer.  Customize the value of 
`file-name-at-point-functions'\nor set it to nil, if you want only the visited 
file name and the\ncurrent directory to be available on first 
\\[next-history-element]\nrequest.\n\nYou can visit files on remote machines by 
specifying something\nlike /ssh:SOME_REMOTE_MACHINE:FILE for the file name.  
You can\nalso visit local files as a different user by specifying\n/sudo::FILE 
for the file name.\nSee the Info node `(tramp)File name Syntax' in the Tramp 
Info\nmanual, for more about this.\n\nInteractively, or if WILDCARDS is non-nil 
in a call from Lisp,\nexpand wildcards (if any) and visit multiple files.  You 
can\nsuppress wildcard expansion by setting `find-file-wildcards' to nil.\n\nTo 
visit a file without any kind of conversion and without\nautomatically choosing 
a major mode, use \\[find-file-literally]." (interactive #f(compiled-function 
() #)) #) 
"/home/mjpons/kde3-trinity/INSTALL-Trusty.org")
  apply(ad-Advice-find-file #f(compiled-function (filename  wildcards) 
"Edit file FILENAME.\nSwitch to a buffer visiting file FILENAME,\ncreating one 
if none already exists.\nInteractively, the default if you just type RET is the 
current directory,\nbut the visited file name is available through the 
minibuffer history:\ntype \\[next-history-element] to pull it into the 
minibuffer.\n\nThe first time \\[next-history-element] is used after Emacs 
prompts for\nthe file name, the result is affected by 
`file-name-at-point-functions',\nwhich by default try to guess the file name by 
looking at point in the\ncurrent buffer.  Customize the value of 
`file-name-at-point-functions'\nor set it to nil, if you want only the visited 
f

  1   2   3   4   5   6   7   8   >