Re: [patch] ox-beamer: allow setting frame subtitle with BEAMER_SUBTITLE property
Hi Ihor, I think that it will make more sense to recognize Org markup in the > BEAMER_SUBTITLE property value. I agree, that would be a good idea. I tried to implement this in the same way as with the frametitle: , | (let ((env (org-element-property :BEAMER_ENV headline))) | (format "{%s}" | (if (and env (equal (downcase env) "fullframe")) "" | (org-export-data | (org-element-property :title headline) info ` Like this: , | (when-let ((subtitle | (org-element-property :BEAMER_SUBTITLE headline))) | (format "{%s}" | (org-export-data subtitle info))) ` but it doesn't work---the subtitle is just rendered verbatim (even if it has org markup---this is included in the .tex file). I've had a look around the various data export functions and I can't work out why not. Can you (or someone else) advise? Also, please announce the new feature in the ORG-NEWS. Will do, when I've got the formatting working. Very best, Hugo
[patch] ox-beamer: allow setting frame subtitle with BEAMER_SUBTITLE property
Hi all, I found recently I wanted to add subtitles to some slides in beamer in an export from org-mode. In the end I had to write an explicit #+beamer: declaration with latex code in it for each headline. The attached patch implements an easier (I think) way of setting subtitles, with properties on org headings which are exported as frames. I hope this is helpful. Best, HugoFrom 88b04892fd270989980c5d34595213e67d8c8f3a Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Fri, 5 Jul 2024 22:13:19 +0100 Subject: [PATCH] ox-beamer: allow setting frame subtitle with headline property * lisp/ox-beamer.el (org-beamer--format-frame): allow a frame subtitle to be specified in the BEAMER_SUBTITLE property. If specified, put it in the second non-optional argument to \begin{frame}. * doc/org-manual.org (Frames and Blocks in Beamer): document above behaviour. --- doc/org-manual.org | 5 + lisp/ox-beamer.el | 4 2 files changed, 9 insertions(+) diff --git a/doc/org-manual.org b/doc/org-manual.org index ad584d7a5..cfa1e4b85 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -12653,6 +12653,11 @@ *** Frames and Blocks in Beamer frames. It is also useful for properly closing a =column= environment. + #+cindex: @samp{BEAMER_SUBTITLE}, property + If =BEAMER_SUBTITLE= is set, org exports its value as the subtitle + for the headline's frame. This property has no effect on headlines + which are not exported as frames. + #+cindex: @samp{BEAMER_ACT}, property #+cindex: @samp{BEAMER_OPT}, property When =BEAMER_ACT= is set for a headline, Org export translates that diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 51684448d..6925c8092 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -470,6 +470,10 @@ (defun org-beamer--format-frame (headline contents info) (if (and env (equal (downcase env) "fullframe")) "" (org-export-data (org-element-property :title headline) info +;; Subtitle +(when-let ((subtitle +(org-element-property :BEAMER_SUBTITLE headline))) + (format "{%s}" subtitle)) "\n" ;; The following workaround is required in fragile frames ;; as Beamer will append "\par" to the beginning of the -- 2.20.1
[PATCH] oc-basic.el: Fix wrong type for the editors field when parsing JSON.
I use org-cite with a JSON bibliography and noticed a bug when an entry only has an "editors" field but no "authors" field. The function `org-cite-basic—get-author' correctly falls back to using the editors instead of the authors, but `org-cite-basic--parse-json’ stringifies only the "authors" field and not the "editors." This creates an error when other functions assume they got a string from `org-cite-basic—get-author'. The patch fixes the issue by applying the same transformation to both "authors" and "editors". As explained in the ChangeLog entry, this points to a more general issue where `org-cite-basic--get-field' is expected to return nil or a string, but calls `org-cite-basic--get-entry' that may return an association list. I am not sure how to fix that since it means converting anything that `org-cite-basic--get-entry' may return into a string. oc-basic.el.patch Description: Binary data Hugo Cisneros
[PATCH 1] lisp/org-fold.el: Fold header lines in blocks (was: Proposal: folding stacked `#+header:' lines in src blocks)
On 2022-12-07 19:58, Thomas S. Dye wrote: I would use this feature. My stack typically includes headers, a name, and a caption. It would be nice to fold them all out of sight. Great! I've worked up a patch (well, two patches), attached. Some details of the implementation: - folding blocks now cycles: - everything folded (only top header line visible if present, otherwise only `#+begin' line visible). - all content visible, (header stack folded, top header visible, `#+begin' and `#+end' lines visible). - everything visible - (the second and third are treated as equivalent unless there is more than one header line.) - Folding will happen on pressing (or whatever you have bound) with point: - anywhere on the `#+begin' or `#+end' line - on any header keyword (`#+name:', `#+header', etc.) - anywhere else in the header stack where completion does not otherwise kick in (not quite sure of the exact mechanics on this one, might be dependant on one's configuration)? This includes part-way through header lines. - This seemed to me the most comfortable configuration for use. - Retain the old behaviour of moving point to the beginning of the remaining visible lines when point is hidden by folding. - renames `org-fold--hide-wrapper-toggle' to `org-fold--hide-wrapper-cycle', which seemed more appropriate under the circumstances. - All the tests in testing/lisp/test-org-fold.el pass for me. Some less-than-perfections: - I'm not sure what to do about default block folding (as in, how blocks are folded when a file is first visited). First, I don't have a complete list of things (variables, startup options, etc.) which affect it. Secondly, I'm not sure what the behaviour should be now that blocks can be in up to three folding states. Advice would be appreciated. - I'm not sure what other documentation I should add. Once this patch is stable and people approve of it, I can add a news entry. Should I update the manual at all? Hope this is useful! HugoFrom 04186df871b94d4a961a5193a7cb050f2a4bc2ff Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Mon, 12 Dec 2022 11:30:10 + Subject: [PATCH 2/2] lisp/org-fold.el: Rename `org-fold--hide-wrapper-toggle' to `org-fold--hide-wrapper-cycle' * lisp/org-fold.el: rename (org-fold--hide-wrapper-toggle): Rename to `org-fold--hide-wrapper-cycle'. (org-fold-hide-block-toggle, org-fold-hide-drawer-toggle): Replace old function name with new. --- lisp/org-fold.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-fold.el b/lisp/org-fold.el index 21cdc6fad..37e6d6450 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -477,7 +477,7 @@ heading to appear." ; Blocks and drawers visibility -(defun org-fold--hide-wrapper-toggle (element category force no-error) +(defun org-fold--hide-wrapper-cycle (element category force no-error) "Cycle visibility for ELEMENT. ELEMENT is a block or drawer type parsed element. CATEGORY is @@ -579,7 +579,7 @@ ELEMENT is provided, consider it instead of the current block. Return a non-nil value when toggling is successful." (interactive) - (org-fold--hide-wrapper-toggle + (org-fold--hide-wrapper-cycle (or element (org-element-at-point)) 'block force no-error)) (defun org-fold-hide-drawer-toggle ( force no-error element) @@ -592,7 +592,7 @@ ELEMENT is provided, consider it instead of the current drawer. Return a non-nil value when toggling is successful." (interactive) - (org-fold--hide-wrapper-toggle + (org-fold--hide-wrapper-cycle (or element (org-element-at-point)) 'drawer force no-error)) (defun org-fold-hide-block-all () -- 2.20.1 From 62ef11504f361d058c5425ad5e1184be6e19bd6f Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Mon, 12 Dec 2022 11:25:14 + Subject: [PATCH 1/2] lisp/org-fold.el: Fold header lines in blocks * lisp/org-fold.el (org-fold--hide-wrapper-toggle): Cycle blocks between three folding states, potentially including headers in folding. Update docstring accordingly. --- lisp/org-fold.el | 65 +++- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/lisp/org-fold.el b/lisp/org-fold.el index 05ac71ea4..21cdc6fad 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -478,14 +478,27 @@ heading to appear." ; Blocks and drawers visibility (defun org-fold--hide-wrapper-toggle (element category force no-error) - "Toggle visibility for ELEMENT. + "Cycle visibility for ELEMENT. ELEMENT is a block or drawer type parsed element. CATEGORY is either `block' or `drawer'. When FORCE is `off', show the block or drawer. If it is non-nil, hide it unconditionally. Throw an error when not at a block or drawer, unless NO-ERROR is non-nil. -Return a non-nil value when toggling is successful." +A property drawer will cycle between open and closed states. + +A block with not extra head
Proposal: folding stacked `#+header:' lines in src blocks
Sometimes I deal with large blocks (generally src blocks) with a lot of header arguments. To deal with this, I stack them up in `#+header:' lines. Real example from a file I have: , | #+header: :results (if (org-export-derived-backend-p org-export-current-backend 'latex) "latex" "file raw") | #+header: :file (if (org-export-derived-backend-p org-export-current-backend 'latex) nil "foo.png") | #+header: :packages '((nil "tikz" t)) | #+header: :imagemagick t :fit t | #+header: :headers '("\\usetikzlibrary{calc,positioning,patterns}") | #+begin_src latex | | #+end_src ` This is fine, but the height of the header lines often rather gets in the way when I'm working (once I've written them out, or expanded them from a snippet, I don't want to see them again). Thus, I propose that stacked `#+header:' line on top of blocks be foldable. I'm thinking of this as roughly analagous to folding property drawers under headlines. That is: - the header stack should be foldable independently of the block's content. That is, I should be able to fold up my stack of five header lines into one line, without folding my block. - the header lines should be folded by default when the block is folded - there should be a variable (corresponding to `org-cycle-hide-drawer-startup') controlling wether the header stacks are shown on startup or not. - /unlike/ property drawer folding, I think it would be good if hitting repeatedly cycled the block through three states: - everything unfolded - header folded and content open - everything folded. First question: what do people think of this, do people support this as an idea? If so, second question: I think this would be implemented by altering `org-fold--hide-wrapper-toggle' to treat blocks specially with a cyclic folding system. Is this right? If other people think this is a good idea, and that's roughly the way to go, I'll try to make a patch at some point. Any thoughts welcome! Hugo
[PATCH] lisp/ox-latex.el: put labels inside example blocks
I exported an essay written in org mode to a LaTeX file (and then a pdf) today. It had `example' blocks in several consequent sections, each with a name (i.e. `#+name'). I have `org-latex-prefer-user-labels' set to t, and used these names to refer to the examples later on. I noticed that some of these labels were resolved wrong (i.e. printed as the wrong number) in the resulting pdf. Examining the tex source, this was because the labels had been printed outside (just before) the example blocks, thus: ,--- | \label{ex:foo} | \begin{example} | My example here | \end{example} `--- In tnhese cases, sometimes LaTeX interpreted the surrounding section as the subject of the label, and printed the number of that section when the label was referred to. The attached patch forces example environments to be printed thus: ,--- | \begin{example}\label{ex:foo} | My example here | \end{example} `--- This solves the problem. The logic/conditions for when to print a label, and how it is generated remain unchanged. Hope this is helpful for someone else too! HugoFrom ce920752084eaa776a885d403c18ddd981e92203 Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Thu, 1 Dec 2022 23:24:10 + Subject: [PATCH] lisp/ox-latex.el: put labels inside example blocks * lisp/ox-latex.el (org-latex-example-block): Instead of `org-latex--wrap-label', manually add label after \begin{}. This produces proper label resolution in LaTeX. Labels before the environment begins can be interpreted as referring to the surrounding section. --- lisp/ox-latex.el | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 3d18ee7ff..10e4292d2 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2127,13 +2127,13 @@ information." (let ((environment (or (org-export-read-attribute :attr_latex example-block :environment) "verbatim"))) - (org-latex--wrap-label - example-block - (format "\\begin{%s}\n%s\\end{%s}" - environment - (org-export-format-code-default example-block info) - environment) - info + (format "\\begin{%s}%s\n%s\\end{%s}" + environment + (if (org-element-property :name example-block) + (org-latex--label example-block info nil 'full) +"") + (org-export-format-code-default example-block info) + environment Export Block -- 2.20.1
Can :packages and :headers arguments in latex SRC blocks be made affect EXPORT blocks of results?
tl;dr: can I have `:packages' and `:headers' arguments from LaTeX src block take effect, when I export those blocks as export blocks? I wanted a way to write tikz snippets inside org documents, preview them in the document as images, but have the tikz /code/ appear when I exported to LaTeX. So far I have this: , | #+header: :results (if (org-export-derived-backend-p org-export-current-backend 'latex) "latex" "file raw") | #+header: :file (if (org-export-derived-backend-p org-export-current-backend 'latex) nil "foo.png") | #+header: :packages '((nil "tikz" t)) | #+header: :imagemagick t :fit t | #+header: :headers '("\\usetikzlibrary{calc,positioning,patterns}") | #+begin_src latex | \begin{tikzpicture}[on grid, | font=\footnotesize, | level distance=2.5cm, | sibling distance=2.5cm, | every node/.style={circle,draw,fill=white}, | touch/.style={circle,draw=red!100,fill=red!40,thick}, | invirtueof/.style={circle,draw=red!50,fill=red!20,very thick}] | | \node [invirtueof] {Car} | child {node {wheel}} | child {node [invirtueof] {body} | child {node {driver door}} | child {node [invirtueof] {passenger door} | child {node [touch] {region of door; | \end{tikzpicture} ` This works almost perfectly. It's set generate an EXPORT block of LaTeX code when exporting, and an inline image in the results block otherwise. When generating this inline image, it takes into account the necessary `:packages' and extra `:headers' defined. The only problem is that when I export to LaTeX, what is included is /just/ what was in the results block, which is /just/ the code inside the original src block (i.e. the export does not include the `:packages' or `:headers' information, and thus fails to compile because the LaTeX file doesn't load tikz). Is there a way around this? Either to export the src block another way, or to add metadata to the to the resulting EXPORT block (or just text, though I'm not sure how that would work for `:packages', since they require text to be added to the resulting exported LaTeX file in a different place from where the text of the block goes). Ideally, I would like to not have to change anything in the file between working on it (previewing) and exporting. Solutions to similar problems (e.g. <https://emacs.stackexchange.com/a/60714/34394>) seem to require commenting and uncommenting lines. I would really like a single, write-once solution (and am perfectly happy with it being verbose). If there /isn't/ a way to do this at the moment but someone knows roughly what would have to change in org for there to be, that would be great information to have too. I would be happy to try to work up a patch. I've looked at some of the code and it looks just about approachable. TIA Hugo
Suggestion: refer to other scheduled tasks in DEADLINE/SCHEDULE
Sorry if this has been asked on the list before -- I searched briefly and couldn't find anything. I use org mode for scheduling events (which are not tasks, and therefore do not have a TODO status) as well as for logging tasks (which do have a TODO status). Often, I find I want to set a deadline (less often, a schedule) for a task identical to the timestamp of an event (e.g. there's a seminar on Thursday, in time for which I need to read two papers). At the moment, I do this by looking up the event, copying the timestamp, then setting the deadline in each task to that timestamp. This is laborious, often quite fiddly, especially if the event's timestamp repeats (as with weekly seminar), but the task only relates to a specific instance of that repeat (the paper I need to read has to be read in time for /this week's/ seminar, so I have to look up the timestamp and check what the next match on the repeater will be, then input that manually). I think it would be great if other org headlines could be referenced in DEADLINEs and SCHEDULEs. This would effectively solve my problem: I could just add an id (or whatever identifier the implementation ends up using) to the event headline, and then use that id in the DEADLINE or SCHEDULE, thus: , | * Important Seminar | :PROPERTIES: | :CUSTOM_ID: seminarid | :END: | <2022-10-27 Through +1w> | | * TODO Read Famous Paper | DEADLINE: seminarid | | * TODO Read Other Paper | DEADLINE: seminarid ` Then the tasks to read papers will show up in my agenda with deadlines when the seminar starts. As far as I know, there isn't a way to do this already (though if there is, I would be happy to use it!). This would be great, but it still doesn't solve the repeater/specific date problem. For this, we would need some sort of special syntax which selects one out of the various correct dates. Perhaps: , | * Important Seminar | :PROPERTIES: | :CUSTOM_ID: seminarid | :END: | <2022-10-27 Through +1w> | | * TODO Read Famous Paper | DEADLINE: :id seminarid :after <2022-11-08 Tue> | | * TODO Read Other Paper | DEADLINE: :id seminarid :after <2022-11-08 Tue> ` (This is only a suggestion, to demonstrate that some special syntax would be necessary. I'm not wedded to the use of keys, or the specific keys I have suggested, or anything like that.) I don't have the knowledge of org, or the time at the moment to implement any of this (though I wouldn't be upset if somebody else did!). At least for now though, some questions: - What do people think of this as an idea? - What would be a good solution to the extra syntax problem? (a similar question seems to have been asked before: <https://emacs.stackexchange.com/questions/62590/org-mode-how-to-set-a-deadline-to-an-already-appointed-meeting-date>) One day, I might find some time to look at the codebase and implement this if nobody else does.. thanks, Hugo
[PATCH v4] ol.el: add description format parameter to org-link-parameters
Since the last version of this patch, I have: - moved the code which sets `type' in `org-insert-link' to a position where it covers more cases - rewritten the macros used in the tests, so that always (and correctly) restore the original state after running, even after errors. Thanks to Max Nikulin for suggesting using `condition-case' There is only one thing left which I am not happy with. Currently, the test fails in the case where :default-description is 'ignore. This was intended to test for situations where the parameter is set to a function, but the function doesn't return a string (I used ignore because it returns 'nil). Accordingly, the test is a `should-error' (because the function *should* return a string, so we should error if it doesn't, right?). But the error condition is inside the error clause of a condition case---which is only triggered if the code errors. Calling 'ignore with any arguments and getting 'nil back doesn't cause any errors, so the error clause is never triggered, and 'nil is just used as the default description (which is then ignored, because it is 'nil -- other non-string values like numbers would not be ignored). I'd like some input on what to do about this: I could rewrite the tests so that a nil-value doesn't matter. In the case of this test, a non-interactive call would just insert a link without a description. Alternatively I could rewrite the function so that if the :default-description parameter returns something, we error unless it is a string. tl;dr The question is: what is the Good Behaviour when :default-description is set to something, which is meant to return a string and returns 'nil instead? Should it be treated like an empty string, or as an error? Thanks, Hugo >From ae17e87436def764f99b24add4debb5d7a481e1a Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Tue, 21 Jun 2022 12:45:50 +0100 Subject: [PATCH 2/2] test-ol: tests for default-description param when inserting links Add tests for various values of `:default-description' in `org-link-parameters'. --- testing/lisp/test-ol.el | 92 + 1 file changed, 92 insertions(+) diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el index 429bb52ee..9114c6497 100644 --- a/testing/lisp/test-ol.el +++ b/testing/lisp/test-ol.el @@ -625,5 +625,97 @@ See https://github.com/yantar92/org/issues/4.; (test-ol-parse-link-in-text "The http://foo.com/(something)?after=parens link" +;;; Insert Links + +(defmacro test-ol-with-link-parameters-as (type parameters body) + "Pass TYPE/PARAMETERS to `org-link-parameters' and execute BODY. + +Save the original value of `org-link-parameters', execute +`org-link-set-parameters' with the relevant args, execute BODY +and restore `org-link-parameters'. + +TYPE is as in `org-link-set-parameters'. PARAMETERS is a plist to +be passed to `org-link-set-parameters'." + ;; Copy all keys in `parameters' and their original values to + ;; `orig-parameters'. For `parity': nil = odd, non-nill = even + `(let (parity orig-parameters) + (dolist (p ',parameters) + (unless parity + (setq orig-parameters + (plist-put orig-parameters p (org-link-get-parameter ,type p + (setq parity (not parity))) + ;; Set `parameters' values + (condition-case err + (let ((_ (org-link-set-parameters ,type ,@parameters)) + ;; Do body + (rtn (progn ,@body))) + ;; Restore original values + (apply 'org-link-set-parameters ,type orig-parameters) + ;; Return whatever the body returned + rtn) + ;; In case of error, restore state anyway AND really error + (error +(apply 'org-link-set-parameters ,type orig-parameters) +(signal (car err) (cdr err)) + +(defun test-ol-insert-link-get-desc ( link-location description) + "Insert link in temp buffer, return description. + +LINK-LOCATION and DESCRIPTION are passed to +`org-insert-link' (COMPLETE-FILE is always nil)." + (org-test-with-temp-text "" +(org-insert-link nil link-location description) +(save-match-data + (when (and + (org-in-regexp org-link-bracket-re 1) + (match-end 2)) +(match-string-no-properties 2) + +(defun test-ol/return-foobar (_link-test _desc) + "Return string \"foobar\". + +Take (and ignore) arguments conforming to `:default-description' +API in `org-link-parameters'. Used in test +`test-ol/insert-link-default-description', for the case where +`:default-description' is a function symbol." + "foobar") + +(ert-deftest test-ol/insert-link-default-description () + "Test `:default-description' parameter handling." + ;; String case + (should + (string= +"foobar" +(test-ol-with-link-parameters-as + "id" (:default-description "foobar") + (test-ol-inse
Re: [PATCH v3] ol.el: add description format parameter to org-link-parameters
I've finally had time to the `:default-description' parameter in `org-link-parameters'. Ihor Radchenko writes: > I recommend writing tests for org-insert-link in > testing/lisp/test-ol.el and testing expected behaviour for various > values of :default-description. Good advice! I haven't written many tests before, so this was a challenge. I've attached a patch with some tests for the expected behaviour. These include a couple of macros and a function, to stop the definitions being too huge and unwieldy. All the tests pass on my machine. They're very nearly just right, but for some reason `test-ol-with-link-parameters-as' doesn't always reset the parameters correctly for me. However I have them set to originally, it sets `:default-description' to a lambda. This might be a quirk at my end though -- if someone else could have a look I'd be very grateful. The tests showed that my previous approach doesn't work generally enough. I've moved where `type' is defined in the code, to cover all cases. > Firstly, def will be undefined inside the error clause. I've defined def a bit further up in a `let', and run the error clause inside this. > Secondly, when :default-description is a lambda expression and that > expression fails, your code will fail with "wrong-type-argument > symbolp" when executing (symbol-name def). Please consider cases > when `def' is not a string and not a function symbol. Dealt with this by just using `message " %S: "', since %S will print a symbol, a string or a lambda correctly. Hope this is a bit better! Best, Hugo >From 5a44edfda4e09a95bba1327c2758b2637e5b16bd Mon Sep 17 00:00:00 2001 From: Hugo Heagren Date: Tue, 21 Jun 2022 12:45:50 +0100 Subject: [PATCH 2/2] test-ol: tests for default-description param when inserting links Add tests for various values of `:default-description' in `org-link-parameters'. --- testing/lisp/test-ol.el | 77 + 1 file changed, 77 insertions(+) diff --git a/testing/lisp/test-ol.el b/testing/lisp/test-ol.el index 429bb52ee..7524d73af 100644 --- a/testing/lisp/test-ol.el +++ b/testing/lisp/test-ol.el @@ -625,5 +625,82 @@ See https://github.com/yantar92/org/issues/4.; (test-ol-parse-link-in-text "The http://foo.com/(something)?after=parens link" +;;; Insert Links + +(defmacro test-ol-with-link-parameters-as (type parameters body) + "Pass TYPE/PARAMETERS to `org-link-parameters' and execute BODY. + +Save the original value of `org-link-parameters', execute +`org-link-set-parameters' with the relevant args, execute BODY +and restore `org-link-parameters'. + +TYPE is as in `org-link-set-parameters'. PARAMETERS is a plist to +be passed to `org-link-set-parameters'." + `(progn + (setq orig-parameters org-link-parameters) + (org-link-set-parameters ,type ,@parameters) + (let ((rtn (progn ,@body))) + (setq org-link-parameters orig-parameters) + rtn))) + +(defun test-ol-insert-link-get-desc ( link-location description) + "Insert link in temp buffer, return description. + +LINK-LOCATION and DESCRIPTION are passed to +`org-insert-link' (COMPLETE-FILE is always nil)." + (org-test-with-temp-text "" +(org-insert-link nil link-location description) +(save-match-data + (when (and + (org-in-regexp org-link-bracket-re 1) + (match-end 2)) +(match-string-no-properties 2) + +(defun test-ol/return-foobar (_link-test _desc) + "Return string \"foobar\". + +Take (and ignore) arguments conforming to `:default-description' +API in `org-link-parameters'. Used in test +`test-ol/insert-link-default-description', for the case where +`:default-description' is a function symbol." + "foobar") + +(ert-deftest test-ol/insert-link-default-description () + "Test `:default-description' parameter handling." + ;; String case + (should + (string= +"foobar" +(test-ol-with-link-parameters-as + "id" (:default-description "foobar") + (test-ol-insert-link-get-desc "id:foo-bar" + ;; Lambda case + (should + (string= +"foobar" +(test-ol-with-link-parameters-as + "id" (:default-description (lambda (_link-test _desc) "foobar")) + (test-ol-insert-link-get-desc "id:foo-bar" + ;; Function symbol case + (should + (string= +"foobar" +(test-ol-with-link-parameters-as + "id" (:default-description #'test-ol/return-foobar) + (test-ol-insert-link-get-desc "id:foo-bar" + ;; `:default-description' parameter is defined, but doesn't return a + ;; string + (should-error + (test-ol-with-link-parameters-as +"id" (:default-description #'ignore) +(test-ol-insert-link-get-desc "id:foo-bar"))) + ;; Description argument should override `
[PATCH v2] ol.el: add description format parameter to org-link-parameters
* ol.el (org-link-parameters): add parameter `:default-description', a string or a function. * (org-insert-link): if no description is provided (pre-existing or as an argument), next option is to use the `:default-description' (if non-nil) parameter to generate one. Default descriptions are predictable within a link type, but because link types are quite diverse, are NOT predictable across many types. A type-parameter is thus a good place to store information on the default description. --- I've added the condition-case back to the check on `org-link-make-description', and added a new one to the check for the `:default-description' parameter, as Ihor suggested. I've also modified the handling of that parameter, to reflect `org-link-make-description', and updated the docstring accordingly. Apologies if the subject formatting is not correct, I'm still getting the hang of git-send-email. Hugo lisp/ol.el | 43 --- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index 1b2bb9a9a..e74ef8dda 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -140,6 +140,15 @@ link. Function that inserts a link with completion. The function takes one optional prefix argument. +`:default-description' + + String or function used as a default when prompting users for a + link's description. A string is used as-is, a function is + called with two arguments: the full link text, and the + description generated by `org-insert-linke'. It should return + the description to use (this reflects the behaviour of + `org-link-make-description-function'). + `:display' Value for `invisible' text property on the hidden parts of the @@ -1761,11 +1770,14 @@ prefix negates `org-link-keep-stored-after-insertion'. If the LINK-LOCATION parameter is non-nil, this value will be used as the link location instead of reading one interactively. -If the DESCRIPTION parameter is non-nil, this value will be used as the -default description. Otherwise, if `org-link-make-description-function' -is non-nil, this function will be called with the link target, and the -result will be the default link description. When called non-interactively, -don't allow to edit the default description." +If the DESCRIPTION parameter is non-nil, this value will be used +as the default description. If not, and the chosen link type has +a non-nil `:default-description' parameter, that is used to +generate a description as described in `org-link-parameters' +docstring. Otherwise, if `org-link-make-description-function' is +non-nil, this function will be called with the link target, and +the result will be the default link description. When called +non-interactively, don't allow to edit the default description." (interactive "P") (let* ((wcf (current-window-configuration)) (origbuf (current-buffer)) @@ -1775,7 +1787,7 @@ don't allow to edit the default description." (desc region) (link link-location) (abbrevs org-link-abbrev-alist-local) -entry all-prefixes auto-desc) +entry all-prefixes auto-desc type) (cond (link-location) ; specified by arg, just use it. ((org-in-regexp org-link-bracket-re 1) @@ -1842,6 +1854,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (and (equal ":" (substring link -1)) (member (substring link 0 -1) all-prefixes) (setq link (substring link 0 -1 + (setq type link) (setq link (with-current-buffer origbuf (org-link--try-special-completion link) (set-window-configuration wcf) @@ -1918,7 +1931,23 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (let ((initial-input (cond (description) - ((not org-link-make-description-function) desc) + (desc) + ((org-link-get-parameter +type +:default-description) + (condition-case nil + (let ((def (org-link-get-parameter + type + :default-description))) + (cond + ((stringp def) def) + ((functionp def) + (funcall def link desc + (error + (message "Can't get link description from %S" + (symbol-name def)) + (sit-for 2) + nil))) (t (condition-case nil (funcall org-link-make-description-function link desc) (error -- 2.20.1
[PATCH] ol.el: add description format parameter to org-link-parameters
* ol.el (org-link-parameters): add parameter `:default-description', a string or a function. * (org-insert-link): if no description is provided (pre-existing or as an argument), next option is to use the `:default-description' (if non-nil) parameter to generate one. Default descriptions are predictable within a link type, but because link types are quite diverse, are NOT predictable across many types. A type-parameter is thus a good place to store information on the default description. --- lisp/ol.el | 49 +++-- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/lisp/ol.el b/lisp/ol.el index 1b2bb9a9a..af0aaaf35 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -140,6 +140,13 @@ link. Function that inserts a link with completion. The function takes one optional prefix argument. +`:default-description' + + String or function used as a default when prompting users for a + link's description. A string is used as-is, a function is + called with the full link text as the sole argument, and should + return a single string. + `:display' Value for `invisible' text property on the hidden parts of the @@ -1761,11 +1768,14 @@ prefix negates `org-link-keep-stored-after-insertion'. If the LINK-LOCATION parameter is non-nil, this value will be used as the link location instead of reading one interactively. -If the DESCRIPTION parameter is non-nil, this value will be used as the -default description. Otherwise, if `org-link-make-description-function' -is non-nil, this function will be called with the link target, and the -result will be the default link description. When called non-interactively, -don't allow to edit the default description." +If the DESCRIPTION parameter is non-nil, this value will be used +as the default description. If not, and the chosen link type has +a non-nil `:default-description' parameter, that is used to +generate a description as described in `org-link-parameters' +docstring. Otherwise, if `org-link-make-description-function' is +non-nil, this function will be called with the link target, and +the result will be the default link description. When called +non-interactively, don't allow to edit the default description." (interactive "P") (let* ((wcf (current-window-configuration)) (origbuf (current-buffer)) @@ -1775,7 +1785,7 @@ don't allow to edit the default description." (desc region) (link link-location) (abbrevs org-link-abbrev-alist-local) -entry all-prefixes auto-desc) +entry all-prefixes auto-desc type) (cond (link-location) ; specified by arg, just use it. ((org-in-regexp org-link-bracket-re 1) @@ -1842,6 +1852,7 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (and (equal ":" (substring link -1)) (member (substring link 0 -1) all-prefixes) (setq link (substring link 0 -1 + (setq type link) (setq link (with-current-buffer origbuf (org-link--try-special-completion link) (set-window-configuration wcf) @@ -1918,14 +1929,24 @@ Use TAB to complete link prefixes, then RET for type-specific completion support (let ((initial-input (cond (description) - ((not org-link-make-description-function) desc) - (t (condition-case nil -(funcall org-link-make-description-function link desc) - (error - (message "Can't get link description from %S" -(symbol-name org-link-make-description-function)) - (sit-for 2) - nil)) + (desc) + ((org-link-get-parameter +type +:default-description) + (let ((def (org-link-get-parameter + type + :default-description))) + (cond + ((stringp def) def) + ((functionp def) + (funcall def link) + (org-link-make-description-function + (funcall org-link-make-description-function link desc)) + (t (error + (message "Can't get link description from %S" + (symbol-name org-link-make-description-function)) + (sit-for 2) + nil) (setq desc (if (called-interactively-p 'any) (read-string "Description: " initial-input) initial-input -- 2.20.1
ol.el: add description format parameter to org-link-parameters
Suggested patch to add a new link parameter controlling how the default description is generated. As explained in the commit, this behaviour is often similar between links of the same type, but differs between those types, so a parameter seems like a good place to specify it. I've tried to make `org-insert-link' behave sensibly with regard to all the possible options -- hope it's alright. Blue skies, Hugo
[BUG] beamer export -- text inside section, before next headline, has no frame [9.5.2 (9.5.2-ge7ea95 @ /home/hugo/.config/emacs/straight/build/org/)]
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 https://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org mailing list. - --- I have org-beamer-frame-level set to 2, so when exporting to beamer, top-level headlines become sections, and second-level headlines become frames. I often want to include a short explanation/intro of the section, before moving onto the more specific slide (I have found this is good for complex lectures). So I have something like: ```org * A section This is in the section, but not in the subsection (and is therefore not in a frame, and shows up at the top of the slide). ** A subsection Some text in the subsection. This /is/ in a frame, and so behaves correctly. ``` As the MWE says, the text inside the top-level (section) headline, but before the next (frame) headline, is not wrapped in a frame environment when exported, so it renders strangely (at the top of the slide). I feel like this is an easy fix for someone who understands the exporter code well. I've had a look and it's very complex, but I would be grateful if someone else could try. emacs : GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2022-01-15 Package: Org mode version 9.5.2 (9.5.2-ge7ea95 @ /home/hugo/.config/emacs/straight/build/org/) Blue skies, Hugo Appendix. - I tested the above MWE with the following minimal init.el and reproduced the bug (well, it's minimal for me, since I'm used to using straight and use-package, and didn't want to learn any other way of installing all this stuff just to check a bug): ```elisp (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously " https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el " 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) ;; Always integrate straight.el with use-package (setq straight-use-package-by-default t) ;; Actually INSTALL use-package (straight-use-package 'use-package) (use-package org :straight (:includes ox-beamer)) (use-package ox-beamer :after org :config (add-to-list 'org-latex-classes `("beamer" ,(concat "\\documentclass[presentation]{beamer}\n" "[DEFAULT-PACKAGES]" "[PACKAGES]" "[EXTRA]\n") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) :custom (org-beamer-frame-level 2)) ```
Suggestion: convert dispatchers to use transient
Org uses various dispatchers, where invoking a command gives the user a choice of different sub-commands, chosen by pressing a relevant key, from a list displayed on the screen. Some of these dispatchers include options which can affect the command chosen. Examples include org- capture, org-beamer-select-environment and org-export-dispatch. These desptachers are idiosyncratic, written for purpose, and each behave differently. They have varying levels of customisability, and this is reached in different ways for each. Overall, I think the user- experience could be more consistent and more easily customisable. Luckily, recent versions of emacs ship with transient.el, a powerful way of building such interfaces in a consistent and easily extensible way. So, I propose to rewrite the current dispatchers as transients. What does the community think? I would be happy to work on this unless others strongly object, but I don't know everything about org, so if others could help me with a list of other dispatchers which could also be converted that would be helpful. Blue skies, Hugo
Re: [O] Bug with subscripts and superscripts
I'm using org-mode 8.2.3a. Hugo Massaroli 2014-05-09 9:56 GMT-03:00 Bastien b...@gnu.org: Hi Hugo, Hugo M ham1...@gmail.com writes: I'm using 24.3.50.1 with Xubuntu. What version of Org are you using? M-x org-version RET Chances are that you use Org 8.0, in which case we can only recommend to upgarde: http://orgmode.org/manual/Installation.html HTH, -- Bastien
[O] Bug with subscripts and superscripts
Hi. I think there's a bug in org-mode, related with subscripts and superscripts. This is the problem: pastie.org/9142947 And here's the related documentation page: http://www.gnu.org/software/emacs/manual/html_node/org/Subscripts-and-superscripts.html To avoid interpretation as raised or lowered text, you can quote ‘^’ and ‘_’ with a backslash: ‘\^’ and ‘\_’. I think that's not working (adding a backlash to avoid interpretation of raised or lowered text). I'm using 24.3.50.1 with Xubuntu.
Re: [Orgmode] Re: How to convert org file to such a plain text
anhnmncb, this helps you? (defun org-to-anhnmncb () (interactive) (goto-char (point-min)) (let ((curlevel 0)) (while ( (point) (point-max)) (goto-char (point-at-bol)) (cond ((looking-at \\(\\*+\\)\\s-*) (setq curlevel (1- (length (match-string 1 (replace-match (make-string curlevel ?\t))) ((looking-at \\s-*) (replace-match (concat (make-string curlevel ?\t) - (forward-line 1 my test was this: * level1 item ** level2 item item *** level3 item item ** level2 again item item which gets converted into: level1 - item level2 - item - item level3 - item - item level2 again - item - item hope this helps, hugo On Mon, Aug 4, 2008 at 10:43 PM, Eddward DeVilla [EMAIL PROTECTED] wrote: I don't know if you use perl at all. My first guess is: perl -pe's/^(\*+)(\s+.*)$/(\tx length$1).$2/e' TODO.org TODO.txt Having tried it on a live file, I don't think the results are very pleasing Replacing a single character '*' with a tab creates a formatting mess with any other text in the file. Edd On Mon, Aug 4, 2008 at 12:39 PM, anhnmncb [EMAIL PROTECTED] wrote: anhnmncb [EMAIL PROTECTED] writes: Carsten Dominik [EMAIL PROTECTED] writes: On Jul 26, 2008, at 9:52 AM, anhnmncb wrote: Hugo Schmitt [EMAIL PROTECTED] writes: What are the odds that Carsten has plans to export to a format *you* just invented? Oh, my pda app projekt can import this format of file, but if all of you think it's no use, nervermind. Hey, why the huff? The point is, you have not given us any chance at all to think it might be of any use! - Carsten Sorry for delay, I can't reach the app website[1] right now, when it can, I will provide the relavent information. [1] http://www.kylom.com/ Sorry, I can't find more useful info, the app just says it can import the txt file which has different level of indents. So I think replace star(*) with tab is enough. Such like this: Org file -- txt file |* level 1 |level 1 |** level 2 -- |tablevel 2 |tab- item |tab- item |*** level 3 |tabtablevel 3 I'm not a programmer, so if my request is stupid and easy to achieve by any other way, please let me know. On Fri, Jul 25, 2008 at 3:47 PM, anhnmncb [EMAIL PROTECTED] wrote: Carsten Dominik [EMAIL PROTECTED] writes: We do not have an exporter that can do this right now. - Carsten Will it come in furture? On Jul 24, 2008, at 4:59 PM, anhnmncb wrote: I want to export org to plan text, which pattern is: |level 1 |tablevel 2 |tab- item |tabtablevel 3 instead of |* level 1 |** level 2 |tab- item |*** level 3 -- Regards, anhnmncb gpg key: 44A31344 ___ 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 -- Regards, anhnmncb gpg key: 44A31344 ___ 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 -- Regards, anhnmncb gpg key: 44A31344 ___ 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 -- Regards, anhnmncb gpg key: 44A31344 ___ 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
Re: [Orgmode] Re: How to convert org file to such a plain text
What are the odds that Carsten has plans to export to a format *you* just invented? On Fri, Jul 25, 2008 at 3:47 PM, anhnmncb [EMAIL PROTECTED] wrote: Carsten Dominik [EMAIL PROTECTED] writes: We do not have an exporter that can do this right now. - Carsten Will it come in furture? On Jul 24, 2008, at 4:59 PM, anhnmncb wrote: I want to export org to plan text, which pattern is: |level 1 |tablevel 2 |tab- item |tabtablevel 3 instead of |* level 1 |** level 2 |tab- item |*** level 3 -- Regards, anhnmncb gpg key: 44A31344 ___ 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 -- Regards, anhnmncb gpg key: 44A31344 ___ 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
[Orgmode] Emacs: Smarter interactive prompts with Org remember templates
Hello orgmoders! Is Sacha on the list? She has a lot of ideas, but I really wish she would work with the list to improve Orgmode, instead of posting a patch that very few people will want to mantain... Any ideas? Cheers, Hugo The post is here: http://sachachua.com/wp/2008/07/20/emacs-smarter-interactive-prompts-with-org-remember-templates/ ___ 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] export to txt files
Hm, I guess I sent this only to Dimitri... I'm resending it to the list.. This seems to do what you want. (defun org-export-top-levels () (interactive) (goto-char (point-min)) (let (start (point)) (while (re-search-forward ^* nil t) (write-region start (point-at-bol) (concat (org-get-heading) .txt)) (setq start (point-at-bol) Regards, Hugo On Mon, Mar 17, 2008 at 4:43 PM, Daniel Clemente [EMAIL PROTECTED] wrote: Mmmm... I wrote a program which can do this: http://www.danielclemente.com/dislines/index.en.html however it's not LISP. I have written multilingual org files this way, but it's not comfortable since it requires several programs and processing phases. I am still looking for a solution in Emacs LISP, and if possible, one which integrates nicely with org-mode :-) ___ 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
Re: [Orgmode] rcirc
Hi folks. i'd like to write that but before I have to understand how do you use it.. :) I'm trying it with ERC and what I see: following an irc link takes you to the corresponding buffer (say emacs channel) What does that have to do with logs? I must have missed something big this time... -hugo On Wed, Mar 12, 2008 at 5:33 PM, Richard G Riley [EMAIL PROTECTED] wrote: Bastien [EMAIL PROTECTED] writes: Richard G Riley [EMAIL PROTECTED] writes: Are there any plans to support remembering irc channels using org-mode? e.g a hot link on a todo/remembered item which opens rcirc? I recall planner had links to erc. Note: org-irc.el fully supports Erc but Phil coded it in a way that the support for rcirc should be quite straightforward. Great if you can help on this, because I don't know many rcirc users out there... Thanks for the info. I wish I could. Sorry, but elisp is a black art for me for anything but the most simple things. Yes, I just checked the code. It only supports erc. Planner already did that and erc already allows multiple servers and channels to be registered so I guess there was a good basis for the erc installation into org-mode. Not to worry. Maybe I can look at it another time or move back to erc. In fact I should probably question why I moved to rcirc from erc! regards richard. ___ 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
Re: [Orgmode] rcirc
Ok, now i got it working. Tks Bastien. So I have another question (for Phil)... why is org-irc-link-to-logs a customizable option? It looks like linking to logs and linking to sessions are two totally different things and users may want to do both at different times. -Hugo On Wed, Mar 12, 2008 at 6:12 PM, Bastien Guerry [EMAIL PROTECTED] wrote: Hugo Schmitt [EMAIL PROTECTED] writes: I'm trying it with ERC and what I see: following an irc link takes you to the corresponding buffer (say emacs channel) What does that have to do with logs? Maybe try to configure this option: `org-irc-link-to-logs' Not tested though... Phil might better help here. -- Bastien ___ 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: IRC Channel
I bet the bot is named Borg :) On Fri, Mar 7, 2008 at 9:36 AM, Bastien [EMAIL PROTECTED] wrote: Hi Phil and Russell, Phil Jackson [EMAIL PROTECTED] writes: Russell Adams [EMAIL PROTECTED] writes: First thing everyone talked about was who wants to take the role of channel owner? They can delegate an Op, but the Freenode group registration will want a core team member as the owner. I guess I would be willing but I'm not sure how much of an active user I would be to be honest. Being the owner of the channel doesn't require anything special from you, except responsability (and glory): ,[ http://freenode.net/policy.shtml ] | Channels on freenode are owned and operated by the groups which register | them. No minimum level of activity or moderation is expected or required | of channel owners. ` I think it is a good idea to go for #org-mode. As many of you, I don't plan to be anything but a lurker. But I have designed a bot that could serve as a knowledge database for Org. This could be both useful and fun because er... talking to the robot by my own is not *that* fun. -- Bastien ___ 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
Re: [Orgmode] Quickly Switch Between TODO States
Wanrong, I have it configured like this: (setq org-todo-keywords '((sequence TODO(t) STARTED(s) WAITING(w) UNTESTED(u) | DONE(d) DEFERRED(f) CANCELLED(x (setq org-use-fast-todo-selection t) then all it takes is C-c C-t and then a key (t,s,w)... Cheers, Hugo On Feb 13, 2008 2:19 PM, Wanrong Lin [EMAIL PROTECTED] wrote: Did you try C-c C-t ? ,[ (info (org)TODO basics) ] | The most important commands to work with TODO entries are: | | `C-c C-t' | Rotate the TODO state of the current item among | | ,- (unmarked) - TODO - DONE --. | '' | | The same rotation can also be done remotely from the timeline and | agenda buffers with the `t' command key (*note Agenda commands::). ` Hope this helps, C-c C-t is what I have been using, but recently I am a little bit tired of the cycling (especially when I have 7 TODO states), so I wish to have something that can let me select a TODO state directly, like C-c C-c does for tags. Wanrong ___ 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
Re: [Orgmode] list indentation
Hi. The problem with your example, afaik, is that 'And another list' is just the rest of the text that starts at the last 'blah'. Shouldn't 'And another list' be a header? Maybe you want something like this? ** TODO something to be done notes about this task come here and they include a list - blah - blah *** and another list - foo - foo *** And one more list - bar - bar HTH, Hugo On Feb 7, 2008 4:58 PM, cezar [EMAIL PROTECTED] wrote: Hello, I am using org-mode version 5.17a and I sometimes need to write some details on a task like: ** TODO something to be done notes about this task come here and they include a list - blah - blah And another list - foo - foo And one more list - bar - bar Now, this is not what it should look like ! The lists need to be aligned properly. Am I making any sense ? Regards, Cezar ___ 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
Re: [Orgmode] cygwin and org mode
Hi. Even though I can't help you with your problem, I wanted to remember you that Cygwin already has Emacs 22. Regards, Hugo On Feb 6, 2008 3:25 PM, Paul Schlesinger [EMAIL PROTECTED] wrote: When I attempt to load Org-mode in emacs 21 under cygwin I get symbol not defined and macro-declaration-function is not found. I ca not find this error in the mailing list database and wonder if there is any help from your experience to correct it. Paul Schlesinger ___ 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
Re: [Orgmode] Fill-paragraph and orgmode
Hi Carsten, Hm, almost, but i get the idea! This still fails (ok its not the same thing :) ** DONE title - State DONE [2008-01-16 qua 17:48] \\ words words words words words words words words after M-q on the end of 'words line' i get: ** DONE title - State DONE [2008-01-16 qua 17:48] \\ words words words words words words words words but i'll look into it! Thanks Hugo On Jan 31, 2008 6:16 AM, Carsten Dominik [EMAIL PROTECTED] wrote: Hi Hugo, you need to look at the variables paragraph-start and paragraph- separate. You can use org-mode-hook to change them. I believe the following might do the trick (add-hook 'org-mode-hook (lambda () (org-set-local 'paragraph-separate \f\\|\\*+ \\|[ ]*$\\| [ \t]*[:|]\\|^[ \t]+\\[[0-9]\\{4\\}-) ;; The paragraph starter includes hand-formatted lists. (org-set-local 'paragraph-start \f\\|[ ]*$\\|\\*+ \\|\f\\|[ \t]*\\([-+*][ \t]+\\|[0-9]+[.)][ \t] +\\)\\|[ \t]*[:|]\\|^[ \t]+\\[[0-9]\\{4\\}-))) Hope this helps. - Carsten On Jan 28, 2008, at 11:54 AM, Hugo Schmitt wrote: Hi everyone. There is a little issue that I keep having with org-mode. Say the cursor is on : * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] After you press M-q you get this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] ... while what i really wanted was this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] Sure, it only takes a RET to fix, but anyway, if anyone has a solution for this, please share with me. Thanks, Hugo ___ 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
Re: [Orgmode] Strange bug, request for more info
Adam, i'm happy and sad with you last message. How come i never heard about edebug? I read every elisp tutorial out there (should have read the manual!) I've been putting (read-string debug msg) on my code for the past two years for tracing the execution... This totally rocks! Thanks a lot! -Hugo On Jan 31, 2008 7:32 AM, Adam Spiers [EMAIL PROTECTED] wrote: On Thu, Jan 31, 2008 at 09:37:37AM +0100, Carsten Dominik wrote: Hi everyone, John Wiegley is being haunted by a strange bug and I have so far not been able to reproduce and fix it. So I would like to know if anyone else sees the same bug and can contribute observations that may help us to track this down. I believe I had a similar report quite a while ago, but don't remember who reported it. The bug happens when being in the agenda and trying to goto or show the origin location of an agenda entry by pressing SPC or RET. John reports that sometimes (for him several times a day), the other window shows a completely different location. The most weird part of it is that going back to the agenda buffer and then trying the exact same command again, everything works fine! This is driving me crazy, and I'd love to find and fix this problem. So please, if anyone sees the same bug, try to give as as much as info as possible. How often does it happen, under what circumstances, what is your setup etc etc. I haven't seen it, but could you perhaps make use of edebug (conditional) breakpoints to track it down, or edebug evaluation lists, or even `edebug-set-global-break-condition' ? ___ 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
Re: [Orgmode] Re: Git repository
I use mercurial just because it's supposed to work better with windows (work). -Hugo On Jan 31, 2008 1:34 PM, Adam Spiers [EMAIL PROTECTED] wrote: On Thu, Jan 31, 2008 at 04:39:50PM +0100, Carsten Dominik wrote: On Jan 31, 2008, at 4:33 PM, Bernt Hansen wrote: Carsten Dominik [EMAIL PROTECTED] writes: I am considering the idea to move the org development to a public git repository. This would be superb! This is not yet sure and official, but if you want to take a look at the current state of the repository, check out http://repo.or.cz/w/org-mode.git \o/ :) I love git... everything else sucks by comparison :) As far as I can see, mercurial is pretty similar. But compared to cvs, svn, yes, I totally agree. No looking back. Hear hear! mercurial is very similar, and the two of them seem to be streaks ahead of pretty much everything else. ___ 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
[Orgmode] Fill-paragraph and orgmode
Hi everyone. There is a little issue that I keep having with org-mode. Say the cursor is on : * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] After you press M-q you get this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] ... while what i really wanted was this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] Sure, it only takes a RET to fix, but anyway, if anyone has a solution for this, please share with me. Thanks, Hugo ___ 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] Fill-paragraph and orgmode
Ooops, sorry for that. The point is that. after fill-paragraph, the date comes to the same line that my text, ending up with something like below. * TODO title Text text [2008-...] Having the date stay on the line below would be nicer, so if anyone knows how to customize fill-paragraph (or org-fill-paragraph) to achieve that, please tell me. Thanks, Hugo On Jan 28, 2008 8:08 AM, Phil Jackson [EMAIL PROTECTED] wrote: Hugo Schmitt [EMAIL PROTECTED] writes: Hi everyone. There is a little issue that I keep having with org-mode. Say the cursor is on : * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] After you press M-q you get this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] ... while what i really wanted was this: * TODO Title Words words words words words words words words words words words words words words words [2008-01-25 sex] I think your MUA is wrapping your text :/ Cheers, Phil -- Phil Jackson http://www.shellarchive.co.uk ___ 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] TODO dependencies
And the parent could also support the [%] notation that exists for checkboxes :) -Hugo On Jan 25, 2008 12:45 PM, Stuart McLean [EMAIL PROTECTED] wrote: Hi, Sorry if I have started a new thread on this subject, GMail and I are not getting along right now. ** TODO a main project *** TODO step 1 *** TODO step 2 *** TODO step 3 TODO step 3 part a TODO step 3 part b TODO step 3 part c and so on *** TODO step 4 Here is the functionality that I would like, and (as I see it) that would be possible with the hooks provided and extensions that the user could write... marking ** TODO a main project as DONE would mark all subheadings done (say you did them all at once) marking *** TODO step 1 as DONE would mark this item as done and no more, and so on for step two. marking step three as DONE would mark step three and all children (a, b, c) as done, again, say you did them all at once. However, if you marked step 3, part a as DONE, then b (at a later time), then c, only triggering c would mark *** TODO step 3 as DONE as well. In other words marking a heading as DONE will mark all children as DONE, marking children as DONE one-by-one will only mark the parent as DONE when all the children are marked DONE. Is this a correct understanding? This is (one of the functionalities) I would like. Maybe it is already possible, or I have misread something? Thanks again for org-mode, *fantastic software* Stuart ___ 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
[Orgmode] org remember anything
Hi. So, just wrote this and maybe there are others users of Anything.el around: Just update your anything-sources variable to include anything-org-remember. Maybe this will get more useful for people that have 10+ templates and not enough meaninful keys. - Hugo Ps: if there is a better way of achieving `list-of-fst` please tell me. I find it a little odd... --- (defun list-of-nth (list pos) (mapcar (lambda (x) (nth pos x)) list)) (defun list-of-fst (list) (list-of-nth list 0)) (setq anything-org-remember '((name . Org Remember) (candidates . (lambda () (list-of-fst org-remember-templates))) (action . (lambda (name) (let* ((orig-template org-remember-templates) (org-remember-templates (list (assoc name orig-template (call-interactively 'org-remember)) ___ 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] FR: interactive todo creation with remember templates
Perfect! Thanks - Hugo On Jan 25, 2008 10:58 AM, Carsten Dominik [EMAIL PROTECTED] wrote: On Jan 24, 2008, at 5:37 PM, Hugo Schmitt wrote: I think my suggestion doesn't fit orgmode that well, but what if 'org-remember' had 'template' as an optonal argument? (instead of pulling from org-remember-template interactively). Then people could write their own menus/keymap/etc before calling remember. (Hmm, thinking about it, maybe i'll try that myself so i can call remember from Anything) If you are wiling to write lisp code, you can already do this, by putting a list with only one template temporarily into org-remember-templates, like this: (let ((org-remember-templates (Task 116 * TODO %?\n %u ~/org/gtd.org Tasks))) (call-interactively 'org-remember)) When there is only a single template in the list, Org-mode will actually skip the query for the template and execute it right away. So yes, you can write a function that does built a template on the fly. Hope this helps - 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] FR: interactive todo creation with remember templates
I think my suggestion doesn't fit orgmode that well, but what if 'org-remember' had 'template' as an optonal argument? (instead of pulling from org-remember-template interactively). Then people could write their own menus/keymap/etc before calling remember. (Hmm, thinking about it, maybe i'll try that myself so i can call remember from Anything) -Hugo On Jan 24, 2008 12:33 PM, Carsten Dominik [EMAIL PROTECTED] wrote: On Jan 22, 2008, at 3:55 PM, Austin Frank wrote: Hello again! I love all of the options that are available for inclusion in remember templates. I've got templates for the kinds of tasks I create most often. But sometimes I find myself saying man, I wish I could just tack a %^G onto this template, or something similar. These aren't task types that I use often enough to justify giving them their own templates, but I still want to have access to the features offered in remember templates. Would it be possible to build a single-use remember template through prompts at the minibuffer? I am not yet convinced about how useful this would be. First of all, slapping on a %^G means adding tags. Since you probably have %? in the headline of the template anyway, adding tags is as simple as C-c C-c Ahm, no you are right it is not, because we are in a remember buffer after all. Still, just adding % sequences does not really do it because you still need to decide where the info should go. So in the end, it seems to me the the gain will be very minor. Any other opinions? - 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
Re: [Orgmode] Auto Archive TODOs?
Hi... You can do both things, number 2 is easier, if that solves your problem. 1) John Wiegley implemented something to auto archive done tasks. I dunno if it has been added in org. Here is the link: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg02939.html 2) Rebind to another key: This normally goes like this: - Find out which command C-c xs calls using C-h k (in this case org-advertized-archive-subtree) - Append to your org mode customizations: (define-key org-mode-map (kbd f1) 'org-advertized-archive-subtree) HTH, Hugo On Jan 24, 2008 4:33 PM, Ross A. Laird [EMAIL PROTECTED] wrote: Is there any way to automatically archive completed todo items, so that I don't have to manually type C-cxs? If not: I'm not very good at emacs customization, but perhaps there is a way to do this in emacs itself, so that the function called by C-cxs is called by another, simpler key. Ross -- Ross A. Laird, PhD www.rosslaird.info ___ 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
Re: [Orgmode] Re: Remember and then refile
I use ido all day, and I find ido-completing-read much nicer/cooler than the default. If anyone wants to try, just change the sexp (completing-read ...) inside org-refile for something like: (if (fboundp 'ido-completing-read) (ido-completing-read Refile to: tbl nil t nil 'org-refile-history) (completing-read Refile to: tbl nil t nil 'org-refile-history)) ... and the good thing is that ido comes with emacs22. Cheers, Hugo On Jan 20, 2008 12:44 PM, Leo [EMAIL PROTECTED] wrote: On 2008-01-20 14:31 +, Piotr Zielinski wrote: As for completion, both org-refile and org-goto should work with icicles but I haven't tried it extensively yet (icicles provides general-purpose extensive completion support for emacs). My main point is that I'd rather vote for making org-mode work well with otherspecialized modes (eg icicles) than for reimplementing the features. But the problem with icicles is that it might never be included in Emacs. -- .: Leo :. [ sdl.web AT gmail.com ] .: [ GPG Key: 9283AA3F ] :. Use the best OS -- http://www.fedoraproject.org/ ___ 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
Re: [Orgmode] Remember and then refile
Can't wait! Thank you very much for all the work on org-mode. -Hugo On Jan 18, 2008 5:47 AM, Carsten Dominik [EMAIL PROTECTED] wrote: This will be in 5.19. Thanks for the proposal!. - Carsten On Jan 7, 2008, at 5:05 PM, Hugo Schmitt wrote: Hello everyone! I know Remember allows one to select where we want to file an entry with C-u C-c C-c, but now that we have org-refile (great!), it would be really nice to be able to call org-refile after the text is inserted on it's default place (mine is the Tasks tree on todo.org) Now, I couldn't find a way to insert this nicely into the code, since that is done via the remember command. Any ideas? Thanks in advance, Hugo ___ 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] Problems with org-remember-use-refile-when-interactive
Hi Carsten. I was just trying out 5.19 and something showed up with the new remember-refile option. You seem to store the text into the *remember* buffer before calling (org-refile). That is a problem for people that have 'org-refile-targets' to set to generate targets from current file. Here is mine, for example: (setq org-refile-targets '((nil . (:maxlevel . 1 So, is there any way that we could change refile targets to the ones from the default file ? (the file where text would be inserted if we only pressed C-c C-c on the remember buffer - specified on org-remember-templates) Regards, Hugo ___ 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 to allow quotes showing on *remember*
Hi again. Let me just show you the use case. Take a look at my current remember buffer: ---start ## Filing location: Select interactively, default, or last used: ## C-u C-c C-c to select file and header location interactively. ## C-c C-c ~/hugo/docs/org/todo.org - * Inbox ## C-u C-u C-c C-c ??? - * ??? ## To switch templates, use `C-c r'. To abort use `C-c C-k'. * TODO todo title goes here [2008-01-15 ter] ## An Emacs reference mug is what I want. It would hold ten gallons of coffee. ## -- Steve VanDevender ---end I need that patch so that the bottom lines (the quote) aren't appended into the org file after remember. I was just saying that, if more people use something like this *and* it doesn't mess up for people who don't, the patch could be added to org. -hugo On Jan 15, 2008 7:55 AM, Carsten Dominik [EMAIL PROTECTED] wrote: Hi Hugo, I am not sure what the purpose of this is. The ## stuff at the beginning is stuff to remind the user on how to proceed further. What is the idea of Sacha you are referring to? What is the use case? Thanks. On Jan 14, 2008, at 8:45 PM, Hugo Schmitt wrote: Hi folks! I'm sending this as a suggestion. Right now the function 'org-remember-handler' removes the lines on the beginning of the buffer that start with ## (the ones explaining usage, shortcuts, etc) Yesterday i was trying out sachac's idea of putting quotes into remember (on the bottom), but the text that went there was being added to the todo.org with the actual todo. W/ the fix org also removes the lines on the end that begin with '##'. Cheers, -Hugo org.el.patch___ 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
Re: [Orgmode] Patch to allow quotes showing on *remember*
Carsten, Yeah, mostly for fun, but for example Sacha used it for learning English-Japanese translations.. If there is a better way to fix the remember buffer, please tell me. Here's a excerpt from Sacha's post: Adding Other Text to the Remember Buffer Remember has plenty of hooks that let you modify the behavior. For example, you might want to insert a random tagline or fortune-cookie saying whenever you create a note. This is a fun way to encourage yourself to write more, because then there's a little surprise every time you open a Remember buffer. and here is the code that inserts that (rest is on the blog): (eval-after-load 'remember '(progn (defadvice remember (after wicked activate) Add random tagline. (save-excursion (goto-char (point-max)) (insert \n\n (wicked/random-tagline) \n\n) Maybe i can implement that cleaning the remember buffer also as an advice or hook? Thanks in advance. Hugo Here's the link: http://sachachua.com/wp/2008/01/13/capturing-notes-with-remember/ search for subtitle Adding Other Text to the Remember Buffer On Jan 15, 2008 8:17 AM, Carsten Dominik [EMAIL PROTECTED] wrote: Hi Hugo, On Jan 15, 2008, at 12:04 PM, Hugo Schmitt wrote: Hi again. Let me just show you the use case. Take a look at my current remember buffer: ---start ## Filing location: Select interactively, default, or last used: ## C-u C-c C-c to select file and header location interactively. ## C-c C-c ~/hugo/docs/org/todo.org - * Inbox ## C-u C-u C-c C-c ??? - * ??? ## To switch templates, use `C-c r'. To abort use `C-c C-k'. * TODO todo title goes here [2008-01-15 ter] ## An Emacs reference mug is what I want. It would hold ten gallons of coffee. ## -- Steve VanDevender ---end I need that patch so that the bottom lines (the quote) aren't appended into the org file after remember. I was just saying that, if more people use something like this *and* it doesn't mess up for people who don't, the patch could be added to org. My question is: how did this extra commend get into the remember buffer in the first place? Why is it there? just for fun? - Carsten -hugo On Jan 15, 2008 7:55 AM, Carsten Dominik [EMAIL PROTECTED] wrote: Hi Hugo, I am not sure what the purpose of this is. The ## stuff at the beginning is stuff to remind the user on how to proceed further. What is the idea of Sacha you are referring to? What is the use case? Thanks. On Jan 14, 2008, at 8:45 PM, Hugo Schmitt wrote: Hi folks! I'm sending this as a suggestion. Right now the function 'org-remember-handler' removes the lines on the beginning of the buffer that start with ## (the ones explaining usage, shortcuts, etc) Yesterday i was trying out sachac's idea of putting quotes into remember (on the bottom), but the text that went there was being added to the todo.org with the actual todo. W/ the fix org also removes the lines on the end that begin with '##'. Cheers, -Hugo org.el.patch___ 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
[Orgmode] [Org+] org-elisp-symbol.el
I'm reposting to the list because Bastien's mail bounced. --- Hi Bastien. I've been using this package daily, thank you very much. I had a problem today with evaluated functions without docstring. They 'fall' on the code below because functionp is t for them: ((functionp sym-name) (documentation sym-name)) but documentation returns nil for those, so i get an error. For now i'm using the ugly fix: ((functionp sym-name) (or (documentation sym-name) no documentation (2))) Regards, Hugo ___ 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] Can you automatically open a branch on load?
Hello. Something like this already works fine for me: (add-hook 'org-mode-hook 'my-open-some-branch) (defun my-open-some-branch () Start org file with some particular branch opened. (org-overview) (save-excursion (search-forward Finances) (org-show-entry))) You can easily write a couple more lines so that the branch that will be opened is configured on the top of the file itself. HTH, Hugo On Dec 28, 2007 3:10 PM, Eddward DeVilla [EMAIL PROTECTED] wrote: I'm sure that you could write a function that you could call from an org-mode hook to do an occur or something like that. Unfortunately, I don't use org-occur much and the hook I think you need is in my .emacs at work. Given the right org-mode search function and the name of the hook, I think it should be easy to do. If someone doesn't beat me to it, I'll try and get you a better answer when I return to work or when I'm feel a little better and can do some digging. Edd On Dec 27, 2007 8:42 AM, [EMAIL PROTECTED] wrote: Is there an easy way to have a specific branch in your file open when you load the file? ___ 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 ___ 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