Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Jens Lechtenboerger
On 2018-06-14, Óscar Fuentes wrote:

> While trying to create a demo file I noticed that decryption works fine
> as long as the content was relatively new, while it fails for content
> that was encrypted years ago.
>
> I tried setting epg-gpg-program to "gpg" (it is "gpg2" by default) for
> encrypting some tests but then decryption worked fine on those tests.

Probably you encrypted without integrity protection, which was
always a bad idea but in view of EFAIL attacks has recently gained
lots of attention as Bad Thing.  Nowadays GnuPG returns a failure,
you can override that if you know what you are doing.

See there: https://dev.gnupg.org/T3714

Best wishes
Jens



Re: [O] Painfully Slow Export

2018-06-13 Thread Ken Mankoff
On Wed, Jun 13, 2018 at 7:56 PM Berry, Charles  wrote:

> #+RESULTS:
> : # of src block names: 3
> :  Number of Seconds: 0.0498
>
>
> #+RESULTS:
> : # of src block names: 68
> :  Number of Seconds: 2.1021
>
> #+RESULTS:
> : # of src block names: 200
> :  Number of Seconds:15.4018
>
>
> #+RESULTS:
> : # of src block names: 266
> :  Number of Seconds:26.6689
>
> #+RESULTS:
> : # of src block names: 332
> :  Number of Seconds:41.2211
>
> So my mental count of 10 seconds for 200 blocks was a bit off.
>
> And the time is very nearly quadratic in the number of named src blocks:
>
>

One more thought - even if your system is significantly faster for some
unknown reason - why is export taking ~15 seconds for 200 blocks *when you
aren't exporting any of the code*.
 Why is <> expansion occurring if ":eval never-export" is set? There
seems to be something inefficient going on here.

   -k.


[O] How to use em-dash as a bullet for plain text lists?

2018-06-13 Thread Grant Rettke
Hi,

I want to use em-dash as a bullet for plain lists.

I read the documentation and didn't see a customization option.

I read org-list.el only enough to get a rough idea of how it
works. org-at-item-p, org-at-item-bullet-p, org-item-re seem important for
understanding the structure.

Before I go any further (studying or coding)

1. How would you go about this?
2. Is it worth me going further on figuring out how this works and how to
do it?

Sincerely,

Grant Rettke


[O] column in table fails to align for China's characters

2018-06-13 Thread Van L


Hello.

Mixing characters from differing languages causes the table column to fail to 
align.

See as follows.

| Term   | Pronunciation   | Definition 
  |
|+-+--|
| 偷听敌台! | tou1ting1di2tai2| bug implant 
 |
| 工农兵学员 | gong1-nong2-bing1 xue2yuan2 | tertiary education for rubes of low 
socio-economic background during Mao's affirmative action cultural revolution 
1966 - 76 |




Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Óscar Fuentes
Thibault Polge  writes:

>> What's an ECM?
>
> French for Exemple complet minimal = Minimal Working Example (MWE)[1]
>
> [1]: https://en.wikipedia.org/wiki/Minimal_Working_Example

Thanks.

While trying to create a demo file I noticed that decryption works fine
as long as the content was relatively new, while it fails for content
that was encrypted years ago.

I tried setting epg-gpg-program to "gpg" (it is "gpg2" by default) for
encrypting some tests but then decryption worked fine on those tests.

I need to look at org-decrypt-entry works and determine if the problem
is with that function or with epg.




[O] [SOLVED?] (was: how to compare strings of two columns for huge tables)

2018-06-13 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > I have tables (several hundred rows) like this


   > | 03217428 |  3217428 |   |
   > | 71310606 | 71310606 |   |
   > | 05944371 |  5944371 |   |
   > | 70086251 | 70086251 |   |
   > | 50325182 | 50325182 |   |
   > | 04559101 |  4559101 |   |
   > | 51005420 | 51005420 |   |
   > | 51141846 | 51141846 |   |
   > | 05448640 |  5448640 |   |
   > | 06602597 |  6602597 |   |

   > #+TBLFM: $3=if("$1" == "$2", string("OK"))

   > So I would like to add a new column, which would return OK, if the
   > strings of each row of the to columns coincide. I tried 

   > #+TBLFM: $3=if("$1" == "$2", string("OK"))

   > But it did not work. I googled and looked up the manual, no help.

   > It seems a common problem for spreadsheet so I presume there must be an
   > solution but I am unable to find it and would appreciate any help.

   > Thanks 

   > Uwe Brauer


The following seems to work 

