emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* C-u C-u C-c ! inserts an active timestamp.
@ 2013-09-16 13:42 Nicolas Richard
  2013-09-22  6:00 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Richard @ 2013-09-16 13:42 UTC (permalink / raw)
  To: emacs-orgmode

I suggest the following change so that C-u C-u C-c ! inserts an inactive
timestamp. I also document the INACTIVE argument of org-time-stamp.

-- 
Nicolas.

From 5cdb18297d92f2d99334d98aa2f3b8a40e44702f Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Mon, 29 Apr 2013 09:02:21 +0200
Subject: [PATCH] Enforce the convention that C-c ! inserts inactive
 timestamps.

* lisp/org.el (org-time-stamp): When INACTIVE is non-nil, insert an
  inactive timestamp also with double universal argument.
---
 lisp/org.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 59a22a2..044d06f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16036,7 +16036,10 @@ If there is already a timestamp at the cursor, it will be
 modified.
 
 With two universal prefix arguments, insert an active timestamp
-with the current time without prompting the user."
+with the current time without prompting the user.
+
+When called from lisp, the timestamp is inactive if INACTIVE is
+non-nil."
   (interactive "P")
   (let* ((ts nil)
 	 (default-time
@@ -16083,7 +16086,7 @@ with the current time without prompting the user."
 			    " " repeater ">"))))
       (message "Timestamp updated"))
      ((equal arg '(16))
-      (org-insert-time-stamp (current-time) t))
+      (org-insert-time-stamp (current-time) t inactive))
      (t
       (setq time (let ((this-command this-command))
 		   (org-read-date arg 'totime nil nil default-time default-input inactive)))
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: C-u C-u C-c ! inserts an active timestamp.
  2013-09-16 13:42 C-u C-u C-c ! inserts an active timestamp Nicolas Richard
@ 2013-09-22  6:00 ` Carsten Dominik
  2013-09-23  8:51   ` Nicolas Richard
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2013-09-22  6:00 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1796 bytes --]

Applied, thanks you Nicolas.

- Carsten

On 16.9.2013, at 15:42, Nicolas Richard <theonewiththeevillook@yahoo.fr> wrote:

> I suggest the following change so that C-u C-u C-c ! inserts an inactive
> timestamp. I also document the INACTIVE argument of org-time-stamp.
> 
> -- 
> Nicolas.
> 
> From 5cdb18297d92f2d99334d98aa2f3b8a40e44702f Mon Sep 17 00:00:00 2001
> From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
> Date: Mon, 29 Apr 2013 09:02:21 +0200
> Subject: [PATCH] Enforce the convention that C-c ! inserts inactive
> timestamps.
> 
> * lisp/org.el (org-time-stamp): When INACTIVE is non-nil, insert an
>  inactive timestamp also with double universal argument.
> ---
> lisp/org.el | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/lisp/org.el b/lisp/org.el
> index 59a22a2..044d06f 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -16036,7 +16036,10 @@ If there is already a timestamp at the cursor, it will be
> modified.
> 
> With two universal prefix arguments, insert an active timestamp
> -with the current time without prompting the user."
> +with the current time without prompting the user.
> +
> +When called from lisp, the timestamp is inactive if INACTIVE is
> +non-nil."
>   (interactive "P")
>   (let* ((ts nil)
> 	 (default-time
> @@ -16083,7 +16086,7 @@ with the current time without prompting the user."
> 			    " " repeater ">"))))
>       (message "Timestamp updated"))
>      ((equal arg '(16))
> -      (org-insert-time-stamp (current-time) t))
> +      (org-insert-time-stamp (current-time) t inactive))
>      (t
>       (setq time (let ((this-command this-command))
> 		   (org-read-date arg 'totime nil nil default-time default-input inactive)))
> -- 
> 1.8.1.5
> 
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-u C-u C-c ! inserts an active timestamp.
  2013-09-22  6:00 ` Carsten Dominik
@ 2013-09-23  8:51   ` Nicolas Richard
  2013-09-23  9:07     ` Suvayu Ali
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Richard @ 2013-09-23  8:51 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Applied

I noticed that the whole mail went into the commit msg (commit
12de6223dcd736c0958eca874def052b407ff5d1) ; did I send the patch
incorrectly ?

I used git format-patch then inserted the result at the end of the email
I wrote. The page http://orgmode.org/worg/org-contribute.html#sec-4 is
not very explicit about how to send the result of `git format-patch',
but I seem to remember it was ok to just yank the content at the end of
a mail. Is that a wrong assumption ?

-- 
Nicolas

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-u C-u C-c ! inserts an active timestamp.
  2013-09-23  8:51   ` Nicolas Richard
@ 2013-09-23  9:07     ` Suvayu Ali
  2013-09-23  9:16       ` Sebastien Vauban
  0 siblings, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2013-09-23  9:07 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Sep 23, 2013 at 10:51:33AM +0200, Nicolas Richard wrote:
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
> > Applied
> 
> I noticed that the whole mail went into the commit msg (commit
> 12de6223dcd736c0958eca874def052b407ff5d1) ; did I send the patch
> incorrectly ?
> 
> I used git format-patch then inserted the result at the end of the email
> I wrote. The page http://orgmode.org/worg/org-contribute.html#sec-4 is
> not very explicit about how to send the result of `git format-patch',
> but I seem to remember it was ok to just yank the content at the end of
> a mail. Is that a wrong assumption ?

Simply attaching the patch as a text attachment should do fine I think.

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-u C-u C-c ! inserts an active timestamp.
  2013-09-23  9:07     ` Suvayu Ali
@ 2013-09-23  9:16       ` Sebastien Vauban
  2013-09-23 14:08         ` Suvayu Ali
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2013-09-23  9:16 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello Suvayu,

Suvayu Ali wrote:
> On Mon, Sep 23, 2013 at 10:51:33AM +0200, Nicolas Richard wrote:
>> Carsten Dominik <carsten.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> 
>> > Applied
>> 
>> I noticed that the whole mail went into the commit msg (commit
>> 12de6223dcd736c0958eca874def052b407ff5d1) ; did I send the patch
>> incorrectly ?
>> 
>> I used git format-patch then inserted the result at the end of the email
>> I wrote. The page http://orgmode.org/worg/org-contribute.html#sec-4 is
>> not very explicit about how to send the result of `git format-patch',
>> but I seem to remember it was ok to just yank the content at the end of
>> a mail. Is that a wrong assumption ?
>
> Simply attaching the patch as a text attachment should do fine I think.

Though, many guidelines tell:

  Do not attach your patch, but submit it "inline" in the mail body,
  /unless you cannot teach your mailer to leave the formatting
  of the patch alone/.

That allows for easy reviews... and easy comments (after every chunk of code).

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: C-u C-u C-c ! inserts an active timestamp.
  2013-09-23  9:16       ` Sebastien Vauban
@ 2013-09-23 14:08         ` Suvayu Ali
  0 siblings, 0 replies; 6+ messages in thread
From: Suvayu Ali @ 2013-09-23 14:08 UTC (permalink / raw)
  To: emacs-orgmode

On Mon, Sep 23, 2013 at 11:16:25AM +0200, Sebastien Vauban wrote:
> Hello Suvayu,
> 
> Suvayu Ali wrote:
> > On Mon, Sep 23, 2013 at 10:51:33AM +0200, Nicolas Richard wrote:
> >> Carsten Dominik <carsten.dominik@gmail.com> writes:
> >> 
> >> > Applied
> >> 
> >> I noticed that the whole mail went into the commit msg (commit
> >> 12de6223dcd736c0958eca874def052b407ff5d1) ; did I send the patch
> >> incorrectly ?
> >> 
> >> I used git format-patch then inserted the result at the end of the email
> >> I wrote. The page http://orgmode.org/worg/org-contribute.html#sec-4 is
> >> not very explicit about how to send the result of `git format-patch',
> >> but I seem to remember it was ok to just yank the content at the end of
> >> a mail. Is that a wrong assumption ?
> >
> > Simply attaching the patch as a text attachment should do fine I think.
> 
> Though, many guidelines tell:
> 
>   Do not attach your patch, but submit it "inline" in the mail body,
>   /unless you cannot teach your mailer to leave the formatting
>   of the patch alone/.
> 
> That allows for easy reviews... and easy comments (after every chunk of code).

Valid point.  In that case maybe the problem was Nicolas's patch was
inlined after the signature marker, "-- ".

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-23 14:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-16 13:42 C-u C-u C-c ! inserts an active timestamp Nicolas Richard
2013-09-22  6:00 ` Carsten Dominik
2013-09-23  8:51   ` Nicolas Richard
2013-09-23  9:07     ` Suvayu Ali
2013-09-23  9:16       ` Sebastien Vauban
2013-09-23 14:08         ` Suvayu Ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).