Re: [O] Bug report

2016-06-01 Thread Nicolas Goaziou
Hello,

Dan  writes:

> Here is how I reproduce the bug: 
>
> In org-mode (latest version) write \alpha. Then, put the cursor
> somewhere in the word. Press C-c C-x \ in order to display nice utf
> letters (greek, superscript etc). Then move right with the keyboard.
> Emacs crashes every time.

I cannot reproduce it. However, if you can do it reliably, I suggest to
report it as an Emacs bug instead (e.g., with `report-emacs-bug').

Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] error with org-refile and ido-completion-help

2016-06-01 Thread Matt Lundin
Matt Lundin  writes:

> Nicolas Goaziou  writes:
>
>>> A git bisect revealed that the change was introduced in 2015 with the
>>> following commit:
>>>
>>> ,
>>> | commit 50ba0a5ed609f3600f2590f3ba22b8ab3ff3331c
>>> | Author: Nicolas Goaziou 
>>> | Date:   Sun Jun 7 00:38:58 2015 +0200
>>> | 
>>> | Fix 1a7364177046b8a57ade0aeb9f52bacfc0b8b088
>>> | 
>>> | * lisp/org.el (org-icompleting-read): Let `completing-read' or
>>> |   equivalent sort out type of completion.
>>> | (org-olpath-completing-read): Revert partially
>>> | 1a7364177046b8a57ade0aeb9f52bacfc0b8b088.
>>> `
>>>
>>> It looks like this commit removed some functionality from the now
>>> obsolete org-icompleting-read that made sure that the items in the
>>> completion list passed to the completing read function were strings.
>>
>> Actually, this is a bug in "ido.el", since `ido-completing-read' is not
>> a drop-in replacement for `completing-read'.  The latter accepts lists
>> of strings, but also alist, obarrays and hash tables. The former accepts
>> only list of strings.
>>
>> I suggest to report the bug to "ido.el" maintainers since they probably
>> want to preserve compatibility between the completion functions.
>
> OK. Thanks. I see that a bug report has been on the emacs list since
> 2013: 
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15430
>
> For the time being, it's easy enough to write a custom wrapper around
> ido-completing-read, so I think I'll do that.
>
> It's worth nothing that the author of patch that originally added the
> completing-read-function variable did not anticipate that
> ido-completing-read would be a simple drop-in for completing-read:
>
> http://thread.gmane.org/gmane.emacs.devel/134000
>
> For a long time (since at least 2009), org-mode had built-in support for
> ido-mode completion when refiling. So this does seem to be a deprecation
> of longstanding org-mode functionality.
>
> I'll see if we can add something to the docstrings to alert of the need
> to write a wrapper around ido-completing-read.

I think the simplest thing is just to remove the obsolete info in the
manual. Please see the attached patch.

Best,
Matt

>From d66e08b15ddb107135b5cbaa6582c9461347a3a4 Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Wed, 1 Jun 2016 12:04:14 -0500
Subject: [PATCH] Remove paragraph about obsolete variables

* doc/org.texi: Remove paragraph documenting now obsolete variables
  org-completion-use-ido and org-completion-use-iswitchbp.
---
 doc/org.texi | 6 --
 1 file changed, 6 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index 88c506c..36ab999 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -16931,12 +16931,6 @@ emacs -Q --batch \
 @cindex tag completion
 @cindex link abbreviations, completion of
 
-Emacs would not be Emacs without completion, and Org mode uses it whenever it
-makes sense.  If you prefer an @i{iswitchb}- or @i{ido}-like interface for
-some of the completion prompts, you can specify your preference by setting at
-most one of the variables @code{org-completion-use-iswitchb}
-@code{org-completion-use-ido}.
-
 Org supports in-buffer completion.  This type of completion does
 not make use of the minibuffer.  You simply type a few letters into
 the buffer and use the key to complete text right there.
-- 
2.8.3



[O] [PATCH] Make today's deadlines "close" without lead time

2016-06-01 Thread Don March
This patch makes a very small change to the function that determines if a
timestamp is close to the current day, which is used for showing/hiding items in
agenda views.

Under current behavior, a deadline of today is close only if it has some amount
of lead time. If your date is 2016-06-01, the following statements evaluate to
nil:
#+BEGIN_SRC emacs-lisp
(org-deadline-close "2016-06-01 Wed -0d") ;; but this is today!
(org-deadline-close "2016-06-02 Wed -1d")
#+END_SRC

One effect of this is that if you set =org-agenda-todo-ignore-deadlines= to
=far= and generate the TODO list agenda view (C-c a t), then items only appear
if you are one day past the point at which they should appear. For example, the
following item does not show up in my current TODO list:
#+BEGIN_EXAMPLE
* TODO due today, no lead time
DEADLINE: <2016-06-01 -0d>
#+END_EXAMPLE
From 5401da2076b9de890fbf086e472c09c3f0a66fdf Mon Sep 17 00:00:00 2001
From: Don March 
Date: Wed, 1 Jun 2016 00:05:12 -0400
Subject: [PATCH] Make today's deadlines "close" without lead time

* org.el (org-deadline-close): A timestamp is close if the days between
  now and the timestamp are less then or equal to the days of lead time.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 680086d..fb9e101 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17479,7 +17479,7 @@ If SECONDS is non-nil, return the difference in seconds."
 (defun org-deadline-close (timestamp-string  ndays)
   "Is the time in TIMESTAMP-STRING close to the current date?"
   (setq ndays (or ndays (org-get-wdays timestamp-string)))
-  (and (< (org-time-stamp-to-now timestamp-string) ndays)
+  (and (<= (org-time-stamp-to-now timestamp-string) ndays)
(not (org-entry-is-done-p
 
 (defun org-get-wdays (ts  delay zero-delay)
-- 
2.8.1



[O] Bug report

2016-06-01 Thread Dan
Hi,

Here is how I reproduce the bug: 

In org-mode (latest version) write \alpha. Then, put the cursor somewhere in 
the word. Press C-c C-x \ in order to display nice utf letters (greek, 
superscript etc). Then move right with the keyboard. Emacs crashes every time.

Thank you, 

Daniel Fleischer




Re: [O] [PATCH] org: Fix tag width calculation for multi-column chars

2016-06-01 Thread Nicolas Goaziou
Hello,

Yasushi SHOJI  writes:

> Ah, the patch was intended for the branch maint.

You're right, Tags section doesn't exist in in maint, so all is good.

> Would you remove the extra section marker (";;; Tags") thing when
> merge to master?  It merges cleanly from maint to master but leaves
> the marker.

I'll take care of the merging back to master.

> please pull from:
>
>   https://github.com/yashi/org-mode tag-width-fix

I'd rather have the patch with the commit message as an attachment, if
you don't mind.

Thank you !


Regards,

-- 
Nicolas Goaziou



Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> Rasmus  writes:

>> From the Beamer manual, 10.2 (latest TL version): 
>>
>>  \section<⟨mode specification⟩>[⟨short section name⟩]{⟨section name⟩}
>>
>>  Starts a section. No heading is created. The ⟨section name⟩ is shown in
>>  the table of contents and in the navigation bars, except if ⟨short 
>> section
>>  name⟩ is specified. In this case, ⟨short section name⟩ is used in the
>>  navigation bars instead. If a ⟨mode specification⟩ is given, the command
>>  only has an effect for the specified modes.

So I guess "ox-beamer.el" should generate

  \section[alt title]{level 1}

from

 * level 1 :tag:
 :PROPERTIES:
 :ALT_TITLE: alt title
 :END:

when tags:not-in-toc is provided.

>> I guess the most sane solution is to not support tags:not-in-toc in
>> ox-beamer (or in general).
>
> I agree - that might be the easiest solution.

Not that I do mind removing it, but I don't understand why you suggest
that tags:not-in-toc should not be used. It works as expected is almost
all back-ends, doesn't it?

Regards,

-- 
Nicolas Goaziou



Re: [O] [BUG] error with org-refile and ido-completion-help

2016-06-01 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

>> For a long time (since at least 2009), org-mode had built-in support for
>> ido-mode completion when refiling. So this does seem to be a deprecation
>> of longstanding org-mode functionality.

Org mode didn't provide any completion functionality, but provided a fix
for ido. I think that task doesn't belong to Org, since the problem is
not specific to the package.

Besides, it is still possible to use ido for completion.

> I think the simplest thing is just to remove the obsolete info in the
> manual. Please see the attached patch.

Thank you. Applied.

Regards,

-- 
Nicolas Goaziou



[O] Bug: not defined [8.2.10 (release_8.2.10 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2016-06-01 Thread Kejia柯嘉
From: Kejia Wu 
To: emacs-orgmode@gnu.org
Subject: Bug:  not defined [8.2.10 (release_8.2.10 @
/Applications/Emacs.app/Contents/Resources/lisp/org/)]
Date: Wed, 01 Jun 2016 09:24:47 -0400
Message-ID: 
--text follows this line--

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

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

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


 does enter an editing buffer, and in terms of the manual
(http://orgmode.org/manual/Literal-examples.html)  does exit the
buffer:
```
C-c '
Edit the source code example at point in its native mode. This works
by switching to a temporary buffer with the source code. You need to
exit by pressing C-c ' again.
'''
however,  is not defined in the code editing buffer now.

Emacs  : GNU Emacs 25.1.50.1 (x86_64-apple-darwin13.4.0, NS
appkit-1265.21 Version 10.9.5 (Build 13F1603))
 of 2016-05-19
Package: Org-mode version 8.2.10 (release_8.2.10 @
/Applications/Emacs.app/Contents/Resources/lisp/org/)

current state:
==
(setq
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-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-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-hide-inline-tasks
 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)
 )



Re: [O] Bug: not defined [8.2.10 (release_8.2.10 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2016-06-01 Thread Nicolas Goaziou
Hello,

Kejia柯嘉  writes:

>  does enter an editing buffer, and in terms of the manual
> (http://orgmode.org/manual/Literal-examples.html)  does exit the
> buffer:
> ```
> C-c '
> Edit the source code example at point in its native mode. This works
> by switching to a temporary buffer with the source code. You need to
> exit by pressing C-c ' again.
> '''
> however,  is not defined in the code editing buffer now.
>
> Emacs  : GNU Emacs 25.1.50.1 (x86_64-apple-darwin13.4.0, NS
> appkit-1265.21 Version 10.9.5 (Build 13F1603))
>  of 2016-05-19
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> /Applications/Emacs.app/Contents/Resources/lisp/org/)

