[Orgmode] org-datetree Some Suggestions
This is a really nice addition to org. However, I have a couple of suggestions which I think might improve it. At the moment dates are inserted as plain text. It would nice to have an option to insert the date as either an active or inactive date. Perhaps if there was a remember variable the user could simply surround it with either "[" or "<" as appropriate. Or maybe there is a better way? At the moment the date formats are hard coded. It would be nice if there was a date format variable that the user could set, with some sensible default (like the current one). Ian. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Release 6.33
Carsten Dominik wrote: >> I still cannot get the test file to work, that Uwe posted here lately: > > This is strange, that *did* work before I pushed the release. > Anyway, not it no longer does > > OK, fixed again, hope it works now. > > - Carsten Carsten, thanks again for the latest org! Here's what I get when I'm exporting a contacts-file with drawers, using orgmode 6.33c: 1. Exporting to html works perfectly! 2. Exporting to pdf has a little flaw: When there is an anniversary-line just before the drawer this line is omitted during pdf export. Here's my test file: *begin of file** #+DRAWERS: ADRESSE #+LANGUAGE: de #+OPTIONS: toc:nil f:t *:t <:t d:t * Musterfrau, Gerda Irgendein Text. %%(diary-anniversary 11 14 2009) Geburtstag: Gerda %d Jahre alt :ADRESSE: :Stadt:Frankfurt am Main :Telephon: 069--7511--2660 (direkt) :Telephon: 069--7511--1666 (Sekretärin) :E-Post: mailto:g.musterf...@web.de :END: *End of file ** I'm pondering whether the omitted anniversary-line in the pdf-export is something desirable: the "%%" are looking ugly, and the information can be stored in the drawer itself. But the price for this is to double the information: the diary-entry-like sexps is necessary to show the information in the agenda view, and the doubled anniversary information in a drawer is necessary to have a nice looking output. Herzliche Grüße, Uwe ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-datetree Some Suggestions
Ian Barton writes: Hi Ian, > At the moment dates are inserted as plain text. It would nice to have > an option to insert the date as either an active or inactive > date. Perhaps if there was a remember variable the user could simply > surround it with either "[" or "<" as appropriate. Or maybe there is a > better way? You can use the %U escape in any remember template, which inserts the inactive timestamp for this item's creation time. Bye, Tassilo ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Speed commands
Hey Dan, Dan Davison writes: > Here are simplified versions of the forward- and backward-scroll speed > commands that I'm suggesting. I love it! > Dan br, benny ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Howto install from git under XEmacs (org-freemind problem)
Hi Andreas, thanks for the additional information. It seems that Lennart is using calls to `rx' to make his regular expressions, and that function does not seem to exist in your XEmacs installation. I believe all these rx calls could be just substituted by a regexp string. Maybe you can contact Lennart about this issue? I am putting him into the CC. And I have no idea if there will be additional issues with XEmacs compatibility with this new module. - Carsten On Nov 14, 2009, at 12:36 AM, Andreas Gösele wrote: Carsten Dominik gmail.com> writes: I don't know what you are missing, but your Email is missing a backtrace. Well, xemacs -debug-init didn't give one. But I now tried manually to evaluate the org-mode related lines in my init.el and the offending line was: (require 'org-freemind) Debugger entered--Lisp error: (void-variable bol) byte-code("..." [eol nonl space bol current-load-list org-freemind-node-pattern default-boundp set-default rx submatch "*" *\?] 9) load-internal("org-freemind" nil t nil binary) load("org-freemind" nil t nil) require(org-freemind) eval((require (quote org-freemind))) eval-interactive((require (quote org-freemind))) eval-last-sexp(nil) call-interactively(eval-last-sexp) I think I don't need that line in my init.el. But without it, trying to use for instance org-freemind-to-org-mode gives: Debugger entered--Lisp error: (void-variable bol) byte-code("..." [eol nonl space bol current-load-list org-freemind-node-pattern default-boundp set-default rx submatch "*" *\?] 9) load-internal("org-freemind" nil nil nil binary) load("org-freemind" nil nil nil) command-execute(org-freemind-to-org-mode t) execute-extended-command(nil) call-interactively(execute-extended-command) Thanks again! Andreas Gösele ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Release 6.33
Carsten Dominik writes: > On Nov 14, 2009, at 12:03 AM, Sebastian Rose wrote: >>> Drawers are now exported properly >>> == >>> >>> Drawers are now exported when the configuration requires it, >>> i.e. if the variable `org-export-with-drawers' is t or a list >>> containing the drawers to export. >> >> >> I still cannot get the test file to work, that Uwe posted here lately: > > This is strange, that *did* work before I pushed the release. > Anyway, not it no longer does > > OK, fixed again, hope it works now. Yeah! It does! Thanks Sebastian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Howto install from git under XEmacs (org-freemind problem)
Thanks, I have seen this. Is not rx available at all in XEmacs? On Sun, Nov 15, 2009 at 12:17 PM, Carsten Dominik wrote: > > Hi Andreas, thanks for the additional information. > > It seems that Lennart is using calls to `rx' to make his regular > expressions, and that function does not seem to exist in your XEmacs > installation. > > I believe all these rx calls could be just substituted by a regexp string. > Maybe you can contact Lennart about this issue? > > I am putting him into the CC. > > And I have no idea if there will be additional issues with XEmacs > compatibility > with this new module. > > - Carsten > > On Nov 14, 2009, at 12:36 AM, Andreas Gösele wrote: > >> Carsten Dominik gmail.com> writes: >> >>> I don't know what you are missing, but your Email is missing a >>> backtrace. >> >> Well, xemacs -debug-init didn't give one. But I now tried manually to >> evaluate >> the org-mode related lines in my init.el and the offending line was: >> >> (require 'org-freemind) >> >> Debugger entered--Lisp error: (void-variable bol) >> byte-code("..." [eol nonl space bol current-load-list >> org-freemind-node-pattern default-boundp set-default rx submatch "*" *\?] >> 9) >> load-internal("org-freemind" nil t nil binary) >> load("org-freemind" nil t nil) >> require(org-freemind) >> eval((require (quote org-freemind))) >> eval-interactive((require (quote org-freemind))) >> eval-last-sexp(nil) >> call-interactively(eval-last-sexp) >> >> I think I don't need that line in my init.el. But without it, trying to >> use for >> instance org-freemind-to-org-mode gives: >> >> Debugger entered--Lisp error: (void-variable bol) >> byte-code("..." [eol nonl space bol current-load-list >> org-freemind-node-pattern default-boundp set-default rx submatch "*" *\?] >> 9) >> load-internal("org-freemind" nil nil nil binary) >> load("org-freemind" nil nil nil) >> command-execute(org-freemind-to-org-mode t) >> execute-extended-command(nil) >> call-interactively(execute-extended-command) >> >> Thanks again! >> >> Andreas Gösele > >> >> >> >> ___ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > - Carsten > > > > ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] the great^n grand-daddy of orgmode? :)
Carsten Dominik writes: > Hi Adam, > > this is awesome, thanks for the link > > - Carsten > > On Nov 14, 2009, at 1:27 PM, Adam Spiers wrote: > >> In case you haven't seen it, this is probably the first ever public >> demo of outlining software in 1968: >> >> http://www.youtube.com/watch?v=6epbmU7_fvg Hey this is funny! I knew those machines were not much faster than typewriters. What I did _not_ know, is that they were nearly as loud :) (Or is he using vi the first time? Beep beep beep). Sebastian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Speed commands
Hi Dan, these are nice, but somehow I find the "n" command logical and the "p" command confusing :-) - Carsten On Nov 15, 2009, at 3:44 AM, Dan Davison wrote: Dan Davison writes: Carsten Dominik writes: <...> I am happy to have a discussion what additional commands should be present by default. I thought a speed command for scrolling through an org document might be good -- move from heading to heading, displaying the next entry while keeping all others hidden, and close subtrees as you leave them. Here are simplified versions of the forward- and backward-scroll speed commands that I'm suggesting. - (defun ded/org-show-next-heading-tidily () "Show next entry, keeping other entries closed." (if (save-excursion (end-of-line) (outline-invisible-p)) (progn (org-show-entry) (show-children)) (outline-next-heading) (unless (and (bolp) (org-on-heading-p)) (org-up-heading-safe) (hide-subtree) (error "Boundary reached")) (org-overview) (org-reveal t) (org-show-entry) (show-children))) (defun ded/org-show-previous-heading-tidily () "Show previous entry, keeping other entries closed." (let ((pos (point))) (outline-previous-heading) (unless (and (< (point) pos) (bolp) (org-on-heading-p)) (goto-char pos) (hide-subtree) (error "Boundary reached")) (org-overview) (org-reveal t) (org-show-entry) (show-children))) (setq org-use-speed-commands t) (add-to-list 'org-speed-commands-user '("n" ded/org-show-next-heading-tidily)) (add-to-list 'org-speed-commands-user '("p" ded/org-show-previous-heading-tidily)) - Dan Or is there already an org command that does something like this? (Try starting with everything closed.) -- (defun ded/org-show-next-heading-tidily () "Show next entry, keeping other entries closed." (if (save-excursion (end-of-line) (outline-invisible-p)) (org-cycle) (let ((level (org-current-level))) (unless (org-heading-has-child-p) (org-cycle)) (outline-next-heading) (if (< (org-current-level) level) (save-excursion (outline-backward-same-level 1) (org-cycle))) (if (and (bolp) (org-on-heading-p)) (org-cycle) (outline-up-heading 1 t) (org-cycle) (error "Boundary reached") (setq org-use-speed-commands t) (add-to-list 'org-speed-commands-user '("s" ded/org-show-next-heading-tidily)) -- ( might be quite natural for this one, it seems to get used for scrolling e.g. in dired and gnus) Dan - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [PATCH] Meaningful prompt for org-set-effort
Applied, thanks. - Carsten On Nov 14, 2009, at 6:40 PM, Gregory J. Grubbs wrote: I don't understand what I'm being prompted for with the current prompt. --8<---cut here---start->8--- diff --git a/lisp/org.el b/lisp/org.el index c5499a3..dcded8e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12213,11 +12213,11 @@ allowed value." (if (equal rpl 0) (setq rpl 10)) (if (and (> rpl 0) (<= rpl (length allowed))) (car (nth (1- rpl) allowed)) - (org-completing-read "Value: " allowed nil + (org-completing-read "Effort: " allowed nil (t (let (org-completion-use-ido org-completion-use-iswitchb) (org-completing-read - (concat "Value " (if (and cur (string-match "\\S-" cur)) + (concat "Effort " (if (and cur (string-match "\\S-" cur)) (concat "[" cur "]") "") ": ") existing nil nil "" nil cur)) --8<---cut here---end--->8--- ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Request: org-display-outline-path report full file path even when narrowed
Fixed, thanks. - Carsten On Nov 14, 2009, at 6:58 PM, Gregory J. Grubbs wrote: When the following file is narrowed to the "Sub Two" tree, org-display-outline reports the path relative to "Sub Two". It would be more useful to report, e.g. "Top One/Sub Two/Blah" Obviously, if you are narrowed further down the hierarchy, the current function becomes even less useful. --8<---cut here---start->8--- * Top One ** Sub One *** Sub Sub One *** Sub Sub Two ** Sub Two *** Blah Forget following this pattern *** Blah Blah * Top Two --8<---cut here---end--->8--- I would have submitted a patch, but my naive attempts to use (widen) within a (save-excursion) did not work! Cheers, -Greg ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [PATCH] Remove unused function.
Applied, thanks. - Carsten On Nov 14, 2009, at 5:22 PM, Noorul Islam wrote: Hi, Attached is the patch which removes the unused function "org-compact-display-after-subtree-move". Thanks and Regards Noorul ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [PATCH] Typo
Applied, thanks. - Carsten On Nov 14, 2009, at 5:10 PM, Noorul Islam wrote: Hi, I do not have public repository so I am attaching the patch. It is very small though! Thanks Noorul ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Release 6.33
Hi Uwe, it i OK to just put the diary-anniversary line into the drawer. Alternative: #+DRAWERS: ADRESSE #+LANGUAGE: de #+OPTIONS: toc:nil f:t *:t <:t d:t #+CATEGORY: Geburtstag * Musterfrau, Gerda Irgendein Text. :ADRESSE: :Stadt: Frankfurt am Main <2009-11-15 Sun +1y> :Telephon: 069--7511--2660 (direkt) :Telephon: 069--7511--1666 (Sekretärin) :E-Post: mailto:g.musterf...@web.de :Geburtstag: <1997-11-15 Sat +1y> :END: - HTH - Carsten On Nov 15, 2009, at 11:02 AM, Uwe Jochum wrote: Carsten Dominik wrote: I still cannot get the test file to work, that Uwe posted here lately: This is strange, that *did* work before I pushed the release. Anyway, not it no longer does OK, fixed again, hope it works now. - Carsten Carsten, thanks again for the latest org! Here's what I get when I'm exporting a contacts-file with drawers, using orgmode 6.33c: 1. Exporting to html works perfectly! 2. Exporting to pdf has a little flaw: When there is an anniversary- line just before the drawer this line is omitted during pdf export. Here's my test file: *begin of file** #+DRAWERS: ADRESSE #+LANGUAGE: de #+OPTIONS: toc:nil f:t *:t <:t d:t * Musterfrau, Gerda Irgendein Text. %%(diary-anniversary 11 14 2009) Geburtstag: Gerda %d Jahre alt :ADRESSE: :Stadt:Frankfurt am Main :Telephon: 069--7511--2660 (direkt) :Telephon: 069--7511--1666 (Sekretärin) :E-Post: mailto:g.musterf...@web.de :END: *End of file ** I'm pondering whether the omitted anniversary-line in the pdf-export is something desirable: the "%%" are looking ugly, and the information can be stored in the drawer itself. But the price for this is to double the information: the diary-entry-like sexps is necessary to show the information in the agenda view, and the doubled anniversary information in a drawer is necessary to have a nice looking output. Herzliche Grüße, Uwe ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Bug: org-wl: from property not set as expected [6.33]
Applied, thanks. - Carsten On Nov 14, 2009, at 12:43 PM, David Maus wrote: 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-mode mailing list. When storing a link to a Wanderlust message the link's :from property is not set to the full address field (i.e. Name ) if the Wanderlust customization variable `wl-use-petname' is set to 't, what is it's default value. This causes unexpected behavior when `org-store-link' is called for a remember template as the template's :fromname and :fromaddress properties are not set correctly: %:fromname is empty and :fromaddress contains the senders name and not the address. This misbehaviour is caused because `org-wl-store-link' calls `wl-summary-line-from' which respects `wl-use-petname' and returns the senders name only if this variable is set to 't. Attached patch changes this issue by simply make `org-wl-store-link' use the same code to get the from field as it does for the to field. Emacs : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3) of 2009-10-23 on elegiac, modified by Debian Package: Org-mode version 6.33 current state: == (setq org-clock-in-switch-to-state "STARTED" org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold) ("STARTED" :foreground "orange red" :weight bold) ("DONE" :foreground "light green") ("MAYBE" :foreground "tomato") ("WAITING" :foreground "tan2" :weight bold) ("CANCELLED" :foreground "firebrick") ("APPT" :foreground "DeepSkyBlue1" :weight bold) ("DEFERRED" :foreground "light slate gray")) org-agenda-custom-commands '(("r" "Refile New Notes and Tasks" tags "LEVEL=1+REFILE" ((org-agenda-todo-ignore-with-date nil))) ("s" "Started Tasks" todo "STARTED" ((org-agenda-todo-ignore-scheduled nil) (org-agenda-todo- ignore-deadlines nil) (org-agenda-todo-ignore-with-date nil)) ) ) org-agenda-files '("/home/david/Org/pg.org" "/home/david/Org/ work.org" "/home/david/Org/tec.org" "/home/david/Org/priv.org" "/home/david/Org/refile.org") org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-agenda-tags-column -120 org-checklist-export-function 'org-export-as-ascii org-completion-use-ido t org-after-todo-state-change-hook '(org-clock-out-if-current org- checklist) org-agenda-todo-ignore-scheduled t org-todo-state-tags-triggers '((todo ("NOTE")) ("" ("NOTE" . t))) org-log-redeadline 'time org-export-preprocess-hook '(org-export-blocks-preprocess) org-tab-first-hook '(org-hide-block-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-todo-keywords '((sequence "TODO(t)" "STARTED(s)" "|" "DONE(D@)") (sequence "MAYBE(m)" "WAITING(w@/!)" "|" "CANCELLED(C@)") (sequence "APPT(a)" "DEFERRED(d@/!)" "|" "DONE(D@)" "CANCELLED(C@)")) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-directory "~/Org" org-log-reschedule 'time org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide- drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-publish-project-alist '(("private-dynamic" :base-directory "~/ Org/www" :base-extension "org" :publishing-directory "~/www/private" :publishing-function (org-publish-org-to- html) :recursive t :author "David Maus" :email "maus.da...@gmail.com") ("private-static" :base-directory "~/Org/www" :base- extension "css" :publishing-directory "~/www/private" :publishing-function org-publish- attachment :recursive t) ("private" :components ("private-dynamic" "private-static"))) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5]) org-refile-targets '((org-agenda-files :maxlevel . 3)) org-confirm-elisp-link-function 'yes-or-no-p org-refile-use-outline-path 'file org-log-into-drawer "LOGBOOK" org-agenda-todo-ignore-with-date t org-enforce-todo-dependencies t org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp "\\" org-tags-column -120 org-remember-templates '(("todo" 116 "* TODO %^{Description} %^G\n :PROPERTIES:\n :Created: %U \n :Ref: %a\n :END:\n\n %?" "refile.org" bottom nil) ("appt" 97 "* APPT %^{Description} %^G\n %^T\n :PROPERTIES: \n :Created: %U\n :Ref: %a\n :END:\n\n %?" "refile.org" bottom nil) ("note" 110
Re: [Orgmode] Folding last plain list entry
Hi Dan, the folding implementation of plain lists is limited - it works by assuming, for the duration of the org-cycle instance, that these lines are just normal headlines. I believe it would be an awful lot of work to fix this. - Carsten On Nov 13, 2009, at 7:44 PM, Dan Davison wrote: Org-cycle (tab) on the last item of a plain list folds all the rest of the contents in the current heading, despite org-empty-line-terminates-plain-lists being t. It shouldn't do that, right? For example (setq org-empty-line-terminates-plain-lists t) , | * h1 | - item 1 | item 1 contents | - item 2 | item 2 contents | | Non-list stuff ` Now if I hit at the start of the 'item 2' line it folds like this , | * h1 | - item 1 | item 1 contents | - item 2 | item 2... ` Dan ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Proposal: org-protocol handles redirects (finally)
Applied, thanks. - Carsten On Nov 13, 2009, at 6:56 PM, Sebastian Rose wrote: Hi, here is a little patch for org-protocol.el, I always wanted to have. It enhances `org-protocol-open-source' to handle rewritten URLs to some extend. I tested it successfully with my projects here and on the web and it's exactly what I've been missing. If you find it breaks something, or know it how it could be implemented better, report back. * This is how it works: Each project in `org-protocol-project-alist' may now have a new element `:rewrites'. `:rewrites' is a list of cons cells, that maps regular expressions to relative paths. * Example: (setq org-protocol-project-alist '(("http://fairposter.de/"; :base-url "http://example-web-shop.de/"; :working-directory "/path/to/working/directory/" :online-suffix ".php" :working-suffix ".php" :rewrites (("example-web-shop.de/cars/" . "products.php") ("example-web-shop.de/$" . "index.php") )) ;; more projects here )) Today, if I visit http://www.example-web-shop.de/, the URL would not match a path to any of the files below my working directory. Tomorrow, /path/to/working/directory/index.php is opened, because there's a matching rewrite. Today, a rewritten URL like http://example-web-shop.de/cars/lamborghini/Gallardo_LP560-4_MY09 would not match a path to any of the files below my working directory, because URLS like `/cars/' would be rewritten on the server and served through http://example-web-shop.de/products.php. Tomorrow, that URL will be mapped to /path/to/working/directory/products.php, because there's a matching rewrite defined. Best wishes Sebastian diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 30d2dd3..a2bc6af 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -185,6 +185,8 @@ Possible properties are: Last slash required. :working-directory - the local working directory. This is, what base-url will be replaced with. + :redirects - A list of cons cells, each of which maps a regular + expression to match to a path relative to :working-directory. Example: @@ -198,7 +200,12 @@ Example: :online-suffix \".html\" :working-suffix \".org\" :base-url \"http://localhost/org/\"; - :working-directory \"/home/user/org/\"))) + :working-directory \"/home/user/org/\" + :rewrites ((\"org/?$\" . \"index.php\") + + The last line tells `org-protocol-open-source' to open + /home/user/org/index.php, if the URL cannot be mapped to an existing + file, and ends with either \"org\" or \"org/\". Consider using the interactive functions `org-protocol-create' and `org-protocol-create-for-org' to help you filling this variable with valid contents." @@ -504,10 +511,35 @@ The location for a browser's bookmark should look like this: (let* ((wdir (plist-get (cdr prolist) :working-directory)) (strip-suffix (plist-get (cdr prolist) :online- suffix)) (add-suffix (plist-get (cdr prolist) :working- suffix)) - (start-pos (+ (string-match wsearch f) (length base-url))) + ;; Strip "[?#].*$" if `f' is a redirect with another + ;; ending than strip-suffix here: + (f1 (substring f 0 (string-match "\\([\\?#].*\\)?$" f))) + (start-pos (+ (string-match wsearch f1) (length base-url))) (end-pos (string-match - (concat (regexp-quote strip-suffix) "\\ ([?#].*\\)?$") f)) - (the-file (concat wdir (substring f start-pos end-pos) add-suffix))) +(regexp-quote strip-suffix) f1)) + ;; We have to compare redirects without suffix below: + (f2 (concat wdir (substring f1 start-pos end-pos))) + (the-file (concat f2 add-suffix))) + + ;; Note: the-file may still contain `%C3' et al here because browsers + ;; tend to encode `ä' in URLs to `%25C3' - `%25' being ` %'. + ;; So the results may vary. + + ;; -- start redirects -- + (unless (file-exists-p the-file) + (message "File %s does not exist.\nTesting for rewritten URLs." the-file) + (let ((rewrites (plist-get (cdr prolist) :rewrites))) + (when rewrites + (message "Rewrites found: %S" rewrites) + (mapc +(lambda (rewrite) + "Try to match a rewritten URL and map it to a real file." + ;; Compare redirects without suffix: + (if (string-match (car rewrite) f2) + (throw 'result (concat wdir (cdr rewrite) +
Re: [Orgmode] Proposal: org-protocol handles redirects (finally)
Carsten Dominik writes: > Applied, thanks. > > - Carsten Thank you Carsten. I'll go now and document the new feature on worg. Sebastian > On Nov 13, 2009, at 6:56 PM, Sebastian Rose wrote: > >> Hi, >> >> >> here is a little patch for org-protocol.el, I always wanted to have. It >> enhances `org-protocol-open-source' to handle rewritten URLs to some >> extend. >> >> I tested it successfully with my projects here and on the web and it's >> exactly what I've been missing. >> >> If you find it breaks something, or know it how it could be implemented >> better, report back. >> >> >> >> * This is how it works: >> >> Each project in `org-protocol-project-alist' may now have a new >> element `:rewrites'. `:rewrites' is a list of cons cells, that maps >> regular expressions to relative paths. >> >> >> >> * Example: >> >> (setq org-protocol-project-alist >> '(("http://fairposter.de/"; >> :base-url "http://example-web-shop.de/"; >> :working-directory "/path/to/working/directory/" >> :online-suffix ".php" >> :working-suffix ".php" >> :rewrites (("example-web-shop.de/cars/" . "products.php") >>("example-web-shop.de/$" . "index.php") >>)) >> >> ;; more projects here >> )) >> >> >> Today, if I visit http://www.example-web-shop.de/, the URL would >> not match a path to any of the files below my working directory. >> >> Tomorrow, /path/to/working/directory/index.php is opened, because there's >> a matching rewrite. >> >> >> Today, a rewritten URL like >>http://example-web-shop.de/cars/lamborghini/Gallardo_LP560-4_MY09 >> would not match a path to any of the files below my working >> directory, because URLS like `/cars/' would be rewritten on the >> server and served through http://example-web-shop.de/products.php. >> >> Tomorrow, that URL will be mapped to >> /path/to/working/directory/products.php, because there's a matching >> rewrite defined. >> >> >> >> Best wishes >> >> Sebastian >> >> >> diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el >> index 30d2dd3..a2bc6af 100644 >> --- a/lisp/org-protocol.el >> +++ b/lisp/org-protocol.el >> @@ -185,6 +185,8 @@ Possible properties are: >>Last slash required. >> :working-directory - the local working directory. This is, what base-url >> will >>be replaced with. >> + :redirects - A list of cons cells, each of which maps a regular >> + expression to match to a path relative to >> :working-directory. >> >> Example: >> >> @@ -198,7 +200,12 @@ Example: >> :online-suffix \".html\" >> :working-suffix \".org\" >> :base-url \"http://localhost/org/\"; >> - :working-directory \"/home/user/org/\"))) >> + :working-directory \"/home/user/org/\" >> + :rewrites ((\"org/?$\" . \"index.php\") >> + >> + The last line tells `org-protocol-open-source' to open >> + /home/user/org/index.php, if the URL cannot be mapped to an existing >> + file, and ends with either \"org\" or \"org/\". >> >> Consider using the interactive functions `org-protocol-create' and >> `org-protocol-create-for-org' to help you filling this variable with valid >> contents." >> @@ -504,10 +511,35 @@ The location for a browser's bookmark should look like >> this: >> (let* ((wdir (plist-get (cdr prolist) :working-directory)) >>(strip-suffix (plist-get (cdr prolist) :online- >> suffix)) >>(add-suffix (plist-get (cdr prolist) :working- >> suffix)) >> - (start-pos (+ (string-match wsearch f) (length >> base-url))) >> + ;; Strip "[?#].*$" if `f' is a redirect with another >> + ;; ending than strip-suffix here: >> + (f1 (substring f 0 (string-match "\\([\\?#].*\\)?$" f))) >> + (start-pos (+ (string-match wsearch f1) (length >> base-url))) >>(end-pos (string-match >> - (concat (regexp-quote strip-suffix) "\\ >> ([?#].*\\)?$") f)) >> - (the-file (concat wdir (substring f start-pos end-pos) >> add-suffix))) >> + (regexp-quote strip-suffix) f1)) >> + ;; We have to compare redirects without suffix below: >> + (f2 (concat wdir (substring f1 start-pos end-pos))) >> + (the-file (concat f2 add-suffix))) >> + >> + ;; Note: the-file may still contain `%C3' et al here because >> browsers >> + ;; tend to encode `ä' in URLs to `%25C3' - `%25' being ` >> %'. >> + ;; So the results may vary. >> + >> + ;; -- start redirects -- >> + (unless (file-exists-p the-file) >> +(message "File %s does not exist.\nTesting for rewritten URLs." >> the-file) >> +(let ((rewrites (plist-get (cdr prolist) :rewrites))) >> + (when rewrit
[Orgmode] Re: Re: Release 6.33
Carsten Dominik wrote: > Alternative: > :ADRESSE: > :Stadt: Frankfurt am Main <2009-11-15 Sun +1y> > :Telephon: 069--7511--2660 (direkt) > :Telephon: 069--7511--1666 (Sekretärin) > :E-Post: mailto:g.musterf...@web.de > :Geburtstag: <1997-11-15 Sat +1y> > :END: Carsten, wow! I hadn't tried this before, but that is wunderbar again! Thanks a lot for the hint! With this there is really no need for maintaining contact files in another system apart from orgmode! Herzlichen Gruß, Uwe ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-agenda-diary-entry without date tree
Carsten Dominik writes: > On Nov 14, 2009, at 1:33 PM, Matt Lundin wrote: > >> Hi Carsten, >> >> The new org-agenda-diary-entry looks quite convenient. >> >> Would it be possible to add an option to bypass the date tree so as to >> add each new appointment as a simple first level heading? I prefer to >> keep my appointments organized by project and/or category and have no >> real use for the date tree. Ideally, new appointments would appear as >> first level headlines in the org-agenda-diary-file (i.e., my inbox), >> ready to be refiled. > > Hi Matt, > > why are you not simply using your remember template for this? > Hi Carsten, My org-remember template only works for single dates. I'd very much like to be able to create block and anniversary events quickly from the calendar and the agenda (but without the date tree and special "anniversary" heading). In other words, my remember template is only a partial solution. The new feature, on the other hand, offers all the convenient keybindings I remember from my erstwhile days of using the emacs diary. If it's too much trouble, no worries. Best, Matt ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-datetree Some Suggestions
Tassilo Horn wrote: Ian Barton writes: Hi Ian, At the moment dates are inserted as plain text. It would nice to have an option to insert the date as either an active or inactive date. Perhaps if there was a remember variable the user could simply surround it with either "[" or "<" as appropriate. Or maybe there is a better way? You can use the %U escape in any remember template, which inserts the inactive timestamp for this item's creation time. Thanks Tassilo, but it doesn't do what I want. This is an example of what org-datetree produces: ** 2009 *** 2009-11 November <- I would like to customize this format. 2009-11-14 Saturday <- I would like to choose to make this a timestamp * Test1 * Another Test. Ian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [PATCH] Removes obsolete functions, variable and fix typos.
Hello all, Attached is the patch which has following changes. * lisp/org-agenda.el: - Removed obsolete functions, org-highlight-until-next-command and org-unhighlight-once. - Removed obsolete variable org-agenda-remove-date. * lisp/org.el - Fixed some typos. Thanks and Regards, Noorul diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2619914..9ebe2d2 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -2970,7 +2970,6 @@ When EMPTY is non-nil, also include days without any entries." (defvar org-starting-day nil) ; local variable in the agenda buffer (defvar org-agenda-span nil) ; local variable in the agenda buffer (defvar org-include-all-loc nil) ; local variable -(defvar org-agenda-remove-date nil) ; dynamically scoped FIXME: not used??? ;;;###autoload (defun org-agenda-list (&optional include-all start-day ndays) @@ -5536,16 +5535,6 @@ so that the date SD will be in that range." "Detach overlay INDEX." (funcall (if (featurep 'xemacs) 'detach-extent 'delete-overlay) org-hl)) -;; FIXME this is currently not used. -(defun org-highlight-until-next-command (beg end &optional buffer) - "Move the highlight overlay to BEG/END, remove it before the next command." - (org-highlight beg end buffer) - (add-hook 'pre-command-hook 'org-unhighlight-once)) -(defun org-unhighlight-once () - "Remove the highlight from its position, and this function from the hook." - (remove-hook 'pre-command-hook 'org-unhighlight-once) - (org-unhighlight)) - (defun org-agenda-follow-mode () "Toggle follow mode in an agenda buffer." (interactive) diff --git a/lisp/org.el b/lisp/org.el index bf6573b..73117c8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13111,7 +13111,7 @@ user." deltadef (nth 2 delta))) ;; Check if there is an iso week date in there -;; If yes, sore the info and postpone interpreting it until the rest +;; If yes, store the info and postpone interpreting it until the rest ;; of the parsing is done (when (string-match "\\<\\(?:\\([0-9]+\\)-\\)?[wW]\\([0-9]\\{1,2\\}\\)\\(?:-\\([0-6]\\)\\)?\\([ \t]\\|$\\)" ans) (setq iso-year (if (match-end 1) (org-small-year-to-year (string-to-number (match-string 1 ans @@ -13119,7 +13119,7 @@ user." iso-week (string-to-number (match-string 2 ans))) (setq ans (replace-match "" t t ans))) -;; Help matching ISO dates with single digit month ot day, like 2006-8-11. +;; Help matching ISO dates with single digit month or day, like 2006-8-11. (when (string-match "^ *\\(\\([0-9]+\\)-\\)?\\([0-1]?[0-9]\\)-\\([0-3]?[0-9]\\)\\([^-0-9]\\|$\\)" ans) (setq year (if (match-end 2) ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Proposal: org-protocol handles redirects (finally)
Sebastian Rose writes: > Carsten Dominik writes: >> Applied, thanks. >> >> - Carsten > > > Thank you Carsten. > > I'll go now and document the new feature on worg. DONE. Will be http://orgmode.org/worg/org-contrib/org-protocol.php#open-source-rewritten-urls once it's exported. Best wishes Sebastian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-datetree Some Suggestions
On Nov 15, 2009, at 4:35 PM, Ian Barton wrote: Tassilo Horn wrote: Ian Barton writes: Hi Ian, At the moment dates are inserted as plain text. It would nice to have an option to insert the date as either an active or inactive date. Perhaps if there was a remember variable the user could simply surround it with either "[" or "<" as appropriate. Or maybe there is a better way? You can use the %U escape in any remember template, which inserts the inactive timestamp for this item's creation time. Thanks Tassilo, but it doesn't do what I want. This is an example of what org-datetree produces: ** 2009 *** 2009-11 November <- I would like to customize this format. 2009-11-14 Saturday <- I would like to choose to make this a timestamp * Test1 * Another Test. The structure of the tree is also for parsing - in order to put in entries at the right place, the tree leaves must be easy to find and interpolate. So I do want the tree the way it is - we can negotiate about what comes after the date, ant that can also be a timestamp or anything. Ian ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Colors for pre elem. on orgmode.org
Hi, the colors on orgmode.org are made from an Emacs setup with a dark background. Because of the light background on the Web, code examples with syntax highlighting are hard to read. I even avoid #+BEGIN_SRC and use #+BEGIN_EXAMPLE instead. I played a little locally, and found, that the following simple change makes highlighted source code readable. Just put this in an exported HTML file, just before the `' tag and keep the original styles in place, to see the results: pre { background-color:#33; color:white; }These are just the changed values. Unfortunately, this changes the appearance significantly. Dark background for all code. As an alternative, we could change all foreground colors, in that we keep the tint, but reduce the brightness of each. That way we would keep the appearance and have readable code. I've changed the background to be slightly lighter. Just put this in an exported HTML file, just before the `' tag and keep the original styles in place, to see the results: