Re: [O] rounding when exporting

2018-06-25 Thread Nick Dokos
Uwe Brauer  writes:

> Hi 
>
> Is there way, that when I export and org file with a table, its content
> is rounded when exported to html/latex?
>

The exporters take the text to be exported from the buffer, so if the buffer 
contains
arbitrary precision, then I don't think so: you'd have to apply a filter of 
some sort.

It's easy enough however to set the format for calc, recalculate all the 
tables, export,
then reset the format and recalculate once more to get back to where you were. 
Note
that internally org calculates floating point numbers to 12 decimal places 
(roughly)
but displays only 8 of them (to keep the display a bit more compact). See

(info "(org) Formula Syntax for Calc")

for details. Here's an example to use fixed-point format with 3 decimals:

--8<---cut here---start->8---

* Set floating point format to fixed point with 3 decimals  
   :noexport:
#+begin_src emacs-lisp
(setq org-calc-default-modes '(calc-internal-prec 12 calc-float-format
(fix 3);;; the default here was (float 8)
calc-angle-mode deg calc-prefer-frac nil calc-symbolic-mode 
nil calc-date-format
( "-" MM "-" DD " " Www
  (" " hh ":" mm))
calc-display-working-message t))

#+end_src

* Table

|  x | log(x) |
|+|
|  1 |  0 |
|  2 |  0.693 |
|  3 |  1.099 |
|  4 |  1.386 |
|  5 |  1.609 |
|  6 |  1.792 |
|  7 |  1.946 |
|  8 |  2.079 |
|  9 |  2.197 |
| 10 |  2.303 |
#+TBLFM: $2 = log($1)
--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [O] TODO do not display in org-agenda mode

2018-06-25 Thread Tim Cross


'spacemacs" is just a pre-configured version of emacs. I personally
don't like spacemacs, but I have 'stolen' some of their configuration
for my own setup.

