Re: [O] Interaction of Agenda with DEADLINE & SCHEDULED

2019-04-26 Thread Stephan Fabel
Ihor,

On Sat, Apr 20, 2019 at 12:56 AM Ihor Radchenko  wrote:

> > For example, how would one create a custom agenda view that
> >
> > - shows all accomplished tasks within the DEADLINE last week
> > - shows all accomplished tasks that missed the DEADLINE last week
> >
> > Then does the same for the coming week, i.e.
> >
> > - show all tasks which are due in the next week, i.e., within the
> >   DEADLINE
> > - show all tasks which are overdue
>
> There is org-super-agenda package
> (https://github.com/alphapapa/org-super-agenda), which already have a
> part of the functionality. You can use :scheduled and :deadline
> selectors as a starting point to achieve what you want.
>

thank you for the pointer. I will definitely take a look!


> > Ideally, the interaction could even be more informational, so for
> > example, analysis of the available work time next week (assuming 40
> > hours for example) vs. the total estimated effort of all of the above
> > tasks, helping to answer the question of whether all tasks are even
> > achievable given the amount of available work time.
> >
> > Another potential -and very valuable- analysis could be a recommendation
> > of order given DEADLINE, priority and effort over a period of time, for
> > example the next week. What should one do first, then second, etc. to
> > maximize output over a given period of time?
>
> What you want here is actually quite a complicated optimization problem,
> which probably deserves a separate full project of its own.
> I cannot comment much on this part since effort estimates never worked
> for me.
>

Yes. I think it would be awesome if org-mode could do that. If I had the
time, I'd love to take a closer look and see how one could solve for this.

Stephan


[O] [PATCH] org-attach: Make dispatcher commands customizable

2019-04-26 Thread Eric Danan

Hello,

As discussed previously,

https://lists.gnu.org/r/emacs-orgmode/2018-11/msg00038.html

here is a patch to make the list of commands in the org-attach 
dispatcher customizable.


Eric
From 868d2f26a7f4a3ad6d70477193f2abed2d245970 Mon Sep 17 00:00:00 2001
From: Eric Danan 
Date: Fri, 26 Apr 2019 21:21:00 +0200
Subject: [PATCH] org-attach: Make dispatcher commands customizable

* lisp/org-attach.el (org-attach-commands): New custom variable.
(org-attach): Use the above variable.
---
 lisp/org-attach.el | 109 -
 1 file changed, 58 insertions(+), 51 deletions(-)

diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 63b3840a..22dc3765 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -152,12 +152,47 @@ (defcustom org-attach-annex-auto-get 'ask
  (const :tag "always get from annex if necessary" t)
  (const :tag "never get from annex" nil)))
 
