Re: [O] make update2 and ob-comint.el bugs

2016-04-23 Thread Charles C. Berry

On Sat, 23 Apr 2016, Charles C. Berry wrote:


On Sat, 23 Apr 2016, Charles C. Berry wrote:




Summary: ob-comint.elc compiled with `make update2' fails, but 
ob-comint.elc byte compiled via dired or with `emacs-lisp-byte-compile' 
succeeds.


===




To answer my own questions:

ob-comint.el needed to (require 'tramp) and to declare a number of 
tramp functions that the macro `with-parsed-tramp-file-name' invokes.


The compilations I did interactively had tramp loaded as a result of 
loading ess-site, which is why ob-comint.el compiled to produce a working

`org-babel-comint-eval-invisibly-and-wait-for-file'.

I'll check and test a bit more to be sure I've got a patch that really 
works after `make update2' and then push it.


I guess the lesson is to batch compile or use `emacs -q' or a stripped 
down .emacs for interactive compilation to avoid issues like this.


Sorry for messing up the commit history with so many commits for such a 
simple (in the end) issue.


Chuck



Re: [O] koma letter export receiver address

2016-04-23 Thread York Zhao
Hi Rasmus,

Oop! My apology! I've totally forgot this LCO thing. When I used koma
letter for
the first time, I think I had already figured this out, and had set to using
UScommercial9. I created my own class, and assigned my class name to
`org-koma-letter-default-class'. Unfortunately, after a long time not using
it,
when I've forgot the LCO thing, ox-koma-letter.el, at some point, had
changed to
always producing "\LoadLetterOption{NF}", which overwrites the setting in
my own
class.

Instead of setting the option in each org-mode file, I changed the value of
`org-koma-letter-class-option-file' to "UScommercial9". Thanks again for
pointing this out. Because of this issue, I've actually given up using koma
letter, and have been using the old letter class for a while.

I'm wondering why using a French style as default, while the vast majority
of
the users are from the English world, I believe! Just a suggestion.


Thanks,

York


On Sat, Apr 23, 2016 at 10:18 AM, Rasmus  wrote:

> York Zhao  writes:
>
> > Sorry Rasmus, but I don't understand what you are talking about. Have you
> > sent to a wrong subject?
>
> No.
>
> As I understand you are unhappy about the default, French, letter
> template, so I'm asking if you can use another one, like DIN.
> I’ve modified your example below.
>
> Hope it helps,
> Rasmus
>
>
> #+LCO: DIN
> * Cancel my previous written consent
>   :PROPERTIES:
>   :EXPORT_DATE: 2016-03-05
>   :EXPORT_AUTHOR: York
>   :EXPORT_CLOSING: Sincerely yours,
>   :EXPORT_OPTIONS: after-closing-order:(ps cc encl) :t backaddress:t
> title:nil
>   :END:
> ** To-address
> :to:
> Receiver's address
>
> ** From
> :from:
> My address
>
> ** Dear XXX
> Blah blah blah
>
>
>
> --
> Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio
>


Re: [O] make update2 and ob-comint.el bugs

2016-04-23 Thread Charles C. Berry

On Sat, 23 Apr 2016, Charles C. Berry wrote:




Summary: ob-comint.elc compiled with `make update2' fails, but ob-comint.elc 
byte compiled via dired or with `emacs-lisp-byte-compile' succeeds.


===



A bit more info:

It appears that the crucial difference is that my init file has

(require 'ess-site)

in it. If I start `emacs -q' and byte-compile I get one file. If I 
(require 'ess-site) and compile again, I get a different *.elc file.


The latter *.elc file works.

If anyone knows what ess is adding that results in ob-comint.elc that 
works, I am keen to know what it might be.


Best,

Chuck

[rest deleted]



[O] make update2 and ob-comint.el bugs

2016-04-23 Thread Charles C. Berry



Summary: ob-comint.elc compiled with `make update2' fails, but 
ob-comint.elc byte compiled via dired or with `emacs-lisp-byte-compile' 
succeeds.


===

I recently pushed a fix [1] for ob-comint.el or so I thought. See [2] for 
info on the bug.


First, I tested the fix on my own system by eval'ing ob-comint.el and 
running some tests (including `make test' FWIW).


I also byte-compiled the code using `dired-do-byte-compile', loaded that 
and ran more tests. All good.


Then I pushed that commit to master.

When I did `make update2' the compiled fixes did not work. But loading 
`ob-comint.el' works, and compiling via `dired-do-byte-compile' works and 
loading the result also works.


What?!

So I tried to undo the damage with two more commits, but in each case the 
`make update2' step generated code that was buggy.


I see that `make update2' uses `byte-recompile-directory' and indeed 
running that gives a different (larger) ob-comint.elc than does 
`dired-do-byte-compile'. But both eventually use `byte-compile-file', and 
AFAICS the optimization level is the same in both cases. So I am baffled.


Any advice on how to produce code that works when compiled with `make 
update2' or just to understand what gives here is appreciated.


Best,

Chuck

[1] commit e42454088ff1176cce9cc65a4bd1c6f17fe958ec
[2]



Re: [O] Agenda month view or year view for a specific selection of days of the week

2016-04-23 Thread Ken Mankoff

On 2016-04-23 at 15:48, leho.y...@gmail.com  wrote:
> Is it possible to build an agenda month view or year view for a
> specific selection of days of the week (ie. saturday and sunday) ?
> I'm very interesting with this feature, but the manual does not seem
> to show a such possibility.

Here is a code snippet that removes empty sections from an Agenda view. Maybe 
it could be used as a starting place to remove weekdays?

https://lists.gnu.org/archive/html/emacs-orgmode/2015-06/msg00267.html

  -k.



Re: [O] Bug: Docstring of org-yank wrongly says that org-yank-adjusted-subtrees is set by default [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)]

2016-04-23 Thread Kyle Meyer
Jorge Peixoto de Morais Neto  writes:

> org-yank-adjusted-subtrees is defined in org.el as follows:
> (defcustom org-yank-adjusted-subtrees nil
>   "Non-nil means when yanking subtrees, adjust the level.
> With this setting, `org-paste-subtree' is used to insert the subtree, see
> this function for details."
>   :group 'org-edit-structure
>   :type 'boolean)

Thanks.  I've corrected org-yank's docstring.

--
Kyle



Re: [O] Bug: C-u C-u C-c C-o opens pdf links in docview, belying the docstring [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)]

2016-04-23 Thread Kyle Meyer
Jorge Peixoto de Morais Neto  writes:
> In an attempt to open the PDF in the system viewer, position point
> over the link and type C-u C-u C-c C-o.
>
> The link opens in DocView, belying the docstring, which says:
> With a double prefix argument, try to open outside of Emacs, in the
> application the system uses for this file type.

I'd guess that it does try to open it in an external application, but,
after it can't figure out what that should be, it falls back to Emacs.
You could step through the call to org-open-file to get a better
understanding for what it is trying.

> I reproduced with an empty Emacs init file.  I use Ubuntu 16.04.  The default
> PDF application is Okular.

I don't know how Ubunutu assigns default applications, but org-open-file
looks at mailcap assignments by default on GNU/Linux systems (see
org-file-apps-defaults-gnu).  You can also specify an
extension-application mapping using the org-file-apps variable.

--
Kyle



[O] Bug: Docstring of org-yank wrongly says that org-yank-adjusted-subtrees is set by default [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)]