I find these pre-configured versions of emacs (spacemacs,
prelude, better-defaults, Purcell's emacs.d, emagicians, etc) to be good
references and a place for getting ideas, but just using them has a
significant downside - you end up running an emacs configuration you
don't really understand and are then at the mercy of others when it
comes to problem diagnosis.

Tim

Neil Jerram  writes:

> Michaël Chlon  writes:
>
>> Hi,
>>
>> I have spacemacs and write some org files.
>
> By the way, does anyone else find "spacemacs" bothering?  Unlike
> previous things like MicroEmacs, which have somehow always been clear to
> me to be very different things from Emacs, I get the impression that
> "spacemacs" users think that Emacs communities should be able to help
> them in detail, which suggests that they think it's basically the same
> thing.
>
> But if it's the same as Emacs, why use a different name that makes me
> hesitate / worry over whether it might be different from Emacs?
>
> On the other hand, if it's different from Emacs, does it still make
> sense to ask for support here?
>
> I'm genuinely in the dark here, although inclined to think that forking
> the name (of Emacs) is a subtly damaging thing to do; so interested
> either to be put right or to hear other opinions.
>
> Regards,
> Neil


-- 
Tim Cross



Re: [O] TODO do not display in org-agenda mode

2018-06-25 Thread Neil Jerram
Michaël Chlon  writes:

> Hi,
>
> I have spacemacs and write some org files.

By the way, does anyone else find "spacemacs" bothering?  Unlike
previous things like MicroEmacs, which have somehow always been clear to
me to be very different things from Emacs, I get the impression that
"spacemacs" users think that Emacs communities should be able to help
them in detail, which suggests that they think it's basically the same
thing.

But if it's the same as Emacs, why use a different name that makes me
hesitate / worry over whether it might be different from Emacs?

On the other hand, if it's different from Emacs, does it still make
sense to ask for support here?

I'm genuinely in the dark here, although inclined to think that forking
the name (of Emacs) is a subtly damaging thing to do; so interested
either to be put right or to hear other opinions.

Regards,
Neil



Re: [O] TODO do not display in org-agenda mode

2018-06-25 Thread Neil Jerram
Michaël Chlon  writes:

> Hi,
>
> I have spacemacs and write some org files.
> But when I generate an agenda view for week,
> for example, TODO task are not displayed !!

What kind of agenda view do you mean?

With 'C-c a a' (which is what I mostly use), TODO items are only shown
by default if they have a date (scheduled or deadline or active
timestamp).

With 'C-c a t', all TODO items are shown.

Hope this helps...

 Neil



[O] rounding when exporting

2018-06-25 Thread Uwe Brauer



Hi 

Is there way, that when I export and org file with a table, its content
is rounded when exported to html/latex?

Uwe Brauer 




[O] TODO do not display in org-agenda mode

2018-06-25 Thread Michaël Chlon
Hi,

I have spacemacs and write some org files.
But when I generate an agenda view for week,
for example, TODO task are not displayed !!

Any idea what is wrong ?
Here is my .spacemacs file:
 8< -- >8 -

;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.

(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; If non-nil layers with lazy install support are lazy installed.
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
;; ruby
csv
python
ansible
javascript
yaml
scala
imenu-list
themes-megapack
osx
evil-commentary
(geolocation :variables
;; geolocation-enable-automatic-theme-changer t
geolocation-enable-location-service t
geolocation-enable-weather-forecast t)

;; 
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press  (Vim style) or
;;  (Emacs style) to install them.
;; 
helm
auto-completion
better-defaults
emacs-lisp
git
;; markdown
(org :variables
org-enable-github-support t
org-enable-reveal-js-support t
org-projectile-file "TODOs.org"
)
(shell :variables
shell-default-height 30
shell-default-position 'bottom
shell-default-shell 'ansi-term)
spell-checking
syntax-checking
version-control
react
html
;; nginx
;; terraform
search-engine
;; vim-powerline
)
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages, then consider creating a layer. You can also put the
;; configuration in `dotspacemacs/user-config'.
dotspacemacs-additional-packages
'(
flycheck
anzu
;; org-bullets
)
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '()
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and uninstall any
;; unused packages as well as their unused dependencies.
;; `used-but-keep-unused' installs only the used packages but won't uninstall
;; them if they become unused. `all' installs *all* packages supported by
;; Spacemacs and never uninstall them. (default is `used-only')
dotspacemacs-install-packages 'used-only))

(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration.
You should not put any user code in there besides modifying the variable
values."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
dotspacemacs-elpa-timeout 5
;; If non nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update nil
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different 

Re: [O] Org Mode Documentation Patch

2018-06-25 Thread Van L


>> I've printed, signed, scanned and sent the assignment to
>> ass...@gnu.org , waiting for their response.
> 
> Nice.

It should be possible to do without printing and 
scanning, do all of the assignment electronically.



[O] rounding vs cutting

2018-06-25 Thread Uwe Brauer


Hi   Please look at the following examples:  |  org1 |  org2 | 
org1 + org2 | org1 + org2 | org1 | org2 | result2 | 
|---+---+-+-+--+--+-| 
| 1.253 | 1.453 |   2.706 | 2.7 |  1.3 |  1.5 | 2.8 
| #+TBLFM: $3=$1+$2::$4=$1+$2; E f-1::$5=$1;E f-1::$6=$2; E 
f-1::$7=$5+$6  | <>| <>| <>| <>|   | 
| | | org1  | org2  | res1  | round | orground1 | orground2 | 
| |---+---+---+---+---+---+-| 
| 1.253 | 1.453 | 2.706 | 2.7   |   1.3 |   1.5 | 2.8 | 
#+TBLFM: $3=$1+$2::$4=$3;%.1f::$5=$1;%.1f::$6=$2;%.1f::$7=$5+$6 
(BTW, what is the difference between E f-1 and ;%.1f?)


In any case it seems that the rounding in calc is more a cutting 
that is the actual value of column 1 and 2 are not saved somewhere 
but instead are cut since the result in column 4 and 7 do not 
coincide (but they do so in other spreadsheets as in libreoffice 
and others).


Or is there something I miss here?

Uwe Brauer 





Re: [O] Org Mode Documentation Patch

2018-06-25 Thread Nicolas Goaziou
Hello,

"Siraphob (Ben) Phipathananunth"  writes:

> I've printed, signed, scanned and sent the assignment to
> ass...@gnu.org , waiting for their response.

Nice.

> In the meantime, please install another patch I wrote, attached.

Done, barring one hunk specified below.

> You may notice that the email and name of the patch author is
> different, this is to correspond with my email and legal name. ("Ben"
> is my nickname)

OK.

> - compilation for /today/, until the entry is marked DONE, i.e.,
> - the task is automatically forwarded until completed.
> + compilation for /today/, until the entry is marked DONE, (i.e.
> + the task is automatically forwarded until completed).

I wasn't convinced by this change so I didn't apply it. The former form
looks correct.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Org Mode Documentation Patch

2018-06-25 Thread Siraphob (Ben) Phipathananunth
I've printed, signed, scanned and sent the assignment to ass...@gnu.org 
, waiting for their response.


In the meantime, please install another patch I wrote, attached.

You may notice that the email and name of the patch author is different, 
this is to correspond with my email and legal name. ("Ben" is my nickname)


Thanks,

--
Siraphob (Ben) Phipathananunth
From 677ac08a5b11157f59dd5acc73a2bc7103344f22 Mon Sep 17 00:00:00 2001
From: Siraphob Phipathananunth 
Date: Mon, 25 Jun 2018 21:27:05 +0700
Subject: [PATCH] Fix "cursor" to "point", fix grammar and add cross-references

* doc/org-manual : More wording and grammar is fixed, cross-references
to other sections are added when key terms appear (e.g. agenda,
property, completion).
---
 doc/org-manual.org | 323 ++---
 1 file changed, 161 insertions(+), 162 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index f1180458a..caa23be83 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -1145,8 +1145,7 @@ to disable them individually.
  indentation.  When these commands are executed several times in
  direct succession, the initially selected region is used, even if
  the new indentation would imply a different hierarchy.  To use
- the new hierarchy, break the command chain with a cursor motion
- or so.
+ the new hierarchy, break the command chain by moving point.
 
  As a special case, using this command on the very first item of
  a list moves the whole list.  This behavior can be disabled by
@@ -1194,7 +1193,7 @@ to disable them individually.
  #+vindex: org-support-shift-select
  #+kindex: S-LEFT
  #+kindex: S-RIGHT
- This command also cycles bullet styles when point in on the
+ This command also cycles bullet styles when point is in on the
  bullet or anywhere in an item line, details depending on
  ~org-support-shift-select~.
 
@@ -1683,7 +1682,7 @@ you, configure the option ~org-table-auto-blank-field~.
  #+vindex: org-table-copy-increment
  When current field is empty, copy from first non-empty field
  above.  When not empty, copy current field down to next row and
- move cursor along with it.  Depending on the variable
+ move point along with it.  Depending on the variable
  ~org-table-copy-increment~, integer field values can be
  incremented during copy.  Integers that are too large are not
  incremented, however.  Also, a ~0~ prefix argument temporarily
@@ -1919,10 +1918,10 @@ to derive fields from other fields.  While fully 
featured, Org's
 implementation is not identical to other spreadsheets.  For example,
 Org knows the concept of a /column formula/ that will be applied to
 all non-header fields in a column without having to copy the formula
-to each relevant field.  There is also a formula debugger, and
-a formula editor with features for highlighting fields in the table
-corresponding to the references at the point in the formula, moving
-these references by arrow keys.
+to each relevant field.  There is also a formula debugger, and a
+formula editor with features for highlighting fields in the table
+corresponding to the references at point in the formula, moving these
+references by arrow keys.
 
 *** References
 :PROPERTIES:
@@ -3376,7 +3375,7 @@ generally, act on links.
  possible with =~/= for your home directory.  You can force an
  absolute path with two {{{kbd(C-u)}}} prefixes.
 
-- {{{kbd(C-c C-l)}}} (with cursor on existing link) ::
+- {{{kbd(C-c C-l)}}} (with point on existing link) ::
 
  #+cindex: following links
  When point is on an existing link, {{{kbd(C-c C-l)}}} allows
@@ -3391,11 +3390,11 @@ generally, act on links.
  ~browse-url-at-point~), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB
  for the corresponding links, and execute the command in a shell
  link.  When point is on an internal link, this command runs the
- corresponding search.  When point is on the tags part of
- a headline, it creates the corresponding tags view (see [[*Matching
- tags and properties]]).  If the cursor is on a timestamp, it
- compiles the agenda for that date.  Furthermore, it visits text
- and remote files in =file= links with Emacs and select a suitable
+ corresponding search.  When point is on the tags part of a
+ headline, it creates the corresponding tags view (see [[*Matching
+ tags and properties]]).  If point is on a timestamp, it compiles
+ the agenda for that date.  Furthermore, it visits text and remote
+ files in =file= links with Emacs and select a suitable
  application for local non-text files.  Classification of files is
  based on file extension only.  See option ~org-file-apps~.  If
  you want to override the default application and visit the file
@@ -3867,14 +3866,13 @@ require action.  Your setup would then look like this:
 (sequence "|" "CANCELED")))
 #+end_src
 
