custom sort

Setting sort by > “custom sort” presents images in any sequence you define. Images are initally ordered by an image property (import order, image capture time, file name, etc.) but you can then incrementally alter “custom sort” sequences by drag-and-drop. Be careful: an erroneous drag-and-drop can easily ruin one or more painstakingly-created image sequences.

🔗cautions

  • “Undo” does not reverse drag-and-drop resequencing.

  • Drag-and-drop resequencing is always enabled in lighttable filemanager and in the filmstrip, but any resulting changes are invisible if sort by > “custom sort” is not in effect.

  • Do not use “custom sort” for tag-based collections that specify a wild-card ("*" or “%”) expression.1

  • Ensure any image you drag is not selected unless you want to reposition the entire currently selected set.

  • Aim your “drops” accurately: verify the correct target is highlighted before dropping!

  • “custom sort” positions are lost if images are removed from darktable or their tags are detached or deleted (why?).

🔗which custom sort sequence?

Collection type determines which image sequence drag-and-drop changes. If the collection’s selection criterion is tag, a tag-based “custom sort” sequence is altered. Otherwise, the global “custom sort” sequence is altered. Collection filters (even if tag-based) do not influence which sequence drag-and-drop changes.

When sort by > “custom sort” is in effect, dragged-and-dropped images are immediately presented in their new tag-based or global “custom sort” sequence.

🔗what to drag, where to drop?

While viewing a collection in filemanager or the filmstrip, you may drag any hovered-over (highlighted) image to any other image in the displayed collection. Empty space before, between, or after images is not a recognized drop target.

You may relocate a single image (unselected or sole selection) or a selected set of images by dragging one of them to the desired position as follows:

  • Drop on the image you want a dragged image or selected set to precede when sort order is “ascending”.

  • Drop on the image you want a dragged image or selected set to follow when sort order is “descending”.

  • Abort an accidental drag by dropping the dragged image outside of the thumbnail display. If all peripheral panels are hidden, then drop the dragged image on itself. If multiple images were selected, the entire selected set will be relocated to that spot.

  • If the “dropped on” image is subsequently resequenced, filtered out, or even deleted, the dropped image(s) remain where the “dropped on” image was located.

🔗who’s last? (or, in descending sort, first?)

  • An image dropped after the last image on lighttable is regarded as dropped on the last image, thus positioned before it.

  • To change the last image in an “ascending” “custom sort” display, drop it on the existing last image, then drag-and-drop that last image on its intended replacement.

  • If you expect to use a “descending” sort, do the opposite to change the first image.

🔗suggested process

  1. If you intend to present a collection in more than one “custom sort” sequence or if some images in a collection are included in other collections to be displayed with a different global “custom sort”, then tag-based collections should be used.

  2. For tag-based “custom sort” only:

  • Set sort by to the image attribute and sort order (ascending or descending) you want as your tag’s initial sequence,
  • Select the images to be sequenced, and
  • in the right-hand panel at tagging, bottom half, add a new tag or click on an existing tag.
  • The tag is now attached to the selected images in the displayed sequence. Note the tag’s increased image count.
  • Change collections selection crierion to “tag” and choose the newly-applied tag. Note that the newly-tagged images are shown.
  1. Long-distance drags are difficult because neither filemanager nor filmstrip scroll while you drag. Try to fit drag sources and targets onto the same screen by maximizing the the window and scrolling the display. If that’s not sufficient:
  • increase the number of images displayed (thus shrinking thumbnails) or
  • hide images between drag source and drop target using collection filters (e.g., by ranges of “datetime captured” or “image id”).
  1. Rearrange the images as you desire:
  • Clear any active selection: selection > select none.
  • Set sort by > “custom sort” so you can verify your changes immediately.
  • Remember the cautions above as you drag-and-drop.

  1. When a wild-card tag expression does not resolve to a single tag, then drag-and-drop operates on only the first matching tag’s sequence. If that tag is attached to a source image, the image is resequenced. If the same tag is also attached to the target image, the drop occurs there; if not, resequenced images appear at the collection’s “custom sort” tail or head. If the first matching tag is not attached to a source image, the image is not repositioned. Collections preference “tag case sensitivity” is relevant beyond case: “insensitive” treats “%” (but not “*”) as a string-match wild card. The global sequence is not affected in any of these cases. ↩︎