2016-04-23 Thread Jorge Peixoto de Morais Neto
org-yank-adjusted-subtrees is defined in org.el as follows:
(defcustom org-yank-adjusted-subtrees nil
  "Non-nil means when yanking subtrees, adjust the level.
With this setting, `org-paste-subtree' is used to insert the subtree, see
this function for details."
  :group 'org-edit-structure
  :type 'boolean)


Emacs  : GNU Emacs 25.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-22
Package: Org-mode version 8.3.4 (8.3.4-39-ge0acd8-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-
toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-
command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-
function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-
function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-
configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes org-
eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-
maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-
cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-
function
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )
-- 
- I am Brazilian.  I hope my English is correct and I welcome corrections.
- Please adopt free formats like PDF, ODF, LaTeX, Vorbis, Opus, WebM and 7z.
- Free software for Android: https://f-droid.org/





[O] Bug: When exporting to PDF an Org file where multiple footnotes share the same definition, only the first footnote is clickable [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-pl

2016-04-23 Thread Jorge Peixoto de Morais Neto
Export the following Org file to PDF:

Line1.[fn:1]

\pagebreak

Line2.[fn:1]
* Footnotes
[fn:1] Footnote.

In the generated PDF, the second footnote reference (on page 2) is not
clickable.  If this happened on a large document, how would the reader
locate the footnote definition?

I reproduced this with an empty ~/.emacs.  This is Ubuntu 16.04.

Emacs  : GNU Emacs 25.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-22
Package: Org-mode version 8.3.4 (8.3.4-39-ge0acd8-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-
toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-
command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-
function
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-latex-format-headline-function 'org-latex-format-headline-default-
function
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-
configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes org-
eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-
maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-
cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-html-format-inlinetask-function 'org-html-format-inlinetask-default-
function
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )
-- 
- I am Brazilian.  I hope my English is correct and I welcome corrections.
- Please adopt free formats like PDF, ODF, LaTeX, Vorbis, Opus, WebM and 7z.
- Free software for Android: https://f-droid.org/





[O] Bug: C-u C-u C-c C-o opens pdf links in docview, belying the docstring [8.3.4 (8.3.4-39-ge0acd8-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)]

2016-04-23 Thread Jorge Peixoto de Morais Neto
Create an Org file with a link to an existing PDF file.  For example:

[[file:~/circulant_diagonalization.pdf][file:~/circulant_diagonalization.pdf]]

(assuming the mentioned file exists at that path).  In an attempt to open the
PDF in the system viewer, position point over the link and type
C-u C-u C-c C-o.

The link opens in DocView, belying the docstring, which says:
With a double prefix argument, try to open outside of Emacs, in the
application the system uses for this file type.

I reproduced with an empty Emacs init file.  I use Ubuntu 16.04.  The default
PDF application is Okular.

Emacs  : GNU Emacs 25.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-22
Package: Org-mode version 8.3.4 (8.3.4-39-ge0acd8-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20160418/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-
toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-
command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-
configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-
mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes org-
eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-
maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-
cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

-- 
- I am Brazilian.  I hope my English is correct and I welcome corrections.
- Please adopt free formats like PDF, ODF, LaTeX, Vorbis, Opus, WebM and 7z.
- Free software for Android: https://f-droid.org/






[O] Bug: org-store-link misinterprets headings containing multiple links [8.3.4 (8.3.4-34-gacfd41-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20160411/)]

2016-04-23 Thread Georgiy Tugai
Reproducing the bug
===

  - Create a heading (of any level). The heading title should contain at
least two links, of any type. For example, `[[#A][alpha]]'
`[[#B][beta]]'
  - With point on the heading, call `org-store-link'.


Expected behaviour
==

  - The "Stored: " message contains the text of the links ("Stored:
alpha beta")
  - The stored link's description contains the text of the links ("alpha
beta")


Actual behaviour


  - The "Stored: " message contains the text of the *first* link,
repeated multiple times depending on the number of other links in
the heading. ("Stored: alpha alpha")
  - The stored link's description matches the message ("alpha alpha")



Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-10 on foutrelis
Package: Org-mode version 8.3.4 (8.3.4-34-gacfd41-elpaplus @ 
~/.emacs.d/elpa/org-plus-contrib-20160411/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook 
change-major-mode-hook org-babel-show-result-all append local]
   5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )


signature.asc
Description: PGP signature


Re: [O] koma letter export receiver address

2016-04-23 Thread Rasmus
York Zhao  writes:

> Sorry Rasmus, but I don't understand what you are talking about. Have you
> sent to a wrong subject?

No.

As I understand you are unhappy about the default, French, letter
template, so I'm asking if you can use another one, like DIN.
I’ve modified your example below.

Hope it helps,
Rasmus


#+LCO: DIN
* Cancel my previous written consent
  :PROPERTIES:
  :EXPORT_DATE: 2016-03-05
  :EXPORT_AUTHOR: York
  :EXPORT_CLOSING: Sincerely yours,
  :EXPORT_OPTIONS: after-closing-order:(ps cc encl) :t backaddress:t title:nil
  :END:
** To-address:to:
Receiver's address

** From:from:
My address

** Dear XXX
Blah blah blah



-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio



Re: [O] koma letter export receiver address

2016-04-23 Thread York Zhao
Sorry Rasmus, but I don't understand what you are talking about. Have you
sent to a wrong subject?

Thanks,
York


On Sat, Apr 23, 2016 at 9:18 AM, Rasmus  wrote:

> Hi,
>
> Can you just change the template to DIN or must you use the French format?
> E.g.:
>
> #+LCO: DIN
>
> Rasmus
>
> --
> Need more coffee. . .
>


Re: [O] koma letter export receiver address

2016-04-23 Thread Rasmus
Hi,

Can you just change the template to DIN or must you use the French format?
E.g.:

#+LCO: DIN

Rasmus

-- 
Need more coffee. . .



[O] How to calculate sum of property in tree?

2016-04-23 Thread Rainer Hansen
Hi,

I would like Emacs to calculate the price for the travel cost
(21.90). This should be calculated as sum of the values of the property
"Price" in the elements of the tree. How do I do that in Emacs Lisp?

--
* Travel cost -- 21.90 EUR

** Train Eusirchen -- Bonn, src_emacs-lisp{(org-entry-get (point) "Price")} EUR 
   :PROPERTIES:
   :Price:7.70
   :END:
** Bus Euskirchen -- Stotzheim, src_emacs-lisp{(org-entry-get (point) "Price")} 
EUR
   :PROPERTIES:
   :Price:2.40
   :END:

** Taxi Bonn, src_emacs-lisp{(org-entry-get (point) "Price")} EUR
   :PROPERTIES:
   :Price:11.80
   :END:
--

Thanks!

Rainer