|   03217428 |3217428 | NO |
|   71310606 |   71310606 | OK |
|   05944371 |5944371 | NO |
|   70086251 |   70086251 | OK |
|   50325182 |   50325182 | OK |
|   04559101 |4559101 | NO |
|   51005420 |   51005420 | OK |
|   51141846 |   51141846 | OK |
|   05448640 |5448640 | NO |
|   06602597 |6602597 | NO |
|  8 |  9 | NO |
| Hallo This | Hallo This | OK |
#+TBLFM: $3=if("$1" == "$2", OK, string("NO"))



smime.p7s
Description: S/MIME cryptographic signature


[O] how to compare strings of two columns for huge tables

2018-06-13 Thread Uwe Brauer



Hi

I have tables (several hundred rows) like this


| 03217428 |  3217428 |   |
| 71310606 | 71310606 |   |
| 05944371 |  5944371 |   |
| 70086251 | 70086251 |   |
| 50325182 | 50325182 |   |
| 04559101 |  4559101 |   |
| 51005420 | 51005420 |   |
| 51141846 | 51141846 |   |
| 05448640 |  5448640 |   |
| 06602597 |  6602597 |   |
#+TBLFM: $3=if("$1" == "$2", string("OK"))

So I would like to add a new column, which would return OK, if the
strings of each row of the to columns coincide. I tried 
#+TBLFM: $3=if("$1" == "$2", string("OK"))

But it did not work. I googled and looked up the manual, no help.

It seems a common problem for spreadsheet so I presume there must be an
solution but I am unable to find it and would appreciate any help.

Thanks 

Uwe Brauer




Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Thibault Polge
> What's an ECM?

French for Exemple complet minimal = Minimal Working Example (MWE)[1]

[1]: https://en.wikipedia.org/wiki/Minimal_Working_Example

--
Thibault



Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Óscar Fuentes
Nicolas Goaziou  writes:

> Hello,
>
> Óscar Fuentes  writes:
>
>> Today I noticed that org-crypt is broken on my daily driver.
>>
>> On a header with the :crypt: tag I invoke org-decrypt-entry, a popup
>> dialog asks for the password, I type the password and then the
>> minibuffer shows
>>
>> GPG error: "Decryption failed", ""
>>
>> The complete error message on *Messages* is
>>
>> epg--check-error-for-decrypt: GPG error: "Decryption failed", ""
>
> Could you provide an ECM?

What's an ECM?




Re: [O] ‘V’ ‘#+BEGIN_VERBATIM ... #+END_VERBATIM’ missing in manual(?)

2018-06-13 Thread Nicolas Goaziou
Hello,

alain.coch...@unistra.fr writes:

> In section "15.2 Easy templates" of the manual, I think that under
>
>Org comes with these pre-defined easy templates:
>
> the line related to VERBATIM is missing.

The "Easy templates" section does not exist anymore in new manual. Also,
there is no such thing as a "verbatim" environment.

IOW, it is already solved in master.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Nicolas Goaziou
Hello,

Óscar Fuentes  writes:

> Today I noticed that org-crypt is broken on my daily driver.
>
> On a header with the :crypt: tag I invoke org-decrypt-entry, a popup
> dialog asks for the password, I type the password and then the
> minibuffer shows
>
> GPG error: "Decryption failed", ""
>
> The complete error message on *Messages* is
>
> epg--check-error-for-decrypt: GPG error: "Decryption failed", ""

Could you provide an ECM?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Painfully Slow Export

2018-06-13 Thread Ken Mankoff
Hi Chuck,

Thanks for your continued help and interest in this issue.

Here are the results from the timing test using your code:

| # Blocks | w/o noweb | noweb | NESTED  noweb |
|--+---+---+---|
|3 |  0.05 |   |  0.33 |
|   13 | 0.155 |   1.9 |  3.76 |
|   23 |  0.27 |   6.8 | 16.95 |
|   33 |  0.40 |  16.8 | 37.96 |
|   43 |  0.62 |   | 81.92 |
|  143 |  4.06 |   |   |


On 2018-06-13 at 19:55 +02, Berry, Charles  wrote:
> This is on my late-2012 MacBook Pro. MacOS 10.13.5, Emacs 25.3.1, org
> 9.1.13. So this sounds almost exactly like your setup.

I'm on a 2014 MBP, 10.12.6, same Emacs and Org, and 16 GB RAM.

> Maybe time to try a minimal init file to see if something you have
> customized is bogging things down.

I've been doing this in "Emacs -Q" the whole time.

I'm not sure why this works on your system and not mine, but this is my first 
foray into noweb. I'll return to my old methods for now, or at least separate 
the code and text I'm about to begin writing into separate Org docs so that the 
text export is not impacted by this issue.

  -k.



