Re: [O] Name-space prefixes in ox- packages

2017-09-09 Thread Kaushal Modi
On Sat, Sep 9, 2017 at 9:36 AM Nicolas Goaziou 
wrote:

>
> "ox" stands for "org-export-". This is so to limit file name size. Some
> systems are very limited (e.g. MS-DOS).
>

Is that file name size that important in today's time? I'd be surprised if
anyone using Org is using MS-DOS. But regardless, the "ox-" prefix
definitely looks better than "org-export-".


> Variables and functions should really be "org-export-html..." but that
> would be very long. The "org" prefix is mandatory for Org variables and
> functions. "ox" would be misleading.
>

Does this have to do with org-export--generate-copy-script (as discussed
here[1])? Is the prefix requirement for "org-" more widespread than that?

[1]: http://lists.gnu.org/archive/html/emacs-orgmode/2016-05/msg00231.html
-- 

Kaushal Modi


[O] Library of Babel

2017-09-09 Thread Charles Millar
First. Should Sections 14.5 and 14.6 of the manual need revision since 
lob has been moved to Worg? Or at least a reference to Worg site be 
inserted.


Second: Am I correct that ob-lob.el has not been removed so that I can 
ingest my own source code blocks into, e.g. some/directory/cm-lob?


Charlie Millar





Re: [O] BUG - strange characters showing in agenda after times displayed

2017-09-09 Thread Matt Lundin
Sharon Kimble  writes:

> With the new release of org-mode to 9.1 I am finding with every build of
> a new agenda that this is displaying for items with a time as part of
> them -
>
>   organiser:   8:30΄ьԔלڤ  Scheduled: TODO email org-mode list
>
> This is new and has only appeared with the new agenda which is generated
> after the release of org-mode 9.1.
>
> How do I stop it and get rid of it please?

I cannot replicate this. My guess is that it is related to a particular
configuration setting on your machine. For instance, what is the value
of org-agenda-time-grid? The order of items in this variable changed
with the upgrade to 9.1.

Best,
Matt




Re: [O] ox-html export bug

2017-09-09 Thread Nicolas Goaziou
Hello,

Fabrice Popineau  writes:

> 2017-09-08 19:40 GMT+02:00 kadal :
>
>> That said, the first option is better because if I'm setting a CUSTOM_ID,
>> that's what should be used for internal links...
>>
>>
> I agree with that. Ideally, if you set a CUSTOM_ID, then it should replace
> the default org generated id.

Using raw CUSTOM_ID value in exported documents is an issue because it
requires the user to know, ahead of time, what are the allowed
characters in the output format. As an example, I would consider it to
be a bug if Org refused to export my document to pdf because I had
chosen "100%" as a custom ID somewhere in the document.

However, HTML is a bit special in this case, because users expect to see
custom ID in the address bar of their browser.

Hopefully this is now fixed.

Thank you.


Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] match by property in agenda view

2017-09-09 Thread Matt Lundin
Xebar Saram  writes:

