emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Don't create marker if target is entire file.
Date: Tue, 6 Jul 2010 09:01:16 +0200	[thread overview]
Message-ID: <247582F3-920B-46B9-8459-5DA39890CBCF@gmail.com> (raw)
In-Reply-To: <1278358114-1212-1-git-send-email-dmaus@ictsoc.de>

Applied, thanks.

I am really enjoying how things get resolved now
without me interacting, and all I need to do is to apply
a patch.

Thanks to all who contributed in this thread and in others!

- Carsten

On Jul 5, 2010, at 9:28 PM, David Maus wrote:

> * org-agenda.el (org-agenda-bulk-action): Don't create marker for
> position if target is entire file.
>
> If the target of a bulk refile operation is the entire file,
> `org-refile-get-location' returns nil for the refile position.
> Creating a marker for the target file's buffer at position nil returns
> a marker that points nowhere (Cf. GNU Emacs Lisp Reference Manual,
> 31.6).  `org-refile' adds headings to level 1 if the target position
> for the target file is nil -- and hence a marker that points nowhere
> is not nil, tries to jump to nowhere.
> ---
> lisp/org-agenda.el |   11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 4345f06..1fe4639 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -7489,11 +7489,12 @@ The prefix arg is passed through to the  
> command if possible."
> 		   "Refile to: "
> 		   (marker-buffer (car org-agenda-bulk-marked-entries))
> 		   org-refile-allow-creating-parent-nodes))
> -      (setcar (nthcdr 3 rfloc)
> -	      (move-marker (make-marker) (nth 3 rfloc)
> -			   (or (get-file-buffer (nth 1 rfloc))
> -			       (find-buffer-visiting (nth 1 rfloc))
> -			       (error "This should not happen"))))
> +      (if (nth 3 rfloc)
> +	  (setcar (nthcdr 3 rfloc)
> +		  (move-marker (make-marker) (nth 3 rfloc)
> +			       (or (get-file-buffer (nth 1 rfloc))
> +				   (find-buffer-visiting (nth 1 rfloc))
> +				   (error "This should not happen")))))
>
>       (setq cmd (list 'org-agenda-refile nil (list 'quote rfloc) t)
> 	    redo-at-end t))
> -- 
> 1.7.1
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

      parent reply	other threads:[~2010-07-06  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-04  8:55 Bug: Error when bulk-refile and org-refile-use-outline-path is 'file [6.36trans] David Maus
2010-07-05 19:28 ` [PATCH] Don't create marker if target is entire file David Maus
2010-07-06  6:17   ` Noorul Islam K M
2010-07-06  6:25     ` David Maus
2010-07-06  7:01   ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=247582F3-920B-46B9-8459-5DA39890CBCF@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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