[O] set Babel default header argument don't eval when export seems does not work

2018-05-21 Thread stardiviner
I set Babel default header arguments to this:

,
| (setq-default org-babel-default-header-args
|   '((:session . "none")
| (:noweb . "no") (:hlines . "no")
| (:tangle . "no") (:comments . "links")
| (:cache . "yes")
| (:results . "replace")
| ;; for exporting
| (:eval . "never-export")
| (:exports . "both")
| ))
`

When I export with org-publish, src blocks still evaluated. Seems `:eval 
never-export` does not work?

-- 
[ stardiviner ] don't need to convince with trends.
   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] Easy Template does not expand

2018-05-21 Thread Don Womick
Is 9.2's release date known yet?

On Thu, May 17, 2018 at 10:46 AM, Jon Snader  wrote:

> And so it begins.
>


Re: [O] [bug] in capture

2018-05-21 Thread Thomas Holst

Hello Nicolas,

thank you for fixing this. I can confirm that my capture template is 
working again.


--
  Thomas


Am 17.05.2018 um 23:01 schrieb Nicolas Goaziou:

Hello,

Thomas Holst  writes:


Hi Nicolas,

thank you for looking into this.

To reproduce the error I have to use file+function target. There is no
error if I use file+headline target.

Here is an ECM:

#+begin_src org
* Setup

#+begin_src emacs-lisp
   (setq org-capture-template nil)

   (setq
   org-capture-templates
   '(("x" "Testing" table-line (file+function
"~/tmp/capture-bug/ecm.org" th:test-capture)
   "| | | %^{Arzt/Apotheke} |"
   :table-line-pos "III-1" :immediate-finish t)))

   (defun th:test-capture ()
   "Sets point to headline"
   (interactive)
   (goto-char (point-min))
   (org-speed-move-safe (quote org-next-visible-heading)))
#+end_src

* testing capture
|---+-+--|
| ! | Datum   | Arzt |
|---+-+--|
|   | |  |
|---+-+--|
| # | |  |
|---+-+--|
#+end_src

The function "th:test-capture" sets point to beginning of headline
"testing capture".

I experimented with several point positions (end of the headline, line
below headline). But none worked. The error stayed the same.

And here is the backtrace:
Debugger entered--Lisp error: (error "Capture template ‘hr’:
integer-or-marker-p")

Fixed. Thank you.

Regards,





Re: [O] General advice beyond Org

2018-05-21 Thread Kevin Buchs
As a student, you simply need to go along with your supervisor's
recommendations. You are not in a position to dictate the terms. Using the
proprietary tools will not hurt you, unless you need to buy your own. If it
were the case that you needed to buy your own, then I would ask your
supervisor for another solution.

Even as a Junior faculty member, you may be in close collaboration with
other faculty and should follow the consensus. That is how you work with
other people effectively. You don't keep asserting that your solution is
better. When you are calling the shots, you can use the tools you wish.

So, you need to adjust your attitude. It may be that you are presenting the
issue of principles - I prefer free, you prefer proprietary, but that is
not really the true issue. Maybe you don't know the proprietary tools and
don't want to learn them or feel you can't learn them. Choice of tools you
use is no reason to switch graduate programs.

This is entirely a matter of getting along with other people, not being
selfish, etc. These are life skills we are talking about.

Kevin Buchs

On Thu, May 17, 2018 at 7:28 PM,  wrote:

> Hello,
>
> _I_ need help. I am in graduate school, and I keep having issues with my
> advisor for my strong inclination to use free software. I am obviously not
> in position to refuse, but she dislikes to have discussions about it. She
> pays a stipend to me every month, and my tuition is waved.
>
> Is anyone here aware of a place where they do computational human
> biomechanics, mechanics, materials or finite elements where I could
> interact with free software? (having github, LaTeX, Python, etc.; avoid
> Micro$oft products, Matlab, Mathematica, etc.). Is there no place where one
> can simply use free software on a daily basis?
>
> It seems from her comments that I am, otherwise, a good researcher. She is
> a nice person, but I fear that this may become an issue in the future for
> me (whether with her or other people).
>
> As a student or junior faculty, how do you go about this? Do you just nod
> and wave your freedom good bye?
>
> Thank you! (I will post this in other fora as well; don't let that to
> discourage you from answering, please).
>
> -
>
> ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of
> the NSA's hands!
> $24.95 ONETIME Lifetime accounts with Privacy Features!  15GB disk! No
> bandwidth quotas!
> Commercial and Bulk Mail Options!
>


[O] Bug: Bug in handling of named fields in the org spreadsheet [9.1.13 (release_9.1.13)]

2018-05-21 Thread Piyush Srivastava

In the current org mode version (release_9.1.13), when a named cell
formula is stored using C-u C-c =, the #+TBLFM line stores the name of
the cell *without* a prefix $ sign, as in the following table (notice
that in the #+TBLFM row, there is no $ sign before the 'sum' variable):

|   |   c |
|---+-|
|   |   3 |
|   |  10 |
|---+-|
| # |  14 |
| ^ | sum |
|---+-|
#+TBLFM: sum=vsum(@-II$0..@-I$0)


With this convention, pressing TAB in the row after making a change in
the table does not update the field referred to by $sum, contrary to
what is said in the manual.


However, if I manually add a prefix $ to the variable sum in the #+TBLFM
row (as in the table below), then TAB update work as described in the
manual (notice the $sum variable in the #+TBLFM row):


|   |   c |
|---+-|
|   |   3 |
|   |  12 |
|---+-|
| # |  15 |
| ^ | sum |
|---+-|
#+TBLFM: $sum=vsum(@-II$0..@-I$0)



A fix is to ensure that if the LHS of a field formula being inserted is
a field name rather than a numerical reference, then a '$' should be
prefixed to it.  I have the following patch that implements this:


diff --git a/lisp/org-table.el b/lisp/org-table.el
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2301,7 +2301,13 @@ LOCATION instead."
(org-indent-line)
(insert (or (match-string 2) "#+TBLFM:")))
   (insert " "
- (mapconcat (lambda (x) (concat (car x) "=" (cdr x)))
+ (mapconcat (lambda (x)
+  (let* ((name (car x))
+ (first (substring-no-properties name 0 1))
+ (test (or (string= first "@") (string= first 
"$")))
+ )
+(concat (if test name (concat "$" name))
+"=" (cdr x
 (sort alist #'org-table-formula-less-p)
 "::")
  "\n"


What this patch does is the following: if the reference being inserted
does not begin with an '@' or a '$', then it is assumed to be a named
reference, and a '$' is prefixed to it.  This will work *provided* no
named references themselves start with a '$'.

I am happy to assign copyright for the patch, if that is needed and if
the patch if found suitable, for it to be included in org-mode code.


Thanks,
-- Piyush.


Emacs  : GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09
Package: Org mode version 9.1.13 (release_9.1.13)



Re: [O] General advice beyond Org

2018-05-21 Thread S. Champailler
This is a super wise advice :

>> Be a scout in the proprietary camp. Learn the tools your instructors are
>> willing to teach. Learn what it takes to achieve the same results with free
>> software. Learn the difference in workflows and user experience.

Comparing stuff in scenarios you don't invent yourself is super enlightening. 
Once you don't define the scenario, all sorts of edge/unexpected situations 
arise.

For example, if you work with math stuff, I'm sure you'll find interesting 
differences between computations results (e.g. matlab equations solving versus 
say Octave).

stF







> Le 18 mai 2018 à 12:54, Yuri Khan  a écrit :
> 
> 
> On Fri, May 18, 2018 at 7:29 AM  wrote:
> 
> > _I_ need help. I am in graduate school, and I keep having issues with my
> > advisor for my strong inclination to use free software. I am obviously
> > not in position to refuse, but she dislikes to have discussions about
> > it. She pays a stipend to me every month, and my tuition is wa[i]ved.
> 
> > Is anyone here aware of a place where they do computational human
> > biomechanics, mechanics, materials or finite elements where I could
> > interact with free software? (having github, LaTeX, Python, etc.; avoid
> > Micro$oft products, Matlab, Mathematica, etc.). Is there no place where
> > one can simply use free software on a daily basis?
> 
> Are you required to pay for licenses for proprietary software you are asked
> to use? Chances are, your school is getting academic discounts, and you get
> to use it for no charge.
> 
> Your instructors and professors probably have a lot of experience with
> those tools. They are understandably reluctant to switch, because the tools
> work well enough for them.
> 
> Also, as a student, you do not have sufficient influence to convert
> everybody at your school to free software.
> 
> > As a student or junior faculty, how do you go about this? Do you just
> > nod and wave your freedom good bye?
> 
> The point of education is to get exposed to many tools, techniques and
> workflows. By limiting yourself to free software only, you will miss out.
> 
> Be a scout in the proprietary camp. Learn the tools your instructors are
> willing to teach. Learn what it takes to achieve the same results with free
> software. Learn the difference in workflows and user experience.
> 
> You will find something you can do with free software that you don’t know
> how to do with proprietary tools. Ask your teachers. They will either point
> you at something you missed (and then you can study it); or they will admit
> that feature is nice but their tool doesn’t have it (and then you have
> demonstrated the merits of free software); or they will say it’s not
> important.
> 
> You will also likely find more than a few points where non-free software
> delivers better UX. Use that knowledge to improve free software so that it
> can compete with proprietary software on UX terms, not only on the issue of
> freedom.
>



[O] SRC block with `-i' switch seems to solve the problem (was: comment alignment not lining up / C++//l OrgSrc Abbrev / Releasing Emacs 26.1)

