Re: [O] Bug: Secondary smart quotes are exported as apostrophes. [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/coleman/.emacs.d/elpa/org-9.1.14/)]

2019-01-05 Thread Coleman Gariety
Nicolas,

Thank you for your response.

> When you need that level of precision, smart quotes are not for you.

I agree. However, in specialized fields (linguistics and philosophy, for
example), single quotation marks are commonly used to refer to technical
terms or specialized uses of words
:
"Single
quotes are easier on the eyes when reading material that uses quotes
frequently, which is why academic publishers adopted this format for works
in these areas."

> You can use entities directly to obtain the desired result, e.g. \rsquo,
\lsquo...

I think that this is rather tedious. Do you agree? If so, it seems
reasonable to me that there should be some option to export text such as...

'foo'


...in the form of...

 foo


It occurs to me that an academic who works in the field of linguistics or
philosophy should be able to properly export his or her writing without
using cryptic glyphs ("...") or commenting out line `5545` of `ox.el`. Do
you agree?

Thank you for your time and your consideration.
Coleman

On Thu, Jan 3, 2019 at 3:21 AM Nicolas Goaziou 
wrote:

> Hello,
>
> Coleman Gariety  writes:
>
> > Also, it occurs to me that one can make use of single quotation marks as
> > primary quotes when mentioning a word without using it. Moreover, when
> > italics and double quotation marks are also present, the use of single
> > quotations as primary is necessary.
> >
> > For example:
> >
> > 'GNU' is an acronym for the phrase "GNU's Not Unix!" but GNU is an
> > operating system and *not* an acronym.
>
> When you need that level of precision, smart quotes are not for you.
> "Smart" quotes are a dumb way to automate some basic typographic rules.
> Clearly, this is not what you are after.
>
> You can use entities directly to obtain the desired result, e.g. \rsquo,
> \lsquo...
>
> > Is it feasible to add an option to treat single quotation marks as
> primary
> > pairs on export?
>
> I think you are mixing up the level of quotation and the glyph used. You
> can export "..." as single quotes by setting
> `org-export-smart-quotes-alist' accordingly.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] Org-drill broken with Org 9.2

2019-01-05 Thread Neeum Zawan


Hi,

When I try to run Org-drill, I get the backtrace below.

Others are seeing it too:

https://bitbucket.org/eeeickythump/org-drill/issues/62/org-drill-doesnt-work-with-org-mode-92
Ideas?

Thanks.


Debugger entered--Lisp error: (error "Invalid match tag: \"\"")
 signal(error ("Invalid match tag: \"\""))
 error("Invalid match tag: %S" "")
 org-tags-expand("")
 org-make-tags-matcher("")
 org-map-entries((lambda nil (if (and (not (org-invisible-p)) (> 
 (org-current-level) drill-entry-level)) (progn (if (or (/= 
 (org-current-level) (1+ drill-entry-level)) (funcall test)) 
 (progn (hide-subtree))) (setq drill-sections (cons (point) 
 drill-sections) "" tree)
 (save-excursion (org-map-entries (function (lambda nil (if (and 
 (not (org-invisible-p)) (> (org-current-level) 
 drill-entry-level)) (progn (if (or (/= (org-current-level) (1+ 
 drill-entry-level)) (funcall test)) (progn (hide-subtree))) 
 (setq drill-sections (cons (point) drill-sections)) "" 
 'tree))
 (let ((drill-entry-level (org-current-level)) (drill-sections 
 nil)) (org-show-subtree) (save-excursion (org-map-entries 
 (function (lambda nil (if (and (not (org-invisible-p)) (> 
 (org-current-level) drill-entry-level)) (progn (if (or (/= 
 (org-current-level) (1+ drill-entry-level)) (funcall test)) 
 (progn (hide-subtree))) (setq drill-sections (cons (point) 
 drill-sections)) "" 'tree)) (reverse drill-sections))
 org-drill-hide-subheadings-if((lambda nil (let ((drill-heading 
 (org-get-heading t))) (not (member drill-heading 
 heading-list)

 org-drill-hide-all-subheadings-except(nil)
 (progn (org-drill-hide-all-subheadings-except nil) 
 (org-drill--show-latex-fragments) (condition-case nil (progn 
 (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p)))
 (unwind-protect (progn (org-drill-hide-all-subheadings-except 
 nil) (org-drill--show-latex-fragments) (condition-case nil 
 (progn (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text))
 (progn (org-drill-hide-clozed-text) (unwind-protect (progn 
 (org-drill-hide-all-subheadings-except nil) 
 (org-drill--show-latex-fragments) (condition-case nil (progn 
 (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text)))
 (progn (progn (org-drill-hide-clozed-text) (unwind-protect 
 (progn (org-drill-hide-all-subheadings-except nil) 
 (org-drill--show-latex-fragments) (condition-case nil (progn 
 (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text
 (unwind-protect (progn (progn (org-drill-hide-clozed-text) 
 (unwind-protect (progn (org-drill-hide-all-subheadings-except 
 nil) (org-drill--show-latex-fragments) (condition-case nil 
 (progn (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text 
 (org-drill-unhide-text))
 (progn (org-drill-hide-cloze-hints) (unwind-protect (progn 
 (progn (org-drill-hide-clozed-text) (unwind-protect (progn 
 (org-drill-hide-all-subheadings-except nil) 
 (org-drill--show-latex-fragments) (condition-case nil (progn 
 (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text 
 (org-drill-unhide-text)))
 (progn (progn (org-drill-hide-cloze-hints) (unwind-protect 
 (progn (progn (org-drill-hide-clozed-text) (unwind-protect 
 (progn (org-drill-hide-all-subheadings-except nil) 
 (org-drill--show-latex-fragments) (condition-case nil (progn 
 (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text 
 (org-drill-unhide-text
 (unwind-protect (progn (progn (org-drill-hide-cloze-hints) 
 (unwind-protect (progn (progn (org-drill-hide-clozed-text) 
 (unwind-protect (progn (org-drill-hide-all-subheadings-except 
 nil) (org-drill--show-latex-fragments) (condition-case nil 
 (progn (org-display-inline-images t)) (error nil)) 
 (org-cycle-hide-drawers 'all) (prog1 
 (org-drill-presentation-prompt) (org-drill-hide-subheadings-if 
 'org-drill-entry-p))) (org-drill-unhide-clozed-text 
 (org-drill-unhide-text (org-drill-unhide-text))
 (progn (if org-drill-hide-item-headings-p 
 (org-drill-hide-heading-at-point)) (org-drill-hide-comments) 
 (unwind-protect (progn (progn 

[O] please read: bug when marking tasks done

2019-01-05 Thread cesar mena
hello everyone,

in the maint branch, marking a repeatable task as DONE causes the
"Rescheduled from" dates to be lost in the :LOGBOOK:.

in the below diff all of the from dates are rewritten with the new
scheduled date:

  -  SCHEDULED: <2018-12-04 Tue .+1m>
  +  SCHEDULED: <2019-02-05 Tue .+1m>
 :PROPERTIES:
  -  :LAST_REPEAT: [2018-08-08 Wed 07:40]
  +  :LAST_REPEAT: [2019-01-05 Sat 18:47]
 :END:
 :LOGBOOK:
  -  - Rescheduled from "[2018-11-28 Wed .+1m]" on [2018-11-28 Wed 08:35]
  -  - Rescheduled from "[2018-11-25 Sun .+1m]" on [2018-11-25 Sun 09:17]
  -  - Rescheduled from "[2018-11-20 Tue .+1m]" on [2018-11-22 Thu 10:03]
  -  - Rescheduled from "[2018-11-13 Tue .+1m]" on [2018-11-17 Sat 09:48]
  -  - Rescheduled from "[2018-11-06 Tue .+1m]" on [2018-11-08 Thu 07:02]
  -  - Rescheduled from "[2018-10-28 Sun .+1m]" on [2018-10-30 Tue 16:22]
  -  - Rescheduled from "[2018-10-25 Thu .+1m]" on [2018-10-25 Thu 07:34]
  -  - Rescheduled from "[2018-10-19 Fri .+1m]" on [2018-10-19 Fri 07:48]
  -  - Rescheduled from "[2018-10-16 Tue .+1m]" on [2018-10-16 Tue 16:21]
  -  - Rescheduled from "[2018-10-11 Thu .+1m]" on [2018-10-14 Sun 10:31]
  -  - Rescheduled from "[2018-10-07 Sun .+1m]" on [2018-10-08 Mon 08:48]
  -  - Rescheduled from "[2018-09-27 Thu .+1m]" on [2018-09-29 Sat 18:50]
  -  - Rescheduled from "[2018-09-20 Thu .+1m]" on [2018-09-20 Thu 09:50]
  -  - Rescheduled from "[2018-09-08 Sat .+1m]" on [2018-09-14 Fri 07:10]
  +  - State "DONE"   from "TODO"   [2019-01-05 Sat 18:47]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-28 Wed 08:35]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-25 Sun 09:17]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-22 Thu 10:03]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-17 Sat 09:48]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-11-08 Thu 07:02]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-30 Tue 16:22]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-25 Thu 07:34]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-19 Fri 07:48]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-16 Tue 16:21]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-14 Sun 10:31]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-10-08 Mon 08:48]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-29 Sat 18:50]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-20 Thu 09:50]
  +  - Rescheduled from "[2019-02-05 Tue .+1m]" on [2018-09-14 Fri 07:10]
  
bisect says it was introduced in
af81211fdc01b64449179bcdb77fb1c8ecb3fb94.

cheers all,
-cm



[O] Feature request: Allow export to convert broken links to plain text

2019-01-05 Thread Ryan Thompson
Hi all,

I have a use case where I'd like for Org Mode to remove broken links while
preserving their text when exporting. In particular, I'm exporting the same
file multiple times with different sets of headlines excluded each time,
and as a result I have to be careful of linking to headlines that might not
be present in every export. It would be much easier if such links could
simply be converted back to plain text for that export, while remaining as
a link for any exports that *do* include the target headline. None of the
existing settings do quite what I want. The "mark" option comes closest. I
basically want "mark" but without adding any additional text around the
link's text. Would the developers be willing to merge such a feature if I
wrote it? I would add another possible value to
"org-export-with-broken-links", perhaps calling it something like "unlink"
or "strip".

Thanks,

Ryan Thompson


Re: [O] time range, timestamps // was: docstring typoes in org-read-date-force-compatible-dates

2019-01-05 Thread Kyle Meyer
Van L  writes:

[...]

> I am muddling my way through
>
>  [info:org#Creating timestamps]
>  [info:org#The date/time prompt]
>
> and see that org-evaluate-time-range does nothing for
>
> <2019-01-04 Fri 11:00-12:15>

It looks like org-evaluate-time-range uses org-at-date-range-p, which
matches only the timestamp--timestamp range style.  I'd guess that the
easiest way to make org-evaluate-time-range support the single timestamp
range variant would be to update it to use the org-element api (e.g.,
org-element-context reports the above timestamp as :type active-range).

-- 
kyle



Re: [O] org-ref exports nicely to html but not to odt

2019-01-05 Thread Eric S Fraga
On Saturday,  5 Jan 2019 at 16:59, Uwe Brauer wrote:
> Thanks, right now I am struggling to install the pandoc-citeproc
> filter.

On Debian, it's its own package so easy but I do know that, at least in
the past, the version on Debian was quite significantly behind
upstream.  This may or may not matter to you, of course.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442



[O] Bug: Can't create org-link to heading containing an ampersand

2019-01-05 Thread Joseph Lloyd
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 mailing list.


I have the following heading:

* Example & Test

When I create the following link to it, I expect it to navigate to the heading 
when I call org-open-at-point (C-c C-o):
[[Example & Test][Example & Test]]

Instead, calling org-open-at-point offers to create a new heading. If I say 
yes, a new heading is created, but calling org-open-at-point again on the link 
offers to create another heading identical to the first that was created.

I have org-link-search-must-match-exact-headline set to ‘query-to-create.

It appears that the ampersand is not being found in the heading search.

Emacs  : GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 
Version 10.10.5 (Build 14F2511))
 of 2018-05-30
Package: Org mode version N/A (N/A @ /Users/joseph/.local/src/org-mode/lisp/)

Regards,

Joseph




Re: [O] org-ref exports nicely to html but not to odt

2019-01-05 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga  writes:

   > I use the following (attached) script to convert LaTeX files (usually
   > generated by org) to docx.  It sometimes works well, or at least well
   > enough for my uses.  Maybe you can adapt it to your needs.

Thanks, right now I am struggling to install the pandoc-citeproc filter.


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] open link in source code block

2019-01-05 Thread Win Treese



> On Jan 5, 2019, at 5:25 AM, Eric S Fraga  wrote:
> 
> On Friday,  4 Jan 2019 at 19:38, Win Treese wrote:
>> Suppose I have the following Org file contents:
>> 
>> * test
>> 
>> #+BEGIN_SRC emacs-lisp
>> (setq yyy 3)
>> ;; See https://www.gnu.org
>> #+END_SRC
>> 
>> The URL for gnu.org is highlighted as a clickable link. But if I click
>> it, the source block is evaluated. This seems rather unexpected,
>> especially since my intention was to open the link.
> 
> Probably expected albeit maybe not your preferred behaviour; all about
> precedence.  In any case, I would suggest that the easy solution would
> be to move such links out of the src block.  I usually put these as org
> comments, along the lines of
> 
> # See https://www.gnu.org
> #+BEGIN_SRC emacs-lisp
> (setq yyy 3)
> #+END_SRC
> 
> My approach to literate programming is to have no (significant) comments
> in the code segments themselves.  Each code block is small and has all
> commentary in the text, not the code.

Thanks for the note, Eric.

I think the style you describe is good in most cases. I stumbled over this in a
more complicated situation in which rearranging things doesn’t work.

This seems like a slightly bigger problem, though: clicking on a highlighted
link doesn’t just fail to open the link, it executes the source block, which can
have very unintended side effects.

I wonder if the issue is an artifact of implementation rather than intentional
design: org-open-at-mouse sets point to the location of the click and then
calls org-open-at-point. The documentation at points says that C-c C-o in 
a source block opens the results of evaluation (fair enough, although the
docstring does not).

So the problem seems to be about the mouse click behavior, not the basic
function of org-open-at-point.

Thanks,
Win





[O] [PATCH] fix org-num-mode detect enabled already issue

2019-01-05 Thread stardiviner


When I execute command `[M-x org-mode]` on an Org buffer which is
already have `org-num-mode` enabled. It will re-generate overlay.

Here is a quick patch:

modified   lisp/org-num.el
@@ -438,17 +438,16 @@ NUMBERING is a list of numbers."
 (define-minor-mode org-num-mode
   "Dynamic numbering of headlines in an Org buffer."
   :lighter " o#"
-  (cond
-   (org-num-mode
+  (if org-num-mode
+  (progn
+   (mapc #'delete-overlay org-num--overlays)
+   (setq org-num--overlays nil)
+   (remove-hook 'after-change-functions #'org-num--verify t))
 (unless (derived-mode-p 'org-mode)
   (user-error "Cannot activate headline numbering outside Org mode"))
 (setq org-num--numbering nil)
 (setq org-num--overlays (nreverse (org-num--number-region nil nil)))
-(add-hook 'after-change-functions #'org-num--verify nil t))
-   (t
-(mapc #'delete-overlay org-num--overlays)
-(setq org-num--overlays nil)
-(remove-hook 'after-change-functions #'org-num--verify t
+(add-hook 'after-change-functions #'org-num--verify nil t)))

-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



[O] [ANN (mini)] Avoid fast tag selection for one call

2019-01-05 Thread Marco Wahl
Hi,

This is a slight enhancement, I think, and hopefully useful for others
too.

Now with C-u C-u before ~org-set-tags-command~ (e.g. C-u C-u C-c C-c)
the fast tag selection interface is avoided and the plain tag selection
interface appears.


Ciao,  Marco





Re: [O] open link in source code block

2019-01-05 Thread Eric S Fraga
On Friday,  4 Jan 2019 at 19:38, Win Treese wrote:
> Suppose I have the following Org file contents:
>
> * test
>
> #+BEGIN_SRC emacs-lisp
> (setq yyy 3)
> ;; See https://www.gnu.org
> #+END_SRC
>
> The URL for gnu.org is highlighted as a clickable link. But if I click
> it, the source block is evaluated. This seems rather unexpected,
> especially since my intention was to open the link.

Probably expected albeit maybe not your preferred behaviour; all about
precedence.  In any case, I would suggest that the easy solution would
be to move such links out of the src block.  I usually put these as org
comments, along the lines of

 # See https://www.gnu.org
 #+BEGIN_SRC emacs-lisp
 (setq yyy 3)
 #+END_SRC

My approach to literate programming is to have no (significant) comments
in the code segments themselves.  Each code block is small and has all
commentary in the text, not the code.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442



Re: [O] org-ref exports nicely to html but not to odt

2019-01-05 Thread Eric S Fraga
I use the following (attached) script to convert LaTeX files (usually
generated by org) to docx.  It sometimes works well, or at least well
enough for my uses.  Maybe you can adapt it to your needs.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442
#!/bin/sh -f
BASE=$(basename $1 .tex)
CSL="/home/ucecesf/synced/share/citation.styles/acm-siggraph.csl"
if [ -f default.csl ]; then
CSL="default.csl"
fi
echo "Converting " $BASE.tex " to " $BASE.docx " using bib style " $CSL
pandoc --bibliography=/home/ucecesf/synced/share/texmf/bibtex/bib/bibliography.bib --csl=${CSL} --filter pandoc-citeproc ${BASE}.tex -o ${BASE}.docx
#pandoc --bibliography=/home/ucecesf/share/texmf/bibtex/bib/papers.bib --csl=/home/ucecesf/synced/share/citation.styles/elsevier-with-titles.csl --filter pandoc-citeproc ${BASE}.tex -o ${BASE}.docx


Re: [O] org-ref exports nicely to html but not to odt

2019-01-05 Thread Uwe Brauer

   > I have used pandoc a little a while ago.   See
   > 
http://kitchingroup.cheme.cmu.edu/blog/2015/01/29/Export-org-mode-to-docx-with-citations-via-pandoc/

   > If you search pandoc on my blog you may find some more.

Thanks for pointing that out I did visit your blog. The resulting docx
does not contain hyperref links to the references, as far as I can see.


smime.p7s
Description: S/MIME cryptographic signature