> Hi all
>
> i Have this item in a property drawer:
>
> :people: %^{people?|-|allan|bob|joel}
>
> now i have this custom agenda view defined
>
> (add-to-list 'org-agenda-custom-commands
> '("sk" "wtd" 
> tags "people=\"allan\"" 
> ((org-agenda-sorting-strategy '(priority-down effort-down)))
> ))
>
> yet when i launch it it never finds any items which have a :people:
> allan entry in the drawer

I believe you need to use regexp syntax. The above command will find
only find property values that exactly match "allan". The following
command will find property values containing "allan".

(add-to-list 'org-agenda-custom-commands
 '("sk" "wtd" 
   tags "people={allan}"
   ((org-agenda-sorting-strategy '(priority-down effort-down)))
   ))

Best,
Matt




Re: [O] how to select a source code block and print it to a postscript file

2017-09-09 Thread dmg
I invested a bit more time (plus a couple of suggestions of members of this
list and stackoverflow.) I was able to create a module that prints the
current source block to PDF
without using the exporter. It now uses the pdf viewer to open it.

It might be useful to some people who simply need to create a PDF from a
source block and have it open in the corresponding PDF application:


I look at your suggestions, which pointed me in the direction I needed.
At the end I realized what I wanted was simply to export the current
block to PDF without using the latex exporter. So I simply make the
selection and print that selection to ps, then convert to pdf, and open
using org-open



--
(defcustom dmg-org-src-export-pdf-font-size 12
   "Size of font to use "
  :type 'number
  :version 25
  :group 'dmg-org-src-export-pdf)

(defcustom dmg-org-src-export-pdf-file-name "/tmp/source.code"
   "Name of the file to export as postscript "
  :type 'string
  :version 25
  :group 'dmg-org-src-export-pdf)


(defun dmg-org-src-export-pdf ()
  "show the source code in xournal as a PDF"
  (interactive)
  (save-restriction
(save-excursion
   (unless (executable-find "ps2pdf")
  (error "ps2pdf not found"))

  (let ((element (org-element-at-point))
)
(unless (eq (org-element-type element) 'src-block)
  (error "Not in org-src-block"))
)

  (let* (
 (output-file
  (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info
'light
  dmg-org-src-export-pdf-file-name))
 (ps-file (concat output-file ".ps"))
 (pdf-file (concat output-file ".pdf"))
 ;; this uses dynamic scoping to set the parameters of ps
temporarily
 (ps-font-size dmg-org-src-export-pdf-font-size)
 )
(message "Exporting: %s" ps-file)
(org-babel-mark-block)
(narrow-to-region (region-beginning) (region-end))
(ps-print-buffer-with-faces  ps-file)
(shell-command (concat "ps2pdf " ps-file " " pdf-file))
(delete-file ps-file)
(org-open-file pdf-file)
)
  )))


On Sat, Sep 9, 2017 at 2:25 AM, dmg  wrote:

> hi everybody,
>
> I teach programming and I have been using org-mode for a couple years to
> do it. I absolutely love it.
> Lately I have been thinking that I would like to be able to draw on the
> source code using xournal
> (using a tablet)
>
> To do that, I need to generate a pdf. But I don't want to generate the PDF
> of the entire file,
> just of the block I am currently positioned at. I wrote the following
> code, but it feels clumsy, and
> I am not a very good emacs-lisp programmer. I put it together by
> extracting code here and there.
>
> Is there a better way to run ps-print-buffer (or ps-print-region) on the
> current block?
> I am currently using the :tangle parameter as a filename to be created
> (adding the extension .ps)
>
> the script I am running takes the postscript file, generate a pdf, and
> then runs xournal on it.
>
> thank you in advance for any suggestions,
>
> (defun org-src-xournal ()
>   "show the source code in xournal as a PDF"
>   (interactive)
>   (save-restriction
> (save-excursion
>   (let* ((case-fold-search t)
> (tangle-file
>  (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info
> 'light
>  (user-error "Point is not in a source code block or it
> does not have a tangle name")))
> (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*"
>"^[ \t]*#\\+end_.*"))
> (ps-file (concat tangle-file ".ps"))
> )
>
> (message "Exporting: %s" ps-file)
> (if blockp
> (let ((block-start
> (progn (goto-char (car blockp))
> (next-line)
> (point)
>   ))
>   (block-end
> (progn (goto-char (cdr blockp))
> (previous-line)
> (point)
>   ))
>   )
>   (narrow-to-region block-start block-end))
>   (user-error "Not in a block"))
> (ps-print-buffer-with-faces ps-file)
> (shell-command (concat "code-xournal " ps-file "&"))
> )
>   )))
>
>
> --
> --dmg
>
> ---
> Daniel M. German
> http://turingmachine.org
>



-- 
--dmg

---
Daniel M. German
http://turingmachine.org


Re: [O] [RFC] Remove Org Struct mode

2017-09-09 Thread Michael Brand
Hi Thorsten

First thank you very much for creating outshine.

On Sat, Sep 9, 2017 at 8:20 PM, Thorsten Jolitz  wrote:

> I'm not sure how orgstruct-mode does it, but since outshine is a minor
> mode, it cannot use Key bindings exactly like Org, since many of these
> are used in other major modes too.
>
> It is not easy to find a prefix for a minor mode that is easy to type
> but won't conflict with major modes.

Later I found that I don't have to use the outshine prefix key at all.
Outshine hijacks TAB like orgstruct-mode when on a headline and for
the other commands that orgstruct-mode hijacks as well I use now the
outshine speed commands. They work perfect with vi emulation by
switching to Emacs state (E) and back when done.

Michael



Re: [O] [RFC] Remove Org Struct mode

2017-09-09 Thread Thorsten Jolitz
Michael Brand  writes:

Hello Micheal,

> My requirements for orgstruct-mode or its replacement are very limited
> compared to what orgstruct-mode or outshine.el do or intend to do:

> 4) Key bindings exactly like Org

> All items 3)..7) are supported in orgstruct-mode, in outshine.el I was
> not able to make them work. 

I'm not sure how orgstruct-mode does it, but since outshine is a minor
mode, it cannot use Key bindings exactly like Org, since many of these
are used in other major modes too.

It is not easy to find a prefix for a minor mode that is easy to type
but won't conflict with major modes.

-- 
cheers,
Thorsten




[O] "Invalid duration format" error after updating to version 9.1

2017-09-09 Thread wtm
Hello,

I'm running Org mode 9.1 under Emacs 25.2 on Windows 10 (version
information below) and I've encountered a problem when running my
agenda commands that I'm unsure how to troubleshoot.

Org mode version 9.1 (9.1-elpaplus @ c:/scimax/elpa/org-plus-contrib-20170906/)
GNU Emacs 25.2.1 (x86_64-w64-mingw32) of 2017-04-24

After running a custom agenda command, I'm given an error, "Invalid
duration format: ":45".  The backtrace is attached.

I've tried going through all my agenda files and changing any
instances of durations without a leading "0" for minutes.

:45 --> 0:45

But this doesn't seem to help.  I know that recent changes (see
http://orgmode.org/Changes.html) may be related to my issue.  I'm just
not sure how to troubleshoot from here.

I'd appreciate advice on next steps that I might take.

Thank you,

Will
Debugger entered--Lisp error: (error "Invalid duration format: \":45\"")
  signal(error ("Invalid duration format: \":45\""))
  error("Invalid duration format: %S" ":45")
  org-duration-to-minutes(":45")
  org-refresh-property(((effort . identity) (effort-minutes . 
org-duration-to-minutes)) ":45" nil)
  org-refresh-properties("Effort" ((effort . identity) (effort-minutes . 
org-duration-to-minutes)))
  org-refresh-effort-properties()
  org-agenda-prepare-buffers(("~/Dropbox/org/work.org" 
"~/Dropbox/org/work.org_archive" "~/Dropbox/org/work-someday.org" 
"~/Dropbox/org/personal.org" "~/Dropbox/org/personal-someday.org" 
"~/Dropbox/org/learning.org" "~/Dropbox/org/teaching-and-learning.org" 
"~/Dropbox/org/refile.txt" "~/Dropbox/org/dotemacs/init.org" 
"~/Dropbox/org/blog.org" "~/Dropbox/org/writing.org" "~/Dropbox/org/org.org" 
"~/Dropbox/org/journal.org" "~/Dropbox/org/wiki.org" 
"c:/Users/Will/Dropbox/org/journal/20161130.org" "~/Dropbox/org/root.org" 
"~/Dropbox/org/infolit.org"))
  (if org-agenda-multi (progn (setq buffer-read-only nil) (goto-char 
(point-max)) (if (or (bobp) org-agenda-compact-blocks (not 
org-agenda-block-separator)) nil (insert "\n" (if (stringp 
org-agenda-block-separator) org-agenda-block-separator (make-string 
(window-width) org-agenda-block-separator)) "\n")) (narrow-to-region (point) 
(point-max))) (setq org-done-keywords-for-agenda nil) 
(org-agenda-prepare-window (get-buffer-create org-agenda-buffer-name) 
filter-alist) (setq buffer-read-only nil) (org-agenda-reset-markers) (let 
((inhibit-read-only t)) (erase-buffer)) (org-agenda-mode) (setq 
org-agenda-buffer (current-buffer)) (setq org-agenda-contributing-files nil) 
(setq org-agenda-columns-active nil) (org-agenda-prepare-buffers 
(org-agenda-files nil (quote ifmode))) (setq org-todo-keywords-for-agenda 
(org-uniquify org-todo-keywords-for-agenda)) (setq org-done-keywords-for-agenda 
(org-uniquify org-done-keywords-for-agenda)) (setq org-agenda-last-prefix-arg 
current-prefix-arg) (setq org-agenda-this-buffer-name org-agenda-buffer-name) 
(and name (not org-agenda-name) (set (make-local-variable (quote 
org-agenda-name)) name)))
  (if (org-agenda-use-sticky-p) (progn (put (quote org-agenda-tag-filter) 
:preset-filter nil) (put (quote org-agenda-category-filter) :preset-filter nil) 
(put (quote org-agenda-regexp-filter) :preset-filter nil) 
(org-agenda-prepare-window (get-buffer org-agenda-buffer-name) filter-alist) 
(message "Sticky Agenda buffer, use `r' to refresh") (or org-agenda-multi 
(org-agenda-fit-window-to-buffer)) (throw (quote exit) "Sticky Agenda buffer, 
use `r' to refresh")) (setq org-todo-keywords-for-agenda nil) (put (quote 
org-agenda-tag-filter) :preset-filter org-agenda-tag-filter-preset) (put (quote 
org-agenda-category-filter) :preset-filter org-agenda-category-filter-preset) 
(put (quote org-agenda-regexp-filter) :preset-filter 
org-agenda-regexp-filter-preset) (put (quote org-agenda-effort-filter) 
:preset-filter org-agenda-effort-filter-preset) (if org-agenda-multi (progn 
(setq buffer-read-only nil) (goto-char (point-max)) (if (or (bobp) 
org-agenda-compact-blocks (not org-agenda-block-separator)) nil (insert "\n" 
(if (stringp org-agenda-block-separator) org-agenda-block-separator 
(make-string (window-width) org-agenda-block-separator)) "\n")) 
(narrow-to-region (point) (point-max))) (setq org-done-keywords-for-agenda nil) 
(org-agenda-prepare-window (get-buffer-create org-agenda-buffer-name) 
filter-alist) (setq buffer-read-only nil) (org-agenda-reset-markers) (let 
((inhibit-read-only t)) (erase-buffer)) (org-agenda-mode) (setq 
org-agenda-buffer (current-buffer)) (setq org-agenda-contributing-files nil) 
(setq org-agenda-columns-active nil) (org-agenda-prepare-buffers 
(org-agenda-files nil (quote ifmode))) (setq org-todo-keywords-for-agenda 
(org-uniquify org-todo-keywords-for-agenda)) (setq org-done-keywords-for-agenda 
(org-uniquify org-done-keywords-for-agenda)) (setq org-agenda-last-prefix-arg 
current-prefix-arg) (setq org-agenda-this-buffer-name org-agenda-buffer-name) 
(and name (not org-agenda-name) (set (make-local-variable (quote 
org-agenda-name)) name))) (setq 

Re: [O] Old 'C-c tab' binding shadowed

2017-09-09 Thread Adrian Bradd
I also use this keybinding for opening subtrees to certain depths. My
reasoning is identical to Marco's, it provides a great overview with very
little noise.

Would be nice to have these actions context dependent in org so we get the
best of both worlds. Failing that, Kaushal's setup looks like a good
solution.

Cheers,

Adrian

On 7 September 2017 at 18:11, Marco Wahl  wrote:

> >> I think the bindings could coexist peacefully since
> >>
> > `org-table-toggle-column-width' makes sense only for the cursor located
> >> in a table and `outline-show-children' makes most sense (AFAICS) when
> >> called on a headline.
> >>
> >> Does this sound reasonable?
> >>
> >> Does anyone see clearly how to implement this?  (I don't.)
> >>
> >
> > I  always wondered the same about other org-table-* bindings in org.el.
> >
> > This works:
> >
> > diff --git a/lisp/org.el b/lisp/org.el
> > index a03d8c5a429..cba9b20482f 100644
> > --- a/lisp/org.el
> > +++ b/lisp/org.el
> > @@ -19632,7 +19632,12 @@ COMMANDS is a list of alternating OLDDEF NEWDEF
> > command names."
> >  (org-defkey org-mode-map "\C-j" 'org-return-indent)
> >  (org-defkey org-mode-map "\C-c?"'org-table-field-info)
> >  (org-defkey org-mode-map "\C-c "'org-table-blank-field)
> > -(org-defkey org-mode-map (kbd "C-c TAB") #'org-table-toggle-column-
> width)
> > +(org-defkey org-mode-map (kbd "C-c TAB")
> > +'(menu-item "toggle-column-width-when-in-table" nil
> > +:filter (lambda ( _)
> > +  (if (org-at-table-p)
> > +  #'org-table-toggle-column-width
> > +#'outline-show-children
> >  (org-defkey org-mode-map "\C-c+"'org-table-sum)
> >  (org-defkey org-mode-map "\C-c="'org-table-eval-formula)
> >  (org-defkey org-mode-map "\C-c'"'org-edit-special)
> >
> > I actually do this for org-table-* bindings in my config:
> >
> > ;; Bind the "org-table-*" command ONLY when the point is in an Org
> > table.
> > ;; http://emacs.stackexchange.com/a/22457/115
> > (bind-keys
> >  :map org-mode-map
> >  :filter (org-at-table-p)
> >  ("C-c ?" . org-table-field-info)
> >  ("C-c SPC" . org-table-blank-field)
> >  ("C-c +" . org-table-sum)
> >  ("C-c =" . org-table-eval-formula)
> >  ("C-c `" . org-table-edit-field)
> >  ("C-#" . org-table-rotate-recalc-marks)
> >  ("C-c }" . org-table-toggle-coordinate-overlays)
> >  ("C-c {" . org-table-toggle-formula-debugger))
> >
> > Inspiration:
> > http://endlessparentheses.com/define-context-aware-keys-in-emacs.html
>
> Thanks!
>
> Good to know a path to a personal configuration for the case no one else
> is interested in the old C-c TAB behavior.
>
>
> Ciao,
>  Marco
>
>
>


Re: [O] [PATCH] Ensure proper nesting of captured entries

2017-09-09 Thread Matt Lundin
Matt Lundin  writes:

> I configure my org-capture templates set to insert items at the end of a
> capture file: i.e., with a simple file target - (file "~/org/inbox.org")
> - and no target headline.

A note of clarification. My post and patch relate to headline entries,
not list items. Apologies for the confusion about terminology.

Best,
Matt



Re: [O] proliferation of agenda tasks, but how to stop it please?

2017-09-09 Thread Matt Lundin
Sharon Kimble  writes:

> How can I stop my 31-day agenda from showing each and every daily task
> for each and every day, when all I need to see them on is today please?
>
> The change has only occurred since updating to
> 'org-plus-contrib-20170906'.

I believe you can put the following in your agenda file:

(setq org-agenda-show-future-repeats nil)

This has replaced the variable org-agenda-repeating-timestamp-show-all. 

Best,
Matt



Re: [O] BUG - org-agenda-show-future-repeats not mentioned in org.pdf

2017-09-09 Thread Nicolas Goaziou
Hello,

Sharon Kimble  writes:

> Seeing this new variable I've been trying to set it up to stop all the
> future displays of each and every task being displayed in my 31 days
> agenda.
>
> I've updated my git/org-mode and then built the new 'org.pdf', opened it
> and then had a quick browse for 'org-agenda-show-future-repeats'. I then
> did a search of the whole file and it isn't mentioned at all!

The manual cannot possibly (and doesn't) contain a reference to every
variable.

> I was hoping to see something which showed how to use it, as currently I
> have each and every repeat showing for each and every day of my 31-day
> agenda. 

You can know how to use it by looking at its docstring. I copy it here
for reference:

   Non-nil shows repeated entries in the future part of the agenda.
   When set to the symbol ‘next’ only the first future repeat is shown.

> If we have changes, especially major ones like this, could they not be
> mentioned in the org.pdf with perhaps a new chapter titled 'Changes' and
> then giving details of how to use the new commands, please?

The variable was introduced in 


Regards,

-- 
Nicolas Goaziou



[O] [PATCH] Ensure proper nesting of captured items

2017-09-09 Thread Matt Lundin
I configure my org-capture templates set to insert items at the end of a
capture file: i.e., with a simple file target - (file "~/org/inbox.org")
- and no target headline. In the past, org capture would always insert
these as top level headings, regardless of existing headings in the
target file. Recently, org-capture has begun to nest these entries
according to context. This is undesirable, as it has caused many
important capture items to be buried under unrelated headings.

I did a git bisect and found the problematic commit from June 2, 2017:

57d0a7453d0386f3f1425fc5319b2f42fca16e42

As far as I can tell, that commit took out the line in
org-capture-place-entry that sets level to 1 when there is no target
entry. The attached patch makes a minor change to fix the issue.

Best,
Matt 

>From 20ead737aebc9c46aa291b5a70248c57f3fd64a1 Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Sat, 9 Sep 2017 11:08:06 -0500
Subject: [PATCH] Ensure that top-level capture targets are pasted at level 1

* lisp/org-capture.el: (org-capture-place-entry) Ensure that level is
  set to 1 (i.e., the top level) if there is no headline target
  defined. Otherwise, captured items are improperly nested by context.
---
 lisp/org-capture.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index cd1944d96..2ddb9c505 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1097,7 +1097,7 @@ may have been stored before."
 (defun org-capture-place-entry ()
   "Place the template as a new Org entry."
   (let ((reversed? (org-capture-get :prepend))
-	level)
+	(level 1))
 (when (org-capture-get :exact-position)
   (goto-char (org-capture-get :exact-position)))
 (cond
-- 
2.14.1



[O] proliferation of agenda tasks, but how to stop it please?

2017-09-09 Thread Sharon Kimble

How can I stop my 31-day agenda from showing each and every daily task
for each and every day, when all I need to see them on is today please?

The change has only occurred since updating to 'org-plus-contrib-20170906'.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.1


signature.asc
Description: PGP signature


[O] Add attributes to figure in html5

2017-09-09 Thread L. Larrabee Strow
I am using

(setq org-html-html5-fancy t
  org-html-doctype "html5")

for html exporting, as I would like to use the figure environment for
image exports.

Is there any way to pass an attribute to the html?  (I am afraid I might
not be using all the correct terms here for html5.)  Here is what I
would like to get in the html export:

https://site.com/desert_rtp.png;>
   https://site.com/desert_rtp.png;>


Getting the width is no problem.  My question is how to get the first
two lines w/o using #+BEGIN_EXPORT HTML.

If I could get this to work, then I can use the fancybox image routines
with org and retain compabtitility with latex exporting.

I tried

#+ATTR_HTML:  :data-fancybox gallery

but that puts the attributes in the href, not before href.

Thanks, Larrabee

-- 
L. Larrabee Strow
UMBC Physics Department
Email: st...@umbc.edu
Cell: 724-288-6933



Re: [O] Name-space prefixes in ox- packages

2017-09-09 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> I have observed that even though the exporter backend package names begin
> with ox-, all the variables and functions inside still start with org-.
>
> Is there a strong reason to do so?

"ox" stands for "org-export-". This is so to limit file name size. Some
systems are very limited (e.g. MS-DOS).

Variables and functions should really be "org-export-html..." but that
would be very long. The "org" prefix is mandatory for Org variables and
functions. "ox" would be misleading.

Regards,

-- 
Nicolas Goaziou



[O] Name-space prefixes in ox- packages

2017-09-09 Thread Kaushal Modi
Hello,

I have observed that even though the exporter backend package names begin
with ox-, all the variables and functions inside still start with org-.

Is there a strong reason to do so? Or was that to prevent the older
org-html, etc packages from breaking when they got renamed to ox-html, etc?

So the question is if the new export backends should also follow the same
convention.

This question came up because if the ox- packages follow the convention
used in core, they fail the lint check done by an external package called
package-lint[1]. The lint checkers expects all variables and functions in a
package FOO to have FOO- prefix. Here[2] the discussion on that package's
GitHub issue thread.

PS: I believe it is the same case with ob- packages.

[1]: https://github.com/purcell/package-lint
[2]: https://github.com/purcell/package-lint/issues/89

Thanks.
-- 

Kaushal Modi


[O] how to select a source code block and print it to a postscript file

2017-09-09 Thread dmg
hi everybody,

I teach programming and I have been using org-mode for a couple years to do
it. I absolutely love it.
Lately I have been thinking that I would like to be able to draw on the
source code using xournal
(using a tablet)

To do that, I need to generate a pdf. But I don't want to generate the PDF
of the entire file,
just of the block I am currently positioned at. I wrote the following code,
but it feels clumsy, and
I am not a very good emacs-lisp programmer. I put it together by extracting
code here and there.

Is there a better way to run ps-print-buffer (or ps-print-region) on the
current block?
I am currently using the :tangle parameter as a filename to be created
(adding the extension .ps)

the script I am running takes the postscript file, generate a pdf, and then
runs xournal on it.

thank you in advance for any suggestions,

(defun org-src-xournal ()
  "show the source code in xournal as a PDF"
  (interactive)
  (save-restriction
(save-excursion
  (let* ((case-fold-search t)
(tangle-file
 (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info
'light
 (user-error "Point is not in a source code block or it
does not have a tangle name")))
(blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*"
   "^[ \t]*#\\+end_.*"))
(ps-file (concat tangle-file ".ps"))
)

(message "Exporting: %s" ps-file)
(if blockp
(let ((block-start
(progn (goto-char (car blockp))
(next-line)
(point)
  ))
  (block-end
(progn (goto-char (cdr blockp))
(previous-line)
(point)
  ))
  )
  (narrow-to-region block-start block-end))
  (user-error "Not in a block"))
(ps-print-buffer-with-faces ps-file)
(shell-command (concat "code-xournal " ps-file "&"))
)
  )))


-- 
--dmg

---
Daniel M. German
http://turingmachine.org


Re: [O] Flattening references in ODT export

2017-09-09 Thread James Harkins
  On Sat, 09 Sep 2017 05:06:24 -0400 James Harkins  
wrote  
> I guess next I'm going to try to hack ox-odt.el...

Hm, that's going to be too complicated. So I suppose my only other option is to 
make an SVG for every code example, and include only images. Or hack the xml by 
hand in the final editing stage.

But it's strange... it seems like it should be simple enough to have one 
counter for both figures and listings. I'm surprised that org seems to be 
really quite adamant that nobody would ever, ever want this.

hjh




[O] BUG - strange characters showing in agenda after times displayed

2017-09-09 Thread Sharon Kimble

With the new release of org-mode to 9.1 I am finding with every build of
a new agenda that this is displaying for items with a time as part of
them -

--8<---cut here---start->8---
  organiser:   8:30΄ьԔלڤ  Scheduled: TODO email org-mode list
--8<---cut here---end--->8---

This is new and has only appeared with the new agenda which is generated
after the release of org-mode 9.1.

How do I stop it and get rid of it please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.1


signature.asc
Description: PGP signature


Re: [O] Flattening references in ODT export

2017-09-09 Thread James Harkins
 On Fri, 08 Sep 2017 23:52:33 -0400 James Harkins  
wrote  
> Is there a way to have "figure" references in ODT exports be simply a flat 
> list? 
>  
> Meaning -- I would like "Example 1," "Example 2," etc. (or "Figure," doesn't 
> really matter). 
>  
> With "num:nil," "Listing 1," "Listing 2," "Listing 3," but there is also a 
> figure, which becomes "Figure 1." So there's a listing and a figure with the 
> same index number.

So I found variable-help for org-odt-category-map-alist.

BTW the variable's help conflicts with the org manual. The manual says, to 
change the displayed label, you should change the second string for the 
category, but the help in Emacs indicates it's actually the fourth string.

Manual says:

 (setq org-odt-category-map-alist
   '(("__Figure__" "Illustration" "value" "Figure" 
org-odt--enumerable-image-p)))

Should be:

 (setq org-odt-category-map-alist
   '(("__Figure__" "Figure" "value" "Illustration" 
org-odt--enumerable-image-p)))

But it's still not working. Maybe I'm misunderstanding the fields. I thought 
keying __Figure__ and __Listing__ both to the OD-VARIABLE "Illustration" would 
make both of them share one numeric sequence:

(setq org-odt-category-map-alist
  '(("__Table__" "Table" "value" "Table" org-odt--enumerable-p)
 ("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p)
 ("__MathFormula__" "Text" "math-formula" "Equation" 
org-odt--enumerable-formula-p)
 ("__DvipngImage__" "Equation" "value" "Equation" 
org-odt--enumerable-latex-image-p)
 ("__Listing__" "Illustration" "value" "Figure" org-odt--enumerable-p)))

... but they still get separate counters.

One suspicious thing in content.xml:









Org generates two Illustration counters...?

OK, so org has an inherent limitation that every distinct type of labeled 
entity must have a separate counter. Well, bother.

I guess next I'm going to try to hack ox-odt.el... (and, mental note, don't 
write for a journal ever again that won't accept PDF, 'cause the ODT exporter 
is really not mature by comparison. And don't tell me to write directly in 
LibreOffice, I have reasons why that is a terrible idea for me. I'll explain 
them another time if you like.)

hjh




[O] BUG - org-agenda-show-future-repeats not mentioned in org.pdf

2017-09-09 Thread Sharon Kimble

Seeing this new variable I've been trying to set it up to stop all the
future displays of each and every task being displayed in my 31 days
agenda.

I've updated my git/org-mode and then built the new 'org.pdf', opened it
and then had a quick browse for 'org-agenda-show-future-repeats'. I then
did a search of the whole file and it isn't mentioned at all!

I was hoping to see something which showed how to use it, as currently I
have each and every repeat showing for each and every day of my 31-day
agenda. I've tried -

--8<---cut here---start->8---
(setq org-agenda-show-future-repeats n)

OR

(setq org-agenda-show-future-repeats 0)

OR

(setq org-agenda-show-future-repeats 1)
--8<---cut here---end--->8---

But I still can't disable *all* my repeats showing for every day. 

If we have changes, especially major ones like this, could they not be
mentioned in the org.pdf with perhaps a new chapter titled 'Changes' and
then giving details of how to use the new commands, please?

I do have another bug that's irritating me, but that's for a separate post.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.1


signature.asc
Description: PGP signature