2018-05-21 Thread Van L
Hello Eli.

Thanks for solving the problem with chinese input method’s link reference which 
was broken due to an 18yo typo.

Separately, the following is a different bug.

I reported this bug which didn’t get acknowledged as far as I can tell.

I think the bug isn’t a bug now.

It isn’t a bug if instead of using EXAMPLE block I use SRC block with the `-i’ 
switch and the indenting will be preserved properly.

Perhaps the Org Mode documentation about the `-i’ switch for SRC block can 
demonstrate an example, for Python especially, to get the point across about 
preserving indentation and reduce the chance of misunderstanding or missing the 
point.

> Begin forwarded message:
> 
> From: Van L 
> Subject: comment alignment not lining up / C++//l OrgSrc Abbrev / Releasing 
> Emacs 26.1
> Date: 7 May 2018 at 23:24:00 AEST
> To: emacs-orgmode@gnu.org
> 
> Hello.
> 
> Here is a recipe reproducing a bug described in the post which is forward 
> from.
> 
> — recipe begins
> 
>   - to reproduce faulty comment line up
> 
> 1) ~/2018/Applications/Emacs.app/Contents/MacOS/Emacs -Q 
> 
> 2) open file ~/Documents/x-reproduce-me
> 
>   (Fundamental) mode is on
> 
> 3) C-h C-a ; verify version is 26.1 rc-1
> 
> 4) enter the following into the file, place cursor at end of 43, save 
> file, M-x revert-buffer
> 
>#+BEGIN_EXAMPLE
>* Reading
> 
>Chapters
> 
>1)
>2) Page43
> 
> 
> 
>Local variables:
>mode: org
>paragraph-separate: "[ ]*$"
>coding: utf-8
>end:
> 
>#+END_EXAMPLE
> 
> 
>(Org) mode is on ; show all ; place cursor at end of 43 ; type `M-j' ; 
> ` 
>- see - http://emacs.scratch.space/public/org-mode-cpp-x-0.png
> 
> 5) Abbrev view opens in second pane
> 
>   type in the following
> 
>   #+BEGIN_EXAMPLE
>   void some_function() // function that doesn't return a value
>{
>  double d = 2.2; // initialize floating-point number
>  int i = 7; // initialize integer
>  d = d+i; // assign sum to d
>  i = d*i; // assign product i (truncating the double to an int)
>}
>// To align, highlight the region then
>// M-x align-regexp  // 
>   #+END_EXAMPLE
> 
>   highlight the region of four lines in the body of the function
> 
>   do, M-x align-regexp  // 
> 
>   - the four line's comment are lined up
> 
>   do, C-c '
> 
> 6) we are out of the abbrev view
> 
>   - the line with `int i = 7;' has comment alignment not lining up
> 
>- see - http://emacs.scratch.space/public/org-mode-cpp-x-1.png
> 
>   highlight the region of four lines in the body of the function
> 
>   do, M-x align-regexp  // 
> 
>   - the four line's comment are lined up
> 
>- see - http://emacs.scratch.space/public/org-mode-cpp-x-2.png
> 
>   do, C-c '
> 
> 7) we are in the abbrev view
> 
>- again, the line with `int i = 7;' has comment alignment not lining up
> 
>   - see - http://emacs.scratch.space/public/org-mode-cpp-x-3.png
> 
> — recipe ends
> 
> 
>> Begin forwarded message:
>> 
>> From: Bastien 
>> Subject: Re: Releasing Emacs 26.1
>> Date: 7 May 2018 at 22:05:40 AEST
>> To: Van L 
>> Cc: Phil Sainty , Eli Zaretskii , John 
>> Wiegley , Michael Albinus , 
>> emacs-de...@gnu.org
>> 
>> Hi,
>> 
>> Van L  writes:
>> 
 On 7 May 2018, at 21:10, Phil Sainty  wrote:
 
 If the bugs are in new functionality, I wouldn't see any issue with
 leaving the improvements until the next release if necessary;