-The keywords should 

Re: [O] BUG? WAS: Re: Painfully Slow Export

2018-06-25 Thread Ken Mankoff
Hello,

I was waiting for Org to update in elpa. This appears fixed. Thank you
Charles for helping define the problem better.

  -k.

On 6/24/18, Berry, Charles  wrote:
>
>
>> On Jun 23, 2018, at 2:06 PM, Nicolas Goaziou 
>> wrote:
>>
>> Hello,
>>
>> "Berry, Charles"  writes:
>>
>>> tl;dr: `:exports results :noweb no-export :eval never-export' needlessly
>>> expands <> code causing massive slowdowns on export.
>>
>> I think this is now fixed.
>
> I think so, too.
>
> Thanks,
>
> Chuck
>



Re: [O] [PATCH] org-attach: Allow attaching file from visited buffer

2018-06-25 Thread Eric Danan
Sorry for the slow reply.

I tried something similar to your second proposal (mimicking
`org-attach-dired-to-subtree'), but more convenient in my opinion and
not losing the method choice. It mimicks the mechanism to store links:
there is a new command `org-store-attachment' (to which one could give
a global keybinding such as `C-c a`) that stores an attachment to the
current buffer in a new variable `org-stored-attachments', and
`org-attach-attach', when called interactively, prompts to select an
attachment from this variable if it is non nil (the attachment is then
removed from the variable). See attached patch (yes I've signed the
FSF papers).

"Storing an attachment" simply means storing the buffer file name or,
if there is none, the buffer name, to the variable (there may be a
better terminology for that). Then `org-attach-attach' detects if the
"file" is actually the name of a non-file-visiting buffer and uses
`write-file' rather than the specified or default method in that case.
So we keep the method choice and don't need to add a specific command
for buffers to the dispatcher. If you think it's not worth introducing
complications for allowing to attach non-file-visiting buffers, we
could simply prevent this in `org-store-attachment'. I also made it so
that if `org-store-attachment' is called from a dired buffer, then the
file at point is stored rather than the dired buffer itself.

This can certainly be improved, but I hope it is sufficient for you to
judge whether you think it is a good idea or not. Possible
improvements I thought about:
- When `org-store-attachment' is called from a dired buffer and there
are marked files, we could store these rather than the file at point
(similar to `org-attach-dired-to-subtree').
- We could add a mechanism for making `org-attach-attach'
unconditionally read a file name, ignoring `org-stored-attachments'
(i.e. a prefix argument, distinct from the one to visit the attachment
directory). We could also add a command to clear
`org-stored-attachments' from the dispatcher.
- We could check whether the file to attach is modified and prompt the
user to save it in that case (this is actually independent from the
present discussion).

I understand that other users may not like this mechanism and prefer
different solutions (or leaving things as they are). There was a
recent suggestion to make the list of commands in the attachment
dispatcher customizable:

http://lists.gnu.org/archive/html/emacs-orgmode/2018-06/msg00139.html

Do you think it would make sense to do so?

Thank you for your attention.
On Thu, Jun 21, 2018 at 5:47 PM Nicolas Goaziou  wrote:
>
> Hello,
>
> Eric Danan  writes:
>
> > When the file to attach is already open in emacs, it is generally
> > faster to select it from the buffer list than navigating to it through
> > the file system. This patch adds a `b' command to the attach
> > dispatcher that reads a buffer and writes it in the attachment
> > directory.
>
> Thank you.
>
> One issue is that we're losing the method choice (symlink, copy,
> hardlink).
>
> However, `org-attach-attach' already offers to start file system
> navigation from a Dired side buffer, if any. We may extend this idea: if
> there is a buffer currently displayed in another window, but no Dired
> buffer, offer its default directory as a start for completion.
>
> Another idea is to create a new function that will attach the current
> file to the subtree in another window. See
> `org-attach-dired-to-subtree', for example.
>
> If you haven't signed FSF papers, you need to add TINYCHANGE at the end
> of the commit message.
>
> Regards,
>
> --
> Nicolas Goaziou


0001-org-attach-Add-mechanism-to-store-attachment-to-curr.patch
Description: Binary data


Re: [O] The + character creating strike-through markup within in-line literal / code blocks

2018-06-25 Thread Nick Dokos
John Magolske  writes:

>> It happens because syntax coloring is a bit dumb. It uses regexps but
>> not the parser. However, if you try, e.g., to export the document, the
>> plus signs will not be treated as markers.
>
> Ok, just tried org-html-export-as-html and see it renders properly
> in html:
>
> ... expression (x +. y) the +. is ...
>
> but I feel like there's a bug in the regex, that the =code= and
> ~verbatim~ marker characters should be able to prevent any other
> marker characters bracketed by them from causing highlighting.

Regexes recognize what is called a "regular" language which obeys a
context-free grammar. Although modern regexes are a bit more powerful,
it is still difficult (and computationally expensive) to have them
recognize context (e.g. figure out that we are now inside a verbatim
environment and so we need to do things differently).  That's why
context-sensitive grammars require parsers.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [O] Demoting in plain list displays asterisk as space

2018-06-25 Thread Nicolas Goaziou
Hello,

Rainer Stengele  writes:

> Having this item list:
>
> - 1
> - 2
>
> with cursor in the "-2" row demoteing the item with org-shiftmetaright 
> results in
>
> - 1
> 2
>
> where the expected "  * 2" is displayed as "2".
> describe-char with cursor at the expected asterisk position reveals
> that "*" is displayed as space:

I cannot reproduce it. Please check your configuration.

Regards,

-- 
Nicolas Goaziou



[O] Demoting in plain list displays asterisk as space

2018-06-25 Thread Rainer Stengele

Hi all,

Having this item list:

- 1
- 2

with cursor in the "-2" row demoteing the item with org-shiftmetaright results 
in

- 1
2

where the expected "  * 2" is displayed as "2".
describe-char with cursor at the expected asterisk position reveals that "*" is 
displayed as space:

-
position: 7 of 10 (60%), column: 2
character: * (displayed as *) (codepoint 42, #o52, #x2a)
preferred charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x2A
   script: latin
   syntax: _which means: symbol
 category: .:Base, a:ASCII, l:Latin, r:Roman
 to input: type "C-x 8 RET 2a" or "C-x 8 RET ASTERISK"
  buffer code: #x2A
file code: #x2A (encoded by coding system utf-8-dos)
  display: composed to form "*" (see below)

Composed by the rule:
(? )
The component character(s) are displayed by these fonts (glyph codes):
  : uniscribe:-outline-DejaVu Sans 
Mono-normal-normal-normal-mono-12-*-*-*-c-*-iso8859-1 (#x03)
See the variable ‘reference-point-alist’ for the meaning of the rule.

Character code properties: customize what to show
  name: ASTERISK
  general-category: Po (Punctuation, Other)
  decomposition: (42) ('*')

There are text properties here:
  composition  [Show]
  fontifiedt
  keymap   [Show]
  line-prefix  ""
  mouse-face   highlight
  wrap-prefix  [Show]
-

Demoting once more results in:
- 1

+

I cannot seem to find the reason why the "*" is displayed as empty char (space).
I already found out that there are no overlays at that point.
Does anybody have a hint?

Thank you.
Regards, Rainer