Could you upgrade Org to a more recent version and try again?

Regards,

-- 
Nicolas Goaziou



[O] babel and bibliography

2016-06-01 Thread Joseph Mingrone
Hi,

For the simple example below, is there a better way to include the bibliography,
so that if the document is exported to HTML, the LaTeX code isn't included?


#+TITLE:
#+AUTHOR:
#+LaTeX_HEADER: \usepackage{natbib}

The moon in June is like a big ballon \citep{self1987asymptotic}.

\bibliographystyle{abbrvnat}
\bibliography{/home/jrm/scm/references.git/refs}


I've seen documentation and examples using ox-bibtex, but those don't seem to
apply any longer with newer versions or org-mode.  I'm running 8.3.4 in Emacs
25.0.94.1 (5th pretest for version 25.1).

Regards,

Joseph


signature.asc
Description: PGP signature


Re: [O] assign tags via helm/avy?

2016-06-01 Thread Xebar Saram
Thx so much guys for the great answers

Kaushal Modi: cousel-org-tag is fantastic and works very well for me

John: i did try helm with (mapcar 'car 'org-tag-persistent-alist ) but it
gave me an error:

cons: Wrong type argument: sequencep, org-tag-persistent-alist


the code i used:

(defun helm-tagger ()
  (interactive)
  (helm
   :sources
   `((name . "HELM tag setter")
 (candidates . ,(mapcar 'car 'org-tag-persistent-alist ))
 (action . (lambda (candidate)
 (org-set-tags-to (helm-marked-candidates)))


to be honest cousel-org-tag works really well but if anyone else is
interested in the helm part ive posted the error

kind regards

Z



On Tue, May 31, 2016 at 6:40 AM, Kaushal Modi 
wrote:

>
>
> On Mon, May 30, 2016, 11:18 PM Xebar Saram  wrote:
>
>> thx so much john!
>>
>> is there a way where the function can auto read all the tags from
>> "org-tag-persistent-alist " instead of manfully adding to the function each
>> time a new tag is added?
>>
>> best
>>
>> Z
>>
>
> If you use the ivy-family of list completion, check out the counsel
> package, and the cousel-org-tag function in there.
>
>> --
>
> --
> Kaushal Modi
>


Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> OK. Here it is:
>>
>> #+TITLE: An Example
>> #+EMAIL: rai...@krugs.de
>>
>> #+OPTIONS:   tags:not-in-toc
>>
>> #+LATEX_CLASS: beamer
>> #+OPTIONS:   H:2 toc:t
>>
>> * Level 1   :andHereIsTheTag:
>> ** A Frame
>> #+begin_example
>> Org-mode version 8.3.4 (release_8.3.4-850-g9dbeaa @ 
>> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
>> GNU Emacs 25.0.94.1 (x86_64-apple-darwin15.4.0, Carbon Version 157 AppKit 
>> 1404.46) of 2016-05-24
>> #+end_example
>>
>>
>> The problem is beamer - with the other exports it works. With beamer,
>> I get the pdf at [[https://www.dropbox.com/s/fc6z9wszxl5vv9i/text.pdf?dl=0]]
>
> I cannot reproduce it. Could you show the LaTeX code generated?

Here it is

Rainer

--8<---cut here---start->8---
% Created 2016-06-01 Wed 10:04
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{color}
\usepackage{listings}
\usetheme{default}
\author{Rainer M. Krug}
\date{\today}
\title{An Example}
\hypersetup{
 pdfauthor={Rainer M. Krug},
 pdftitle={An Example},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 25.0.94.1 (Org mode 8.3.4)}, 
 pdflang={English}}
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}


\section[Level 1]{Level 1\hfill{}\textsc{andHereIsTheTag}}
\label{sec:orgf7a1edf}
\begin{frame}[fragile,label={sec:org61ac01b}]{A Frame}
 \begin{verbatim}
Org-mode version 8.3.4 (release_8.3.4-850-g9dbeaa @ 
/Users/rainerkrug/.emacs.d/org-mode/lisp/)
GNU Emacs 25.0.94.1 (x86_64-apple-darwin15.4.0, Carbon Version 157 AppKit 
1404.46) of 2016-05-24
\end{verbatim}
\end{frame}
\end{document}
--8<---cut here---end--->8---

>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Rainer M Krug
John Hendy  writes:

> On Fri, May 27, 2016 at 11:15 AM, Rainer M Krug  wrote:
>> Nicolas Goaziou  writes:
>>
>>> Hello,
>>>
>>> Rainer M Krug  writes:
>>>
 When I generate a pdf, the tags are in the TOC - but tags:not-in-toc
 means that the tags are *not* in the toc - possibly only in the headers
 itself? I don't know.

 Just checked, the tags are also in the toc in html export.

 According to the documentation:

 ,
 | If this is the symbol ‘not-in-toc’, tags will be removed from
 | table of contents entries, but still be shown in the headlines of
 | the document.
 `

 This is not working anymore.
>>>
>>> I cannot reproduce it, at least on HTML, LaTeX, and ASCII export. Could
>>> you show an ECM ?
>>
>> OK. Here it is:
>>
>> --8<---cut here---start->8---
>> #+TITLE: An Example
>> #+EMAIL: rai...@krugs.de
>>
>> #+OPTIONS:   tags:not-in-toc
>>
>> #+LATEX_CLASS: beamer
>> #+OPTIONS:   H:2 toc:t
>>
>> * Level 1   :andHereIsTheTag:
>> ** A Frame
>> #+begin_example
>> Org-mode version 8.3.4 (release_8.3.4-850-g9dbeaa @ 
>> /Users/rainerkrug/.emacs.d/org-mode/lisp/)
>> GNU Emacs 25.0.94.1 (x86_64-apple-darwin15.4.0, Carbon Version 157 AppKit 
>> 1404.46) of 2016-05-24
>> #+end_example
>> --8<---cut here---end--->8---
>>
>>
>> The problem is beamer - with the other exports it works. With beamer,
>> I get the pdf at [[https://www.dropbox.com/s/fc6z9wszxl5vv9i/text.pdf?dl=0]]
>>
>
> As is, I get the tag in beamer, article, and html. You're saying you
> *don't* get the tag in article/html, but you *do* in beamer? If so, I
> can't reproduce. Behavior is consistent with what I'd expect, namely
> that tags export, but setting tags:nil turns that off.

The tags *do* export to the *headers*, which is expected, but *should not* be
in the toc.

Cheers,

Rainer

>
>
> John
>
>> Cheers,
>>
>> Rainer
>>
>>>
>>> Regards,
>>
>> --
>> Rainer M. Krug
>> email: Rainerkrugsde
>> PGP: 0x0F52F982

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> \section[Level 1]{Level 1\hfill{}\textsc{andHereIsTheTag}}

IIUC, according to this line, tags should be removed from the toc.

This issue may be related to Beamer.

Regards,

-- 
Nicolas Goaziou



Re: [O] assign tags via helm/avy?

2016-06-01 Thread John Kitchin
I had one too many quotes in there. It should have been ,(mapcar 'car
org-tag-persistent-alist)

The counsel command is nice too. I have a lot of helm muscle memory to
work with though ;)

Xebar Saram writes:

> Thx so much guys for the great answers
>
> Kaushal Modi: cousel-org-tag is fantastic and works very well for me
>
> John: i did try helm with (mapcar 'car 'org-tag-persistent-alist ) but it
> gave me an error:
>
> cons: Wrong type argument: sequencep, org-tag-persistent-alist
>
>
> the code i used:
>
> (defun helm-tagger ()
>   (interactive)
>   (helm
>:sources
>`((name . "HELM tag setter")
>  (candidates . ,(mapcar 'car 'org-tag-persistent-alist ))
>  (action . (lambda (candidate)
>  (org-set-tags-to (helm-marked-candidates)))
>
>
> to be honest cousel-org-tag works really well but if anyone else is
> interested in the helm part ive posted the error
>
> kind regards
>
> Z
>
>
>
> On Tue, May 31, 2016 at 6:40 AM, Kaushal Modi 
> wrote:
>
>>
>>
>> On Mon, May 30, 2016, 11:18 PM Xebar Saram  wrote:
>>
>>> thx so much john!
>>>
>>> is there a way where the function can auto read all the tags from
>>> "org-tag-persistent-alist " instead of manfully adding to the function each
>>> time a new tag is added?
>>>
>>> best
>>>
>>> Z
>>>
>>
>> If you use the ivy-family of list completion, check out the counsel
>> package, and the cousel-org-tag function in there.
>>
>>> --
>>
>> --
>> Kaushal Modi
>>


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Some LaTeX Beamer / org-mode questions

2016-06-01 Thread Rasmus
Florian Lindner  writes:

> On Mon, 30 May 2016 13:53:52 +0200
> Rasmus  wrote:
>
>> Hi,
>> 
>> Florian Lindner  writes:
>> 
>> >> #+options: title:nil  
>> >
>> > Sorry, can't make it work.  
>> >> #+subtitle:  
>> >
>> > Neither that works for me  
>> 
>> Are you sure you are using an up-to-date version of Org?
>> M-x org-version should return 8.3.something.
>
> Ah, you were right. I used the builtin org version.
>
> It works now, however, when I set the title:nil is does not produce a
> title page at all.
>
> #+BEGIN_LATEX
> \maketitle
> #+END_LATEX

Or:

@@latex:\maketitle@@.

What exactly are you missing from the standard title page support of Org?

> inserts a title page, but after the table of contents.
>
> Any way to work around that?

Yes, the #+TOC keyword combined with the option toc:nil.

 http://orgmode.org/org.html#Table-of-contents

Rasmus

-- 
Dobbelt-A




[O] colored code background in org 8.3

2016-06-01 Thread John Kitchin
Hi all,

I am finally getting around to switching over to org 8.3... One thing I
miss already is the colored background in the code blocks. I recall that
was removed. Has anyone looked into a way to put it back?


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> \section[Level 1]{Level 1\hfill{}\textsc{andHereIsTheTag}}
>
> IIUC, according to this line, tags should be removed from the toc.
>
> This issue may be related to Beamer.

>From the Beamer manual, 10.2 (latest TL version): 

 \section<⟨mode specification⟩>[⟨short section name⟩]{⟨section name⟩}

 Starts a section. No heading is created. The ⟨section name⟩ is shown in
 the table of contents and in the navigation bars, except if ⟨short section
 name⟩ is specified. In this case, ⟨short section name⟩ is used in the
 navigation bars instead. If a ⟨mode specification⟩ is given, the command
 only has an effect for the specified modes.

I guess the most sane solution is to not support tags:not-in-toc in
ox-beamer (or in general).

A latex hack might be something like this (untested):

\section{title}
\section*{title \hfill :tags:} % to not mess up if someone uses 
article mode


Here’s another hack that can be applied in a org latex document class.

http://tex.stackexchange.com/questions/203105/short-section-name-in-toc

Rasmus

-- 
Look, it is what it is because of what it was



Re: [O] Some LaTeX Beamer / org-mode questions

2016-06-01 Thread Florian Lindner


On Mon, 30 May 2016 13:53:52 +0200
Rasmus  wrote:

> Hi,
> 
> Florian Lindner  writes:
> 
> >> #+options: title:nil  
> >
> > Sorry, can't make it work.  
> >> #+subtitle:  
> >
> > Neither that works for me  
> 
> Are you sure you are using an up-to-date version of Org?
> M-x org-version should return 8.3.something.

Ah, you were right. I used the builtin org version.

It works now, however, when I set the title:nil is does not produce a
title page at all.

#+BEGIN_LATEX
\maketitle
#+END_LATEX

inserts a title page, but after the table of contents.

Any way to work around that?

Best,
Florian




Re: [O] [PATCH] org: Fix tag width calculation for multi-column chars

2016-06-01 Thread Yasushi SHOJI
Hi Nicolas,

On Wed, 01 Jun 2016 05:02:58 +0900,
Nicolas Goaziou wrote:
> Yasushi SHOJI  writes:
> > Let me know if I miss something.
> 
> Could you send it again with an appropriate commit message and using git
> format-patch?

Oops.  Sorry about the format=flowed.  Not sure how I got that, but
might be gmail thing.  I'll use NNTP or git pull request next time.

> Also, there is already a "Tags" section in "test-org.el". Could you add
> your tests there instead of creating a new section?

Ah, the patch was intended for the branch maint.

Would you remove the extra section marker (";;; Tags") thing when
merge to master?  It merges cleanly from maint to master but leaves
the marker.

please pull from:

  https://github.com/yashi/org-mode tag-width-fix

ps. If you want me to change it for master, let me know.  I'll do it.
--
yashi



Re: [O] [PATCH] org: Fix tag width calculation for multi-column chars

2016-06-01 Thread Yasushi SHOJI
Hi Samuel,

On Wed, 01 Jun 2016 06:06:02 +0900,
Samuel Wales wrote:
> 
> i wonder if this also fixes tags for variable pitch (proportional)
> fonts.  i have been having great success with variable pitch fonts and
> it would be great if this fixes tags for them too.

This fix is nothing to do with propotional fonts.  What kind of
problem do you have right now?  Any screen shot or an ECM?

If you are refering to the Ambiguous width defined in UAX#11, it might.
-- 
   yashi





[O] swindle.org

2016-06-01 Thread Jude DaShiell
Here's a small org file for logging all of those attempted swindle calls. 
Use this and if you talk to authorities or consumer protection types 
you'll have your ducks in a row.


| date | message | call | notes |
|--+-+--+---|
|  | |  |   |

--




Re: [O] BUG: in beamer export non-beamer tags exported as part of header

2016-06-01 Thread Rainer M Krug
Rasmus  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
>>> \section[Level 1]{Level 1\hfill{}\textsc{andHereIsTheTag}}
>>
>> IIUC, according to this line, tags should be removed from the toc.
>>
>> This issue may be related to Beamer.
>
> From the Beamer manual, 10.2 (latest TL version): 
>
>  \section<⟨mode specification⟩>[⟨short section name⟩]{⟨section name⟩}
>
>  Starts a section. No heading is created. The ⟨section name⟩ is shown in
>  the table of contents and in the navigation bars, except if ⟨short 
> section
>  name⟩ is specified. In this case, ⟨short section name⟩ is used in the
>  navigation bars instead. If a ⟨mode specification⟩ is given, the command
>  only has an effect for the specified modes.
>
> I guess the most sane solution is to not support tags:not-in-toc in
> ox-beamer (or in general).

I agree - that might be the easiest solution.

Rainer


>
> A latex hack might be something like this (untested):
>
> \section{title}
> \section*{title \hfill :tags:} % to not mess up if someone uses 
> article mode
>
>
> Here’s another hack that can be applied in a org latex document class.
>
> http://tex.stackexchange.com/questions/203105/short-section-name-in-toc
>
> Rasmus

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] [PATCH] org: Fix tag width calculation for multi-column chars

2016-06-01 Thread Rasmus
Samuel Wales  writes:

> i wonder if this also fixes tags for variable pitch (proportional)
> fonts.  i have been having great success with variable pitch fonts and
> it would be great if this fixes tags for them too.

No.


https://www.gnu.org/software/emacs/manual/html_node/elisp/Size-of-Displayed-Text.html


You'd need pixel alignment.

Here’s a version that aligns the left part pf tags.

(defun org-align-tags-here ( arg)
  ;; Assumes that this is a headline
  "Align tags on the current headline to TO-COL."
  (save-excursion
(when (org-at-heading-p)
  (beginning-of-line)
  (re-search-forward org-complex-heading-regexp (line-end-position) t)
  (when (match-end 5) ; There’s a tag.
(goto-char (match-end 4))
(delete-region (point) (match-beginning 5))
(insert (propertize
 (make-string (- (abs org-tags-column) (current-column)
 (- (match-end 5) (match-beginning 5)))
  ?\s)
 ;; one would need somehow intelligently figure out
 ;; the maximum pixel number.
 'display '(space :align-to (600


Questions if we were to pixel align:

- Can we drop right alignment of tags? (i.e. org-tags-column < 0).
- We might need to know the pixel width of :tags: anyway to set the width
  of the white space to "right-margin" - "width-of-tags".  Is this robust
  to resizing?  Or is there a "\hfill"-like property for Emacs space?
- How to determine max width on "auto-filled" file?  Go through each line
  or just make it a custom value?

Perhaps a nice "conservative" way is to introduce a org-tags-column-pixel,
but if we can find a good "automatic" way that’s nicer IMO.

Rasmus

-- 
The second rule of Fight Club is: You do not talk about Fight Club




Re: [O] [ox-publish, patch] More flexible sitemaps

2016-06-01 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> This was by far the hardest part...

Thank you. Some comments follow.

> +(defun org-publish-find-property (file property  reset)
> +  "Find the PROPERTY of FILE in project.
> +PROPERTY can be a string or a symbol-property."

Could you also document RESET argument?

> +  (unless (or (file-directory-p file) (directory-name-p file))

What is `directory-name-p'?

> +(let ((prop (cond ((stringp property)
> +   (intern (downcase (format ":%s" property
> +  (t property

The following might be more robust:

  (if (keywordp property) property
(intern (downcase (format ":%s" property)))

> +  (and (not reset) (org-publish-cache-get-file-property file prop nil t))

(unless reset ...)

Anyway, you don't seem to use the return value. If this is used for
side-effect only, you may want to call `org-publish-initialize-cache'
instead.

> +  (let* ((org-inhibit-startup t)
> + (visiting (find-buffer-visiting file))
> + (buffer (or visiting (find-file-noselect file)))
> + (case-fold-search t))
> +(with-current-buffer buffer
> +  ;; protect local variables in open buffers
> +  (org-export-with-buffer-copy
> +   (let* ((backends (append (list nil)
> +(mapcar 'org-export-backend-name
> +org-export-registered-backends)))
> +  (value (cl-loop for backend in backends
> +  when (org-no-properties
> +(org-element-interpret-data
> + (plist-get 
> (org-export-get-environment backend)
> +prop)))
> +  return it)))

Return value of `org-element-interpret-data' is never nil so the loop
always returns the first back-end.

In any case, this is sub-optimal since common keywords are retrieved for
each back-end. Also, two back-ends could use the same keyword, with
different values (e.g., using `parsed' or not).

One option could be to change the policy about keywords in ox.el and
move KEYWORDS and SUBTITLE there. Unfortunately, there is still a change
to miss some cases.

Another option would be to provide BACKEND to sitemap-function. I think
it can be backward-compatible if we make it an optional argument.

> +(defcustom org-publish-sitemap-file-entry-format "%- [[file:%link][%TITLE]]"
>"Format string for site-map file entry.
> -You could use brackets to delimit on what part the link will be.
>  
> -%t is the title.
> -%a is the author.
> -%d is the date formatted using `org-publish-sitemap-date-format'."
> +Most keywords can be accessed using a the name of the keyword
> +prefixed with \"%\", e.g. \"%TITLE\" or \"%KEYWORDS\".  In
> +addition, the following keywords are defined.
> +
> +  %fullpath
> +The full path of the file.
> +
> +  %relpath
> +The relative path of the file.
> +
> +  %filename
> +  %f
> +The filename.
> +
> +  %link
> +  %l
> +The link.
> +
> +  %*
> +Leveled headline relative to the base directory.
> +
> +  %*
> +Leveled item relative to the base directory.
> +
> +  %author
> +The author of the document, the project, or `user-full-name'.
> +
> +  %date
> + Date formatted using `org-publish-sitemap-date-format'.
> +
> +See also `org-publish-sitemap-dir-entry-format'."

Could it be possible to use single-char placeholders and `format-spec',
which is more robust than replace-match (e.g., it is possibl to escape
percent signs)...

> +(defcustom org-publish-sitemap-dir-entry-format "%- %f"
> +  "Format string for site-map file entry.
> +
> +The following keywords are defined.
> +
> +  %fullpath
> +The full path of the file.
> +
> +  %relpath
> +The relative path of the file.
> +
> +  %filename
> +  %f
> +The filename.
> +
> +  %link
> +  %l
> +The link.
> +
> +  %*
> +Leveled headline relative to the base directory.
> +
> +  %*
> +Leveled item relative to the base directory.
> +
> +  %author
> +The author of the document, the project, or `user-full-name'.
> +
> +  %date
> + Date formatted using `org-publish-sitemap-date-format'.

Ditto.

> @@ -1292,11 +1394,11 @@ Returns value on success, else nil."
>  (defun org-publish-cache-ctime-of-src (file)
>"Get the ctime of FILE as an integer."
>(let ((attr (file-attributes
> -(expand-file-name (or (file-symlink-p file) file)
> -  (file-name-directory file)
> +   (expand-file-name (or (file-symlink-p file) file)
> + (file-name-directory file)

Maybe 

  (file-truename file)

instead.

> +  `:sitemap-preamble'
> +  `:sitemap-postamble'
> +
> +Preamble and postamble for sitemap.  Useful for inserting
> +#+OPTIONS: keywords, footers etc.  See
> +