>>> 
>>> In org mode for Emacs 26.1 rc-1, I see comment alignment for cpp not
>>> lining up, see screenshot.
>> 
>> I cannot reproduce this bug with Emacs 26.1 rc-1 and Org 9.1.12.
>> 
>> Can you send it to emacs-orgmode@gnu.org and provide a detailed recipe
>> on how to reproduce it with emacs -Q?
>> 
>> Thanks,
>> 
>> -- 
>> Bastien
> 
> Van L
> van@scratch.space
> 
> 
> 




Re: [O] General advice beyond Org

2018-05-21 Thread Yuri Khan
On Fri, May 18, 2018 at 7:29 AM  wrote:

> _I_ need help. I am in graduate school, and I keep having issues with my
> advisor for my strong inclination to use free software. I am obviously
> not in position to refuse, but she dislikes to have discussions about
> it. She pays a stipend to me every month, and my tuition is wa[i]ved.

> Is anyone here aware of a place where they do computational human
> biomechanics, mechanics, materials or finite elements where I could
> interact with free software? (having github, LaTeX, Python, etc.; avoid
> Micro$oft products, Matlab, Mathematica, etc.). Is there no place where
> one can simply use free software on a daily basis?

Are you required to pay for licenses for proprietary software you are asked
to use? Chances are, your school is getting academic discounts, and you get
to use it for no charge.