+(defcustom org-attach-commands
+  '(((?a ?\C-a) org-attach-attach "Select a file and attach it to the task, 
using `org-attach-method'.")
+((?c ?\C-c) org-attach-attach-cp "Attach a file using copy method.")
+((?m ?\C-m) org-attach-attach-mv "Attach a file using move method.")
+((?l ?\C-l) org-attach-attach-ln "Attach a file using link method.")
+((?y ?\C-y) org-attach-attach-lns "Attach a file using symbolic-link 
method.")
+((?u ?\C-u) org-attach-url "Attach a file from URL (downloading it).")
+((?b) org-attach-buffer "Select a buffer and attach its contents to the 
task.")
+((?n ?\C-n) org-attach-new "Create a new attachment, as an Emacs buffer.")
+((?z ?\C-z) org-attach-sync "Synchronize the current task with its 
attachment\n directory, in case you added attachments yourself.\n")
+((?o ?\C-o) org-attach-open "Open current task's attachments.")
+((?O) org-attach-open-in-emacs "Like \"o\", but force opening in Emacs.")
+((?f ?\C-f) org-attach-reveal "Open current task's attachment directory.")
+((?F) org-attach-reveal-in-emacs "Like \"f\", but force using dired in 
Emacs.\n")
+((?d ?\C-d) org-attach-delete-one "Delete one attachment, you will be 
prompted for a file name.")
+((?D) org-attach-delete-all "Delete all of a task's attachments.  A safer 
way is\n to open the directory in dired and delete from there.\n")
+((?s ?\C-s) org-attach-set-directory "Set a specific attachment directory 
for this entry or reset to default.")
+((?i ?\C-i) org-attach-set-inherit "Make children of the current entry 
inherit its attachment directory.\n")
+((?q) (lambda () (interactive) (message "Abort")) "Abort."))
+  "The list of commands for the attachment dispatcher.
+Each entry in this list is a list of three elements:
+- A list of keys (characters) to select the command (the fist
+  character in the list is shown in the attachment dispatcher's
+  splash buffer and minubuffer prompt).
+- A command that is called interactively when one of these keys
+  is pressed.
+- A docstring for this command in the attachment dispatcher's
+  splash buffer."
+  :group 'org-attach
+  :package-version '(Org . "9.2")
+  :version "26.2"
+  :type '(repeat (list (repeat :tag "Keys" character)
+  (function :tag "Command")
+  (string :tag "Docstring"
+
 ;;;###autoload
 (defun org-attach ()
   "The dispatcher for attachment commands.
 Shows a list of commands and prompts for another key to execute a command."
   (interactive)
-  (let (c marker)
+  (let (c marker command)
 (when (eq major-mode 'org-agenda-mode)
   (setq marker (or (get-text-property (point) 'org-hd-marker)
   (get-text-property (point) 'org-marker)))
@@ -172,59 +207,31 @@ (defun org-attach ()
(save-window-excursion
  (unless org-attach-expert
(with-output-to-temp-buffer "*Org Attach*"
- (princ "Select an Attachment Command:
-
-a   Select a file and attach it to the task, using `org-attach-method'.
-c/m/l/y Attach a file using copy/move/link/symbolic-link method.
-u   Attach a file from URL (downloading it).
-b   Select a buffer and attach its contents to the task.
-n   Create a new attachment, as an Emacs buffer.
-z   Synchronize the current task with its attachment
-directory, in case you added attachments yourself.
-
-o   Open current task's attachments.
-O   Like \"o\", but force opening in Emacs.
-f   Open current task's attachment directory.
-F   Like \"f\", but force using dired in Emacs.
-
-d   Delete one attachment, you will be prompted for a file name.
-D   Delete all of a task's attachments.  A safer way is
-to open the directory in dired and delete from there.
-
-s   Set a specific attachment directory for this entry or reset to default.
-i   Make children of the current entry inherit its attachment 
directory.")))
+ (princ (format "Select an Attachment Command:\n\n%s"
+ 

[O] ox-html: proof-tree (bussproofs) latex fragment

2019-04-26 Thread Robert M. Kovacsics

Hi,

I have a latex-fragment like so

#+LATEX_HEADER: \usepackage{bussproofs}
#+OPTIONS: tex:dvipng
\begin{prooftree}
\AxiomC{}
\LeftLabel{(fn)}
\UnaryInfC{$\text{Env}\vdash C(\text{Env}', \text{fn } x \ \Rightarrow\ 
E_1)\ v \ \to\ \text{Env},\text{Env}',(x,v)\vdash E_1$}

\end{prooftree}


when I export this, it fails because it replaces the \begin{prooftree} 
with \begin{prooftree*}, and there is no such environment. I think the 
problem is with "org-html--unlabel-latex-environment" in ox-html.el, as 
it assumes any environment has a starred version. Perhaps that function 
should only be applied to a couple of environments, e.g. equation, 
according to a whitelist? Or have a blacklist for which it shouldn't 
apply.


Or perhaps I am including latex fragments wrong?

Thanks,
Robert



Re: [O] bug#35419: [Proposal] Buffer Lenses and the Case of Org-Mode (also, Jupyter)

2019-04-26 Thread Roland Everaert
I see lens to be useful for the eev mode, too.

Roland.

Dmitrii Korobeinikov writes:

>> Have you looked at Phil Lord's lentic package?  I think it implements a
>> lot of what you're talking about.
>
>> https://github.com/phillord/lentic
>
> This is nice to see!
> Indeed, except for embedding, there is a large overlap with what I
> described as buffer lenses.
>
> BTW, judging by this description: "changes percolation now happens
> incrementally, so only those parts of the buffer are updated. As a result,
> lentic now cope with long files with little noticable delay", the buffers
> don't share any data and need to sync with the master [linked] buffer.
> Is this the best solution? I have imagined that at the low level there is
> an actual data structure that keeps the raw textual data and it could be
> directly shared by multiple buffers. I mean, when a buffer is saved to a
> file, the text doesn't need to be stripped of properties beforehand, right?
>
> чт, 25 апр. 2019 г. в 07:37, Noam Postavsky :
>
>> Dmitrii Korobeinikov  writes:
>>
>> > * Implementation
>> >
>> >   I am not familiar with Emacs internals to say what's feasible of the
>> > proposed structure.
>>
>> Have you looked at Phil Lord's lentic package?  I think it implements a
>> lot of what you're talking about.
>>
>> https://github.com/phillord/lentic
>>


-- 
Luke, use the FOSS

Sent from Emacs