Re: [O] Painfully Slow Export

2018-06-13 Thread Berry, Charles


> On Jun 12, 2018, at 10:32 PM, Ken Mankoff  wrote:
> 
> 
> 
> On Wed, Jun 13, 2018 at 12:12 AM Berry, Charles  wrote:
> > On Jun 12, 2018, at 2:30 PM, Ken Mankoff  wrote:
> > 
> > Based on the profiling, I think the reason it takes 1 minute is because the 
> > code blocks use <> blocks?
> 
> I do not see this.
> 
> It takes a bit longer to run the noweb example you gave with 200 `baz' src 
> blocks, but nothing crazy - like 10 seconds versus 5 for your other example. 
> I used `C-c C-e l L' for each.
> 
> And the profiler gives `org-babel-expand-noweb-references' about 2% of the 
> total.
> 
> You are using a recent version of org, right?
>  
> Yes: 9.1.13-elpa or org-20180604.
> Emacs-mac 26.1 port on OSX from Macports.
> Or Emacs 25.3 downloaded from https://emacsformacosx.com/builds
> 
> Are you sure you hd 200 baz blocks? I'm not actually able to test with that 
> many. 10 takes 1 second. 20 takes 10 seconds. 30 takes 30 seconds. It seems 
> to grow exponentially. I don't have the patience to debug how long 100 takes.

So here it is again - using your ECM. 

Use this block to record the timing and count the number of named src blocks:

#+begin_src emacs-lisp :eval never-export
  (let ((sb (length (org-babel-src-block-names)))
(st-time (time-to-seconds (get-internal-run-time
(org-latex-export-as-latex)
(format
 "# of src block names: %d\n Number of Seconds: %10.4f"
 sb  (-
  (time-to-seconds (get-internal-run-time))
  st-time)))
#+end_src

Now run it, add more src blocks after each run, and paste the results elsewhere 
(argh! I should have used `:results append'):

#+RESULTS:
: # of src block names: 3
:  Number of Seconds: 0.0498


#+RESULTS:
: # of src block names: 68
:  Number of Seconds: 2.1021

#+RESULTS:
: # of src block names: 200
:  Number of Seconds:15.4018


#+RESULTS:
: # of src block names: 266
:  Number of Seconds:26.6689

#+RESULTS:
: # of src block names: 332
:  Number of Seconds:41.2211


So my mental count of 10 seconds for 200 blocks was a bit off.

And the time is very nearly quadratic in the number of named src blocks:

#+begin_src R :results output

  x <- c(3, 68, 200, 266, 332)
  y <- c(0.0498, 2.10, 15.40, 26.67, 41.22)
  fit <- lm(y ~ x + I( x^2 ))
  summary(fit)

#+end_src

#+RESULTS:
#+begin_example

Call:
lm(formula = y ~ x + I(x^2))

Residuals:
   12345 
-0.02650  0.04187  0.01194 -0.05929  0.03197 

Coefficients:
 Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.783e-02  5.584e-02   1.036   0.4092
x   5.083e-03  8.755e-04   5.805   0.0284 *  
I(x^2)  3.578e-04  2.579e-06 138.762 5.19e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.05973 on 2 degrees of freedom
Multiple R-squared:  1, Adjusted R-squared:  1 
F-statistic: 1.67e+05 on 2 and 2 DF,  p-value: 5.986e-06

#+end_example

This is on my late-2012 MacBook Pro. MacOS 10.13.5, Emacs 25.3.1, org 9.1.13. 
So this sounds almost exactly like your setup.

Maybe time to try a minimal init file to see if something you have customized 
is bogging things down. 

HTH,

Chuck

[O] customizable org-attach commands?

2018-06-13 Thread Eric Abrahamsen
I'd like to provide a patch making the org-attach dispatcher
customizable. ie a new custom option `org-attach-commands' that maps
characters to functions, and then the dispatch function builds its menu
from that option. Would that be acceptable?

What I'm trying to do is add my own org-attach function that prompts for
a file and then attaches it to an outgoing Gnus message buffer.

Another org-attach thing I'd like to do is add a way to export a subtree
as a file into the subtree's attach directory, but I haven't come up
with a good way of doing that yet. One way would be to add an option to
the export dispatcher, which seems awkward. Another way would be to
allow a property like ":EXPORT_FILE_NAME: :ATTACH_DIR", and look for
that in `org-export-output-file-name'. But that will require a little
more thought.

Eric




[O] org-crypt broken on Ubuntu 18.04

2018-06-13 Thread Óscar Fuentes
Hello.

Today I noticed that org-crypt is broken on my daily driver.