Your instructors and professors probably have a lot of experience with
those tools. They are understandably reluctant to switch, because the tools
work well enough for them.

Also, as a student, you do not have sufficient influence to convert
everybody at your school to free software.

> As a student or junior faculty, how do you go about this? Do you just
> nod and wave your freedom good bye?

The point of education is to get exposed to many tools, techniques and
workflows. By limiting yourself to free software only, you will miss out.

Be a scout in the proprietary camp. Learn the tools your instructors are
willing to teach. Learn what it takes to achieve the same results with free
software. Learn the difference in workflows and user experience.

You will find something you can do with free software that you don’t know
how to do with proprietary tools. Ask your teachers. They will either point
you at something you missed (and then you can study it); or they will admit
that feature is nice but their tool doesn’t have it (and then you have
demonstrated the merits of free software); or they will say it’s not
important.

You will also likely find more than a few points where non-free software
delivers better UX. Use that knowledge to improve free software so that it
can compete with proprietary software on UX terms, not only on the issue of
freedom.



[O] Bug: Potential Bug With How Priorities Are Displayed In An Agenda Using The Column View [9.1.13 (9.1.13-elpa @ /home/tom/.emacs.d/elpa/org-9.1.13/)]

2018-05-21 Thread Tom Purl
I like to use column view with my org agenda. One of the custom
properties that I like to view is the priority. Here's what I do to make
that happen:

