emacs-orgmode@gnu.org

2019-12-11 Thread Justin Vallon
When I use "emacs --no-init-file", I get the default distribution org
packages, and "

Re: [O] FW: [RFC] Link-type for attachments, more attach options

2019-12-11 Thread Gustav Wikström
Hi stardiviner,

It is my belief that =[Ctrl-C Ctrl-l]= already is supported. You will only get 
suggestions for attachments if there are any attachments on the outline node 
you're in. Or in any of its parents if inheritance is configured.

Regards Gustav

From: Emacs-orgmode  on behalf of 
stardiviner 
Sent: Thursday, December 12, 2019 6:21:30 AM
To: emacs-orgmode@gnu.org 
Subject: Re: [O] FW: [RFC] Link-type for attachments, more attach options


Hi Gustav,

I suggest to add support for =[Ctrl-C Ctrl-l]= like ~file:~ link type. which 
will
auto in completion list. It will be convenient for user.

--
[ 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




Best way to template a big table

2019-12-11 Thread Lawrence Bottorff
I've got a big table that I would like to create a template for, i.e., the
rows and columns and the myriad | and -. Then a key chord would produce it
in an org file ready for values to be entered. I've seen the post-9.2
tempo-define-template, but that looks more suited to smaller things. There
is Emacs Skeleton, but I'd like to ask people who perhaps have faced this
issue before for a "best practice" answer.

LB


Re: [O] FW: [RFC] Link-type for attachments, more attach options

2019-12-11 Thread stardiviner


Hi Gustav,

I suggest to add support for =[Ctrl-C Ctrl-l]= like ~file:~ link type. which 
will
auto in completion list. It will be convenient for user.

-- 
[ 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
  



[PATCH] Fix verbatim block fontification to end blocks on headlines

2019-12-11 Thread Tom Gillespie
This patch is a change to how org fontifies verbatim source blocks re: [1].
Hopefully it answers Nicolas's question from that thread. Best!
Tom

On Sun, Dec 8, 2019 at 12:05 AM Nicolas Goaziou  wrote:
> I do not understand. Source and example blocks are verbatim blocks,
> whereas verse blocks are not. There is nothing to match, is there?

[1] Bug: headlines escape blocks:
https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/msg00133.html
From 531eac23e22b5b8b16f2747bbd5c1bd43fcbe43b Mon Sep 17 00:00:00 2001
From: Tom Gillespie 
Date: Wed, 11 Dec 2019 17:57:47 -0800
Subject: org.el: Fix verbatim block fontification to end blocks on headlines

* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Enhance regex
for finding the end of blocks (i.e., `beg-of-endline') to detect
headlines (i.e., "^\\*") so that fontification matches the behavior
of org mode (i.e., that headlines are healines, even in vertabim).

This change aligns the behavior and the visual appearance of verbatim
blocks that contain headlines. When `font-lock-mode' is enabled this
change makes situations like those in (info "(org) Literal Examples")
literally jump off the page.

Overview of new fontification

Source| fontification before | fontification after  |
\#+BEGIN_EXAMPLE  | org-block-begin-line | org-block-begin-line |
I look verbatim!  | org-block| org-block|
* Org headers in  | org-block| org-level-1  |
verbatim blocks   | org-block| nil  |
** highly accordingly | org-block| org-level-2  |
\#+END_EXAMPLE| org-block-end-line   | org-meta-line|

TINYCHANGE
---
 lisp/org.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 9b84592ba..0e8dda495 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5287,7 +5287,7 @@ by a #."
 	  (setq block-type (downcase (match-string 5))
 		quoting (member block-type org-protecting-blocks)) ; src, example, export, maybe more
 	  (when (re-search-forward
-		 (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*")
+		 (concat "\\(^\\*\\|^[ \t]*#\\+end" (match-string 4) "\\>.*\\)")
 		 nil t)  ;; on purpose, we look further than LIMIT
 	;; We do have a matching #+end line
 	(setq beg-of-endline (match-beginning 0)
@@ -5326,10 +5326,11 @@ by a #."
 	(add-text-properties
 	 beg (if whole-blockline bol-after-beginline end-of-beginline)
 	 '(face org-block-begin-line))
-	(add-text-properties
-	 beg-of-endline
-	 (min (point-max) (if whole-blockline (min (point-max) (1+ end-of-endline)) end-of-endline))
-	 '(face org-block-end-line))
+	(when (not (string= (match-string 1) "*"))
+	  (add-text-properties
+	   beg-of-endline
+	   (min (point-max) (if whole-blockline (min (point-max) (1+ end-of-endline)) end-of-endline))
+	   '(face org-block-end-line)))
 	t))
 	 ((member dc1 '("+title:" "+author:" "+email:" "+date:"))
 	  (org-remove-flyspell-overlays-in
-- 
2.23.0



Re: How to mark task as done at specified (past) time?

2019-12-11 Thread Kyle Meyer
Tim Landscheidt  writes:
[...]
> I want Gnus to mark the task as done /at the time when the mail was
> sent/, i. e. in:
> |- State "DONE"   from "TODO"   [2019-11-27 Mi 16:44]
>
> I want "2019-11-27 Mi 16:44" not to be the current time, but
> some other (past) time.
>
> How can I mark a task as done at a specified time?  Looking
> at org-add-planning-info, there seems to be a mechanism to
> pass a timestamp, but it does not seem to be exposed at
> higher levels (?).

Yes, as far as I can see, org-todo uses the TIME argument of
org-add-planning-info for the org-extend-today-until feature, but
there's not a way for the caller to directly specify the timestamp.

> Do I have to cl-flet org-current-time or something similar?

Something along those lines would probably be the most straightforward.
Light testing with the command below suggests overriding current-time is
sufficient:

(defun my-org-todo-time-machine ()
  (interactive)
  (cl-letf (((symbol-function 'current-time)
 (lambda ()
   (apply #'encode-time (org-parse-time-string
 "2019-11-27 Mi 16:44")
(call-interactively #'org-todo)))



Re: Bug: org-use-fast-todo-selection prefix option removed [9.3 (9.3-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20191203/)]

2019-12-11 Thread Kyle Meyer
Allen Li  writes:

> The option to set org-use-fast-todo-selection to 'prefix was removed
> without my noticing.  This breaks my workflow since I like the default
> cycling behavior and only occasionally use fast todo selection to
> switch between todo state sets.
>
> It was removed in commit f1c030bed54737319aeb1d592e3340d6a48cea3a

Carsten proposed that change here:

  https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00138.html

A couple of people chimed in to say they were in favor and nobody raised
an objection.  I personally prefer the new behavior as well.

While I think we should reassess that change if it turns out that it
breaks many people's workflow, for now I'd recommend that you advise
org-todo.



Re: need to increase contrast in all emacs faces for legibility

2019-12-11 Thread wry

On 12/10, Samuel Wales wrote:

at night, i need much more contrast in my emacs faces in order to
increase legibility.


This is counterintuitive, normally you need to increase contrast
during the day and decrease contrast (and lower brightness) at night
to prevent eye strain. Unless you're using an E Ink display or
something crazy, decreased ambient light should not affect legibility
(pixels are backlit), only eye strain.


is it possible to programmatically increase foreground contrast
against their background in all faces?



i already have the background black or close to it.


Studies have suggested that light text on dark background is less
legible than dark text on light background, so you could change
that. Anecdotally this is true for me in Emacs and on the web, but the
decreased eye strain at night is worth the tradeoff of using a dark
background.

I doubt Emacs has this contrast functionality built in. You can always
change themes (M-x customize-themes). A quick Google of "Emacs high
contrast themes" yields at least one theme you could try.

You can even manually modify themes. Just go to the Elisp file and
play around with the theme definition. Use Gimp or Google "HTML color
picker" to find new colors to replace whichever color you're not
satisfied with.

If you're actually trying to reduce eye strain at night, there are
several tools at your disposal.

- Redshift has already been mentioned; I consider my computer
 basically unusable at night without it
- Decrease display brightness using software
 (e.g. https://github.com/haikarainen/light )
- Change brightness or color settings at the hardware level (by
 clicking buttons on your monitor)
- Add more ambient light around your monitor
- Computer blue-light filtering glasses (I don't know if they're effective or 
not)



Bug: org-use-fast-todo-selection prefix option removed [9.3 (9.3-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20191203/)]

2019-12-11 Thread Allen Li
The option to set org-use-fast-todo-selection to 'prefix was removed
without my noticing.  This breaks my workflow since I like the default
cycling behavior and only occasionally use fast todo selection to
switch between todo state sets.

It was removed in commit f1c030bed54737319aeb1d592e3340d6a48cea3a



bug#36984: 27.0.50; Calling newline in org src opens org src edit

2019-12-11 Thread Nicolas Goaziou
Hello,

Deric Bytes  writes:

> Calling M-x newline when in org src block. Turns it yellow and prevents
> editing (it opens org edit src )
>
> I have tried the latest emacs and org-mode. And run the following code
> in an emacs -q

I didn't try with Emacs 27, but with Org 9.3 and Emacs 26.3, I cannot
reproduce your problem.

Regards,

-- 
Nicolas Goaziou





bug#37333: Org-mode python output not working

2019-12-11 Thread Nicolas Goaziou
Hello,

Michael Wu  writes:

> In the following block:
>
> #+BEGIN_SRC python :results value :session
> def f():
> return 5
> f()
> #+END_SRC
>
>
> It gives the message
>
> "Code block returned no value"

FWIW, I cannot reproduce it. You may want to update Org. Mine is 9.3.

Regards,

-- 
Nicolas Goaziou





Re: [SOLVED] (was: org-ref-insert-cite-link inserts citep)

2019-12-11 Thread John Kitchin
That is the default value of that variable. I guess you had set it
elsewhere to be getting citep before.

John

---
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



On Wed, Dec 11, 2019 at 4:59 PM Uwe Brauer  wrote:

> >>> "UB" == Uwe Brauer  writes:
>
>> Hi
>
>> I enjoy org-ref, but I struggle to configure org-ref-insert-link.
>
> (setq org-ref-default-citation-link "cite")
>
> Is your friend
>
>


[SOLVED] (was: org-ref-insert-cite-link inserts citep)

2019-12-11 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

   > Hi 

   > I enjoy org-ref, but I struggle to configure org-ref-insert-link.

(setq org-ref-default-citation-link "cite")

Is your friend



smime.p7s
Description: S/MIME cryptographic signature


org-ref-insert-cite-link inserts citep

2019-12-11 Thread Uwe Brauer


Hi 

I enjoy org-ref, but I struggle to configure org-ref-insert-link.

It inserts, per default, citep
for example 
citep:wald84:_gener_relat

How can I change that to plain cite:wald84:_gener_relat

Thanks and regards

Uwe Brauer 




Need to increase contrast in all emacs faces for legibility

2019-12-11 Thread Bruce Russell
Protesilaos Stavrou has uploaded two (light and dark) “accessibility” themes 
with “consistent minimum contrast ratio between background and foreground 
values of 7:1 or higher" to Melpa. See 
https://www.youtube.com/watch?v=zofd0O12XWE 
. The source code is on GitLab at 
https://gitlab.com/protesilaos/modus-themes 
.

Re: File tags prevent autocomplete of global tags

2019-12-11 Thread Berry, Charles


> On Dec 10, 2019, at 4:54 PM, E R  wrote:
> 
> Hello,
> 
> following the post below, by the same title, I was advised to notify the 
> org-mode mailing list.
> 
> https://emacs.stackexchange.com/questions/54277/file-tags-prevent-autocomplete-of-global-tags
> 
> To summarize, tags defined inside a file interfere with auto-complete of tags 
> defined globally, that is, in ~/.emacs

For completeness: you described there what is documented in

(info "(org) Setting Tags")

as the expected behavior.

You want to customize ‘org-tag-persistent-alist’ instead of `org-tag-alist'.

HTH,

Chuck

File tags prevent autocomplete of global tags

2019-12-11 Thread E R
Hello,

following the post below, by the same title, I was advised to notify the
org-mode mailing list.

https://emacs.stackexchange.com/questions/54277/file-tags-prevent-autocomplete-of-global-tags

To summarize, tags defined inside a file interfere with auto-complete of
tags defined globally, that is, in ~/.emacs


auto scheduling task

2019-12-11 Thread claude fuhrer

Hi all

Trying to organise my day I faced to a small problem


I would like be able to create a list of task with duration and start 
time for the first one. For example (this is pseudo code, do not work 
for real)


** Day 11-dec-2019

*** Task 1
    scheduled: <2019-12-11 Wed 09:25> duration:0:30

*** Task B
    duration: 0:45

*** Another task
    duration: 1:15


and then these task would be automatically displayed in my agenda (when 
using the command org-agenda) as they were scheduled completely that is :


start time of first task: given

end time of first task : start time + duration

start time of second task : end time of first time

end time of second task : start time + duration.


The order should be the order of  the task in the list (if needed they 
could all be tagged as "today task" for example). Moreover I would like 
to be able to insert a task during the day in the list (for example 
between "Task B" and "Another Task" and the next time I display the 
agenda it consider the new task ).



Is there a way to do something like this ? Thank you in advance for your 
help






Re: need to increase contrast in all emacs faces for legibility

2019-12-11 Thread Pankaj Jangid
> is it possible to programmatically increase foreground contrast
> against their background in all faces?


For shr (the built-in browser), there is something. But in general I am
not aware if there is something related to this.

shr-color-visible-distance-min, shr-color-visible-luminance-min

These two variables are used for shr.



Re: documenting python module examples in orgmode

2019-12-11 Thread Divan Santana
Thanks John Kitchin. Your suggestion works.



Re: need to increase contrast in all emacs faces for legibility

2019-12-11 Thread Marco
Hello,

> is it possible to programmatically increase foreground contrast
> against their background in all faces?

While I can't answer your question, which is an interesting one (don't
think it's org related, though), I just wanted to ask: can't you just
adjust the temperature of your display with a tool such as redshift
(for linux) or f.lux (windows)?