On a header with the :crypt: tag I invoke org-decrypt-entry, a popup
dialog asks for the password, I type the password and then the
minibuffer shows

GPG error: "Decryption failed", ""

The complete error message on *Messages* is

epg--check-error-for-decrypt: GPG error: "Decryption failed", ""

This is a very recent problem. In dpkg.log I see:

2018-06-12 00:33:00 upgrade gnupg-utils:amd64 2.2.4-1ubuntu1 2.2.4-1ubuntu1.1

2018-06-12 00:33:05 upgrade gnupg:amd64 2.2.4-1ubuntu1 2.2.4-1ubuntu1.1

I tried the latest org-mode (9.1.13) and Emacs from master branch but
the problem persists.

$ gpg --version
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/oscar/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2




[O] ‘V’ ‘#+BEGIN_VERBATIM ... #+END_VERBATIM’ missing in manual(?)

2018-06-13 Thread Alain . Cochard


Hello.

In section "15.2 Easy templates" of the manual, I think that under

   Org comes with these pre-defined easy templates:

the line related to VERBATIM is missing.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France| Fax:   +33 (0)3 68 85 01 25 



Re: [O] [PATCH] Add new keyword :coding for #+include directive

2018-06-13 Thread Nicolas Goaziou
Hello,

pierre.techouey...@free.fr (Pierre Téchoueyres) writes:

> I've seen you didn't apply the part which added an entry in ORG-NEWS
> file. Was this deliberate or just an side effect of your refactoring ?
> Or is this unneeded ? 
> Again thanks for your patience.

I had to remove that change or your patch wouldn't apply. I forgot to
apply it back separately. This is now done. Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Adding single cell movement to org-table

2018-06-13 Thread Nicolas Goaziou
Hello,

Chris Kauffman  writes:

> Attached are the updated patches for single cell movement in org
> tables.

Thank you!

I squashed the various patches, fixed the docstrings and refactored
a bit some functions.

I also renamed `org-table-move-single-cell-*' into
`org-table-move-cell-*', which is shorter and, IMO, not ambiguous.

I pushed it in "next" branch, which will be merged with master once Org
9.2 is out.

BTW, what is current status wrt FSF papers now?

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] orgalist: increase vspace between points, leave orgalist (indent)

2018-06-13 Thread Uwe Brauer
>>> "Nicolas" == Nicolas Goaziou  writes:

   > Hello,
   > Uwe Brauer  writes:

   >> First of all thanks for orgalist, I use it frequently and enjoy quite a
   >> bit. There are two features I am missing (or don't know who to use
   >> them).
   >> 
   >> 1. How can I increase the vspace per default (say one blank line)
   >> between 2 points in a list? That is a variable which controls that
   >> behavior?

   > For now, it obeys to `org-blank-before-new-entry'. In Orgalist 1.8,
   > there is a new variable, `orgalist-separated-items', which basically
   > does the same.

1. I have set it now to t.

2. And that seems to make the difference

thanks 
   
   >> 2. Which key should I use to leave a list? Return just jumps
   >> ^  to position. But I am looking for a command which would jump.
   >> 
   >> 
   >> 
   >> ^ here. Of course I can use return return and then backward-kill-word.
   >> But is there any orgalist specific command which does this?

   > Use C-j, or RET, depending on electric indentation.

It seems that electric-indention mode is on in my messages buffers.