(setq org-agenda-overriding-columns-format "%TODO %4PRIORITY(Pri.)
%50ITEM(Task)")

Using Org 8.2 I was able to view the priority in the column
view. However, since I've upgraded to the latest stable version of Org
I now see "B" when the priority is empty.

Emacs  : GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-09-12 on hullmann, modified by Debian
Package: Org mode version 9.1.13 (9.1.13-elpa @ 
/home/tom/.emacs.d/elpa/org-9.1.13/)

current state:
==
(setq
org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
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-agenda-custom-commands '(("." "Simple agenda view" ((tags "+today" 
((org-agenda-span (quote day (agenda ""
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-from-is-user-regexp "\\"
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 '(#[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-block-all append local] 5 "\n\n(fn)"]
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook 
org-babel-show-result-all append local] 5 "\n\n(fn)"]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn 
ENTRY)"]
org-archive-hook '(org-attach-archive-delete-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-agenda-view-columns-initially t
org-agenda-span 1
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-link-parameters '(("id" :follow org-id-open) ("rmail" :follow 
org-rmail-open :store org-rmail-store-link)
   ("mhe" :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow 
org-irc-visit :store org-irc-store-link)
   ("info" :follow org-info-open :export org-info-export :store 
org-info-store-link)
   ("gnus" :follow org-gnus-open :store org-gnus-store-link)
   ("docview" :follow org-docview-open :export org-docview-export :store 
org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete 
org-bbdb-complete-link :store org-bbdb-store-link)
   ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs") ("doi" 
:follow org--open-doi-link)
   ("elisp" :follow org--open-elisp-link) ("file" :complete 
org-file-complete-link)
   ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path 
("help" :follow org--open-help-link)
   ("http" :follow (lambda (path) (browse-url (concat "http:" path
   ("https" :follow (lambda (path) (browse-url (concat "https:" path
   ("mailto" :follow (lambda (path) (browse-url (concat "mailto:; path
   ("news" :follow (lambda (path) (browse-url (concat "news:; path 
("shell" :follow org--open-shell-link))
org-agenda-files '("/tmp/org-test/test.org")
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)

[O] ask emacs to evaluate id file

2018-05-21 Thread Julius Dittmar
Hi,

how can I tell emacs org-mode to read the link information written in
~/.emacs.d/.org-id-locations ?

I confirmed that's the file that gets written by M-x
org-id-update-id-locations, but even though the id linked to in a
[[id:XYZ]] link is included in this file, emacs cannot follow that link
to the file and headline.

Thanks in advance,

Julius




Re: [O] General advice beyond Org

2018-05-21 Thread S. Champailler
Be aware that free software is politcally loaded. It's just not a matter of 
having the right or best tools, it' sometimes a question of ideal, that is 
something that is *very* hard to negociate about...

Moreover, if the people you work with use, say Word, it's pretty tough to bring 
in, say Latex. Because you'll disrupt the organisation of the team.

In the case of emacs, though, things are easier : it's made to work with text 
files and that is quite compatible with any other proprietary software. You 
won't affect anybody's job with that.

Here at my job, I don't control any of the software I use (I have to use 
Oracle, Windows, Skype), but I can choose the software that *I* use for myself. 
So it's a balance.

Changing other's mind, or methods is super hard, what you experience is just 
the normal. It'd be nice to know why your advisor rejects free software 
equivalents (lack of features ? fear of legal battles ? organisational ...)

Stefan


> Le 18 mai 2018 à 02:28, ed...@openmail.cc a écrit :
> 
> 
> Hello,
> 
> _I_ need help. I am in graduate school, and I keep having issues with my 
> advisor for my strong inclination to use free software. I am obviously 
> not in position to refuse, but she dislikes to have discussions about 
> it. She pays a stipend to me every month, and my tuition is waved.
> 
> Is anyone here aware of a place where they do computational human 
> biomechanics, mechanics, materials or finite elements where I could 
> interact with free software? (having github, LaTeX, Python, etc.; avoid 
> Micro$oft products, Matlab, Mathematica, etc.). Is there no place where 
> one can simply use free software on a daily basis?
> 
> It seems from her comments that I am, otherwise, a good researcher. She 
> is a nice person, but I fear that this may become an issue in the future 
> for me (whether with her or other people).
> 
> As a student or junior faculty, how do you go about this? Do you just 
> nod and wave your freedom good bye?
> 
> Thank you! (I will post this in other fora as well; don't let that to 
> discourage you from answering, please).
> 
> -
> 
> ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
> NSA's hands!
> $24.95 ONETIME Lifetime accounts with Privacy Features!  
> 15GB disk! No bandwidth quotas!
> Commercial and Bulk Mail Options!  
>



[O] comment alignment not lining up / C++//l OrgSrc Abbrev / Releasing Emacs 26.1

2018-05-21 Thread Van L
Hello.

Here is a recipe reproducing a bug described in the post which is forward from.

— recipe begins

   - to reproduce faulty comment line up

 1) ~/2018/Applications/Emacs.app/Contents/MacOS/Emacs -Q 

 2) open file ~/Documents/x-reproduce-me

(Fundamental) mode is on

 3) C-h C-a ; verify version is 26.1 rc-1

 4) enter the following into the file, place cursor at end of 43, save 
file, M-x revert-buffer

#+BEGIN_EXAMPLE
* Reading

Chapters

1)
2) Page 43



Local variables:
mode: org
paragraph-separate: "[  ]*$"
coding: utf-8
end:

#+END_EXAMPLE


(Org) mode is on ; show all ; place cursor at end of 43 ; type `M-j' ; 
` Begin forwarded message:
> 
> From: Bastien 
> Subject: Re: Releasing Emacs 26.1
> Date: 7 May 2018 at 22:05:40 AEST
> To: Van L 
> Cc: Phil Sainty , Eli Zaretskii , John 
> Wiegley , Michael Albinus , 
> emacs-de...@gnu.org
> 
> Hi,
> 
> Van L  writes:
> 
>>> On 7 May 2018, at 21:10, Phil Sainty  wrote:
>>> 
>>> If the bugs are in new functionality, I wouldn't see any issue with
>>> leaving the improvements until the next release if necessary;
>> 
>> In org mode for Emacs 26.1 rc-1, I see comment alignment for cpp not
>> lining up, see screenshot.
> 
> I cannot reproduce this bug with Emacs 26.1 rc-1 and Org 9.1.12.
> 
> Can you send it to emacs-orgmode@gnu.org and provide a detailed recipe
> on how to reproduce it with emacs -Q?
> 
> Thanks,
> 
> -- 
> Bastien

Van L
van@scratch.space






[O] Bug: Adding duration which spans days produces invalid timestamps & confusing errors [9.1.13 (9.1.13-elpa @ /home/ieure/.emacs.d/elpa/org-9.1.13/)]

2018-05-21 Thread Ian Eure

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


I spent far too long figuring out why I was getting this error when I
pulled up my week agenda with C-c a a

org-duration-to-minutes: Invalid duration format: "+2:00"

The string "+2:00" doesn’t appear anywhere in my org files.  After
bisecting the list of files, then the contents of the one that was
causing issues, I found that it was due to this timestamp:

<2018-05-16 Wed 22:00-26:00>

There are only 24 hours in the day, but this says 26.  Oops.  This
surprised me, because this had been created by doing:

C-c . 22:00+4

I use this shortcut a lot, since it’s easier for me to think about the
duration rather than do the mental math to come up with the ending
hour.

I’m not sure it’s a good idea to insert a span timestamp in this case,
but I think at a minimum, Org ought to error in this case, rather than
producing a timestamp it can’t consume.

It would also be good if the error was clearer, ideally telling you
the exact file/line the erroneous timestamp was on.




Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-05-07, modified by Debian
Package: Org mode version 9.1.13 (9.1.13-elpa @ 
/home/ieure/.emacs.d/elpa/org-9.1.13/)



Re: [O] [bzg/org-mode] Added latex export option to ob-plantuml.el (#1)

2018-05-21 Thread Roger J. H. Welsh
Hi,

I have a patch to add the latex export option to ob-plantuml.el .

I originally tried to submit a Pull Request to a repo on github.
https://github.com/rjhwelsh/org-mode/commit/dd69e979b4a8fdd0bb70306e0afb339720659dc5.patch

> Hi, thanks for your contribution but this github repo don't take patches, I 
> should have closed the ability to send PR. Can you resend your patch to 
> emacs-orgmode@gnu.org ? Thanks a lot !
Bastien informed me that I should send it on this way.
Patch is also attached.

Is there any other preferred method to contribute other than patch over email?

--
Kind regards,
Roger Welsh
fpr: 2FCB 9E31 EA77 CDEC A3AE  5DD7 D54C C777 553A 180D
From dd69e979b4a8fdd0bb70306e0afb339720659dc5 Mon Sep 17 00:00:00 2001
From: rjhwelsh <30714737+rjhwe...@users.noreply.github.com>
Date: Thu, 17 May 2018 15:36:41 +1200
Subject: [PATCH] Update ob-plantuml.el

---
 lisp/ob-plantuml.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 9a9313e7b..3326a6419 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -92,7 +92,9 @@ This function is called by `org-babel-execute-src-block'."
 			(if (string= (file-name-extension out-file) "eps")
 			" -teps" "")
 			(if (string= (file-name-extension out-file) "pdf")
-			" -tpdf" "")
+			" -tpdf" "")			
+			(if (string= (file-name-extension out-file) "tex")
+			" -tlatex" "")
 			(if (string= (file-name-extension out-file) "vdx")
 			" -tvdx" "")
 			(if (string= (file-name-extension out-file) "xmi")


signature.asc
Description: PGP signature


[O] link handling for `file:' fails to stay within Emacs but calls `open file:' with TextEdit

2018-05-21 Thread Van L
Hello.

The link handling for org mode behaves unexpectedly where a file sets
org mode according to `Local variables:' at the end of the file.

In the following, a.org and b.org files work as expected using M-x
org-store-link and M-x org-insert-link for `file:' link.

Without the .org filename extension, following the link calls

  `open file:' which leads to Org Mode opening the file with TextEdit

under mac os, Emacs 26.1 rc-1.


 

;; running  : Emacs.app/Contents/MacOS/Emacs -Q
;; problem  : This two file arrangment for `Emacs -Q' *fails* to follow the 
link.
;; expect   : Emacs to open a link to org file.
;; unexpected   : Emacs calls TextEdit to open org file.
;; solution : if file a and b are called a.org and b.org then there is no 
problem.

;; Solution needs org files named without the `.org’ extension
;; to follow `file:’ links without leaving Emacs.


 
;; file : a


* one

** two

*** three

[[file:b::*title%20%E4%B8%AD][title 中]]

# Local variables:
# mode: org
# End:


 
;; file : b

* work

** title 中

*** chapter


# Local variables:
# mode: org
# End:

 
;; file a.org

* one

** two

*** three

[[file:b.org::*title%20%E4%B8%AD][title 中]]





 
;; file b.org

* work

** title 中

*** chapter







[O] how to have log line written into LOGBOOK drawer

2018-05-21 Thread Julius Dittmar
Hi,

I use a function written by John Kitchin which, among other things, does
some logging. It uses

(org-add-log-setup 'state
  (format "Review Priority %s" new-review-priority)
  current-review-priority
  'time)

for that, where new-review-priority and current-review-priority contain
strings.

Currently those lines are added right after the PROPERTIES drawer. I
would prefer for them to appear in the LOGBOOK drawer. How can I
archieve that?

Thanks in advance,

Julius




[O] Code or Verbatim

2018-05-21 Thread aldo ridhoni
https://orgmode.org/manual/Emphasis-and-monospace.html#Emphasis-and-monospace

https://orgmode.org/guide/Emphasis-and-monospace.html#Emphasis-and-monospace

The manual and guide is different in code and verbatim text. Which one is
the right one?



Re: [O] Localized org-mode

2018-05-21 Thread Rasmus
> is there something like localized/internationalized org? I.e. all
> keywords, like :PROPERTIES: are translated to another language,
> like :EIGENSCHAFTEN: (for German) so it looks more natural in a foreign
> language. It is of a special importance for languages with non-latin
> letters, where the mix of different languages might be
> visually/esthetically disturbing and require switching of keyboard
> layouts while writing. Technically it should be a simple 1-to-1
> substitution based on an org_keyword_vocabulary for a specific language.

There’s a somewhat popular program called "microsoft excel" that I
sometimes have the misfortune of being exposed to.  It has played with the
idea that you propose.  Function names depends on the LOCALE.  How do you
find the mean of a vector, say?  Well, it depends on the LOCALE of the
system.  My experience is that the result is not pleasant!

Localization should at most (if at all) be supported via with overlays as
others have pointed out, but it would be weird when inserting
e.g. properties (C-c C-x p).

Rasmus

-- 
Need more coffee. . .




Re: [O] [POLL] Should Org tempo be enabled by default? (expand templates thru e.g. "<s[TAB]")

2018-05-21 Thread Rasmus
Bastien  writes:

> Hi Rasmus,
>
> Rasmus  writes:
>
>> Do you think org-tempo should try to detect "old" versions of
>> org-structure-template-alist and give a better error if it sees one?
>
> Yes, it definitely should detect old format and fix it.

I don’t remember if I replied to this or not.

In any case, it will not be able to "fix" an old template, as it can be
much more complex than the new syntax.

I would simply raise an error with a helpful text if the "old" format is
detected.

Rasmus

-- 
m-mm-mmm- bacon!




Re: [O] [POLL] Should Org tempo be enabled by default? (expand templates thru e.g. "<s[TAB]")

2018-05-21 Thread Rasmus
Hi,

Aaron Ecay  writes:

> Hi Rasmus,
>
> 2018ko maiatzak 7an, Rasmus-ek idatzi zuen:
>
>> 
>> They’d already have the "old" behavior if it’s enabled by default in
>> org.el.  
>
> Indeed, my suggestion is not an alternative to keeping (what is now
> called) org-tempo turned on by default indefinitely.  It is an
> alternative to turning org-tempo off suddenly.
>
>> Perhaps I’m too cruel or harsh after many years of dealing with the
>> Emacs-way, but I do think that such as change is adequatly documented
>> in ORG-NEWS and the manual.  (Days after a new release there will also
>> be a stackoverflow question for the Googlers).  
>
> Here I am much more conservative than you: I think that puzzling users
> so that they ask questions on stack overflow is an outcome that should
> be avoided if possible.  I also think experience shows that ORG-NEWS is
> missed by a significant fraction of users.

That is a nice thought, at least in theory.  I guess my worry is about the
"costs" of implementing such practices.

Perhaps we could ask people if they want to have the ORG-NEWS file
displayed when a new version of Org is installed. :)

> Besides, I am a programmer not a writer so I believe in the power of
> code over prose :P

I am not a programmer, so perhaps therein lies the difference.


>> Customize-changed would bring up the changes to
>> org-structure-template-alist, which mentions Org Tempo.
>
> Interesting.  I didnʼt know about that function.  I just tried M-x
> customize-changed RET Org 9.0 RET.  That gives an error; it seems to
> only work based on emacs versions and not package versions.  Thatʼs
> unfortunate, it would have been nice if people who install org from ELPA
> could use the function to keep up with org changes independently from
> their emacs version.  (In fact, I just sent this as a feature request to
> the emacs bug tracker, #31383)

I did not know that.  Thanks.

Rasmus

-- 
Dobbelt-A



Re: [O] Inheriting some local variables from source code block editing buffers

2018-05-21 Thread Aaron Ecay
Hi Göktuğ,

A couple of comments:

2018ko maiatzak 18an, Göktuğ Kayaalp-ek idatzi zuen:

[...]

> +(defcustom org-src-apply-risky-edit-bindings 'ask
> +  "What to do if an edit binding is a risky local variable.
> +If this is nil, bindings that satisfy ‘risky-local-variable-p’
> +are skipped, with a warning message.  Otherwise, its value should
> +be a symbol telling how to thread them.  Possible values of this
> +setting are:
> +
> +nil  Skip, warning the user via a message.
> +skip-silent  Skip risky local varibles silently.
> +ask  Prompt user for each variable.
> +tApply the variable but show a warning.
> +apply-silent Apply risky local variables silently."

It would be more consistent/less confusing to use skip-warn and
apply-warn instead of nil and t.  It would also lead to fewer bugs in
the sense that:

[...]

> +(cond ((or (and (eq org-src-apply-risky-edit-bindings 'ask)
> +(y-or-n-p (format prompt-apply name value)))
> +   (eq org-src-apply-risky-edit-bindings 'apply-silent))
> +   (funcall apply-binding))
> +  (org-src-apply-risky-edit-bindings
> +   (prog1
> +   (funcall apply-binding)
> + (message risky-message "Applied" name)))
> +  ((not org-src-apply-risky-edit-bindings)
> +   (message risky-message "Skipped" name))
> +  ((eq org-src-apply-risky-edit-bindings 'skip-silent))
> +  ('else
> +   (user-error
> +"Unexpected value for ‘%S’, will not apply this or any more 
> bindings."
> +'org-src-apply-risky-edit-bindings

If I am reading the above cond correctly, then the (eq
org-src-apply-risky-edit-bindings 'skip-silent) branch will never be
reached, because it will be eaten by the second branch.  (And so will
the “else” branch, for that matter.)

IMO you should use cl-case instead of cond, which will be less conducive
to subtle problems like this and make it clear that the possible values
are exhaustively handled.  (That approach will mean shuffling the y-or-n-p
stuff around slightly).

[...]

> +(defun org-src--parse-edit-bindings (sexp-str pos-beg pos-end)
> +  ;; XXX: require cadr of the varlist items to be atoms, for security?
> +  ;; Or prompt users?  Because otherwise there can be complete
> +  ;; programs embedded in there.

Maybe instead of using risky-local-variable-p above, this feature should
use safe-local-variable-p instead.  Then we wouldnʼt have to worry about
the security implications of allowing non-atom values.  It seems like a
version of this feature that only worked for atoms would be quite limited
in functionality.  In that case, we should probably call the defcustom
above ...apply-unsafe-edit-bindings for the sake of accuracy.

-- 
Aaron Ecay



Re: [O] [POLL] Should Org tempo be enabled by default? (expand templates thru e.g. "<s[TAB]")

2018-05-21 Thread Rasmus
Hi,

Bastien  writes:

>>> One remaining decision to make is: what is the future of org-tempo?  I am
>>> sympathetic to the idea that the best place for it eventually would be
>>> org-contrib or GNU ELPA, and not org core.
>>
>> We don’t have make that decision now, do we?
>
> No.  For now I'd like to get back to your original "trigger" and
> continue to enhance the org-tempo code so that it allows to wrap
> regions around templates.

How would that work?  A snippet is at the beginning of the line?  Also, if
I have delete-selection-mode on it might not make sense to try and "save"
region when expanding a tempo snippet. 

Rasmus


-- 
Evidence suggests Snowden used a powerful tool called monospaced fonts



[O] [partially solved] (was: exporting radio tables longtabular)

2018-05-21 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > | / | <> | <>| <> | <> | <> | <> | 
<> | <>  |
   > |   | Apellido, Nombre   | DNI   | E1 | E2 | E3 | E4 | 
E5 | Res |
   > 
|---++---++++++-|
   > |   | Brauer |   | 1  | 1  | 2  | 3  | 
3  | 10  |
   > # ATTR_LaTeX: :environment longtabu



It seems that the following works:
#+LATEX_HEADER_EXTRA: \usepackage{longtable}
#+ATTR_LATEX: :environment longtable
| / | <> | <>| <> | <> | <> | <> | <> | 
<>  |
|   | Apellido, Nombre   | DNI   | E1 | E2 | E3 | E4 | E5 | 
Res |
|---++---++++++-|
|   | Brauer |   | 1  | 1  | 2  | 3  | 3  | 
10  |


However a bit strange table is generated in the latex file:

\begin{longtable}{|l|l|r|r|r|r|r|r|}
Apellido, Nombre & DNI & E1 & E2 & E3 & E4 & E5 & Res\\ \hline
\hline
\endfirsthead
\multicolumn{8}{l}{Continued from previous page} \\ \hline
\hline

Apellido, Nombre & DNI & E1 & E2 & E3 & E4 & E5 & Res \\ \hline

\hline
\endhead
\hline\multicolumn{8}{r}{Continued on next page} \\ \hline
\endfoot
\endlastfoot
\hline


Why that?

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


[O] exporting radio tables longtabular

2018-05-21 Thread Uwe Brauer


Hi

In  a latex file the following radio table does precisely what I want
% BEGIN RECEIVE ORGTBL this
\begin{longtabu}{|l|l|}
\hline
hallo & this\\ \hline
\end{longtabu}
% END RECEIVE ORGTBL this
\begin{comment}
#+ORGTBL: SEND this orgtbl-to-latex  :lend " \\hline" :environment longtabu
  | / | <>| <>   |
  |---+---+--|
  |   | hallo | this |
\end{comment}


However when I try to work with an org file and exporting the table to a
latex file via

| / | <> | <>| <> | <> | <> | <> | <> | 
<>  |
|   | Apellido, Nombre   | DNI   | E1 | E2 | E3 | E4 | E5 | 
Res |
|---++---++++++-|
|   | Brauer |   | 1  | 1  | 2  | 3  | 3  | 
10  |
# ATTR_LaTeX: :environment longtabu

It is not exported as a lontabu environment.

What do I miss?

Thanks

Uwe Brauer