Turning it off solves my problem, but now I have an elementary question:
Why is the mode on? (I can't find anything in my init files) and how can
I make it sure that it is off in my message buffers?





Re: [O] Org mode in combination with emacs follow-mode is terrible

2018-06-13 Thread Joost Kremers



On Wed, Jun 13 2018, Eric S Fraga wrote:

On Wednesday, 13 Jun 2018 at 09:53, Gerald Wildgruber wrote:
Switching to text-mode, with 5 windows and follow-mode still 
being

active reduces lag significantly.

So there must be an issue specifically with the combination of 
org-mode

and follow-mode!


I don't think there's an issue per se in the sense of bugs.  Org 
does
much more processing of the text than does text mode so if you 
have 60k
worth of text to process each time you type something, it's 
probably not

surprising that there is a lag.


Actually, I would suspect it's more of a problem for follow-mode 
than org-mode, because follow-mode needs to keep the different 
windows in sync. For this, it adds a function to 
`post-command-hook', which means it's run after every key press.


It's not inconceivable that `follow-mode' does something that is 
extra time-consuming in an Org buffer. To find out what that might 
be, you could try the Elisp profiler that comes with Emacs. See 
the section "Profiling" in the Elisp manual for details.


Once you've found out which function(s) consume so much time, it 
might be possible to ask in here or on emacs-devel what exactly is 
causing the problem and whether there's a way around it.


--
Joost Kremers
Life has its moments



Re: [O] Org mode in combination with emacs follow-mode is terrible

2018-06-13 Thread Eric S Fraga
On Wednesday, 13 Jun 2018 at 09:53, Gerald Wildgruber wrote:
> Switching to text-mode, with 5 windows and follow-mode still being
> active reduces lag significantly.
>
> So there must be an issue specifically with the combination of org-mode
> and follow-mode!

I don't think there's an issue per se in the sense of bugs.  Org does
much more processing of the text than does text mode so if you have 60k
worth of text to process each time you type something, it's probably not
surprising that there is a lag.  60k is a lot of text and I assume there
are many headings etc.?  Part of the attraction of org mode is the
visual representation of the text and this unfortunately comes at a
cost.

I cannot remember what version of Emacs you are using.  If not the
latest, it might be worth trying v26.1 or even one of the latest
snapshots in case?


-- 
Eric S Fraga via Emacs 25.2.2, Org release_9.1.13-791-g842002


signature.asc
Description: PGP signature


Re: [O] Org mode in combination with emacs follow-mode is terrible

2018-06-13 Thread Gerald Wildgruber


Switching to text-mode, with 5 windows and follow-mode still being
active reduces lag significantly.

So there must be an issue specifically with the combination of org-mode
and follow-mode!

Gerald.

On Di, Jun 12 2018, Eric S Fraga  wrote:

> On Tuesday, 12 Jun 2018 at 12:23, Gerald Wildgruber wrote:
>> Hi Eric,
>>
>> thanks for the input: indeed, I always use at least five windows (on a
>> 40" display), as this setup displays simultanously almost 60Kb of text,
>> an entire papaer, which is excellent!
>
> That's a lot of text so maybe it's really not surprising maybe that
> there is a lag.  What happens if you edit the same file in text-mode?
>
>> Elsewise: do you see any reason or issue with both modes enabled that
>> could lead to such behavior: it would seem that emacs tries to
>> calculate something with every new keystroke, that involves all text
>> before point.
>
> Maybe font-lock and org-indent may impact on this?
>
> I also find that the presence of tables often slows org down although
> it's difficult to quantify the actual impact.


--
Dr. Gerald Wildgruber
Institut für Philosophie, Literatur-, Wissenschafts- und Technikgeschichte
Literaturwissenschaft mit Schwerpunkt Literatur und Wissenschaft
Technische Universität Berlin
Straße des 17. Juni 135
D-10623 Berlin
http://www.philosophie.tu-berlin.de/menue/home/
T. +49 (0)30 314 25924
F. +49 (0)30 314 23107
wildgru...@tu-berlin.de
-
Sent with mu4e



Re: [O] Org mode in combination with emacs follow-mode is terrible

2018-06-13 Thread Gerald Wildgruber


Thanks! actually every single one of the following does help a bit:

- reducing number of windows to 3
- switching to text-mode
- dectivating org-indent-mode, with org-mode still being active

There's still lag, but not as extreme as with my original setup.

Still, the most significant change occurs by deactivating follow-mode:
every lag simply disappears.

Gerald.

On Di, Jun 12 2018, Eric S Fraga  wrote:

> On Tuesday, 12 Jun 2018 at 12:23, Gerald Wildgruber wrote:
>> Hi Eric,
>>
>> thanks for the input: indeed, I always use at least five windows (on a
>> 40" display), as this setup displays simultanously almost 60Kb of text,
>> an entire papaer, which is excellent!
>
> That's a lot of text so maybe it's really not surprising maybe that
> there is a lag.  What happens if you edit the same file in text-mode?
>
>> Elsewise: do you see any reason or issue with both modes enabled that
>> could lead to such behavior: it would seem that emacs tries to
>> calculate something with every new keystroke, that involves all text
>> before point.
>
> Maybe font-lock and org-indent may impact on this?
>
> I also find that the presence of tables often slows org down although
> it's difficult to quantify the actual impact.


--
Dr. Gerald Wildgruber
Institut für Philosophie, Literatur-, Wissenschafts- und Technikgeschichte
Literaturwissenschaft mit Schwerpunkt Literatur und Wissenschaft
Technische Universität Berlin
Straße des 17. Juni 135
D-10623 Berlin
http://www.philosophie.tu-berlin.de/menue/home/
T. +49 (0)30 314 25924
F. +49 (0)30 314 23107
wildgru...@tu-berlin.de
-
Sent with mu4e